@joeyshi12/casper 0.17.0 → 0.17.2

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 (71) hide show
  1. package/README.md +1 -1
  2. package/dist/mcp.js +1 -1
  3. package/dist/server.js +3 -3
  4. package/dist/web/assets/{abnfDiagram-N423BO3Z-Bo2zpD_r.js → abnfDiagram-N423BO3Z-bHwUeFHJ.js} +1 -1
  5. package/dist/web/assets/{arc-eMfj-v5r.js → arc-BAVTuTuF.js} +1 -1
  6. package/dist/web/assets/{architectureDiagram-T3A2C74G-SMny_PQB.js → architectureDiagram-T3A2C74G-YjvbdN71.js} +1 -1
  7. package/dist/web/assets/{blockDiagram-VBNYF7ZC-DSEqDPwv.js → blockDiagram-VBNYF7ZC-RWWwNHHC.js} +1 -1
  8. package/dist/web/assets/{c4Diagram-5PPSVZJV-CpqtaVod.js → c4Diagram-5PPSVZJV-C1zV120G.js} +1 -1
  9. package/dist/web/assets/channel-CKEyAy2P.js +1 -0
  10. package/dist/web/assets/{chunk-2GRJ4B5K-AuFfmAbN.js → chunk-2GRJ4B5K-CEqFP859.js} +1 -1
  11. package/dist/web/assets/{chunk-2Q5K7J3B-iOn5T_gD.js → chunk-2Q5K7J3B-C2UlO6_0.js} +1 -1
  12. package/dist/web/assets/{chunk-5RXB4S5H-4T8n_Vjj.js → chunk-5RXB4S5H-DL6RHJbM.js} +1 -1
  13. package/dist/web/assets/{chunk-5VM5RSS4-BXZGGB8b.js → chunk-5VM5RSS4-Dpsp5fW1.js} +1 -1
  14. package/dist/web/assets/{chunk-6Q2QTUOP-CaHKdpZm.js → chunk-6Q2QTUOP-BwwdwV-3.js} +1 -1
  15. package/dist/web/assets/{chunk-GF5L2VYU-JzGg4vgu.js → chunk-GF5L2VYU-E3M_Jz0M.js} +1 -1
  16. package/dist/web/assets/{chunk-JWPE2WC7-CsXwzKxD.js → chunk-JWPE2WC7-mO769nNh.js} +1 -1
  17. package/dist/web/assets/{chunk-KBJHAD2P-4iRbBEYU.js → chunk-KBJHAD2P-CaRhnQt6.js} +1 -1
  18. package/dist/web/assets/{chunk-RYQCIY6F-D-VbfyMB.js → chunk-RYQCIY6F-4c7Rb-QM.js} +1 -1
  19. package/dist/web/assets/{chunk-XXDRQBXY-CeFbm4g1.js → chunk-XXDRQBXY-D4p0n8Rg.js} +1 -1
  20. package/dist/web/assets/classDiagram-JCYQIIEL-DeNYENJd.js +1 -0
  21. package/dist/web/assets/classDiagram-v2-OCEON4UE-DeNYENJd.js +1 -0
  22. package/dist/web/assets/{cose-bilkent-JH36ORCC-CYNfxa8A.js → cose-bilkent-JH36ORCC-DLfSQ4vZ.js} +1 -1
  23. package/dist/web/assets/{cynefin-VYW2F7L2-rvO1KlAd.js → cynefin-VYW2F7L2-Bwbs8GPE.js} +1 -1
  24. package/dist/web/assets/{cynefinDiagram-MW4NZA55-DvzcG3NL.js → cynefinDiagram-MW4NZA55-9KVeRUVY.js} +1 -1
  25. package/dist/web/assets/{dagre-VZM6K2ZE-BgutGA8k.js → dagre-VZM6K2ZE-yTYV6TCD.js} +1 -1
  26. package/dist/web/assets/{diagram-7IWD3JNH-BoLPEgBs.js → diagram-7IWD3JNH-C85r6FRA.js} +1 -1
  27. package/dist/web/assets/{diagram-B4RE2ZJO-BaaHgQLy.js → diagram-B4RE2ZJO-xD3r4NSp.js} +1 -1
  28. package/dist/web/assets/{diagram-LBJQPF4R-Bc7jkgiW.js → diagram-LBJQPF4R-CGssGp8o.js} +1 -1
  29. package/dist/web/assets/{diagram-Q27KOJAE-p311g83v.js → diagram-Q27KOJAE-BwuulMmi.js} +1 -1
  30. package/dist/web/assets/{diagram-UB23O5K3-ALwvcWzK.js → diagram-UB23O5K3-C9bXIc7b.js} +1 -1
  31. package/dist/web/assets/{ebnfDiagram-BXEA7PRR-DveTtKRe.js → ebnfDiagram-BXEA7PRR-Bov-tTQo.js} +1 -1
  32. package/dist/web/assets/{erDiagram-JOGREHBK-D3kM5uf0.js → erDiagram-JOGREHBK-BWABF10j.js} +1 -1
  33. package/dist/web/assets/{flowDiagram-UKHOOZJN-h_YgCdts.js → flowDiagram-UKHOOZJN-7ClxSgWN.js} +1 -1
  34. package/dist/web/assets/{ganttDiagram-PKOTCBZU-DpMVjZz3.js → ganttDiagram-PKOTCBZU-B_mq6Rgf.js} +1 -1
  35. package/dist/web/assets/{gitGraphDiagram-DS77QQ5N-OJ0-BsVV.js → gitGraphDiagram-DS77QQ5N-DR5WT9-F.js} +1 -1
  36. package/dist/web/assets/{index-DHJZ0QFt.js → index-9KBtl1l6.js} +1 -1
  37. package/dist/web/assets/index-C3SV3SAS.css +1 -0
  38. package/dist/web/assets/index-Cud9MRAb.js +245 -0
  39. package/dist/web/assets/{infoDiagram-6WML65LV-C3dDMfD2.js → infoDiagram-6WML65LV-CDNGRrnf.js} +1 -1
  40. package/dist/web/assets/{ishikawaDiagram-WSZJBQD7-QSccwWZc.js → ishikawaDiagram-WSZJBQD7-C41smMdp.js} +1 -1
  41. package/dist/web/assets/{journeyDiagram-NVQOT4AX-BBse3ziF.js → journeyDiagram-NVQOT4AX-KT6oCUJ5.js} +1 -1
  42. package/dist/web/assets/{kanban-definition-27J2QSJJ-DrbZwvww.js → kanban-definition-27J2QSJJ-sM2fD4Xu.js} +1 -1
  43. package/dist/web/assets/{linear-DSPm6cs7.js → linear-Bay11IOz.js} +1 -1
  44. package/dist/web/assets/{mermaid.core-DXBmt4hx.js → mermaid.core-BeGqsnDU.js} +4 -4
  45. package/dist/web/assets/{mindmap-definition-FAOFIHXS-DnF7VGZ2.js → mindmap-definition-FAOFIHXS-Bn6JQOvp.js} +1 -1
  46. package/dist/web/assets/{pegDiagram-VL7TDLO6-DU79M4ax.js → pegDiagram-VL7TDLO6-BxTNx4vz.js} +1 -1
  47. package/dist/web/assets/{pieDiagram-7S7Q4E2Y-D_kGXiwY.js → pieDiagram-7S7Q4E2Y-BHEZCYQr.js} +1 -1
  48. package/dist/web/assets/{quadrantDiagram-CIZ2JOQS-Sy59mKJK.js → quadrantDiagram-CIZ2JOQS-C_AfgYPZ.js} +1 -1
  49. package/dist/web/assets/{railroadDiagram-AXF67PYL-i-7HN_g3.js → railroadDiagram-AXF67PYL-DPNEgewd.js} +1 -1
  50. package/dist/web/assets/{requirementDiagram-LRYGKXZP-MbXlWZ5N.js → requirementDiagram-LRYGKXZP-dN3RijdY.js} +1 -1
  51. package/dist/web/assets/{sankeyDiagram-W5VNT64P-BhU2pRtd.js → sankeyDiagram-W5VNT64P-BXhuHUjn.js} +1 -1
  52. package/dist/web/assets/{sequenceDiagram-SI44F4Z6-ju70uzxa.js → sequenceDiagram-SI44F4Z6-D5iYwkNV.js} +1 -1
  53. package/dist/web/assets/{sizeCapture-X5ZJPWSS-Oy3UrbXL.js → sizeCapture-X5ZJPWSS-CCQ7xCkP.js} +1 -1
  54. package/dist/web/assets/{stateDiagram-OKZ733FA-DzSL7BOW.js → stateDiagram-OKZ733FA-B32JkGFV.js} +1 -1
  55. package/dist/web/assets/stateDiagram-v2-UEYNNEHI-DYY90LQN.js +1 -0
  56. package/dist/web/assets/{swimlanes-SLNWSIFB-a_3Pai9c.js → swimlanes-SLNWSIFB-BCSvuYY1.js} +2 -2
  57. package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-qUtVKRu1.js +8 -0
  58. package/dist/web/assets/{timeline-definition-Z64GVDOM-CdYiXKKc.js → timeline-definition-Z64GVDOM-D62J85OE.js} +1 -1
  59. package/dist/web/assets/{vennDiagram-T6HMQDX7-CNquHYyi.js → vennDiagram-T6HMQDX7-CB5wbHu4.js} +1 -1
  60. package/dist/web/assets/{wardleyDiagram-T6FBY63Y-D-dCSbF5.js → wardleyDiagram-T6FBY63Y-Dxu_Lh2t.js} +1 -1
  61. package/dist/web/assets/{xychartDiagram-ELKLHX3M-BZCQNI1R.js → xychartDiagram-ELKLHX3M-DzXkICWz.js} +1 -1
  62. package/dist/web/index.html +2 -2
  63. package/dist/web/sw.js +1 -1
  64. package/package.json +1 -1
  65. package/dist/web/assets/channel-BsxsiUCc.js +0 -1
  66. package/dist/web/assets/classDiagram-JCYQIIEL-CRUWBeef.js +0 -1
  67. package/dist/web/assets/classDiagram-v2-OCEON4UE-CRUWBeef.js +0 -1
  68. package/dist/web/assets/index-BYjBvJ2T.css +0 -1
  69. package/dist/web/assets/index-C0MiltSe.js +0 -245
  70. package/dist/web/assets/stateDiagram-v2-UEYNNEHI-TGjHDp18.js +0 -1
  71. package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-Dq3BU0bp.js +0 -8
@@ -0,0 +1,245 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-9KBtl1l6.js","assets/katex-C5jXJg4s.js","assets/katex-BYZTj3zW.css"])))=>i.map(i=>d[i]);
2
+ var Iy=Object.defineProperty;var Ly=(e,t,n)=>t in e?Iy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Oe=(e,t,n)=>Ly(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const u of a)if(u.type==="childList")for(const l of u.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const u={};return a.integrity&&(u.integrity=a.integrity),a.referrerPolicy&&(u.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?u.credentials="include":a.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(a){if(a.ep)return;a.ep=!0;const u=n(a);fetch(a.href,u)}})();function pd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nc={exports:{}},Ls={},rc={exports:{}},Me={};/**
3
+ * @license React
4
+ * react.production.min.js
5
+ *
6
+ * Copyright (c) Facebook, Inc. and its affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var Bp;function Ry(){if(Bp)return Me;Bp=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),E=Symbol.iterator;function x(P){return P===null||typeof P!="object"?null:(P=E&&P[E]||P["@@iterator"],typeof P=="function"?P:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,v={};function D(P,G,L){this.props=P,this.context=G,this.refs=v,this.updater=L||b}D.prototype.isReactComponent={},D.prototype.setState=function(P,G){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,G,"setState")},D.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function A(){}A.prototype=D.prototype;function R(P,G,L){this.props=P,this.context=G,this.refs=v,this.updater=L||b}var U=R.prototype=new A;U.constructor=R,C(U,D.prototype),U.isPureReactComponent=!0;var W=Array.isArray,q=Object.prototype.hasOwnProperty,B={current:null},ae={key:!0,ref:!0,__self:!0,__source:!0};function Z(P,G,L){var we,Re={},_e=null,Ue=null;if(G!=null)for(we in G.ref!==void 0&&(Ue=G.ref),G.key!==void 0&&(_e=""+G.key),G)q.call(G,we)&&!ae.hasOwnProperty(we)&&(Re[we]=G[we]);var De=arguments.length-2;if(De===1)Re.children=L;else if(1<De){for(var fe=Array(De),Se=0;Se<De;Se++)fe[Se]=arguments[Se+2];Re.children=fe}if(P&&P.defaultProps)for(we in De=P.defaultProps,De)Re[we]===void 0&&(Re[we]=De[we]);return{$$typeof:e,type:P,key:_e,ref:Ue,props:Re,_owner:B.current}}function ce(P,G){return{$$typeof:e,type:P.type,key:G,ref:P.ref,props:P.props,_owner:P._owner}}function M(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function me(P){var G={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(L){return G[L]})}var V=/\/+/g;function pe(P,G){return typeof P=="object"&&P!==null&&P.key!=null?me(""+P.key):G.toString(36)}function de(P,G,L,we,Re){var _e=typeof P;(_e==="undefined"||_e==="boolean")&&(P=null);var Ue=!1;if(P===null)Ue=!0;else switch(_e){case"string":case"number":Ue=!0;break;case"object":switch(P.$$typeof){case e:case t:Ue=!0}}if(Ue)return Ue=P,Re=Re(Ue),P=we===""?"."+pe(Ue,0):we,W(Re)?(L="",P!=null&&(L=P.replace(V,"$&/")+"/"),de(Re,G,L,"",function(Se){return Se})):Re!=null&&(M(Re)&&(Re=ce(Re,L+(!Re.key||Ue&&Ue.key===Re.key?"":(""+Re.key).replace(V,"$&/")+"/")+P)),G.push(Re)),1;if(Ue=0,we=we===""?".":we+":",W(P))for(var De=0;De<P.length;De++){_e=P[De];var fe=we+pe(_e,De);Ue+=de(_e,G,L,fe,Re)}else if(fe=x(P),typeof fe=="function")for(P=fe.call(P),De=0;!(_e=P.next()).done;)_e=_e.value,fe=we+pe(_e,De++),Ue+=de(_e,G,L,fe,Re);else if(_e==="object")throw G=String(P),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.");return Ue}function ee(P,G,L){if(P==null)return P;var we=[],Re=0;return de(P,we,"","",function(_e){return G.call(L,_e,Re++)}),we}function K(P){if(P._status===-1){var G=P._result;G=G(),G.then(function(L){(P._status===0||P._status===-1)&&(P._status=1,P._result=L)},function(L){(P._status===0||P._status===-1)&&(P._status=2,P._result=L)}),P._status===-1&&(P._status=0,P._result=G)}if(P._status===1)return P._result.default;throw P._result}var Te={current:null},J={transition:null},le={ReactCurrentDispatcher:Te,ReactCurrentBatchConfig:J,ReactCurrentOwner:B};function S(){throw Error("act(...) is not supported in production builds of React.")}return Me.Children={map:ee,forEach:function(P,G,L){ee(P,function(){G.apply(this,arguments)},L)},count:function(P){var G=0;return ee(P,function(){G++}),G},toArray:function(P){return ee(P,function(G){return G})||[]},only:function(P){if(!M(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},Me.Component=D,Me.Fragment=n,Me.Profiler=a,Me.PureComponent=R,Me.StrictMode=i,Me.Suspense=f,Me.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=le,Me.act=S,Me.cloneElement=function(P,G,L){if(P==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+P+".");var we=C({},P.props),Re=P.key,_e=P.ref,Ue=P._owner;if(G!=null){if(G.ref!==void 0&&(_e=G.ref,Ue=B.current),G.key!==void 0&&(Re=""+G.key),P.type&&P.type.defaultProps)var De=P.type.defaultProps;for(fe in G)q.call(G,fe)&&!ae.hasOwnProperty(fe)&&(we[fe]=G[fe]===void 0&&De!==void 0?De[fe]:G[fe])}var fe=arguments.length-2;if(fe===1)we.children=L;else if(1<fe){De=Array(fe);for(var Se=0;Se<fe;Se++)De[Se]=arguments[Se+2];we.children=De}return{$$typeof:e,type:P.type,key:Re,ref:_e,props:we,_owner:Ue}},Me.createContext=function(P){return P={$$typeof:l,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},P.Provider={$$typeof:u,_context:P},P.Consumer=P},Me.createElement=Z,Me.createFactory=function(P){var G=Z.bind(null,P);return G.type=P,G},Me.createRef=function(){return{current:null}},Me.forwardRef=function(P){return{$$typeof:c,render:P}},Me.isValidElement=M,Me.lazy=function(P){return{$$typeof:T,_payload:{_status:-1,_result:P},_init:K}},Me.memo=function(P,G){return{$$typeof:p,type:P,compare:G===void 0?null:G}},Me.startTransition=function(P){var G=J.transition;J.transition={};try{P()}finally{J.transition=G}},Me.unstable_act=S,Me.useCallback=function(P,G){return Te.current.useCallback(P,G)},Me.useContext=function(P){return Te.current.useContext(P)},Me.useDebugValue=function(){},Me.useDeferredValue=function(P){return Te.current.useDeferredValue(P)},Me.useEffect=function(P,G){return Te.current.useEffect(P,G)},Me.useId=function(){return Te.current.useId()},Me.useImperativeHandle=function(P,G,L){return Te.current.useImperativeHandle(P,G,L)},Me.useInsertionEffect=function(P,G){return Te.current.useInsertionEffect(P,G)},Me.useLayoutEffect=function(P,G){return Te.current.useLayoutEffect(P,G)},Me.useMemo=function(P,G){return Te.current.useMemo(P,G)},Me.useReducer=function(P,G,L){return Te.current.useReducer(P,G,L)},Me.useRef=function(P){return Te.current.useRef(P)},Me.useState=function(P){return Te.current.useState(P)},Me.useSyncExternalStore=function(P,G,L){return Te.current.useSyncExternalStore(P,G,L)},Me.useTransition=function(){return Te.current.useTransition()},Me.version="18.3.1",Me}var Up;function md(){return Up||(Up=1,rc.exports=Ry()),rc.exports}/**
11
+ * @license React
12
+ * react-jsx-runtime.production.min.js
13
+ *
14
+ * Copyright (c) Facebook, Inc. and its affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var Hp;function Oy(){if(Hp)return Ls;Hp=1;var e=md(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function l(c,f,p){var T,E={},x=null,b=null;p!==void 0&&(x=""+p),f.key!==void 0&&(x=""+f.key),f.ref!==void 0&&(b=f.ref);for(T in f)i.call(f,T)&&!u.hasOwnProperty(T)&&(E[T]=f[T]);if(c&&c.defaultProps)for(T in f=c.defaultProps,f)E[T]===void 0&&(E[T]=f[T]);return{$$typeof:t,type:c,key:x,ref:b,props:E,_owner:a.current}}return Ls.Fragment=n,Ls.jsx=l,Ls.jsxs=l,Ls}var zp;function Dy(){return zp||(zp=1,nc.exports=Oy()),nc.exports}var h=Dy(),_=md();const Us=pd(_);var _u={},ic={exports:{}},Bt={},sc={exports:{}},ac={};/**
19
+ * @license React
20
+ * scheduler.production.min.js
21
+ *
22
+ * Copyright (c) Facebook, Inc. and its affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var $p;function Py(){return $p||($p=1,(function(e){function t(J,le){var S=J.length;J.push(le);e:for(;0<S;){var P=S-1>>>1,G=J[P];if(0<a(G,le))J[P]=le,J[S]=G,S=P;else break e}}function n(J){return J.length===0?null:J[0]}function i(J){if(J.length===0)return null;var le=J[0],S=J.pop();if(S!==le){J[0]=S;e:for(var P=0,G=J.length,L=G>>>1;P<L;){var we=2*(P+1)-1,Re=J[we],_e=we+1,Ue=J[_e];if(0>a(Re,S))_e<G&&0>a(Ue,Re)?(J[P]=Ue,J[_e]=S,P=_e):(J[P]=Re,J[we]=S,P=we);else if(_e<G&&0>a(Ue,S))J[P]=Ue,J[_e]=S,P=_e;else break e}}return le}function a(J,le){var S=J.sortIndex-le.sortIndex;return S!==0?S:J.id-le.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var f=[],p=[],T=1,E=null,x=3,b=!1,C=!1,v=!1,D=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function U(J){for(var le=n(p);le!==null;){if(le.callback===null)i(p);else if(le.startTime<=J)i(p),le.sortIndex=le.expirationTime,t(f,le);else break;le=n(p)}}function W(J){if(v=!1,U(J),!C)if(n(f)!==null)C=!0,K(q);else{var le=n(p);le!==null&&Te(W,le.startTime-J)}}function q(J,le){C=!1,v&&(v=!1,A(Z),Z=-1),b=!0;var S=x;try{for(U(le),E=n(f);E!==null&&(!(E.expirationTime>le)||J&&!me());){var P=E.callback;if(typeof P=="function"){E.callback=null,x=E.priorityLevel;var G=P(E.expirationTime<=le);le=e.unstable_now(),typeof G=="function"?E.callback=G:E===n(f)&&i(f),U(le)}else i(f);E=n(f)}if(E!==null)var L=!0;else{var we=n(p);we!==null&&Te(W,we.startTime-le),L=!1}return L}finally{E=null,x=S,b=!1}}var B=!1,ae=null,Z=-1,ce=5,M=-1;function me(){return!(e.unstable_now()-M<ce)}function V(){if(ae!==null){var J=e.unstable_now();M=J;var le=!0;try{le=ae(!0,J)}finally{le?pe():(B=!1,ae=null)}}else B=!1}var pe;if(typeof R=="function")pe=function(){R(V)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,ee=de.port2;de.port1.onmessage=V,pe=function(){ee.postMessage(null)}}else pe=function(){D(V,0)};function K(J){ae=J,B||(B=!0,pe())}function Te(J,le){Z=D(function(){J(e.unstable_now())},le)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(J){J.callback=null},e.unstable_continueExecution=function(){C||b||(C=!0,K(q))},e.unstable_forceFrameRate=function(J){0>J||125<J?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ce=0<J?Math.floor(1e3/J):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(J){switch(x){case 1:case 2:case 3:var le=3;break;default:le=x}var S=x;x=le;try{return J()}finally{x=S}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(J,le){switch(J){case 1:case 2:case 3:case 4:case 5:break;default:J=3}var S=x;x=J;try{return le()}finally{x=S}},e.unstable_scheduleCallback=function(J,le,S){var P=e.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?P+S:P):S=P,J){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=S+G,J={id:T++,callback:le,priorityLevel:J,startTime:S,expirationTime:G,sortIndex:-1},S>P?(J.sortIndex=S,t(p,J),n(f)===null&&J===n(p)&&(v?(A(Z),Z=-1):v=!0,Te(W,S-P))):(J.sortIndex=G,t(f,J),C||b||(C=!0,K(q))),J},e.unstable_shouldYield=me,e.unstable_wrapCallback=function(J){var le=x;return function(){var S=x;x=le;try{return J.apply(this,arguments)}finally{x=S}}}})(ac)),ac}var Wp;function My(){return Wp||(Wp=1,sc.exports=Py()),sc.exports}/**
27
+ * @license React
28
+ * react-dom.production.min.js
29
+ *
30
+ * Copyright (c) Facebook, Inc. and its affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var Yp;function Fy(){if(Yp)return Bt;Yp=1;var e=md(),t=My();function n(r){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+r,o=1;o<arguments.length;o++)s+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,a={};function u(r,s){l(r,s),l(r+"Capture",s)}function l(r,s){for(a[r]=s,r=0;r<s.length;r++)i.add(s[r])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,p=/^[: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]*$/,T={},E={};function x(r){return f.call(E,r)?!0:f.call(T,r)?!1:p.test(r)?E[r]=!0:(T[r]=!0,!1)}function b(r,s,o,d){if(o!==null&&o.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return d?!1:o!==null?!o.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function C(r,s,o,d){if(s===null||typeof s>"u"||b(r,s,o,d))return!0;if(d)return!1;if(o!==null)switch(o.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function v(r,s,o,d,g,y,k){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=d,this.attributeNamespace=g,this.mustUseProperty=o,this.propertyName=r,this.type=s,this.sanitizeURL=y,this.removeEmptyString=k}var D={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){D[r]=new v(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var s=r[0];D[s]=new v(s,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){D[r]=new v(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){D[r]=new v(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){D[r]=new v(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){D[r]=new v(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){D[r]=new v(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){D[r]=new v(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){D[r]=new v(r,5,!1,r.toLowerCase(),null,!1,!1)});var A=/[\-:]([a-z])/g;function R(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var s=r.replace(A,R);D[s]=new v(s,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var s=r.replace(A,R);D[s]=new v(s,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var s=r.replace(A,R);D[s]=new v(s,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){D[r]=new v(r,1,!1,r.toLowerCase(),null,!1,!1)}),D.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){D[r]=new v(r,1,!1,r.toLowerCase(),null,!0,!0)});function U(r,s,o,d){var g=D.hasOwnProperty(s)?D[s]:null;(g!==null?g.type!==0:d||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(C(s,o,g,d)&&(o=null),d||g===null?x(s)&&(o===null?r.removeAttribute(s):r.setAttribute(s,""+o)):g.mustUseProperty?r[g.propertyName]=o===null?g.type===3?!1:"":o:(s=g.attributeName,d=g.attributeNamespace,o===null?r.removeAttribute(s):(g=g.type,o=g===3||g===4&&o===!0?"":""+o,d?r.setAttributeNS(d,s,o):r.setAttribute(s,o))))}var W=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,q=Symbol.for("react.element"),B=Symbol.for("react.portal"),ae=Symbol.for("react.fragment"),Z=Symbol.for("react.strict_mode"),ce=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),me=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),pe=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),ee=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),Te=Symbol.for("react.offscreen"),J=Symbol.iterator;function le(r){return r===null||typeof r!="object"?null:(r=J&&r[J]||r["@@iterator"],typeof r=="function"?r:null)}var S=Object.assign,P;function G(r){if(P===void 0)try{throw Error()}catch(o){var s=o.stack.trim().match(/\n( *(at )?)/);P=s&&s[1]||""}return`
35
+ `+P+r}var L=!1;function we(r,s){if(!r||L)return"";L=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(Y){var d=Y}Reflect.construct(r,[],s)}else{try{s.call()}catch(Y){d=Y}r.call(s.prototype)}else{try{throw Error()}catch(Y){d=Y}r()}}catch(Y){if(Y&&d&&typeof Y.stack=="string"){for(var g=Y.stack.split(`
36
+ `),y=d.stack.split(`
37
+ `),k=g.length-1,I=y.length-1;1<=k&&0<=I&&g[k]!==y[I];)I--;for(;1<=k&&0<=I;k--,I--)if(g[k]!==y[I]){if(k!==1||I!==1)do if(k--,I--,0>I||g[k]!==y[I]){var F=`
38
+ `+g[k].replace(" at new "," at ");return r.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",r.displayName)),F}while(1<=k&&0<=I);break}}}finally{L=!1,Error.prepareStackTrace=o}return(r=r?r.displayName||r.name:"")?G(r):""}function Re(r){switch(r.tag){case 5:return G(r.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return r=we(r.type,!1),r;case 11:return r=we(r.type.render,!1),r;case 1:return r=we(r.type,!0),r;default:return""}}function _e(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case ae:return"Fragment";case B:return"Portal";case ce:return"Profiler";case Z:return"StrictMode";case pe:return"Suspense";case de:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case me:return(r.displayName||"Context")+".Consumer";case M:return(r._context.displayName||"Context")+".Provider";case V:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case ee:return s=r.displayName||null,s!==null?s:_e(r.type)||"Memo";case K:s=r._payload,r=r._init;try{return _e(r(s))}catch{}}return null}function Ue(r){var s=r.type;switch(r.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=s.render,r=r.displayName||r.name||"",s.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _e(s);case 8:return s===Z?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function De(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function fe(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Se(r){var s=fe(r)?"checked":"value",o=Object.getOwnPropertyDescriptor(r.constructor.prototype,s),d=""+r[s];if(!r.hasOwnProperty(s)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var g=o.get,y=o.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return g.call(this)},set:function(k){d=""+k,y.call(this,k)}}),Object.defineProperty(r,s,{enumerable:o.enumerable}),{getValue:function(){return d},setValue:function(k){d=""+k},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function rt(r){r._valueTracker||(r._valueTracker=Se(r))}function Nr(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var o=s.getValue(),d="";return r&&(d=fe(r)?r.checked?"true":"false":r.value),r=d,r!==o?(s.setValue(r),!0):!1}function ri(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function Yi(r,s){var o=s.checked;return S({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??r._wrapperState.initialChecked})}function Vi(r,s){var o=s.defaultValue==null?"":s.defaultValue,d=s.checked!=null?s.checked:s.defaultChecked;o=De(s.value!=null?s.value:o),r._wrapperState={initialChecked:d,initialValue:o,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function qi(r,s){s=s.checked,s!=null&&U(r,"checked",s,!1)}function ii(r,s){qi(r,s);var o=De(s.value),d=s.type;if(o!=null)d==="number"?(o===0&&r.value===""||r.value!=o)&&(r.value=""+o):r.value!==""+o&&(r.value=""+o);else if(d==="submit"||d==="reset"){r.removeAttribute("value");return}s.hasOwnProperty("value")?si(r,s.type,o):s.hasOwnProperty("defaultValue")&&si(r,s.type,De(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(r.defaultChecked=!!s.defaultChecked)}function pa(r,s,o){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var d=s.type;if(!(d!=="submit"&&d!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+r._wrapperState.initialValue,o||s===r.value||(r.value=s),r.defaultValue=s}o=r.name,o!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,o!==""&&(r.name=o)}function si(r,s,o){(s!=="number"||ri(r.ownerDocument)!==r)&&(o==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+o&&(r.defaultValue=""+o))}var qn=Array.isArray;function Qn(r,s,o,d){if(r=r.options,s){s={};for(var g=0;g<o.length;g++)s["$"+o[g]]=!0;for(o=0;o<r.length;o++)g=s.hasOwnProperty("$"+r[o].value),r[o].selected!==g&&(r[o].selected=g),g&&d&&(r[o].defaultSelected=!0)}else{for(o=""+De(o),s=null,g=0;g<r.length;g++){if(r[g].value===o){r[g].selected=!0,d&&(r[g].defaultSelected=!0);return}s!==null||r[g].disabled||(s=r[g])}s!==null&&(s.selected=!0)}}function Qi(r,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return S({},s,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function ma(r,s){var o=s.value;if(o==null){if(o=s.children,s=s.defaultValue,o!=null){if(s!=null)throw Error(n(92));if(qn(o)){if(1<o.length)throw Error(n(93));o=o[0]}s=o}s==null&&(s=""),o=s}r._wrapperState={initialValue:De(o)}}function ga(r,s){var o=De(s.value),d=De(s.defaultValue);o!=null&&(o=""+o,o!==r.value&&(r.value=o),s.defaultValue==null&&r.defaultValue!==o&&(r.defaultValue=o)),d!=null&&(r.defaultValue=""+d)}function Ea(r){var s=r.textContent;s===r._wrapperState.initialValue&&s!==""&&s!==null&&(r.value=s)}function X(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function he(r,s){return r==null||r==="http://www.w3.org/1999/xhtml"?X(s):r==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var Ae,Pe=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,o,d,g){MSApp.execUnsafeLocalFunction(function(){return r(s,o,d,g)})}:r})(function(r,s){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=s;else{for(Ae=Ae||document.createElement("div"),Ae.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Ae.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;s.firstChild;)r.appendChild(s.firstChild)}});function He(r,s){if(s){var o=r.firstChild;if(o&&o===r.lastChild&&o.nodeType===3){o.nodeValue=s;return}}r.textContent=s}var yt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Dn=["Webkit","ms","Moz","O"];Object.keys(yt).forEach(function(r){Dn.forEach(function(s){s=s+r.charAt(0).toUpperCase()+r.substring(1),yt[s]=yt[r]})});function Jt(r,s,o){return s==null||typeof s=="boolean"||s===""?"":o||typeof s!="number"||s===0||yt.hasOwnProperty(r)&&yt[r]?(""+s).trim():s+"px"}function Gn(r,s){r=r.style;for(var o in s)if(s.hasOwnProperty(o)){var d=o.indexOf("--")===0,g=Jt(o,s[o],d);o==="float"&&(o="cssFloat"),d?r.setProperty(o,g):r[o]=g}}var wr=S({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function xt(r,s){if(s){if(wr[r]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Cn(r,s){if(r.indexOf("-")===-1)return typeof s.is=="string";switch(r){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 Wt=null;function Eo(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var To=null,ai=null,ui=null;function tf(r){if(r=gs(r)){if(typeof To!="function")throw Error(n(280));var s=r.stateNode;s&&(s=Ua(s),To(r.stateNode,r.type,s))}}function nf(r){ai?ui?ui.push(r):ui=[r]:ai=r}function rf(){if(ai){var r=ai,s=ui;if(ui=ai=null,tf(r),s)for(r=0;r<s.length;r++)tf(s[r])}}function sf(r,s){return r(s)}function af(){}var yo=!1;function uf(r,s,o){if(yo)return r(s,o);yo=!0;try{return sf(r,s,o)}finally{yo=!1,(ai!==null||ui!==null)&&(af(),rf())}}function Gi(r,s){var o=r.stateNode;if(o===null)return null;var d=Ua(o);if(d===null)return null;o=d[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(o&&typeof o!="function")throw Error(n(231,s,typeof o));return o}var xo=!1;if(c)try{var Ki={};Object.defineProperty(Ki,"passive",{get:function(){xo=!0}}),window.addEventListener("test",Ki,Ki),window.removeEventListener("test",Ki,Ki)}catch{xo=!1}function ME(r,s,o,d,g,y,k,I,F){var Y=Array.prototype.slice.call(arguments,3);try{s.apply(o,Y)}catch(re){this.onError(re)}}var Xi=!1,Ta=null,ya=!1,bo=null,FE={onError:function(r){Xi=!0,Ta=r}};function jE(r,s,o,d,g,y,k,I,F){Xi=!1,Ta=null,ME.apply(FE,arguments)}function BE(r,s,o,d,g,y,k,I,F){if(jE.apply(this,arguments),Xi){if(Xi){var Y=Ta;Xi=!1,Ta=null}else throw Error(n(198));ya||(ya=!0,bo=Y)}}function Ar(r){var s=r,o=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(o=s.return),r=s.return;while(r)}return s.tag===3?o:null}function of(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function lf(r){if(Ar(r)!==r)throw Error(n(188))}function UE(r){var s=r.alternate;if(!s){if(s=Ar(r),s===null)throw Error(n(188));return s!==r?null:r}for(var o=r,d=s;;){var g=o.return;if(g===null)break;var y=g.alternate;if(y===null){if(d=g.return,d!==null){o=d;continue}break}if(g.child===y.child){for(y=g.child;y;){if(y===o)return lf(g),r;if(y===d)return lf(g),s;y=y.sibling}throw Error(n(188))}if(o.return!==d.return)o=g,d=y;else{for(var k=!1,I=g.child;I;){if(I===o){k=!0,o=g,d=y;break}if(I===d){k=!0,d=g,o=y;break}I=I.sibling}if(!k){for(I=y.child;I;){if(I===o){k=!0,o=y,d=g;break}if(I===d){k=!0,d=y,o=g;break}I=I.sibling}if(!k)throw Error(n(189))}}if(o.alternate!==d)throw Error(n(190))}if(o.tag!==3)throw Error(n(188));return o.stateNode.current===o?r:s}function cf(r){return r=UE(r),r!==null?df(r):null}function df(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var s=df(r);if(s!==null)return s;r=r.sibling}return null}var ff=t.unstable_scheduleCallback,hf=t.unstable_cancelCallback,HE=t.unstable_shouldYield,zE=t.unstable_requestPaint,ut=t.unstable_now,$E=t.unstable_getCurrentPriorityLevel,ko=t.unstable_ImmediatePriority,pf=t.unstable_UserBlockingPriority,xa=t.unstable_NormalPriority,WE=t.unstable_LowPriority,mf=t.unstable_IdlePriority,ba=null,Sn=null;function YE(r){if(Sn&&typeof Sn.onCommitFiberRoot=="function")try{Sn.onCommitFiberRoot(ba,r,void 0,(r.current.flags&128)===128)}catch{}}var ln=Math.clz32?Math.clz32:QE,VE=Math.log,qE=Math.LN2;function QE(r){return r>>>=0,r===0?32:31-(VE(r)/qE|0)|0}var ka=64,Ca=4194304;function Ji(r){switch(r&-r){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Sa(r,s){var o=r.pendingLanes;if(o===0)return 0;var d=0,g=r.suspendedLanes,y=r.pingedLanes,k=o&268435455;if(k!==0){var I=k&~g;I!==0?d=Ji(I):(y&=k,y!==0&&(d=Ji(y)))}else k=o&~g,k!==0?d=Ji(k):y!==0&&(d=Ji(y));if(d===0)return 0;if(s!==0&&s!==d&&(s&g)===0&&(g=d&-d,y=s&-s,g>=y||g===16&&(y&4194240)!==0))return s;if((d&4)!==0&&(d|=o&16),s=r.entangledLanes,s!==0)for(r=r.entanglements,s&=d;0<s;)o=31-ln(s),g=1<<o,d|=r[o],s&=~g;return d}function GE(r,s){switch(r){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64: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 s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function KE(r,s){for(var o=r.suspendedLanes,d=r.pingedLanes,g=r.expirationTimes,y=r.pendingLanes;0<y;){var k=31-ln(y),I=1<<k,F=g[k];F===-1?((I&o)===0||(I&d)!==0)&&(g[k]=GE(I,s)):F<=s&&(r.expiredLanes|=I),y&=~I}}function Co(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function gf(){var r=ka;return ka<<=1,(ka&4194240)===0&&(ka=64),r}function So(r){for(var s=[],o=0;31>o;o++)s.push(r);return s}function Zi(r,s,o){r.pendingLanes|=s,s!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,s=31-ln(s),r[s]=o}function XE(r,s){var o=r.pendingLanes&~s;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=s,r.mutableReadLanes&=s,r.entangledLanes&=s,s=r.entanglements;var d=r.eventTimes;for(r=r.expirationTimes;0<o;){var g=31-ln(o),y=1<<g;s[g]=0,d[g]=-1,r[g]=-1,o&=~y}}function _o(r,s){var o=r.entangledLanes|=s;for(r=r.entanglements;o;){var d=31-ln(o),g=1<<d;g&s|r[d]&s&&(r[d]|=s),o&=~g}}var Ye=0;function Ef(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var Tf,vo,yf,xf,bf,No=!1,_a=[],Kn=null,Xn=null,Jn=null,es=new Map,ts=new Map,Zn=[],JE="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 submit".split(" ");function kf(r,s){switch(r){case"focusin":case"focusout":Kn=null;break;case"dragenter":case"dragleave":Xn=null;break;case"mouseover":case"mouseout":Jn=null;break;case"pointerover":case"pointerout":es.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":ts.delete(s.pointerId)}}function ns(r,s,o,d,g,y){return r===null||r.nativeEvent!==y?(r={blockedOn:s,domEventName:o,eventSystemFlags:d,nativeEvent:y,targetContainers:[g]},s!==null&&(s=gs(s),s!==null&&vo(s)),r):(r.eventSystemFlags|=d,s=r.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),r)}function ZE(r,s,o,d,g){switch(s){case"focusin":return Kn=ns(Kn,r,s,o,d,g),!0;case"dragenter":return Xn=ns(Xn,r,s,o,d,g),!0;case"mouseover":return Jn=ns(Jn,r,s,o,d,g),!0;case"pointerover":var y=g.pointerId;return es.set(y,ns(es.get(y)||null,r,s,o,d,g)),!0;case"gotpointercapture":return y=g.pointerId,ts.set(y,ns(ts.get(y)||null,r,s,o,d,g)),!0}return!1}function Cf(r){var s=Ir(r.target);if(s!==null){var o=Ar(s);if(o!==null){if(s=o.tag,s===13){if(s=of(o),s!==null){r.blockedOn=s,bf(r.priority,function(){yf(o)});return}}else if(s===3&&o.stateNode.current.memoizedState.isDehydrated){r.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}r.blockedOn=null}function va(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var o=Ao(r.domEventName,r.eventSystemFlags,s[0],r.nativeEvent);if(o===null){o=r.nativeEvent;var d=new o.constructor(o.type,o);Wt=d,o.target.dispatchEvent(d),Wt=null}else return s=gs(o),s!==null&&vo(s),r.blockedOn=o,!1;s.shift()}return!0}function Sf(r,s,o){va(r)&&o.delete(s)}function eT(){No=!1,Kn!==null&&va(Kn)&&(Kn=null),Xn!==null&&va(Xn)&&(Xn=null),Jn!==null&&va(Jn)&&(Jn=null),es.forEach(Sf),ts.forEach(Sf)}function rs(r,s){r.blockedOn===s&&(r.blockedOn=null,No||(No=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,eT)))}function is(r){function s(g){return rs(g,r)}if(0<_a.length){rs(_a[0],r);for(var o=1;o<_a.length;o++){var d=_a[o];d.blockedOn===r&&(d.blockedOn=null)}}for(Kn!==null&&rs(Kn,r),Xn!==null&&rs(Xn,r),Jn!==null&&rs(Jn,r),es.forEach(s),ts.forEach(s),o=0;o<Zn.length;o++)d=Zn[o],d.blockedOn===r&&(d.blockedOn=null);for(;0<Zn.length&&(o=Zn[0],o.blockedOn===null);)Cf(o),o.blockedOn===null&&Zn.shift()}var oi=W.ReactCurrentBatchConfig,Na=!0;function tT(r,s,o,d){var g=Ye,y=oi.transition;oi.transition=null;try{Ye=1,wo(r,s,o,d)}finally{Ye=g,oi.transition=y}}function nT(r,s,o,d){var g=Ye,y=oi.transition;oi.transition=null;try{Ye=4,wo(r,s,o,d)}finally{Ye=g,oi.transition=y}}function wo(r,s,o,d){if(Na){var g=Ao(r,s,o,d);if(g===null)Vo(r,s,d,wa,o),kf(r,d);else if(ZE(g,r,s,o,d))d.stopPropagation();else if(kf(r,d),s&4&&-1<JE.indexOf(r)){for(;g!==null;){var y=gs(g);if(y!==null&&Tf(y),y=Ao(r,s,o,d),y===null&&Vo(r,s,d,wa,o),y===g)break;g=y}g!==null&&d.stopPropagation()}else Vo(r,s,d,null,o)}}var wa=null;function Ao(r,s,o,d){if(wa=null,r=Eo(d),r=Ir(r),r!==null)if(s=Ar(r),s===null)r=null;else if(o=s.tag,o===13){if(r=of(s),r!==null)return r;r=null}else if(o===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null);return wa=r,null}function _f(r){switch(r){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch($E()){case ko:return 1;case pf:return 4;case xa:case WE:return 16;case mf:return 536870912;default:return 16}default:return 16}}var er=null,Io=null,Aa=null;function vf(){if(Aa)return Aa;var r,s=Io,o=s.length,d,g="value"in er?er.value:er.textContent,y=g.length;for(r=0;r<o&&s[r]===g[r];r++);var k=o-r;for(d=1;d<=k&&s[o-d]===g[y-d];d++);return Aa=g.slice(r,1<d?1-d:void 0)}function Ia(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function La(){return!0}function Nf(){return!1}function Yt(r){function s(o,d,g,y,k){this._reactName=o,this._targetInst=g,this.type=d,this.nativeEvent=y,this.target=k,this.currentTarget=null;for(var I in r)r.hasOwnProperty(I)&&(o=r[I],this[I]=o?o(y):y[I]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?La:Nf,this.isPropagationStopped=Nf,this}return S(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=La)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=La)},persist:function(){},isPersistent:La}),s}var li={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Lo=Yt(li),ss=S({},li,{view:0,detail:0}),rT=Yt(ss),Ro,Oo,as,Ra=S({},ss,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Po,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==as&&(as&&r.type==="mousemove"?(Ro=r.screenX-as.screenX,Oo=r.screenY-as.screenY):Oo=Ro=0,as=r),Ro)},movementY:function(r){return"movementY"in r?r.movementY:Oo}}),wf=Yt(Ra),iT=S({},Ra,{dataTransfer:0}),sT=Yt(iT),aT=S({},ss,{relatedTarget:0}),Do=Yt(aT),uT=S({},li,{animationName:0,elapsedTime:0,pseudoElement:0}),oT=Yt(uT),lT=S({},li,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),cT=Yt(lT),dT=S({},li,{data:0}),Af=Yt(dT),fT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hT={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"},pT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mT(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=pT[r])?!!s[r]:!1}function Po(){return mT}var gT=S({},ss,{key:function(r){if(r.key){var s=fT[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=Ia(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?hT[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Po,charCode:function(r){return r.type==="keypress"?Ia(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Ia(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),ET=Yt(gT),TT=S({},Ra,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),If=Yt(TT),yT=S({},ss,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Po}),xT=Yt(yT),bT=S({},li,{propertyName:0,elapsedTime:0,pseudoElement:0}),kT=Yt(bT),CT=S({},Ra,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),ST=Yt(CT),_T=[9,13,27,32],Mo=c&&"CompositionEvent"in window,us=null;c&&"documentMode"in document&&(us=document.documentMode);var vT=c&&"TextEvent"in window&&!us,Lf=c&&(!Mo||us&&8<us&&11>=us),Rf=" ",Of=!1;function Df(r,s){switch(r){case"keyup":return _T.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pf(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var ci=!1;function NT(r,s){switch(r){case"compositionend":return Pf(s);case"keypress":return s.which!==32?null:(Of=!0,Rf);case"textInput":return r=s.data,r===Rf&&Of?null:r;default:return null}}function wT(r,s){if(ci)return r==="compositionend"||!Mo&&Df(r,s)?(r=vf(),Aa=Io=er=null,ci=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Lf&&s.locale!=="ko"?null:s.data;default:return null}}var AT={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 Mf(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!AT[r.type]:s==="textarea"}function Ff(r,s,o,d){nf(d),s=Fa(s,"onChange"),0<s.length&&(o=new Lo("onChange","change",null,o,d),r.push({event:o,listeners:s}))}var os=null,ls=null;function IT(r){th(r,0)}function Oa(r){var s=mi(r);if(Nr(s))return r}function LT(r,s){if(r==="change")return s}var jf=!1;if(c){var Fo;if(c){var jo="oninput"in document;if(!jo){var Bf=document.createElement("div");Bf.setAttribute("oninput","return;"),jo=typeof Bf.oninput=="function"}Fo=jo}else Fo=!1;jf=Fo&&(!document.documentMode||9<document.documentMode)}function Uf(){os&&(os.detachEvent("onpropertychange",Hf),ls=os=null)}function Hf(r){if(r.propertyName==="value"&&Oa(ls)){var s=[];Ff(s,ls,r,Eo(r)),uf(IT,s)}}function RT(r,s,o){r==="focusin"?(Uf(),os=s,ls=o,os.attachEvent("onpropertychange",Hf)):r==="focusout"&&Uf()}function OT(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Oa(ls)}function DT(r,s){if(r==="click")return Oa(s)}function PT(r,s){if(r==="input"||r==="change")return Oa(s)}function MT(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var cn=typeof Object.is=="function"?Object.is:MT;function cs(r,s){if(cn(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var o=Object.keys(r),d=Object.keys(s);if(o.length!==d.length)return!1;for(d=0;d<o.length;d++){var g=o[d];if(!f.call(s,g)||!cn(r[g],s[g]))return!1}return!0}function zf(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function $f(r,s){var o=zf(r);r=0;for(var d;o;){if(o.nodeType===3){if(d=r+o.textContent.length,r<=s&&d>=s)return{node:o,offset:s-r};r=d}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=zf(o)}}function Wf(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?Wf(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function Yf(){for(var r=window,s=ri();s instanceof r.HTMLIFrameElement;){try{var o=typeof s.contentWindow.location.href=="string"}catch{o=!1}if(o)r=s.contentWindow;else break;s=ri(r.document)}return s}function Bo(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}function FT(r){var s=Yf(),o=r.focusedElem,d=r.selectionRange;if(s!==o&&o&&o.ownerDocument&&Wf(o.ownerDocument.documentElement,o)){if(d!==null&&Bo(o)){if(s=d.start,r=d.end,r===void 0&&(r=s),"selectionStart"in o)o.selectionStart=s,o.selectionEnd=Math.min(r,o.value.length);else if(r=(s=o.ownerDocument||document)&&s.defaultView||window,r.getSelection){r=r.getSelection();var g=o.textContent.length,y=Math.min(d.start,g);d=d.end===void 0?y:Math.min(d.end,g),!r.extend&&y>d&&(g=d,d=y,y=g),g=$f(o,y);var k=$f(o,d);g&&k&&(r.rangeCount!==1||r.anchorNode!==g.node||r.anchorOffset!==g.offset||r.focusNode!==k.node||r.focusOffset!==k.offset)&&(s=s.createRange(),s.setStart(g.node,g.offset),r.removeAllRanges(),y>d?(r.addRange(s),r.extend(k.node,k.offset)):(s.setEnd(k.node,k.offset),r.addRange(s)))}}for(s=[],r=o;r=r.parentNode;)r.nodeType===1&&s.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<s.length;o++)r=s[o],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var jT=c&&"documentMode"in document&&11>=document.documentMode,di=null,Uo=null,ds=null,Ho=!1;function Vf(r,s,o){var d=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Ho||di==null||di!==ri(d)||(d=di,"selectionStart"in d&&Bo(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),ds&&cs(ds,d)||(ds=d,d=Fa(Uo,"onSelect"),0<d.length&&(s=new Lo("onSelect","select",null,s,o),r.push({event:s,listeners:d}),s.target=di)))}function Da(r,s){var o={};return o[r.toLowerCase()]=s.toLowerCase(),o["Webkit"+r]="webkit"+s,o["Moz"+r]="moz"+s,o}var fi={animationend:Da("Animation","AnimationEnd"),animationiteration:Da("Animation","AnimationIteration"),animationstart:Da("Animation","AnimationStart"),transitionend:Da("Transition","TransitionEnd")},zo={},qf={};c&&(qf=document.createElement("div").style,"AnimationEvent"in window||(delete fi.animationend.animation,delete fi.animationiteration.animation,delete fi.animationstart.animation),"TransitionEvent"in window||delete fi.transitionend.transition);function Pa(r){if(zo[r])return zo[r];if(!fi[r])return r;var s=fi[r],o;for(o in s)if(s.hasOwnProperty(o)&&o in qf)return zo[r]=s[o];return r}var Qf=Pa("animationend"),Gf=Pa("animationiteration"),Kf=Pa("animationstart"),Xf=Pa("transitionend"),Jf=new Map,Zf="abort auxClick 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(" ");function tr(r,s){Jf.set(r,s),u(s,[r])}for(var $o=0;$o<Zf.length;$o++){var Wo=Zf[$o],BT=Wo.toLowerCase(),UT=Wo[0].toUpperCase()+Wo.slice(1);tr(BT,"on"+UT)}tr(Qf,"onAnimationEnd"),tr(Gf,"onAnimationIteration"),tr(Kf,"onAnimationStart"),tr("dblclick","onDoubleClick"),tr("focusin","onFocus"),tr("focusout","onBlur"),tr(Xf,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fs="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(" "),HT=new Set("cancel close invalid load scroll toggle".split(" ").concat(fs));function eh(r,s,o){var d=r.type||"unknown-event";r.currentTarget=o,BE(d,s,void 0,r),r.currentTarget=null}function th(r,s){s=(s&4)!==0;for(var o=0;o<r.length;o++){var d=r[o],g=d.event;d=d.listeners;e:{var y=void 0;if(s)for(var k=d.length-1;0<=k;k--){var I=d[k],F=I.instance,Y=I.currentTarget;if(I=I.listener,F!==y&&g.isPropagationStopped())break e;eh(g,I,Y),y=F}else for(k=0;k<d.length;k++){if(I=d[k],F=I.instance,Y=I.currentTarget,I=I.listener,F!==y&&g.isPropagationStopped())break e;eh(g,I,Y),y=F}}}if(ya)throw r=bo,ya=!1,bo=null,r}function Je(r,s){var o=s[Jo];o===void 0&&(o=s[Jo]=new Set);var d=r+"__bubble";o.has(d)||(nh(s,r,2,!1),o.add(d))}function Yo(r,s,o){var d=0;s&&(d|=4),nh(o,r,d,s)}var Ma="_reactListening"+Math.random().toString(36).slice(2);function hs(r){if(!r[Ma]){r[Ma]=!0,i.forEach(function(o){o!=="selectionchange"&&(HT.has(o)||Yo(o,!1,r),Yo(o,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[Ma]||(s[Ma]=!0,Yo("selectionchange",!1,s))}}function nh(r,s,o,d){switch(_f(s)){case 1:var g=tT;break;case 4:g=nT;break;default:g=wo}o=g.bind(null,s,o,r),g=void 0,!xo||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),d?g!==void 0?r.addEventListener(s,o,{capture:!0,passive:g}):r.addEventListener(s,o,!0):g!==void 0?r.addEventListener(s,o,{passive:g}):r.addEventListener(s,o,!1)}function Vo(r,s,o,d,g){var y=d;if((s&1)===0&&(s&2)===0&&d!==null)e:for(;;){if(d===null)return;var k=d.tag;if(k===3||k===4){var I=d.stateNode.containerInfo;if(I===g||I.nodeType===8&&I.parentNode===g)break;if(k===4)for(k=d.return;k!==null;){var F=k.tag;if((F===3||F===4)&&(F=k.stateNode.containerInfo,F===g||F.nodeType===8&&F.parentNode===g))return;k=k.return}for(;I!==null;){if(k=Ir(I),k===null)return;if(F=k.tag,F===5||F===6){d=y=k;continue e}I=I.parentNode}}d=d.return}uf(function(){var Y=y,re=Eo(o),ie=[];e:{var te=Jf.get(r);if(te!==void 0){var Ee=Lo,xe=r;switch(r){case"keypress":if(Ia(o)===0)break e;case"keydown":case"keyup":Ee=ET;break;case"focusin":xe="focus",Ee=Do;break;case"focusout":xe="blur",Ee=Do;break;case"beforeblur":case"afterblur":Ee=Do;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ee=wf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ee=sT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ee=xT;break;case Qf:case Gf:case Kf:Ee=oT;break;case Xf:Ee=kT;break;case"scroll":Ee=rT;break;case"wheel":Ee=ST;break;case"copy":case"cut":case"paste":Ee=cT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ee=If}var be=(s&4)!==0,ot=!be&&r==="scroll",H=be?te!==null?te+"Capture":null:te;be=[];for(var j=Y,$;j!==null;){$=j;var oe=$.stateNode;if($.tag===5&&oe!==null&&($=oe,H!==null&&(oe=Gi(j,H),oe!=null&&be.push(ps(j,oe,$)))),ot)break;j=j.return}0<be.length&&(te=new Ee(te,xe,null,o,re),ie.push({event:te,listeners:be}))}}if((s&7)===0){e:{if(te=r==="mouseover"||r==="pointerover",Ee=r==="mouseout"||r==="pointerout",te&&o!==Wt&&(xe=o.relatedTarget||o.fromElement)&&(Ir(xe)||xe[Pn]))break e;if((Ee||te)&&(te=re.window===re?re:(te=re.ownerDocument)?te.defaultView||te.parentWindow:window,Ee?(xe=o.relatedTarget||o.toElement,Ee=Y,xe=xe?Ir(xe):null,xe!==null&&(ot=Ar(xe),xe!==ot||xe.tag!==5&&xe.tag!==6)&&(xe=null)):(Ee=null,xe=Y),Ee!==xe)){if(be=wf,oe="onMouseLeave",H="onMouseEnter",j="mouse",(r==="pointerout"||r==="pointerover")&&(be=If,oe="onPointerLeave",H="onPointerEnter",j="pointer"),ot=Ee==null?te:mi(Ee),$=xe==null?te:mi(xe),te=new be(oe,j+"leave",Ee,o,re),te.target=ot,te.relatedTarget=$,oe=null,Ir(re)===Y&&(be=new be(H,j+"enter",xe,o,re),be.target=$,be.relatedTarget=ot,oe=be),ot=oe,Ee&&xe)t:{for(be=Ee,H=xe,j=0,$=be;$;$=hi($))j++;for($=0,oe=H;oe;oe=hi(oe))$++;for(;0<j-$;)be=hi(be),j--;for(;0<$-j;)H=hi(H),$--;for(;j--;){if(be===H||H!==null&&be===H.alternate)break t;be=hi(be),H=hi(H)}be=null}else be=null;Ee!==null&&rh(ie,te,Ee,be,!1),xe!==null&&ot!==null&&rh(ie,ot,xe,be,!0)}}e:{if(te=Y?mi(Y):window,Ee=te.nodeName&&te.nodeName.toLowerCase(),Ee==="select"||Ee==="input"&&te.type==="file")var ke=LT;else if(Mf(te))if(jf)ke=PT;else{ke=OT;var ve=RT}else(Ee=te.nodeName)&&Ee.toLowerCase()==="input"&&(te.type==="checkbox"||te.type==="radio")&&(ke=DT);if(ke&&(ke=ke(r,Y))){Ff(ie,ke,o,re);break e}ve&&ve(r,te,Y),r==="focusout"&&(ve=te._wrapperState)&&ve.controlled&&te.type==="number"&&si(te,"number",te.value)}switch(ve=Y?mi(Y):window,r){case"focusin":(Mf(ve)||ve.contentEditable==="true")&&(di=ve,Uo=Y,ds=null);break;case"focusout":ds=Uo=di=null;break;case"mousedown":Ho=!0;break;case"contextmenu":case"mouseup":case"dragend":Ho=!1,Vf(ie,o,re);break;case"selectionchange":if(jT)break;case"keydown":case"keyup":Vf(ie,o,re)}var Ne;if(Mo)e:{switch(r){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else ci?Df(r,o)&&(Ie="onCompositionEnd"):r==="keydown"&&o.keyCode===229&&(Ie="onCompositionStart");Ie&&(Lf&&o.locale!=="ko"&&(ci||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&ci&&(Ne=vf()):(er=re,Io="value"in er?er.value:er.textContent,ci=!0)),ve=Fa(Y,Ie),0<ve.length&&(Ie=new Af(Ie,r,null,o,re),ie.push({event:Ie,listeners:ve}),Ne?Ie.data=Ne:(Ne=Pf(o),Ne!==null&&(Ie.data=Ne)))),(Ne=vT?NT(r,o):wT(r,o))&&(Y=Fa(Y,"onBeforeInput"),0<Y.length&&(re=new Af("onBeforeInput","beforeinput",null,o,re),ie.push({event:re,listeners:Y}),re.data=Ne))}th(ie,s)})}function ps(r,s,o){return{instance:r,listener:s,currentTarget:o}}function Fa(r,s){for(var o=s+"Capture",d=[];r!==null;){var g=r,y=g.stateNode;g.tag===5&&y!==null&&(g=y,y=Gi(r,o),y!=null&&d.unshift(ps(r,y,g)),y=Gi(r,s),y!=null&&d.push(ps(r,y,g))),r=r.return}return d}function hi(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function rh(r,s,o,d,g){for(var y=s._reactName,k=[];o!==null&&o!==d;){var I=o,F=I.alternate,Y=I.stateNode;if(F!==null&&F===d)break;I.tag===5&&Y!==null&&(I=Y,g?(F=Gi(o,y),F!=null&&k.unshift(ps(o,F,I))):g||(F=Gi(o,y),F!=null&&k.push(ps(o,F,I)))),o=o.return}k.length!==0&&r.push({event:s,listeners:k})}var zT=/\r\n?/g,$T=/\u0000|\uFFFD/g;function ih(r){return(typeof r=="string"?r:""+r).replace(zT,`
39
+ `).replace($T,"")}function ja(r,s,o){if(s=ih(s),ih(r)!==s&&o)throw Error(n(425))}function Ba(){}var qo=null,Qo=null;function Go(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Ko=typeof setTimeout=="function"?setTimeout:void 0,WT=typeof clearTimeout=="function"?clearTimeout:void 0,sh=typeof Promise=="function"?Promise:void 0,YT=typeof queueMicrotask=="function"?queueMicrotask:typeof sh<"u"?function(r){return sh.resolve(null).then(r).catch(VT)}:Ko;function VT(r){setTimeout(function(){throw r})}function Xo(r,s){var o=s,d=0;do{var g=o.nextSibling;if(r.removeChild(o),g&&g.nodeType===8)if(o=g.data,o==="/$"){if(d===0){r.removeChild(g),is(s);return}d--}else o!=="$"&&o!=="$?"&&o!=="$!"||d++;o=g}while(o);is(s)}function nr(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return r}function ah(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var o=r.data;if(o==="$"||o==="$!"||o==="$?"){if(s===0)return r;s--}else o==="/$"&&s++}r=r.previousSibling}return null}var pi=Math.random().toString(36).slice(2),_n="__reactFiber$"+pi,ms="__reactProps$"+pi,Pn="__reactContainer$"+pi,Jo="__reactEvents$"+pi,qT="__reactListeners$"+pi,QT="__reactHandles$"+pi;function Ir(r){var s=r[_n];if(s)return s;for(var o=r.parentNode;o;){if(s=o[Pn]||o[_n]){if(o=s.alternate,s.child!==null||o!==null&&o.child!==null)for(r=ah(r);r!==null;){if(o=r[_n])return o;r=ah(r)}return s}r=o,o=r.parentNode}return null}function gs(r){return r=r[_n]||r[Pn],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function mi(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function Ua(r){return r[ms]||null}var Zo=[],gi=-1;function rr(r){return{current:r}}function Ze(r){0>gi||(r.current=Zo[gi],Zo[gi]=null,gi--)}function Xe(r,s){gi++,Zo[gi]=r.current,r.current=s}var ir={},Ct=rr(ir),Dt=rr(!1),Lr=ir;function Ei(r,s){var o=r.type.contextTypes;if(!o)return ir;var d=r.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===s)return d.__reactInternalMemoizedMaskedChildContext;var g={},y;for(y in o)g[y]=s[y];return d&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=s,r.__reactInternalMemoizedMaskedChildContext=g),g}function Pt(r){return r=r.childContextTypes,r!=null}function Ha(){Ze(Dt),Ze(Ct)}function uh(r,s,o){if(Ct.current!==ir)throw Error(n(168));Xe(Ct,s),Xe(Dt,o)}function oh(r,s,o){var d=r.stateNode;if(s=s.childContextTypes,typeof d.getChildContext!="function")return o;d=d.getChildContext();for(var g in d)if(!(g in s))throw Error(n(108,Ue(r)||"Unknown",g));return S({},o,d)}function za(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||ir,Lr=Ct.current,Xe(Ct,r),Xe(Dt,Dt.current),!0}function lh(r,s,o){var d=r.stateNode;if(!d)throw Error(n(169));o?(r=oh(r,s,Lr),d.__reactInternalMemoizedMergedChildContext=r,Ze(Dt),Ze(Ct),Xe(Ct,r)):Ze(Dt),Xe(Dt,o)}var Mn=null,$a=!1,el=!1;function ch(r){Mn===null?Mn=[r]:Mn.push(r)}function GT(r){$a=!0,ch(r)}function sr(){if(!el&&Mn!==null){el=!0;var r=0,s=Ye;try{var o=Mn;for(Ye=1;r<o.length;r++){var d=o[r];do d=d(!0);while(d!==null)}Mn=null,$a=!1}catch(g){throw Mn!==null&&(Mn=Mn.slice(r+1)),ff(ko,sr),g}finally{Ye=s,el=!1}}return null}var Ti=[],yi=0,Wa=null,Ya=0,Zt=[],en=0,Rr=null,Fn=1,jn="";function Or(r,s){Ti[yi++]=Ya,Ti[yi++]=Wa,Wa=r,Ya=s}function dh(r,s,o){Zt[en++]=Fn,Zt[en++]=jn,Zt[en++]=Rr,Rr=r;var d=Fn;r=jn;var g=32-ln(d)-1;d&=~(1<<g),o+=1;var y=32-ln(s)+g;if(30<y){var k=g-g%5;y=(d&(1<<k)-1).toString(32),d>>=k,g-=k,Fn=1<<32-ln(s)+g|o<<g|d,jn=y+r}else Fn=1<<y|o<<g|d,jn=r}function tl(r){r.return!==null&&(Or(r,1),dh(r,1,0))}function nl(r){for(;r===Wa;)Wa=Ti[--yi],Ti[yi]=null,Ya=Ti[--yi],Ti[yi]=null;for(;r===Rr;)Rr=Zt[--en],Zt[en]=null,jn=Zt[--en],Zt[en]=null,Fn=Zt[--en],Zt[en]=null}var Vt=null,qt=null,tt=!1,dn=null;function fh(r,s){var o=sn(5,null,null,0);o.elementType="DELETED",o.stateNode=s,o.return=r,s=r.deletions,s===null?(r.deletions=[o],r.flags|=16):s.push(o)}function hh(r,s){switch(r.tag){case 5:var o=r.type;return s=s.nodeType!==1||o.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(r.stateNode=s,Vt=r,qt=nr(s.firstChild),!0):!1;case 6:return s=r.pendingProps===""||s.nodeType!==3?null:s,s!==null?(r.stateNode=s,Vt=r,qt=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(o=Rr!==null?{id:Fn,overflow:jn}:null,r.memoizedState={dehydrated:s,treeContext:o,retryLane:1073741824},o=sn(18,null,null,0),o.stateNode=s,o.return=r,r.child=o,Vt=r,qt=null,!0):!1;default:return!1}}function rl(r){return(r.mode&1)!==0&&(r.flags&128)===0}function il(r){if(tt){var s=qt;if(s){var o=s;if(!hh(r,s)){if(rl(r))throw Error(n(418));s=nr(o.nextSibling);var d=Vt;s&&hh(r,s)?fh(d,o):(r.flags=r.flags&-4097|2,tt=!1,Vt=r)}}else{if(rl(r))throw Error(n(418));r.flags=r.flags&-4097|2,tt=!1,Vt=r}}}function ph(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;Vt=r}function Va(r){if(r!==Vt)return!1;if(!tt)return ph(r),tt=!0,!1;var s;if((s=r.tag!==3)&&!(s=r.tag!==5)&&(s=r.type,s=s!=="head"&&s!=="body"&&!Go(r.type,r.memoizedProps)),s&&(s=qt)){if(rl(r))throw mh(),Error(n(418));for(;s;)fh(r,s),s=nr(s.nextSibling)}if(ph(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,s=0;r;){if(r.nodeType===8){var o=r.data;if(o==="/$"){if(s===0){qt=nr(r.nextSibling);break e}s--}else o!=="$"&&o!=="$!"&&o!=="$?"||s++}r=r.nextSibling}qt=null}}else qt=Vt?nr(r.stateNode.nextSibling):null;return!0}function mh(){for(var r=qt;r;)r=nr(r.nextSibling)}function xi(){qt=Vt=null,tt=!1}function sl(r){dn===null?dn=[r]:dn.push(r)}var KT=W.ReactCurrentBatchConfig;function Es(r,s,o){if(r=o.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(n(309));var d=o.stateNode}if(!d)throw Error(n(147,r));var g=d,y=""+r;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===y?s.ref:(s=function(k){var I=g.refs;k===null?delete I[y]:I[y]=k},s._stringRef=y,s)}if(typeof r!="string")throw Error(n(284));if(!o._owner)throw Error(n(290,r))}return r}function qa(r,s){throw r=Object.prototype.toString.call(s),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r))}function gh(r){var s=r._init;return s(r._payload)}function Eh(r){function s(H,j){if(r){var $=H.deletions;$===null?(H.deletions=[j],H.flags|=16):$.push(j)}}function o(H,j){if(!r)return null;for(;j!==null;)s(H,j),j=j.sibling;return null}function d(H,j){for(H=new Map;j!==null;)j.key!==null?H.set(j.key,j):H.set(j.index,j),j=j.sibling;return H}function g(H,j){return H=hr(H,j),H.index=0,H.sibling=null,H}function y(H,j,$){return H.index=$,r?($=H.alternate,$!==null?($=$.index,$<j?(H.flags|=2,j):$):(H.flags|=2,j)):(H.flags|=1048576,j)}function k(H){return r&&H.alternate===null&&(H.flags|=2),H}function I(H,j,$,oe){return j===null||j.tag!==6?(j=Kl($,H.mode,oe),j.return=H,j):(j=g(j,$),j.return=H,j)}function F(H,j,$,oe){var ke=$.type;return ke===ae?re(H,j,$.props.children,oe,$.key):j!==null&&(j.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===K&&gh(ke)===j.type)?(oe=g(j,$.props),oe.ref=Es(H,j,$),oe.return=H,oe):(oe=Eu($.type,$.key,$.props,null,H.mode,oe),oe.ref=Es(H,j,$),oe.return=H,oe)}function Y(H,j,$,oe){return j===null||j.tag!==4||j.stateNode.containerInfo!==$.containerInfo||j.stateNode.implementation!==$.implementation?(j=Xl($,H.mode,oe),j.return=H,j):(j=g(j,$.children||[]),j.return=H,j)}function re(H,j,$,oe,ke){return j===null||j.tag!==7?(j=Hr($,H.mode,oe,ke),j.return=H,j):(j=g(j,$),j.return=H,j)}function ie(H,j,$){if(typeof j=="string"&&j!==""||typeof j=="number")return j=Kl(""+j,H.mode,$),j.return=H,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case q:return $=Eu(j.type,j.key,j.props,null,H.mode,$),$.ref=Es(H,null,j),$.return=H,$;case B:return j=Xl(j,H.mode,$),j.return=H,j;case K:var oe=j._init;return ie(H,oe(j._payload),$)}if(qn(j)||le(j))return j=Hr(j,H.mode,$,null),j.return=H,j;qa(H,j)}return null}function te(H,j,$,oe){var ke=j!==null?j.key:null;if(typeof $=="string"&&$!==""||typeof $=="number")return ke!==null?null:I(H,j,""+$,oe);if(typeof $=="object"&&$!==null){switch($.$$typeof){case q:return $.key===ke?F(H,j,$,oe):null;case B:return $.key===ke?Y(H,j,$,oe):null;case K:return ke=$._init,te(H,j,ke($._payload),oe)}if(qn($)||le($))return ke!==null?null:re(H,j,$,oe,null);qa(H,$)}return null}function Ee(H,j,$,oe,ke){if(typeof oe=="string"&&oe!==""||typeof oe=="number")return H=H.get($)||null,I(j,H,""+oe,ke);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case q:return H=H.get(oe.key===null?$:oe.key)||null,F(j,H,oe,ke);case B:return H=H.get(oe.key===null?$:oe.key)||null,Y(j,H,oe,ke);case K:var ve=oe._init;return Ee(H,j,$,ve(oe._payload),ke)}if(qn(oe)||le(oe))return H=H.get($)||null,re(j,H,oe,ke,null);qa(j,oe)}return null}function xe(H,j,$,oe){for(var ke=null,ve=null,Ne=j,Ie=j=0,gt=null;Ne!==null&&Ie<$.length;Ie++){Ne.index>Ie?(gt=Ne,Ne=null):gt=Ne.sibling;var $e=te(H,Ne,$[Ie],oe);if($e===null){Ne===null&&(Ne=gt);break}r&&Ne&&$e.alternate===null&&s(H,Ne),j=y($e,j,Ie),ve===null?ke=$e:ve.sibling=$e,ve=$e,Ne=gt}if(Ie===$.length)return o(H,Ne),tt&&Or(H,Ie),ke;if(Ne===null){for(;Ie<$.length;Ie++)Ne=ie(H,$[Ie],oe),Ne!==null&&(j=y(Ne,j,Ie),ve===null?ke=Ne:ve.sibling=Ne,ve=Ne);return tt&&Or(H,Ie),ke}for(Ne=d(H,Ne);Ie<$.length;Ie++)gt=Ee(Ne,H,Ie,$[Ie],oe),gt!==null&&(r&&gt.alternate!==null&&Ne.delete(gt.key===null?Ie:gt.key),j=y(gt,j,Ie),ve===null?ke=gt:ve.sibling=gt,ve=gt);return r&&Ne.forEach(function(pr){return s(H,pr)}),tt&&Or(H,Ie),ke}function be(H,j,$,oe){var ke=le($);if(typeof ke!="function")throw Error(n(150));if($=ke.call($),$==null)throw Error(n(151));for(var ve=ke=null,Ne=j,Ie=j=0,gt=null,$e=$.next();Ne!==null&&!$e.done;Ie++,$e=$.next()){Ne.index>Ie?(gt=Ne,Ne=null):gt=Ne.sibling;var pr=te(H,Ne,$e.value,oe);if(pr===null){Ne===null&&(Ne=gt);break}r&&Ne&&pr.alternate===null&&s(H,Ne),j=y(pr,j,Ie),ve===null?ke=pr:ve.sibling=pr,ve=pr,Ne=gt}if($e.done)return o(H,Ne),tt&&Or(H,Ie),ke;if(Ne===null){for(;!$e.done;Ie++,$e=$.next())$e=ie(H,$e.value,oe),$e!==null&&(j=y($e,j,Ie),ve===null?ke=$e:ve.sibling=$e,ve=$e);return tt&&Or(H,Ie),ke}for(Ne=d(H,Ne);!$e.done;Ie++,$e=$.next())$e=Ee(Ne,H,Ie,$e.value,oe),$e!==null&&(r&&$e.alternate!==null&&Ne.delete($e.key===null?Ie:$e.key),j=y($e,j,Ie),ve===null?ke=$e:ve.sibling=$e,ve=$e);return r&&Ne.forEach(function(Ay){return s(H,Ay)}),tt&&Or(H,Ie),ke}function ot(H,j,$,oe){if(typeof $=="object"&&$!==null&&$.type===ae&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case q:e:{for(var ke=$.key,ve=j;ve!==null;){if(ve.key===ke){if(ke=$.type,ke===ae){if(ve.tag===7){o(H,ve.sibling),j=g(ve,$.props.children),j.return=H,H=j;break e}}else if(ve.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===K&&gh(ke)===ve.type){o(H,ve.sibling),j=g(ve,$.props),j.ref=Es(H,ve,$),j.return=H,H=j;break e}o(H,ve);break}else s(H,ve);ve=ve.sibling}$.type===ae?(j=Hr($.props.children,H.mode,oe,$.key),j.return=H,H=j):(oe=Eu($.type,$.key,$.props,null,H.mode,oe),oe.ref=Es(H,j,$),oe.return=H,H=oe)}return k(H);case B:e:{for(ve=$.key;j!==null;){if(j.key===ve)if(j.tag===4&&j.stateNode.containerInfo===$.containerInfo&&j.stateNode.implementation===$.implementation){o(H,j.sibling),j=g(j,$.children||[]),j.return=H,H=j;break e}else{o(H,j);break}else s(H,j);j=j.sibling}j=Xl($,H.mode,oe),j.return=H,H=j}return k(H);case K:return ve=$._init,ot(H,j,ve($._payload),oe)}if(qn($))return xe(H,j,$,oe);if(le($))return be(H,j,$,oe);qa(H,$)}return typeof $=="string"&&$!==""||typeof $=="number"?($=""+$,j!==null&&j.tag===6?(o(H,j.sibling),j=g(j,$),j.return=H,H=j):(o(H,j),j=Kl($,H.mode,oe),j.return=H,H=j),k(H)):o(H,j)}return ot}var bi=Eh(!0),Th=Eh(!1),Qa=rr(null),Ga=null,ki=null,al=null;function ul(){al=ki=Ga=null}function ol(r){var s=Qa.current;Ze(Qa),r._currentValue=s}function ll(r,s,o){for(;r!==null;){var d=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,d!==null&&(d.childLanes|=s)):d!==null&&(d.childLanes&s)!==s&&(d.childLanes|=s),r===o)break;r=r.return}}function Ci(r,s){Ga=r,al=ki=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&s)!==0&&(Mt=!0),r.firstContext=null)}function tn(r){var s=r._currentValue;if(al!==r)if(r={context:r,memoizedValue:s,next:null},ki===null){if(Ga===null)throw Error(n(308));ki=r,Ga.dependencies={lanes:0,firstContext:r}}else ki=ki.next=r;return s}var Dr=null;function cl(r){Dr===null?Dr=[r]:Dr.push(r)}function yh(r,s,o,d){var g=s.interleaved;return g===null?(o.next=o,cl(s)):(o.next=g.next,g.next=o),s.interleaved=o,Bn(r,d)}function Bn(r,s){r.lanes|=s;var o=r.alternate;for(o!==null&&(o.lanes|=s),o=r,r=r.return;r!==null;)r.childLanes|=s,o=r.alternate,o!==null&&(o.childLanes|=s),o=r,r=r.return;return o.tag===3?o.stateNode:null}var ar=!1;function dl(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xh(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Un(r,s){return{eventTime:r,lane:s,tag:0,payload:null,callback:null,next:null}}function ur(r,s,o){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(ze&2)!==0){var g=d.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),d.pending=s,Bn(r,o)}return g=d.interleaved,g===null?(s.next=s,cl(d)):(s.next=g.next,g.next=s),d.interleaved=s,Bn(r,o)}function Ka(r,s,o){if(s=s.updateQueue,s!==null&&(s=s.shared,(o&4194240)!==0)){var d=s.lanes;d&=r.pendingLanes,o|=d,s.lanes=o,_o(r,o)}}function bh(r,s){var o=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,o===d)){var g=null,y=null;if(o=o.firstBaseUpdate,o!==null){do{var k={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};y===null?g=y=k:y=y.next=k,o=o.next}while(o!==null);y===null?g=y=s:y=y.next=s}else g=y=s;o={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:y,shared:d.shared,effects:d.effects},r.updateQueue=o;return}r=o.lastBaseUpdate,r===null?o.firstBaseUpdate=s:r.next=s,o.lastBaseUpdate=s}function Xa(r,s,o,d){var g=r.updateQueue;ar=!1;var y=g.firstBaseUpdate,k=g.lastBaseUpdate,I=g.shared.pending;if(I!==null){g.shared.pending=null;var F=I,Y=F.next;F.next=null,k===null?y=Y:k.next=Y,k=F;var re=r.alternate;re!==null&&(re=re.updateQueue,I=re.lastBaseUpdate,I!==k&&(I===null?re.firstBaseUpdate=Y:I.next=Y,re.lastBaseUpdate=F))}if(y!==null){var ie=g.baseState;k=0,re=Y=F=null,I=y;do{var te=I.lane,Ee=I.eventTime;if((d&te)===te){re!==null&&(re=re.next={eventTime:Ee,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var xe=r,be=I;switch(te=s,Ee=o,be.tag){case 1:if(xe=be.payload,typeof xe=="function"){ie=xe.call(Ee,ie,te);break e}ie=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=be.payload,te=typeof xe=="function"?xe.call(Ee,ie,te):xe,te==null)break e;ie=S({},ie,te);break e;case 2:ar=!0}}I.callback!==null&&I.lane!==0&&(r.flags|=64,te=g.effects,te===null?g.effects=[I]:te.push(I))}else Ee={eventTime:Ee,lane:te,tag:I.tag,payload:I.payload,callback:I.callback,next:null},re===null?(Y=re=Ee,F=ie):re=re.next=Ee,k|=te;if(I=I.next,I===null){if(I=g.shared.pending,I===null)break;te=I,I=te.next,te.next=null,g.lastBaseUpdate=te,g.shared.pending=null}}while(!0);if(re===null&&(F=ie),g.baseState=F,g.firstBaseUpdate=Y,g.lastBaseUpdate=re,s=g.shared.interleaved,s!==null){g=s;do k|=g.lane,g=g.next;while(g!==s)}else y===null&&(g.shared.lanes=0);Fr|=k,r.lanes=k,r.memoizedState=ie}}function kh(r,s,o){if(r=s.effects,s.effects=null,r!==null)for(s=0;s<r.length;s++){var d=r[s],g=d.callback;if(g!==null){if(d.callback=null,d=o,typeof g!="function")throw Error(n(191,g));g.call(d)}}}var Ts={},vn=rr(Ts),ys=rr(Ts),xs=rr(Ts);function Pr(r){if(r===Ts)throw Error(n(174));return r}function fl(r,s){switch(Xe(xs,s),Xe(ys,r),Xe(vn,Ts),r=s.nodeType,r){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:he(null,"");break;default:r=r===8?s.parentNode:s,s=r.namespaceURI||null,r=r.tagName,s=he(s,r)}Ze(vn),Xe(vn,s)}function Si(){Ze(vn),Ze(ys),Ze(xs)}function Ch(r){Pr(xs.current);var s=Pr(vn.current),o=he(s,r.type);s!==o&&(Xe(ys,r),Xe(vn,o))}function hl(r){ys.current===r&&(Ze(vn),Ze(ys))}var it=rr(0);function Ja(r){for(var s=r;s!==null;){if(s.tag===13){var o=s.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var pl=[];function ml(){for(var r=0;r<pl.length;r++)pl[r]._workInProgressVersionPrimary=null;pl.length=0}var Za=W.ReactCurrentDispatcher,gl=W.ReactCurrentBatchConfig,Mr=0,st=null,ft=null,pt=null,eu=!1,bs=!1,ks=0,XT=0;function St(){throw Error(n(321))}function El(r,s){if(s===null)return!1;for(var o=0;o<s.length&&o<r.length;o++)if(!cn(r[o],s[o]))return!1;return!0}function Tl(r,s,o,d,g,y){if(Mr=y,st=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Za.current=r===null||r.memoizedState===null?ty:ny,r=o(d,g),bs){y=0;do{if(bs=!1,ks=0,25<=y)throw Error(n(301));y+=1,pt=ft=null,s.updateQueue=null,Za.current=ry,r=o(d,g)}while(bs)}if(Za.current=ru,s=ft!==null&&ft.next!==null,Mr=0,pt=ft=st=null,eu=!1,s)throw Error(n(300));return r}function yl(){var r=ks!==0;return ks=0,r}function Nn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pt===null?st.memoizedState=pt=r:pt=pt.next=r,pt}function nn(){if(ft===null){var r=st.alternate;r=r!==null?r.memoizedState:null}else r=ft.next;var s=pt===null?st.memoizedState:pt.next;if(s!==null)pt=s,ft=r;else{if(r===null)throw Error(n(310));ft=r,r={memoizedState:ft.memoizedState,baseState:ft.baseState,baseQueue:ft.baseQueue,queue:ft.queue,next:null},pt===null?st.memoizedState=pt=r:pt=pt.next=r}return pt}function Cs(r,s){return typeof s=="function"?s(r):s}function xl(r){var s=nn(),o=s.queue;if(o===null)throw Error(n(311));o.lastRenderedReducer=r;var d=ft,g=d.baseQueue,y=o.pending;if(y!==null){if(g!==null){var k=g.next;g.next=y.next,y.next=k}d.baseQueue=g=y,o.pending=null}if(g!==null){y=g.next,d=d.baseState;var I=k=null,F=null,Y=y;do{var re=Y.lane;if((Mr&re)===re)F!==null&&(F=F.next={lane:0,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),d=Y.hasEagerState?Y.eagerState:r(d,Y.action);else{var ie={lane:re,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null};F===null?(I=F=ie,k=d):F=F.next=ie,st.lanes|=re,Fr|=re}Y=Y.next}while(Y!==null&&Y!==y);F===null?k=d:F.next=I,cn(d,s.memoizedState)||(Mt=!0),s.memoizedState=d,s.baseState=k,s.baseQueue=F,o.lastRenderedState=d}if(r=o.interleaved,r!==null){g=r;do y=g.lane,st.lanes|=y,Fr|=y,g=g.next;while(g!==r)}else g===null&&(o.lanes=0);return[s.memoizedState,o.dispatch]}function bl(r){var s=nn(),o=s.queue;if(o===null)throw Error(n(311));o.lastRenderedReducer=r;var d=o.dispatch,g=o.pending,y=s.memoizedState;if(g!==null){o.pending=null;var k=g=g.next;do y=r(y,k.action),k=k.next;while(k!==g);cn(y,s.memoizedState)||(Mt=!0),s.memoizedState=y,s.baseQueue===null&&(s.baseState=y),o.lastRenderedState=y}return[y,d]}function Sh(){}function _h(r,s){var o=st,d=nn(),g=s(),y=!cn(d.memoizedState,g);if(y&&(d.memoizedState=g,Mt=!0),d=d.queue,kl(wh.bind(null,o,d,r),[r]),d.getSnapshot!==s||y||pt!==null&&pt.memoizedState.tag&1){if(o.flags|=2048,Ss(9,Nh.bind(null,o,d,g,s),void 0,null),mt===null)throw Error(n(349));(Mr&30)!==0||vh(o,s,g)}return g}function vh(r,s,o){r.flags|=16384,r={getSnapshot:s,value:o},s=st.updateQueue,s===null?(s={lastEffect:null,stores:null},st.updateQueue=s,s.stores=[r]):(o=s.stores,o===null?s.stores=[r]:o.push(r))}function Nh(r,s,o,d){s.value=o,s.getSnapshot=d,Ah(s)&&Ih(r)}function wh(r,s,o){return o(function(){Ah(s)&&Ih(r)})}function Ah(r){var s=r.getSnapshot;r=r.value;try{var o=s();return!cn(r,o)}catch{return!0}}function Ih(r){var s=Bn(r,1);s!==null&&mn(s,r,1,-1)}function Lh(r){var s=Nn();return typeof r=="function"&&(r=r()),s.memoizedState=s.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Cs,lastRenderedState:r},s.queue=r,r=r.dispatch=ey.bind(null,st,r),[s.memoizedState,r]}function Ss(r,s,o,d){return r={tag:r,create:s,destroy:o,deps:d,next:null},s=st.updateQueue,s===null?(s={lastEffect:null,stores:null},st.updateQueue=s,s.lastEffect=r.next=r):(o=s.lastEffect,o===null?s.lastEffect=r.next=r:(d=o.next,o.next=r,r.next=d,s.lastEffect=r)),r}function Rh(){return nn().memoizedState}function tu(r,s,o,d){var g=Nn();st.flags|=r,g.memoizedState=Ss(1|s,o,void 0,d===void 0?null:d)}function nu(r,s,o,d){var g=nn();d=d===void 0?null:d;var y=void 0;if(ft!==null){var k=ft.memoizedState;if(y=k.destroy,d!==null&&El(d,k.deps)){g.memoizedState=Ss(s,o,y,d);return}}st.flags|=r,g.memoizedState=Ss(1|s,o,y,d)}function Oh(r,s){return tu(8390656,8,r,s)}function kl(r,s){return nu(2048,8,r,s)}function Dh(r,s){return nu(4,2,r,s)}function Ph(r,s){return nu(4,4,r,s)}function Mh(r,s){if(typeof s=="function")return r=r(),s(r),function(){s(null)};if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function Fh(r,s,o){return o=o!=null?o.concat([r]):null,nu(4,4,Mh.bind(null,s,r),o)}function Cl(){}function jh(r,s){var o=nn();s=s===void 0?null:s;var d=o.memoizedState;return d!==null&&s!==null&&El(s,d[1])?d[0]:(o.memoizedState=[r,s],r)}function Bh(r,s){var o=nn();s=s===void 0?null:s;var d=o.memoizedState;return d!==null&&s!==null&&El(s,d[1])?d[0]:(r=r(),o.memoizedState=[r,s],r)}function Uh(r,s,o){return(Mr&21)===0?(r.baseState&&(r.baseState=!1,Mt=!0),r.memoizedState=o):(cn(o,s)||(o=gf(),st.lanes|=o,Fr|=o,r.baseState=!0),s)}function JT(r,s){var o=Ye;Ye=o!==0&&4>o?o:4,r(!0);var d=gl.transition;gl.transition={};try{r(!1),s()}finally{Ye=o,gl.transition=d}}function Hh(){return nn().memoizedState}function ZT(r,s,o){var d=dr(r);if(o={lane:d,action:o,hasEagerState:!1,eagerState:null,next:null},zh(r))$h(s,o);else if(o=yh(r,s,o,d),o!==null){var g=Rt();mn(o,r,d,g),Wh(o,s,d)}}function ey(r,s,o){var d=dr(r),g={lane:d,action:o,hasEagerState:!1,eagerState:null,next:null};if(zh(r))$h(s,g);else{var y=r.alternate;if(r.lanes===0&&(y===null||y.lanes===0)&&(y=s.lastRenderedReducer,y!==null))try{var k=s.lastRenderedState,I=y(k,o);if(g.hasEagerState=!0,g.eagerState=I,cn(I,k)){var F=s.interleaved;F===null?(g.next=g,cl(s)):(g.next=F.next,F.next=g),s.interleaved=g;return}}catch{}finally{}o=yh(r,s,g,d),o!==null&&(g=Rt(),mn(o,r,d,g),Wh(o,s,d))}}function zh(r){var s=r.alternate;return r===st||s!==null&&s===st}function $h(r,s){bs=eu=!0;var o=r.pending;o===null?s.next=s:(s.next=o.next,o.next=s),r.pending=s}function Wh(r,s,o){if((o&4194240)!==0){var d=s.lanes;d&=r.pendingLanes,o|=d,s.lanes=o,_o(r,o)}}var ru={readContext:tn,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useInsertionEffect:St,useLayoutEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useMutableSource:St,useSyncExternalStore:St,useId:St,unstable_isNewReconciler:!1},ty={readContext:tn,useCallback:function(r,s){return Nn().memoizedState=[r,s===void 0?null:s],r},useContext:tn,useEffect:Oh,useImperativeHandle:function(r,s,o){return o=o!=null?o.concat([r]):null,tu(4194308,4,Mh.bind(null,s,r),o)},useLayoutEffect:function(r,s){return tu(4194308,4,r,s)},useInsertionEffect:function(r,s){return tu(4,2,r,s)},useMemo:function(r,s){var o=Nn();return s=s===void 0?null:s,r=r(),o.memoizedState=[r,s],r},useReducer:function(r,s,o){var d=Nn();return s=o!==void 0?o(s):s,d.memoizedState=d.baseState=s,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:s},d.queue=r,r=r.dispatch=ZT.bind(null,st,r),[d.memoizedState,r]},useRef:function(r){var s=Nn();return r={current:r},s.memoizedState=r},useState:Lh,useDebugValue:Cl,useDeferredValue:function(r){return Nn().memoizedState=r},useTransition:function(){var r=Lh(!1),s=r[0];return r=JT.bind(null,r[1]),Nn().memoizedState=r,[s,r]},useMutableSource:function(){},useSyncExternalStore:function(r,s,o){var d=st,g=Nn();if(tt){if(o===void 0)throw Error(n(407));o=o()}else{if(o=s(),mt===null)throw Error(n(349));(Mr&30)!==0||vh(d,s,o)}g.memoizedState=o;var y={value:o,getSnapshot:s};return g.queue=y,Oh(wh.bind(null,d,y,r),[r]),d.flags|=2048,Ss(9,Nh.bind(null,d,y,o,s),void 0,null),o},useId:function(){var r=Nn(),s=mt.identifierPrefix;if(tt){var o=jn,d=Fn;o=(d&~(1<<32-ln(d)-1)).toString(32)+o,s=":"+s+"R"+o,o=ks++,0<o&&(s+="H"+o.toString(32)),s+=":"}else o=XT++,s=":"+s+"r"+o.toString(32)+":";return r.memoizedState=s},unstable_isNewReconciler:!1},ny={readContext:tn,useCallback:jh,useContext:tn,useEffect:kl,useImperativeHandle:Fh,useInsertionEffect:Dh,useLayoutEffect:Ph,useMemo:Bh,useReducer:xl,useRef:Rh,useState:function(){return xl(Cs)},useDebugValue:Cl,useDeferredValue:function(r){var s=nn();return Uh(s,ft.memoizedState,r)},useTransition:function(){var r=xl(Cs)[0],s=nn().memoizedState;return[r,s]},useMutableSource:Sh,useSyncExternalStore:_h,useId:Hh,unstable_isNewReconciler:!1},ry={readContext:tn,useCallback:jh,useContext:tn,useEffect:kl,useImperativeHandle:Fh,useInsertionEffect:Dh,useLayoutEffect:Ph,useMemo:Bh,useReducer:bl,useRef:Rh,useState:function(){return bl(Cs)},useDebugValue:Cl,useDeferredValue:function(r){var s=nn();return ft===null?s.memoizedState=r:Uh(s,ft.memoizedState,r)},useTransition:function(){var r=bl(Cs)[0],s=nn().memoizedState;return[r,s]},useMutableSource:Sh,useSyncExternalStore:_h,useId:Hh,unstable_isNewReconciler:!1};function fn(r,s){if(r&&r.defaultProps){s=S({},s),r=r.defaultProps;for(var o in r)s[o]===void 0&&(s[o]=r[o]);return s}return s}function Sl(r,s,o,d){s=r.memoizedState,o=o(d,s),o=o==null?s:S({},s,o),r.memoizedState=o,r.lanes===0&&(r.updateQueue.baseState=o)}var iu={isMounted:function(r){return(r=r._reactInternals)?Ar(r)===r:!1},enqueueSetState:function(r,s,o){r=r._reactInternals;var d=Rt(),g=dr(r),y=Un(d,g);y.payload=s,o!=null&&(y.callback=o),s=ur(r,y,g),s!==null&&(mn(s,r,g,d),Ka(s,r,g))},enqueueReplaceState:function(r,s,o){r=r._reactInternals;var d=Rt(),g=dr(r),y=Un(d,g);y.tag=1,y.payload=s,o!=null&&(y.callback=o),s=ur(r,y,g),s!==null&&(mn(s,r,g,d),Ka(s,r,g))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var o=Rt(),d=dr(r),g=Un(o,d);g.tag=2,s!=null&&(g.callback=s),s=ur(r,g,d),s!==null&&(mn(s,r,d,o),Ka(s,r,d))}};function Yh(r,s,o,d,g,y,k){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,y,k):s.prototype&&s.prototype.isPureReactComponent?!cs(o,d)||!cs(g,y):!0}function Vh(r,s,o){var d=!1,g=ir,y=s.contextType;return typeof y=="object"&&y!==null?y=tn(y):(g=Pt(s)?Lr:Ct.current,d=s.contextTypes,y=(d=d!=null)?Ei(r,g):ir),s=new s(o,y),r.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=iu,r.stateNode=s,s._reactInternals=r,d&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=g,r.__reactInternalMemoizedMaskedChildContext=y),s}function qh(r,s,o,d){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(o,d),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(o,d),s.state!==r&&iu.enqueueReplaceState(s,s.state,null)}function _l(r,s,o,d){var g=r.stateNode;g.props=o,g.state=r.memoizedState,g.refs={},dl(r);var y=s.contextType;typeof y=="object"&&y!==null?g.context=tn(y):(y=Pt(s)?Lr:Ct.current,g.context=Ei(r,y)),g.state=r.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(Sl(r,s,y,o),g.state=r.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(s=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),s!==g.state&&iu.enqueueReplaceState(g,g.state,null),Xa(r,o,g,d),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308)}function _i(r,s){try{var o="",d=s;do o+=Re(d),d=d.return;while(d);var g=o}catch(y){g=`
40
+ Error generating stack: `+y.message+`
41
+ `+y.stack}return{value:r,source:s,stack:g,digest:null}}function vl(r,s,o){return{value:r,source:null,stack:o??null,digest:s??null}}function Nl(r,s){try{console.error(s.value)}catch(o){setTimeout(function(){throw o})}}var iy=typeof WeakMap=="function"?WeakMap:Map;function Qh(r,s,o){o=Un(-1,o),o.tag=3,o.payload={element:null};var d=s.value;return o.callback=function(){du||(du=!0,zl=d),Nl(r,s)},o}function Gh(r,s,o){o=Un(-1,o),o.tag=3;var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var g=s.value;o.payload=function(){return d(g)},o.callback=function(){Nl(r,s)}}var y=r.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(o.callback=function(){Nl(r,s),typeof d!="function"&&(lr===null?lr=new Set([this]):lr.add(this));var k=s.stack;this.componentDidCatch(s.value,{componentStack:k!==null?k:""})}),o}function Kh(r,s,o){var d=r.pingCache;if(d===null){d=r.pingCache=new iy;var g=new Set;d.set(s,g)}else g=d.get(s),g===void 0&&(g=new Set,d.set(s,g));g.has(o)||(g.add(o),r=Ty.bind(null,r,s,o),s.then(r,r))}function Xh(r){do{var s;if((s=r.tag===13)&&(s=r.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return r;r=r.return}while(r!==null);return null}function Jh(r,s,o,d,g){return(r.mode&1)===0?(r===s?r.flags|=65536:(r.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(s=Un(-1,1),s.tag=2,ur(o,s,1))),o.lanes|=1),r):(r.flags|=65536,r.lanes=g,r)}var sy=W.ReactCurrentOwner,Mt=!1;function Lt(r,s,o,d){s.child=r===null?Th(s,null,o,d):bi(s,r.child,o,d)}function Zh(r,s,o,d,g){o=o.render;var y=s.ref;return Ci(s,g),d=Tl(r,s,o,d,y,g),o=yl(),r!==null&&!Mt?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~g,Hn(r,s,g)):(tt&&o&&tl(s),s.flags|=1,Lt(r,s,d,g),s.child)}function ep(r,s,o,d,g){if(r===null){var y=o.type;return typeof y=="function"&&!Gl(y)&&y.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(s.tag=15,s.type=y,tp(r,s,y,d,g)):(r=Eu(o.type,null,d,s,s.mode,g),r.ref=s.ref,r.return=s,s.child=r)}if(y=r.child,(r.lanes&g)===0){var k=y.memoizedProps;if(o=o.compare,o=o!==null?o:cs,o(k,d)&&r.ref===s.ref)return Hn(r,s,g)}return s.flags|=1,r=hr(y,d),r.ref=s.ref,r.return=s,s.child=r}function tp(r,s,o,d,g){if(r!==null){var y=r.memoizedProps;if(cs(y,d)&&r.ref===s.ref)if(Mt=!1,s.pendingProps=d=y,(r.lanes&g)!==0)(r.flags&131072)!==0&&(Mt=!0);else return s.lanes=r.lanes,Hn(r,s,g)}return wl(r,s,o,d,g)}function np(r,s,o){var d=s.pendingProps,g=d.children,y=r!==null?r.memoizedState:null;if(d.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},Xe(Ni,Qt),Qt|=o;else{if((o&1073741824)===0)return r=y!==null?y.baseLanes|o:o,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:r,cachePool:null,transitions:null},s.updateQueue=null,Xe(Ni,Qt),Qt|=r,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=y!==null?y.baseLanes:o,Xe(Ni,Qt),Qt|=d}else y!==null?(d=y.baseLanes|o,s.memoizedState=null):d=o,Xe(Ni,Qt),Qt|=d;return Lt(r,s,g,o),s.child}function rp(r,s){var o=s.ref;(r===null&&o!==null||r!==null&&r.ref!==o)&&(s.flags|=512,s.flags|=2097152)}function wl(r,s,o,d,g){var y=Pt(o)?Lr:Ct.current;return y=Ei(s,y),Ci(s,g),o=Tl(r,s,o,d,y,g),d=yl(),r!==null&&!Mt?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~g,Hn(r,s,g)):(tt&&d&&tl(s),s.flags|=1,Lt(r,s,o,g),s.child)}function ip(r,s,o,d,g){if(Pt(o)){var y=!0;za(s)}else y=!1;if(Ci(s,g),s.stateNode===null)au(r,s),Vh(s,o,d),_l(s,o,d,g),d=!0;else if(r===null){var k=s.stateNode,I=s.memoizedProps;k.props=I;var F=k.context,Y=o.contextType;typeof Y=="object"&&Y!==null?Y=tn(Y):(Y=Pt(o)?Lr:Ct.current,Y=Ei(s,Y));var re=o.getDerivedStateFromProps,ie=typeof re=="function"||typeof k.getSnapshotBeforeUpdate=="function";ie||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(I!==d||F!==Y)&&qh(s,k,d,Y),ar=!1;var te=s.memoizedState;k.state=te,Xa(s,d,k,g),F=s.memoizedState,I!==d||te!==F||Dt.current||ar?(typeof re=="function"&&(Sl(s,o,re,d),F=s.memoizedState),(I=ar||Yh(s,o,I,d,te,F,Y))?(ie||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(s.flags|=4194308)):(typeof k.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=d,s.memoizedState=F),k.props=d,k.state=F,k.context=Y,d=I):(typeof k.componentDidMount=="function"&&(s.flags|=4194308),d=!1)}else{k=s.stateNode,xh(r,s),I=s.memoizedProps,Y=s.type===s.elementType?I:fn(s.type,I),k.props=Y,ie=s.pendingProps,te=k.context,F=o.contextType,typeof F=="object"&&F!==null?F=tn(F):(F=Pt(o)?Lr:Ct.current,F=Ei(s,F));var Ee=o.getDerivedStateFromProps;(re=typeof Ee=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(I!==ie||te!==F)&&qh(s,k,d,F),ar=!1,te=s.memoizedState,k.state=te,Xa(s,d,k,g);var xe=s.memoizedState;I!==ie||te!==xe||Dt.current||ar?(typeof Ee=="function"&&(Sl(s,o,Ee,d),xe=s.memoizedState),(Y=ar||Yh(s,o,Y,d,te,xe,F)||!1)?(re||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(d,xe,F),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(d,xe,F)),typeof k.componentDidUpdate=="function"&&(s.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof k.componentDidUpdate!="function"||I===r.memoizedProps&&te===r.memoizedState||(s.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||I===r.memoizedProps&&te===r.memoizedState||(s.flags|=1024),s.memoizedProps=d,s.memoizedState=xe),k.props=d,k.state=xe,k.context=F,d=Y):(typeof k.componentDidUpdate!="function"||I===r.memoizedProps&&te===r.memoizedState||(s.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||I===r.memoizedProps&&te===r.memoizedState||(s.flags|=1024),d=!1)}return Al(r,s,o,d,y,g)}function Al(r,s,o,d,g,y){rp(r,s);var k=(s.flags&128)!==0;if(!d&&!k)return g&&lh(s,o,!1),Hn(r,s,y);d=s.stateNode,sy.current=s;var I=k&&typeof o.getDerivedStateFromError!="function"?null:d.render();return s.flags|=1,r!==null&&k?(s.child=bi(s,r.child,null,y),s.child=bi(s,null,I,y)):Lt(r,s,I,y),s.memoizedState=d.state,g&&lh(s,o,!0),s.child}function sp(r){var s=r.stateNode;s.pendingContext?uh(r,s.pendingContext,s.pendingContext!==s.context):s.context&&uh(r,s.context,!1),fl(r,s.containerInfo)}function ap(r,s,o,d,g){return xi(),sl(g),s.flags|=256,Lt(r,s,o,d),s.child}var Il={dehydrated:null,treeContext:null,retryLane:0};function Ll(r){return{baseLanes:r,cachePool:null,transitions:null}}function up(r,s,o){var d=s.pendingProps,g=it.current,y=!1,k=(s.flags&128)!==0,I;if((I=k)||(I=r!==null&&r.memoizedState===null?!1:(g&2)!==0),I?(y=!0,s.flags&=-129):(r===null||r.memoizedState!==null)&&(g|=1),Xe(it,g&1),r===null)return il(s),r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((s.mode&1)===0?s.lanes=1:r.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(k=d.children,r=d.fallback,y?(d=s.mode,y=s.child,k={mode:"hidden",children:k},(d&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=k):y=Tu(k,d,0,null),r=Hr(r,d,o,null),y.return=s,r.return=s,y.sibling=r,s.child=y,s.child.memoizedState=Ll(o),s.memoizedState=Il,r):Rl(s,k));if(g=r.memoizedState,g!==null&&(I=g.dehydrated,I!==null))return ay(r,s,k,d,I,g,o);if(y){y=d.fallback,k=s.mode,g=r.child,I=g.sibling;var F={mode:"hidden",children:d.children};return(k&1)===0&&s.child!==g?(d=s.child,d.childLanes=0,d.pendingProps=F,s.deletions=null):(d=hr(g,F),d.subtreeFlags=g.subtreeFlags&14680064),I!==null?y=hr(I,y):(y=Hr(y,k,o,null),y.flags|=2),y.return=s,d.return=s,d.sibling=y,s.child=d,d=y,y=s.child,k=r.child.memoizedState,k=k===null?Ll(o):{baseLanes:k.baseLanes|o,cachePool:null,transitions:k.transitions},y.memoizedState=k,y.childLanes=r.childLanes&~o,s.memoizedState=Il,d}return y=r.child,r=y.sibling,d=hr(y,{mode:"visible",children:d.children}),(s.mode&1)===0&&(d.lanes=o),d.return=s,d.sibling=null,r!==null&&(o=s.deletions,o===null?(s.deletions=[r],s.flags|=16):o.push(r)),s.child=d,s.memoizedState=null,d}function Rl(r,s){return s=Tu({mode:"visible",children:s},r.mode,0,null),s.return=r,r.child=s}function su(r,s,o,d){return d!==null&&sl(d),bi(s,r.child,null,o),r=Rl(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function ay(r,s,o,d,g,y,k){if(o)return s.flags&256?(s.flags&=-257,d=vl(Error(n(422))),su(r,s,k,d)):s.memoizedState!==null?(s.child=r.child,s.flags|=128,null):(y=d.fallback,g=s.mode,d=Tu({mode:"visible",children:d.children},g,0,null),y=Hr(y,g,k,null),y.flags|=2,d.return=s,y.return=s,d.sibling=y,s.child=d,(s.mode&1)!==0&&bi(s,r.child,null,k),s.child.memoizedState=Ll(k),s.memoizedState=Il,y);if((s.mode&1)===0)return su(r,s,k,null);if(g.data==="$!"){if(d=g.nextSibling&&g.nextSibling.dataset,d)var I=d.dgst;return d=I,y=Error(n(419)),d=vl(y,d,void 0),su(r,s,k,d)}if(I=(k&r.childLanes)!==0,Mt||I){if(d=mt,d!==null){switch(k&-k){case 4:g=2;break;case 16:g=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(d.suspendedLanes|k))!==0?0:g,g!==0&&g!==y.retryLane&&(y.retryLane=g,Bn(r,g),mn(d,r,g,-1))}return Ql(),d=vl(Error(n(421))),su(r,s,k,d)}return g.data==="$?"?(s.flags|=128,s.child=r.child,s=yy.bind(null,r),g._reactRetry=s,null):(r=y.treeContext,qt=nr(g.nextSibling),Vt=s,tt=!0,dn=null,r!==null&&(Zt[en++]=Fn,Zt[en++]=jn,Zt[en++]=Rr,Fn=r.id,jn=r.overflow,Rr=s),s=Rl(s,d.children),s.flags|=4096,s)}function op(r,s,o){r.lanes|=s;var d=r.alternate;d!==null&&(d.lanes|=s),ll(r.return,s,o)}function Ol(r,s,o,d,g){var y=r.memoizedState;y===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:d,tail:o,tailMode:g}:(y.isBackwards=s,y.rendering=null,y.renderingStartTime=0,y.last=d,y.tail=o,y.tailMode=g)}function lp(r,s,o){var d=s.pendingProps,g=d.revealOrder,y=d.tail;if(Lt(r,s,d.children,o),d=it.current,(d&2)!==0)d=d&1|2,s.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&op(r,o,s);else if(r.tag===19)op(r,o,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}d&=1}if(Xe(it,d),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(o=s.child,g=null;o!==null;)r=o.alternate,r!==null&&Ja(r)===null&&(g=o),o=o.sibling;o=g,o===null?(g=s.child,s.child=null):(g=o.sibling,o.sibling=null),Ol(s,!1,g,o,y);break;case"backwards":for(o=null,g=s.child,s.child=null;g!==null;){if(r=g.alternate,r!==null&&Ja(r)===null){s.child=g;break}r=g.sibling,g.sibling=o,o=g,g=r}Ol(s,!0,o,null,y);break;case"together":Ol(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function au(r,s){(s.mode&1)===0&&r!==null&&(r.alternate=null,s.alternate=null,s.flags|=2)}function Hn(r,s,o){if(r!==null&&(s.dependencies=r.dependencies),Fr|=s.lanes,(o&s.childLanes)===0)return null;if(r!==null&&s.child!==r.child)throw Error(n(153));if(s.child!==null){for(r=s.child,o=hr(r,r.pendingProps),s.child=o,o.return=s;r.sibling!==null;)r=r.sibling,o=o.sibling=hr(r,r.pendingProps),o.return=s;o.sibling=null}return s.child}function uy(r,s,o){switch(s.tag){case 3:sp(s),xi();break;case 5:Ch(s);break;case 1:Pt(s.type)&&za(s);break;case 4:fl(s,s.stateNode.containerInfo);break;case 10:var d=s.type._context,g=s.memoizedProps.value;Xe(Qa,d._currentValue),d._currentValue=g;break;case 13:if(d=s.memoizedState,d!==null)return d.dehydrated!==null?(Xe(it,it.current&1),s.flags|=128,null):(o&s.child.childLanes)!==0?up(r,s,o):(Xe(it,it.current&1),r=Hn(r,s,o),r!==null?r.sibling:null);Xe(it,it.current&1);break;case 19:if(d=(o&s.childLanes)!==0,(r.flags&128)!==0){if(d)return lp(r,s,o);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),Xe(it,it.current),d)break;return null;case 22:case 23:return s.lanes=0,np(r,s,o)}return Hn(r,s,o)}var cp,Dl,dp,fp;cp=function(r,s){for(var o=s.child;o!==null;){if(o.tag===5||o.tag===6)r.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===s)break;for(;o.sibling===null;){if(o.return===null||o.return===s)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},Dl=function(){},dp=function(r,s,o,d){var g=r.memoizedProps;if(g!==d){r=s.stateNode,Pr(vn.current);var y=null;switch(o){case"input":g=Yi(r,g),d=Yi(r,d),y=[];break;case"select":g=S({},g,{value:void 0}),d=S({},d,{value:void 0}),y=[];break;case"textarea":g=Qi(r,g),d=Qi(r,d),y=[];break;default:typeof g.onClick!="function"&&typeof d.onClick=="function"&&(r.onclick=Ba)}xt(o,d);var k;o=null;for(Y in g)if(!d.hasOwnProperty(Y)&&g.hasOwnProperty(Y)&&g[Y]!=null)if(Y==="style"){var I=g[Y];for(k in I)I.hasOwnProperty(k)&&(o||(o={}),o[k]="")}else Y!=="dangerouslySetInnerHTML"&&Y!=="children"&&Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&Y!=="autoFocus"&&(a.hasOwnProperty(Y)?y||(y=[]):(y=y||[]).push(Y,null));for(Y in d){var F=d[Y];if(I=g!=null?g[Y]:void 0,d.hasOwnProperty(Y)&&F!==I&&(F!=null||I!=null))if(Y==="style")if(I){for(k in I)!I.hasOwnProperty(k)||F&&F.hasOwnProperty(k)||(o||(o={}),o[k]="");for(k in F)F.hasOwnProperty(k)&&I[k]!==F[k]&&(o||(o={}),o[k]=F[k])}else o||(y||(y=[]),y.push(Y,o)),o=F;else Y==="dangerouslySetInnerHTML"?(F=F?F.__html:void 0,I=I?I.__html:void 0,F!=null&&I!==F&&(y=y||[]).push(Y,F)):Y==="children"?typeof F!="string"&&typeof F!="number"||(y=y||[]).push(Y,""+F):Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&(a.hasOwnProperty(Y)?(F!=null&&Y==="onScroll"&&Je("scroll",r),y||I===F||(y=[])):(y=y||[]).push(Y,F))}o&&(y=y||[]).push("style",o);var Y=y;(s.updateQueue=Y)&&(s.flags|=4)}},fp=function(r,s,o,d){o!==d&&(s.flags|=4)};function _s(r,s){if(!tt)switch(r.tailMode){case"hidden":s=r.tail;for(var o=null;s!==null;)s.alternate!==null&&(o=s),s=s.sibling;o===null?r.tail=null:o.sibling=null;break;case"collapsed":o=r.tail;for(var d=null;o!==null;)o.alternate!==null&&(d=o),o=o.sibling;d===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function _t(r){var s=r.alternate!==null&&r.alternate.child===r.child,o=0,d=0;if(s)for(var g=r.child;g!==null;)o|=g.lanes|g.childLanes,d|=g.subtreeFlags&14680064,d|=g.flags&14680064,g.return=r,g=g.sibling;else for(g=r.child;g!==null;)o|=g.lanes|g.childLanes,d|=g.subtreeFlags,d|=g.flags,g.return=r,g=g.sibling;return r.subtreeFlags|=d,r.childLanes=o,s}function oy(r,s,o){var d=s.pendingProps;switch(nl(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _t(s),null;case 1:return Pt(s.type)&&Ha(),_t(s),null;case 3:return d=s.stateNode,Si(),Ze(Dt),Ze(Ct),ml(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(r===null||r.child===null)&&(Va(s)?s.flags|=4:r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,dn!==null&&(Yl(dn),dn=null))),Dl(r,s),_t(s),null;case 5:hl(s);var g=Pr(xs.current);if(o=s.type,r!==null&&s.stateNode!=null)dp(r,s,o,d,g),r.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!d){if(s.stateNode===null)throw Error(n(166));return _t(s),null}if(r=Pr(vn.current),Va(s)){d=s.stateNode,o=s.type;var y=s.memoizedProps;switch(d[_n]=s,d[ms]=y,r=(s.mode&1)!==0,o){case"dialog":Je("cancel",d),Je("close",d);break;case"iframe":case"object":case"embed":Je("load",d);break;case"video":case"audio":for(g=0;g<fs.length;g++)Je(fs[g],d);break;case"source":Je("error",d);break;case"img":case"image":case"link":Je("error",d),Je("load",d);break;case"details":Je("toggle",d);break;case"input":Vi(d,y),Je("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!y.multiple},Je("invalid",d);break;case"textarea":ma(d,y),Je("invalid",d)}xt(o,y),g=null;for(var k in y)if(y.hasOwnProperty(k)){var I=y[k];k==="children"?typeof I=="string"?d.textContent!==I&&(y.suppressHydrationWarning!==!0&&ja(d.textContent,I,r),g=["children",I]):typeof I=="number"&&d.textContent!==""+I&&(y.suppressHydrationWarning!==!0&&ja(d.textContent,I,r),g=["children",""+I]):a.hasOwnProperty(k)&&I!=null&&k==="onScroll"&&Je("scroll",d)}switch(o){case"input":rt(d),pa(d,y,!0);break;case"textarea":rt(d),Ea(d);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(d.onclick=Ba)}d=g,s.updateQueue=d,d!==null&&(s.flags|=4)}else{k=g.nodeType===9?g:g.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=X(o)),r==="http://www.w3.org/1999/xhtml"?o==="script"?(r=k.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof d.is=="string"?r=k.createElement(o,{is:d.is}):(r=k.createElement(o),o==="select"&&(k=r,d.multiple?k.multiple=!0:d.size&&(k.size=d.size))):r=k.createElementNS(r,o),r[_n]=s,r[ms]=d,cp(r,s,!1,!1),s.stateNode=r;e:{switch(k=Cn(o,d),o){case"dialog":Je("cancel",r),Je("close",r),g=d;break;case"iframe":case"object":case"embed":Je("load",r),g=d;break;case"video":case"audio":for(g=0;g<fs.length;g++)Je(fs[g],r);g=d;break;case"source":Je("error",r),g=d;break;case"img":case"image":case"link":Je("error",r),Je("load",r),g=d;break;case"details":Je("toggle",r),g=d;break;case"input":Vi(r,d),g=Yi(r,d),Je("invalid",r);break;case"option":g=d;break;case"select":r._wrapperState={wasMultiple:!!d.multiple},g=S({},d,{value:void 0}),Je("invalid",r);break;case"textarea":ma(r,d),g=Qi(r,d),Je("invalid",r);break;default:g=d}xt(o,g),I=g;for(y in I)if(I.hasOwnProperty(y)){var F=I[y];y==="style"?Gn(r,F):y==="dangerouslySetInnerHTML"?(F=F?F.__html:void 0,F!=null&&Pe(r,F)):y==="children"?typeof F=="string"?(o!=="textarea"||F!=="")&&He(r,F):typeof F=="number"&&He(r,""+F):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(a.hasOwnProperty(y)?F!=null&&y==="onScroll"&&Je("scroll",r):F!=null&&U(r,y,F,k))}switch(o){case"input":rt(r),pa(r,d,!1);break;case"textarea":rt(r),Ea(r);break;case"option":d.value!=null&&r.setAttribute("value",""+De(d.value));break;case"select":r.multiple=!!d.multiple,y=d.value,y!=null?Qn(r,!!d.multiple,y,!1):d.defaultValue!=null&&Qn(r,!!d.multiple,d.defaultValue,!0);break;default:typeof g.onClick=="function"&&(r.onclick=Ba)}switch(o){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}}d&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return _t(s),null;case 6:if(r&&s.stateNode!=null)fp(r,s,r.memoizedProps,d);else{if(typeof d!="string"&&s.stateNode===null)throw Error(n(166));if(o=Pr(xs.current),Pr(vn.current),Va(s)){if(d=s.stateNode,o=s.memoizedProps,d[_n]=s,(y=d.nodeValue!==o)&&(r=Vt,r!==null))switch(r.tag){case 3:ja(d.nodeValue,o,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&ja(d.nodeValue,o,(r.mode&1)!==0)}y&&(s.flags|=4)}else d=(o.nodeType===9?o:o.ownerDocument).createTextNode(d),d[_n]=s,s.stateNode=d}return _t(s),null;case 13:if(Ze(it),d=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(tt&&qt!==null&&(s.mode&1)!==0&&(s.flags&128)===0)mh(),xi(),s.flags|=98560,y=!1;else if(y=Va(s),d!==null&&d.dehydrated!==null){if(r===null){if(!y)throw Error(n(318));if(y=s.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(n(317));y[_n]=s}else xi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;_t(s),y=!1}else dn!==null&&(Yl(dn),dn=null),y=!0;if(!y)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=o,s):(d=d!==null,d!==(r!==null&&r.memoizedState!==null)&&d&&(s.child.flags|=8192,(s.mode&1)!==0&&(r===null||(it.current&1)!==0?ht===0&&(ht=3):Ql())),s.updateQueue!==null&&(s.flags|=4),_t(s),null);case 4:return Si(),Dl(r,s),r===null&&hs(s.stateNode.containerInfo),_t(s),null;case 10:return ol(s.type._context),_t(s),null;case 17:return Pt(s.type)&&Ha(),_t(s),null;case 19:if(Ze(it),y=s.memoizedState,y===null)return _t(s),null;if(d=(s.flags&128)!==0,k=y.rendering,k===null)if(d)_s(y,!1);else{if(ht!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(k=Ja(r),k!==null){for(s.flags|=128,_s(y,!1),d=k.updateQueue,d!==null&&(s.updateQueue=d,s.flags|=4),s.subtreeFlags=0,d=o,o=s.child;o!==null;)y=o,r=d,y.flags&=14680066,k=y.alternate,k===null?(y.childLanes=0,y.lanes=r,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=k.childLanes,y.lanes=k.lanes,y.child=k.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=k.memoizedProps,y.memoizedState=k.memoizedState,y.updateQueue=k.updateQueue,y.type=k.type,r=k.dependencies,y.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),o=o.sibling;return Xe(it,it.current&1|2),s.child}r=r.sibling}y.tail!==null&&ut()>wi&&(s.flags|=128,d=!0,_s(y,!1),s.lanes=4194304)}else{if(!d)if(r=Ja(k),r!==null){if(s.flags|=128,d=!0,o=r.updateQueue,o!==null&&(s.updateQueue=o,s.flags|=4),_s(y,!0),y.tail===null&&y.tailMode==="hidden"&&!k.alternate&&!tt)return _t(s),null}else 2*ut()-y.renderingStartTime>wi&&o!==1073741824&&(s.flags|=128,d=!0,_s(y,!1),s.lanes=4194304);y.isBackwards?(k.sibling=s.child,s.child=k):(o=y.last,o!==null?o.sibling=k:s.child=k,y.last=k)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=ut(),s.sibling=null,o=it.current,Xe(it,d?o&1|2:o&1),s):(_t(s),null);case 22:case 23:return ql(),d=s.memoizedState!==null,r!==null&&r.memoizedState!==null!==d&&(s.flags|=8192),d&&(s.mode&1)!==0?(Qt&1073741824)!==0&&(_t(s),s.subtreeFlags&6&&(s.flags|=8192)):_t(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function ly(r,s){switch(nl(s),s.tag){case 1:return Pt(s.type)&&Ha(),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return Si(),Ze(Dt),Ze(Ct),ml(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 5:return hl(s),null;case 13:if(Ze(it),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(n(340));xi()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return Ze(it),null;case 4:return Si(),null;case 10:return ol(s.type._context),null;case 22:case 23:return ql(),null;case 24:return null;default:return null}}var uu=!1,vt=!1,cy=typeof WeakSet=="function"?WeakSet:Set,ye=null;function vi(r,s){var o=r.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(d){at(r,s,d)}else o.current=null}function Pl(r,s,o){try{o()}catch(d){at(r,s,d)}}var hp=!1;function dy(r,s){if(qo=Na,r=Yf(),Bo(r)){if("selectionStart"in r)var o={start:r.selectionStart,end:r.selectionEnd};else e:{o=(o=r.ownerDocument)&&o.defaultView||window;var d=o.getSelection&&o.getSelection();if(d&&d.rangeCount!==0){o=d.anchorNode;var g=d.anchorOffset,y=d.focusNode;d=d.focusOffset;try{o.nodeType,y.nodeType}catch{o=null;break e}var k=0,I=-1,F=-1,Y=0,re=0,ie=r,te=null;t:for(;;){for(var Ee;ie!==o||g!==0&&ie.nodeType!==3||(I=k+g),ie!==y||d!==0&&ie.nodeType!==3||(F=k+d),ie.nodeType===3&&(k+=ie.nodeValue.length),(Ee=ie.firstChild)!==null;)te=ie,ie=Ee;for(;;){if(ie===r)break t;if(te===o&&++Y===g&&(I=k),te===y&&++re===d&&(F=k),(Ee=ie.nextSibling)!==null)break;ie=te,te=ie.parentNode}ie=Ee}o=I===-1||F===-1?null:{start:I,end:F}}else o=null}o=o||{start:0,end:0}}else o=null;for(Qo={focusedElem:r,selectionRange:o},Na=!1,ye=s;ye!==null;)if(s=ye,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,ye=r;else for(;ye!==null;){s=ye;try{var xe=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(xe!==null){var be=xe.memoizedProps,ot=xe.memoizedState,H=s.stateNode,j=H.getSnapshotBeforeUpdate(s.elementType===s.type?be:fn(s.type,be),ot);H.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var $=s.stateNode.containerInfo;$.nodeType===1?$.textContent="":$.nodeType===9&&$.documentElement&&$.removeChild($.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(oe){at(s,s.return,oe)}if(r=s.sibling,r!==null){r.return=s.return,ye=r;break}ye=s.return}return xe=hp,hp=!1,xe}function vs(r,s,o){var d=s.updateQueue;if(d=d!==null?d.lastEffect:null,d!==null){var g=d=d.next;do{if((g.tag&r)===r){var y=g.destroy;g.destroy=void 0,y!==void 0&&Pl(s,o,y)}g=g.next}while(g!==d)}}function ou(r,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var o=s=s.next;do{if((o.tag&r)===r){var d=o.create;o.destroy=d()}o=o.next}while(o!==s)}}function Ml(r){var s=r.ref;if(s!==null){var o=r.stateNode;switch(r.tag){case 5:r=o;break;default:r=o}typeof s=="function"?s(r):s.current=r}}function pp(r){var s=r.alternate;s!==null&&(r.alternate=null,pp(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&(delete s[_n],delete s[ms],delete s[Jo],delete s[qT],delete s[QT])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function mp(r){return r.tag===5||r.tag===3||r.tag===4}function gp(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||mp(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Fl(r,s,o){var d=r.tag;if(d===5||d===6)r=r.stateNode,s?o.nodeType===8?o.parentNode.insertBefore(r,s):o.insertBefore(r,s):(o.nodeType===8?(s=o.parentNode,s.insertBefore(r,o)):(s=o,s.appendChild(r)),o=o._reactRootContainer,o!=null||s.onclick!==null||(s.onclick=Ba));else if(d!==4&&(r=r.child,r!==null))for(Fl(r,s,o),r=r.sibling;r!==null;)Fl(r,s,o),r=r.sibling}function jl(r,s,o){var d=r.tag;if(d===5||d===6)r=r.stateNode,s?o.insertBefore(r,s):o.appendChild(r);else if(d!==4&&(r=r.child,r!==null))for(jl(r,s,o),r=r.sibling;r!==null;)jl(r,s,o),r=r.sibling}var bt=null,hn=!1;function or(r,s,o){for(o=o.child;o!==null;)Ep(r,s,o),o=o.sibling}function Ep(r,s,o){if(Sn&&typeof Sn.onCommitFiberUnmount=="function")try{Sn.onCommitFiberUnmount(ba,o)}catch{}switch(o.tag){case 5:vt||vi(o,s);case 6:var d=bt,g=hn;bt=null,or(r,s,o),bt=d,hn=g,bt!==null&&(hn?(r=bt,o=o.stateNode,r.nodeType===8?r.parentNode.removeChild(o):r.removeChild(o)):bt.removeChild(o.stateNode));break;case 18:bt!==null&&(hn?(r=bt,o=o.stateNode,r.nodeType===8?Xo(r.parentNode,o):r.nodeType===1&&Xo(r,o),is(r)):Xo(bt,o.stateNode));break;case 4:d=bt,g=hn,bt=o.stateNode.containerInfo,hn=!0,or(r,s,o),bt=d,hn=g;break;case 0:case 11:case 14:case 15:if(!vt&&(d=o.updateQueue,d!==null&&(d=d.lastEffect,d!==null))){g=d=d.next;do{var y=g,k=y.destroy;y=y.tag,k!==void 0&&((y&2)!==0||(y&4)!==0)&&Pl(o,s,k),g=g.next}while(g!==d)}or(r,s,o);break;case 1:if(!vt&&(vi(o,s),d=o.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=o.memoizedProps,d.state=o.memoizedState,d.componentWillUnmount()}catch(I){at(o,s,I)}or(r,s,o);break;case 21:or(r,s,o);break;case 22:o.mode&1?(vt=(d=vt)||o.memoizedState!==null,or(r,s,o),vt=d):or(r,s,o);break;default:or(r,s,o)}}function Tp(r){var s=r.updateQueue;if(s!==null){r.updateQueue=null;var o=r.stateNode;o===null&&(o=r.stateNode=new cy),s.forEach(function(d){var g=xy.bind(null,r,d);o.has(d)||(o.add(d),d.then(g,g))})}}function pn(r,s){var o=s.deletions;if(o!==null)for(var d=0;d<o.length;d++){var g=o[d];try{var y=r,k=s,I=k;e:for(;I!==null;){switch(I.tag){case 5:bt=I.stateNode,hn=!1;break e;case 3:bt=I.stateNode.containerInfo,hn=!0;break e;case 4:bt=I.stateNode.containerInfo,hn=!0;break e}I=I.return}if(bt===null)throw Error(n(160));Ep(y,k,g),bt=null,hn=!1;var F=g.alternate;F!==null&&(F.return=null),g.return=null}catch(Y){at(g,s,Y)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)yp(s,r),s=s.sibling}function yp(r,s){var o=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(pn(s,r),wn(r),d&4){try{vs(3,r,r.return),ou(3,r)}catch(be){at(r,r.return,be)}try{vs(5,r,r.return)}catch(be){at(r,r.return,be)}}break;case 1:pn(s,r),wn(r),d&512&&o!==null&&vi(o,o.return);break;case 5:if(pn(s,r),wn(r),d&512&&o!==null&&vi(o,o.return),r.flags&32){var g=r.stateNode;try{He(g,"")}catch(be){at(r,r.return,be)}}if(d&4&&(g=r.stateNode,g!=null)){var y=r.memoizedProps,k=o!==null?o.memoizedProps:y,I=r.type,F=r.updateQueue;if(r.updateQueue=null,F!==null)try{I==="input"&&y.type==="radio"&&y.name!=null&&qi(g,y),Cn(I,k);var Y=Cn(I,y);for(k=0;k<F.length;k+=2){var re=F[k],ie=F[k+1];re==="style"?Gn(g,ie):re==="dangerouslySetInnerHTML"?Pe(g,ie):re==="children"?He(g,ie):U(g,re,ie,Y)}switch(I){case"input":ii(g,y);break;case"textarea":ga(g,y);break;case"select":var te=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!y.multiple;var Ee=y.value;Ee!=null?Qn(g,!!y.multiple,Ee,!1):te!==!!y.multiple&&(y.defaultValue!=null?Qn(g,!!y.multiple,y.defaultValue,!0):Qn(g,!!y.multiple,y.multiple?[]:"",!1))}g[ms]=y}catch(be){at(r,r.return,be)}}break;case 6:if(pn(s,r),wn(r),d&4){if(r.stateNode===null)throw Error(n(162));g=r.stateNode,y=r.memoizedProps;try{g.nodeValue=y}catch(be){at(r,r.return,be)}}break;case 3:if(pn(s,r),wn(r),d&4&&o!==null&&o.memoizedState.isDehydrated)try{is(s.containerInfo)}catch(be){at(r,r.return,be)}break;case 4:pn(s,r),wn(r);break;case 13:pn(s,r),wn(r),g=r.child,g.flags&8192&&(y=g.memoizedState!==null,g.stateNode.isHidden=y,!y||g.alternate!==null&&g.alternate.memoizedState!==null||(Hl=ut())),d&4&&Tp(r);break;case 22:if(re=o!==null&&o.memoizedState!==null,r.mode&1?(vt=(Y=vt)||re,pn(s,r),vt=Y):pn(s,r),wn(r),d&8192){if(Y=r.memoizedState!==null,(r.stateNode.isHidden=Y)&&!re&&(r.mode&1)!==0)for(ye=r,re=r.child;re!==null;){for(ie=ye=re;ye!==null;){switch(te=ye,Ee=te.child,te.tag){case 0:case 11:case 14:case 15:vs(4,te,te.return);break;case 1:vi(te,te.return);var xe=te.stateNode;if(typeof xe.componentWillUnmount=="function"){d=te,o=te.return;try{s=d,xe.props=s.memoizedProps,xe.state=s.memoizedState,xe.componentWillUnmount()}catch(be){at(d,o,be)}}break;case 5:vi(te,te.return);break;case 22:if(te.memoizedState!==null){kp(ie);continue}}Ee!==null?(Ee.return=te,ye=Ee):kp(ie)}re=re.sibling}e:for(re=null,ie=r;;){if(ie.tag===5){if(re===null){re=ie;try{g=ie.stateNode,Y?(y=g.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(I=ie.stateNode,F=ie.memoizedProps.style,k=F!=null&&F.hasOwnProperty("display")?F.display:null,I.style.display=Jt("display",k))}catch(be){at(r,r.return,be)}}}else if(ie.tag===6){if(re===null)try{ie.stateNode.nodeValue=Y?"":ie.memoizedProps}catch(be){at(r,r.return,be)}}else if((ie.tag!==22&&ie.tag!==23||ie.memoizedState===null||ie===r)&&ie.child!==null){ie.child.return=ie,ie=ie.child;continue}if(ie===r)break e;for(;ie.sibling===null;){if(ie.return===null||ie.return===r)break e;re===ie&&(re=null),ie=ie.return}re===ie&&(re=null),ie.sibling.return=ie.return,ie=ie.sibling}}break;case 19:pn(s,r),wn(r),d&4&&Tp(r);break;case 21:break;default:pn(s,r),wn(r)}}function wn(r){var s=r.flags;if(s&2){try{e:{for(var o=r.return;o!==null;){if(mp(o)){var d=o;break e}o=o.return}throw Error(n(160))}switch(d.tag){case 5:var g=d.stateNode;d.flags&32&&(He(g,""),d.flags&=-33);var y=gp(r);jl(r,y,g);break;case 3:case 4:var k=d.stateNode.containerInfo,I=gp(r);Fl(r,I,k);break;default:throw Error(n(161))}}catch(F){at(r,r.return,F)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function fy(r,s,o){ye=r,xp(r)}function xp(r,s,o){for(var d=(r.mode&1)!==0;ye!==null;){var g=ye,y=g.child;if(g.tag===22&&d){var k=g.memoizedState!==null||uu;if(!k){var I=g.alternate,F=I!==null&&I.memoizedState!==null||vt;I=uu;var Y=vt;if(uu=k,(vt=F)&&!Y)for(ye=g;ye!==null;)k=ye,F=k.child,k.tag===22&&k.memoizedState!==null?Cp(g):F!==null?(F.return=k,ye=F):Cp(g);for(;y!==null;)ye=y,xp(y),y=y.sibling;ye=g,uu=I,vt=Y}bp(r)}else(g.subtreeFlags&8772)!==0&&y!==null?(y.return=g,ye=y):bp(r)}}function bp(r){for(;ye!==null;){var s=ye;if((s.flags&8772)!==0){var o=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:vt||ou(5,s);break;case 1:var d=s.stateNode;if(s.flags&4&&!vt)if(o===null)d.componentDidMount();else{var g=s.elementType===s.type?o.memoizedProps:fn(s.type,o.memoizedProps);d.componentDidUpdate(g,o.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var y=s.updateQueue;y!==null&&kh(s,y,d);break;case 3:var k=s.updateQueue;if(k!==null){if(o=null,s.child!==null)switch(s.child.tag){case 5:o=s.child.stateNode;break;case 1:o=s.child.stateNode}kh(s,k,o)}break;case 5:var I=s.stateNode;if(o===null&&s.flags&4){o=I;var F=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":F.autoFocus&&o.focus();break;case"img":F.src&&(o.src=F.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var Y=s.alternate;if(Y!==null){var re=Y.memoizedState;if(re!==null){var ie=re.dehydrated;ie!==null&&is(ie)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}vt||s.flags&512&&Ml(s)}catch(te){at(s,s.return,te)}}if(s===r){ye=null;break}if(o=s.sibling,o!==null){o.return=s.return,ye=o;break}ye=s.return}}function kp(r){for(;ye!==null;){var s=ye;if(s===r){ye=null;break}var o=s.sibling;if(o!==null){o.return=s.return,ye=o;break}ye=s.return}}function Cp(r){for(;ye!==null;){var s=ye;try{switch(s.tag){case 0:case 11:case 15:var o=s.return;try{ou(4,s)}catch(F){at(s,o,F)}break;case 1:var d=s.stateNode;if(typeof d.componentDidMount=="function"){var g=s.return;try{d.componentDidMount()}catch(F){at(s,g,F)}}var y=s.return;try{Ml(s)}catch(F){at(s,y,F)}break;case 5:var k=s.return;try{Ml(s)}catch(F){at(s,k,F)}}}catch(F){at(s,s.return,F)}if(s===r){ye=null;break}var I=s.sibling;if(I!==null){I.return=s.return,ye=I;break}ye=s.return}}var hy=Math.ceil,lu=W.ReactCurrentDispatcher,Bl=W.ReactCurrentOwner,rn=W.ReactCurrentBatchConfig,ze=0,mt=null,ct=null,kt=0,Qt=0,Ni=rr(0),ht=0,Ns=null,Fr=0,cu=0,Ul=0,ws=null,Ft=null,Hl=0,wi=1/0,zn=null,du=!1,zl=null,lr=null,fu=!1,cr=null,hu=0,As=0,$l=null,pu=-1,mu=0;function Rt(){return(ze&6)!==0?ut():pu!==-1?pu:pu=ut()}function dr(r){return(r.mode&1)===0?1:(ze&2)!==0&&kt!==0?kt&-kt:KT.transition!==null?(mu===0&&(mu=gf()),mu):(r=Ye,r!==0||(r=window.event,r=r===void 0?16:_f(r.type)),r)}function mn(r,s,o,d){if(50<As)throw As=0,$l=null,Error(n(185));Zi(r,o,d),((ze&2)===0||r!==mt)&&(r===mt&&((ze&2)===0&&(cu|=o),ht===4&&fr(r,kt)),jt(r,d),o===1&&ze===0&&(s.mode&1)===0&&(wi=ut()+500,$a&&sr()))}function jt(r,s){var o=r.callbackNode;KE(r,s);var d=Sa(r,r===mt?kt:0);if(d===0)o!==null&&hf(o),r.callbackNode=null,r.callbackPriority=0;else if(s=d&-d,r.callbackPriority!==s){if(o!=null&&hf(o),s===1)r.tag===0?GT(_p.bind(null,r)):ch(_p.bind(null,r)),YT(function(){(ze&6)===0&&sr()}),o=null;else{switch(Ef(d)){case 1:o=ko;break;case 4:o=pf;break;case 16:o=xa;break;case 536870912:o=mf;break;default:o=xa}o=Op(o,Sp.bind(null,r))}r.callbackPriority=s,r.callbackNode=o}}function Sp(r,s){if(pu=-1,mu=0,(ze&6)!==0)throw Error(n(327));var o=r.callbackNode;if(Ai()&&r.callbackNode!==o)return null;var d=Sa(r,r===mt?kt:0);if(d===0)return null;if((d&30)!==0||(d&r.expiredLanes)!==0||s)s=gu(r,d);else{s=d;var g=ze;ze|=2;var y=Np();(mt!==r||kt!==s)&&(zn=null,wi=ut()+500,Br(r,s));do try{gy();break}catch(I){vp(r,I)}while(!0);ul(),lu.current=y,ze=g,ct!==null?s=0:(mt=null,kt=0,s=ht)}if(s!==0){if(s===2&&(g=Co(r),g!==0&&(d=g,s=Wl(r,g))),s===1)throw o=Ns,Br(r,0),fr(r,d),jt(r,ut()),o;if(s===6)fr(r,d);else{if(g=r.current.alternate,(d&30)===0&&!py(g)&&(s=gu(r,d),s===2&&(y=Co(r),y!==0&&(d=y,s=Wl(r,y))),s===1))throw o=Ns,Br(r,0),fr(r,d),jt(r,ut()),o;switch(r.finishedWork=g,r.finishedLanes=d,s){case 0:case 1:throw Error(n(345));case 2:Ur(r,Ft,zn);break;case 3:if(fr(r,d),(d&130023424)===d&&(s=Hl+500-ut(),10<s)){if(Sa(r,0)!==0)break;if(g=r.suspendedLanes,(g&d)!==d){Rt(),r.pingedLanes|=r.suspendedLanes&g;break}r.timeoutHandle=Ko(Ur.bind(null,r,Ft,zn),s);break}Ur(r,Ft,zn);break;case 4:if(fr(r,d),(d&4194240)===d)break;for(s=r.eventTimes,g=-1;0<d;){var k=31-ln(d);y=1<<k,k=s[k],k>g&&(g=k),d&=~y}if(d=g,d=ut()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*hy(d/1960))-d,10<d){r.timeoutHandle=Ko(Ur.bind(null,r,Ft,zn),d);break}Ur(r,Ft,zn);break;case 5:Ur(r,Ft,zn);break;default:throw Error(n(329))}}}return jt(r,ut()),r.callbackNode===o?Sp.bind(null,r):null}function Wl(r,s){var o=ws;return r.current.memoizedState.isDehydrated&&(Br(r,s).flags|=256),r=gu(r,s),r!==2&&(s=Ft,Ft=o,s!==null&&Yl(s)),r}function Yl(r){Ft===null?Ft=r:Ft.push.apply(Ft,r)}function py(r){for(var s=r;;){if(s.flags&16384){var o=s.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var d=0;d<o.length;d++){var g=o[d],y=g.getSnapshot;g=g.value;try{if(!cn(y(),g))return!1}catch{return!1}}}if(o=s.child,s.subtreeFlags&16384&&o!==null)o.return=s,s=o;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function fr(r,s){for(s&=~Ul,s&=~cu,r.suspendedLanes|=s,r.pingedLanes&=~s,r=r.expirationTimes;0<s;){var o=31-ln(s),d=1<<o;r[o]=-1,s&=~d}}function _p(r){if((ze&6)!==0)throw Error(n(327));Ai();var s=Sa(r,0);if((s&1)===0)return jt(r,ut()),null;var o=gu(r,s);if(r.tag!==0&&o===2){var d=Co(r);d!==0&&(s=d,o=Wl(r,d))}if(o===1)throw o=Ns,Br(r,0),fr(r,s),jt(r,ut()),o;if(o===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=s,Ur(r,Ft,zn),jt(r,ut()),null}function Vl(r,s){var o=ze;ze|=1;try{return r(s)}finally{ze=o,ze===0&&(wi=ut()+500,$a&&sr())}}function jr(r){cr!==null&&cr.tag===0&&(ze&6)===0&&Ai();var s=ze;ze|=1;var o=rn.transition,d=Ye;try{if(rn.transition=null,Ye=1,r)return r()}finally{Ye=d,rn.transition=o,ze=s,(ze&6)===0&&sr()}}function ql(){Qt=Ni.current,Ze(Ni)}function Br(r,s){r.finishedWork=null,r.finishedLanes=0;var o=r.timeoutHandle;if(o!==-1&&(r.timeoutHandle=-1,WT(o)),ct!==null)for(o=ct.return;o!==null;){var d=o;switch(nl(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&Ha();break;case 3:Si(),Ze(Dt),Ze(Ct),ml();break;case 5:hl(d);break;case 4:Si();break;case 13:Ze(it);break;case 19:Ze(it);break;case 10:ol(d.type._context);break;case 22:case 23:ql()}o=o.return}if(mt=r,ct=r=hr(r.current,null),kt=Qt=s,ht=0,Ns=null,Ul=cu=Fr=0,Ft=ws=null,Dr!==null){for(s=0;s<Dr.length;s++)if(o=Dr[s],d=o.interleaved,d!==null){o.interleaved=null;var g=d.next,y=o.pending;if(y!==null){var k=y.next;y.next=g,d.next=k}o.pending=d}Dr=null}return r}function vp(r,s){do{var o=ct;try{if(ul(),Za.current=ru,eu){for(var d=st.memoizedState;d!==null;){var g=d.queue;g!==null&&(g.pending=null),d=d.next}eu=!1}if(Mr=0,pt=ft=st=null,bs=!1,ks=0,Bl.current=null,o===null||o.return===null){ht=1,Ns=s,ct=null;break}e:{var y=r,k=o.return,I=o,F=s;if(s=kt,I.flags|=32768,F!==null&&typeof F=="object"&&typeof F.then=="function"){var Y=F,re=I,ie=re.tag;if((re.mode&1)===0&&(ie===0||ie===11||ie===15)){var te=re.alternate;te?(re.updateQueue=te.updateQueue,re.memoizedState=te.memoizedState,re.lanes=te.lanes):(re.updateQueue=null,re.memoizedState=null)}var Ee=Xh(k);if(Ee!==null){Ee.flags&=-257,Jh(Ee,k,I,y,s),Ee.mode&1&&Kh(y,Y,s),s=Ee,F=Y;var xe=s.updateQueue;if(xe===null){var be=new Set;be.add(F),s.updateQueue=be}else xe.add(F);break e}else{if((s&1)===0){Kh(y,Y,s),Ql();break e}F=Error(n(426))}}else if(tt&&I.mode&1){var ot=Xh(k);if(ot!==null){(ot.flags&65536)===0&&(ot.flags|=256),Jh(ot,k,I,y,s),sl(_i(F,I));break e}}y=F=_i(F,I),ht!==4&&(ht=2),ws===null?ws=[y]:ws.push(y),y=k;do{switch(y.tag){case 3:y.flags|=65536,s&=-s,y.lanes|=s;var H=Qh(y,F,s);bh(y,H);break e;case 1:I=F;var j=y.type,$=y.stateNode;if((y.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||$!==null&&typeof $.componentDidCatch=="function"&&(lr===null||!lr.has($)))){y.flags|=65536,s&=-s,y.lanes|=s;var oe=Gh(y,I,s);bh(y,oe);break e}}y=y.return}while(y!==null)}Ap(o)}catch(ke){s=ke,ct===o&&o!==null&&(ct=o=o.return);continue}break}while(!0)}function Np(){var r=lu.current;return lu.current=ru,r===null?ru:r}function Ql(){(ht===0||ht===3||ht===2)&&(ht=4),mt===null||(Fr&268435455)===0&&(cu&268435455)===0||fr(mt,kt)}function gu(r,s){var o=ze;ze|=2;var d=Np();(mt!==r||kt!==s)&&(zn=null,Br(r,s));do try{my();break}catch(g){vp(r,g)}while(!0);if(ul(),ze=o,lu.current=d,ct!==null)throw Error(n(261));return mt=null,kt=0,ht}function my(){for(;ct!==null;)wp(ct)}function gy(){for(;ct!==null&&!HE();)wp(ct)}function wp(r){var s=Rp(r.alternate,r,Qt);r.memoizedProps=r.pendingProps,s===null?Ap(r):ct=s,Bl.current=null}function Ap(r){var s=r;do{var o=s.alternate;if(r=s.return,(s.flags&32768)===0){if(o=oy(o,s,Qt),o!==null){ct=o;return}}else{if(o=ly(o,s),o!==null){o.flags&=32767,ct=o;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{ht=6,ct=null;return}}if(s=s.sibling,s!==null){ct=s;return}ct=s=r}while(s!==null);ht===0&&(ht=5)}function Ur(r,s,o){var d=Ye,g=rn.transition;try{rn.transition=null,Ye=1,Ey(r,s,o,d)}finally{rn.transition=g,Ye=d}return null}function Ey(r,s,o,d){do Ai();while(cr!==null);if((ze&6)!==0)throw Error(n(327));o=r.finishedWork;var g=r.finishedLanes;if(o===null)return null;if(r.finishedWork=null,r.finishedLanes=0,o===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var y=o.lanes|o.childLanes;if(XE(r,y),r===mt&&(ct=mt=null,kt=0),(o.subtreeFlags&2064)===0&&(o.flags&2064)===0||fu||(fu=!0,Op(xa,function(){return Ai(),null})),y=(o.flags&15990)!==0,(o.subtreeFlags&15990)!==0||y){y=rn.transition,rn.transition=null;var k=Ye;Ye=1;var I=ze;ze|=4,Bl.current=null,dy(r,o),yp(o,r),FT(Qo),Na=!!qo,Qo=qo=null,r.current=o,fy(o),zE(),ze=I,Ye=k,rn.transition=y}else r.current=o;if(fu&&(fu=!1,cr=r,hu=g),y=r.pendingLanes,y===0&&(lr=null),YE(o.stateNode),jt(r,ut()),s!==null)for(d=r.onRecoverableError,o=0;o<s.length;o++)g=s[o],d(g.value,{componentStack:g.stack,digest:g.digest});if(du)throw du=!1,r=zl,zl=null,r;return(hu&1)!==0&&r.tag!==0&&Ai(),y=r.pendingLanes,(y&1)!==0?r===$l?As++:(As=0,$l=r):As=0,sr(),null}function Ai(){if(cr!==null){var r=Ef(hu),s=rn.transition,o=Ye;try{if(rn.transition=null,Ye=16>r?16:r,cr===null)var d=!1;else{if(r=cr,cr=null,hu=0,(ze&6)!==0)throw Error(n(331));var g=ze;for(ze|=4,ye=r.current;ye!==null;){var y=ye,k=y.child;if((ye.flags&16)!==0){var I=y.deletions;if(I!==null){for(var F=0;F<I.length;F++){var Y=I[F];for(ye=Y;ye!==null;){var re=ye;switch(re.tag){case 0:case 11:case 15:vs(8,re,y)}var ie=re.child;if(ie!==null)ie.return=re,ye=ie;else for(;ye!==null;){re=ye;var te=re.sibling,Ee=re.return;if(pp(re),re===Y){ye=null;break}if(te!==null){te.return=Ee,ye=te;break}ye=Ee}}}var xe=y.alternate;if(xe!==null){var be=xe.child;if(be!==null){xe.child=null;do{var ot=be.sibling;be.sibling=null,be=ot}while(be!==null)}}ye=y}}if((y.subtreeFlags&2064)!==0&&k!==null)k.return=y,ye=k;else e:for(;ye!==null;){if(y=ye,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:vs(9,y,y.return)}var H=y.sibling;if(H!==null){H.return=y.return,ye=H;break e}ye=y.return}}var j=r.current;for(ye=j;ye!==null;){k=ye;var $=k.child;if((k.subtreeFlags&2064)!==0&&$!==null)$.return=k,ye=$;else e:for(k=j;ye!==null;){if(I=ye,(I.flags&2048)!==0)try{switch(I.tag){case 0:case 11:case 15:ou(9,I)}}catch(ke){at(I,I.return,ke)}if(I===k){ye=null;break e}var oe=I.sibling;if(oe!==null){oe.return=I.return,ye=oe;break e}ye=I.return}}if(ze=g,sr(),Sn&&typeof Sn.onPostCommitFiberRoot=="function")try{Sn.onPostCommitFiberRoot(ba,r)}catch{}d=!0}return d}finally{Ye=o,rn.transition=s}}return!1}function Ip(r,s,o){s=_i(o,s),s=Qh(r,s,1),r=ur(r,s,1),s=Rt(),r!==null&&(Zi(r,1,s),jt(r,s))}function at(r,s,o){if(r.tag===3)Ip(r,r,o);else for(;s!==null;){if(s.tag===3){Ip(s,r,o);break}else if(s.tag===1){var d=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(lr===null||!lr.has(d))){r=_i(o,r),r=Gh(s,r,1),s=ur(s,r,1),r=Rt(),s!==null&&(Zi(s,1,r),jt(s,r));break}}s=s.return}}function Ty(r,s,o){var d=r.pingCache;d!==null&&d.delete(s),s=Rt(),r.pingedLanes|=r.suspendedLanes&o,mt===r&&(kt&o)===o&&(ht===4||ht===3&&(kt&130023424)===kt&&500>ut()-Hl?Br(r,0):Ul|=o),jt(r,s)}function Lp(r,s){s===0&&((r.mode&1)===0?s=1:(s=Ca,Ca<<=1,(Ca&130023424)===0&&(Ca=4194304)));var o=Rt();r=Bn(r,s),r!==null&&(Zi(r,s,o),jt(r,o))}function yy(r){var s=r.memoizedState,o=0;s!==null&&(o=s.retryLane),Lp(r,o)}function xy(r,s){var o=0;switch(r.tag){case 13:var d=r.stateNode,g=r.memoizedState;g!==null&&(o=g.retryLane);break;case 19:d=r.stateNode;break;default:throw Error(n(314))}d!==null&&d.delete(s),Lp(r,o)}var Rp;Rp=function(r,s,o){if(r!==null)if(r.memoizedProps!==s.pendingProps||Dt.current)Mt=!0;else{if((r.lanes&o)===0&&(s.flags&128)===0)return Mt=!1,uy(r,s,o);Mt=(r.flags&131072)!==0}else Mt=!1,tt&&(s.flags&1048576)!==0&&dh(s,Ya,s.index);switch(s.lanes=0,s.tag){case 2:var d=s.type;au(r,s),r=s.pendingProps;var g=Ei(s,Ct.current);Ci(s,o),g=Tl(null,s,d,r,g,o);var y=yl();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Pt(d)?(y=!0,za(s)):y=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,dl(s),g.updater=iu,s.stateNode=g,g._reactInternals=s,_l(s,d,r,o),s=Al(null,s,d,!0,y,o)):(s.tag=0,tt&&y&&tl(s),Lt(null,s,g,o),s=s.child),s;case 16:d=s.elementType;e:{switch(au(r,s),r=s.pendingProps,g=d._init,d=g(d._payload),s.type=d,g=s.tag=ky(d),r=fn(d,r),g){case 0:s=wl(null,s,d,r,o);break e;case 1:s=ip(null,s,d,r,o);break e;case 11:s=Zh(null,s,d,r,o);break e;case 14:s=ep(null,s,d,fn(d.type,r),o);break e}throw Error(n(306,d,""))}return s;case 0:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:fn(d,g),wl(r,s,d,g,o);case 1:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:fn(d,g),ip(r,s,d,g,o);case 3:e:{if(sp(s),r===null)throw Error(n(387));d=s.pendingProps,y=s.memoizedState,g=y.element,xh(r,s),Xa(s,d,null,o);var k=s.memoizedState;if(d=k.element,y.isDehydrated)if(y={element:d,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},s.updateQueue.baseState=y,s.memoizedState=y,s.flags&256){g=_i(Error(n(423)),s),s=ap(r,s,d,o,g);break e}else if(d!==g){g=_i(Error(n(424)),s),s=ap(r,s,d,o,g);break e}else for(qt=nr(s.stateNode.containerInfo.firstChild),Vt=s,tt=!0,dn=null,o=Th(s,null,d,o),s.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(xi(),d===g){s=Hn(r,s,o);break e}Lt(r,s,d,o)}s=s.child}return s;case 5:return Ch(s),r===null&&il(s),d=s.type,g=s.pendingProps,y=r!==null?r.memoizedProps:null,k=g.children,Go(d,g)?k=null:y!==null&&Go(d,y)&&(s.flags|=32),rp(r,s),Lt(r,s,k,o),s.child;case 6:return r===null&&il(s),null;case 13:return up(r,s,o);case 4:return fl(s,s.stateNode.containerInfo),d=s.pendingProps,r===null?s.child=bi(s,null,d,o):Lt(r,s,d,o),s.child;case 11:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:fn(d,g),Zh(r,s,d,g,o);case 7:return Lt(r,s,s.pendingProps,o),s.child;case 8:return Lt(r,s,s.pendingProps.children,o),s.child;case 12:return Lt(r,s,s.pendingProps.children,o),s.child;case 10:e:{if(d=s.type._context,g=s.pendingProps,y=s.memoizedProps,k=g.value,Xe(Qa,d._currentValue),d._currentValue=k,y!==null)if(cn(y.value,k)){if(y.children===g.children&&!Dt.current){s=Hn(r,s,o);break e}}else for(y=s.child,y!==null&&(y.return=s);y!==null;){var I=y.dependencies;if(I!==null){k=y.child;for(var F=I.firstContext;F!==null;){if(F.context===d){if(y.tag===1){F=Un(-1,o&-o),F.tag=2;var Y=y.updateQueue;if(Y!==null){Y=Y.shared;var re=Y.pending;re===null?F.next=F:(F.next=re.next,re.next=F),Y.pending=F}}y.lanes|=o,F=y.alternate,F!==null&&(F.lanes|=o),ll(y.return,o,s),I.lanes|=o;break}F=F.next}}else if(y.tag===10)k=y.type===s.type?null:y.child;else if(y.tag===18){if(k=y.return,k===null)throw Error(n(341));k.lanes|=o,I=k.alternate,I!==null&&(I.lanes|=o),ll(k,o,s),k=y.sibling}else k=y.child;if(k!==null)k.return=y;else for(k=y;k!==null;){if(k===s){k=null;break}if(y=k.sibling,y!==null){y.return=k.return,k=y;break}k=k.return}y=k}Lt(r,s,g.children,o),s=s.child}return s;case 9:return g=s.type,d=s.pendingProps.children,Ci(s,o),g=tn(g),d=d(g),s.flags|=1,Lt(r,s,d,o),s.child;case 14:return d=s.type,g=fn(d,s.pendingProps),g=fn(d.type,g),ep(r,s,d,g,o);case 15:return tp(r,s,s.type,s.pendingProps,o);case 17:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:fn(d,g),au(r,s),s.tag=1,Pt(d)?(r=!0,za(s)):r=!1,Ci(s,o),Vh(s,d,g),_l(s,d,g,o),Al(null,s,d,!0,r,o);case 19:return lp(r,s,o);case 22:return np(r,s,o)}throw Error(n(156,s.tag))};function Op(r,s){return ff(r,s)}function by(r,s,o,d){this.tag=r,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sn(r,s,o,d){return new by(r,s,o,d)}function Gl(r){return r=r.prototype,!(!r||!r.isReactComponent)}function ky(r){if(typeof r=="function")return Gl(r)?1:0;if(r!=null){if(r=r.$$typeof,r===V)return 11;if(r===ee)return 14}return 2}function hr(r,s){var o=r.alternate;return o===null?(o=sn(r.tag,s,r.key,r.mode),o.elementType=r.elementType,o.type=r.type,o.stateNode=r.stateNode,o.alternate=r,r.alternate=o):(o.pendingProps=s,o.type=r.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=r.flags&14680064,o.childLanes=r.childLanes,o.lanes=r.lanes,o.child=r.child,o.memoizedProps=r.memoizedProps,o.memoizedState=r.memoizedState,o.updateQueue=r.updateQueue,s=r.dependencies,o.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},o.sibling=r.sibling,o.index=r.index,o.ref=r.ref,o}function Eu(r,s,o,d,g,y){var k=2;if(d=r,typeof r=="function")Gl(r)&&(k=1);else if(typeof r=="string")k=5;else e:switch(r){case ae:return Hr(o.children,g,y,s);case Z:k=8,g|=8;break;case ce:return r=sn(12,o,s,g|2),r.elementType=ce,r.lanes=y,r;case pe:return r=sn(13,o,s,g),r.elementType=pe,r.lanes=y,r;case de:return r=sn(19,o,s,g),r.elementType=de,r.lanes=y,r;case Te:return Tu(o,g,y,s);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case M:k=10;break e;case me:k=9;break e;case V:k=11;break e;case ee:k=14;break e;case K:k=16,d=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return s=sn(k,o,s,g),s.elementType=r,s.type=d,s.lanes=y,s}function Hr(r,s,o,d){return r=sn(7,r,d,s),r.lanes=o,r}function Tu(r,s,o,d){return r=sn(22,r,d,s),r.elementType=Te,r.lanes=o,r.stateNode={isHidden:!1},r}function Kl(r,s,o){return r=sn(6,r,null,s),r.lanes=o,r}function Xl(r,s,o){return s=sn(4,r.children!==null?r.children:[],r.key,s),s.lanes=o,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}function Cy(r,s,o,d,g){this.tag=s,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=So(0),this.expirationTimes=So(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=So(0),this.identifierPrefix=d,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Jl(r,s,o,d,g,y,k,I,F){return r=new Cy(r,s,o,I,F),s===1?(s=1,y===!0&&(s|=8)):s=0,y=sn(3,null,null,s),r.current=y,y.stateNode=r,y.memoizedState={element:d,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},dl(y),r}function Sy(r,s,o){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:B,key:d==null?null:""+d,children:r,containerInfo:s,implementation:o}}function Dp(r){if(!r)return ir;r=r._reactInternals;e:{if(Ar(r)!==r||r.tag!==1)throw Error(n(170));var s=r;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Pt(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(r.tag===1){var o=r.type;if(Pt(o))return oh(r,o,s)}return s}function Pp(r,s,o,d,g,y,k,I,F){return r=Jl(o,d,!0,r,g,y,k,I,F),r.context=Dp(null),o=r.current,d=Rt(),g=dr(o),y=Un(d,g),y.callback=s??null,ur(o,y,g),r.current.lanes=g,Zi(r,g,d),jt(r,d),r}function yu(r,s,o,d){var g=s.current,y=Rt(),k=dr(g);return o=Dp(o),s.context===null?s.context=o:s.pendingContext=o,s=Un(y,k),s.payload={element:r},d=d===void 0?null:d,d!==null&&(s.callback=d),r=ur(g,s,k),r!==null&&(mn(r,g,k,y),Ka(r,g,k)),k}function xu(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function Mp(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var o=r.retryLane;r.retryLane=o!==0&&o<s?o:s}}function Zl(r,s){Mp(r,s),(r=r.alternate)&&Mp(r,s)}function _y(){return null}var Fp=typeof reportError=="function"?reportError:function(r){console.error(r)};function ec(r){this._internalRoot=r}bu.prototype.render=ec.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(n(409));yu(r,s,null,null)},bu.prototype.unmount=ec.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;jr(function(){yu(null,r,null,null)}),s[Pn]=null}};function bu(r){this._internalRoot=r}bu.prototype.unstable_scheduleHydration=function(r){if(r){var s=xf();r={blockedOn:null,target:r,priority:s};for(var o=0;o<Zn.length&&s!==0&&s<Zn[o].priority;o++);Zn.splice(o,0,r),o===0&&Cf(r)}};function tc(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function ku(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function jp(){}function vy(r,s,o,d,g){if(g){if(typeof d=="function"){var y=d;d=function(){var Y=xu(k);y.call(Y)}}var k=Pp(s,d,r,0,null,!1,!1,"",jp);return r._reactRootContainer=k,r[Pn]=k.current,hs(r.nodeType===8?r.parentNode:r),jr(),k}for(;g=r.lastChild;)r.removeChild(g);if(typeof d=="function"){var I=d;d=function(){var Y=xu(F);I.call(Y)}}var F=Jl(r,0,!1,null,null,!1,!1,"",jp);return r._reactRootContainer=F,r[Pn]=F.current,hs(r.nodeType===8?r.parentNode:r),jr(function(){yu(s,F,o,d)}),F}function Cu(r,s,o,d,g){var y=o._reactRootContainer;if(y){var k=y;if(typeof g=="function"){var I=g;g=function(){var F=xu(k);I.call(F)}}yu(s,k,r,g)}else k=vy(o,s,r,g,d);return xu(k)}Tf=function(r){switch(r.tag){case 3:var s=r.stateNode;if(s.current.memoizedState.isDehydrated){var o=Ji(s.pendingLanes);o!==0&&(_o(s,o|1),jt(s,ut()),(ze&6)===0&&(wi=ut()+500,sr()))}break;case 13:jr(function(){var d=Bn(r,1);if(d!==null){var g=Rt();mn(d,r,1,g)}}),Zl(r,1)}},vo=function(r){if(r.tag===13){var s=Bn(r,134217728);if(s!==null){var o=Rt();mn(s,r,134217728,o)}Zl(r,134217728)}},yf=function(r){if(r.tag===13){var s=dr(r),o=Bn(r,s);if(o!==null){var d=Rt();mn(o,r,s,d)}Zl(r,s)}},xf=function(){return Ye},bf=function(r,s){var o=Ye;try{return Ye=r,s()}finally{Ye=o}},To=function(r,s,o){switch(s){case"input":if(ii(r,o),s=o.name,o.type==="radio"&&s!=null){for(o=r;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<o.length;s++){var d=o[s];if(d!==r&&d.form===r.form){var g=Ua(d);if(!g)throw Error(n(90));Nr(d),ii(d,g)}}}break;case"textarea":ga(r,o);break;case"select":s=o.value,s!=null&&Qn(r,!!o.multiple,s,!1)}},sf=Vl,af=jr;var Ny={usingClientEntryPoint:!1,Events:[gs,mi,Ua,nf,rf,Vl]},Is={findFiberByHostInstance:Ir,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},wy={bundleType:Is.bundleType,version:Is.version,rendererPackageName:Is.rendererPackageName,rendererConfig:Is.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:W.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=cf(r),r===null?null:r.stateNode},findFiberByHostInstance:Is.findFiberByHostInstance||_y,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Su=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Su.isDisabled&&Su.supportsFiber)try{ba=Su.inject(wy),Sn=Su}catch{}}return Bt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ny,Bt.createPortal=function(r,s){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!tc(s))throw Error(n(200));return Sy(r,s,null,o)},Bt.createRoot=function(r,s){if(!tc(r))throw Error(n(299));var o=!1,d="",g=Fp;return s!=null&&(s.unstable_strictMode===!0&&(o=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=Jl(r,1,!1,null,null,o,!1,d,g),r[Pn]=s.current,hs(r.nodeType===8?r.parentNode:r),new ec(s)},Bt.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=cf(s),r=r===null?null:r.stateNode,r},Bt.flushSync=function(r){return jr(r)},Bt.hydrate=function(r,s,o){if(!ku(s))throw Error(n(200));return Cu(null,r,s,!0,o)},Bt.hydrateRoot=function(r,s,o){if(!tc(r))throw Error(n(405));var d=o!=null&&o.hydratedSources||null,g=!1,y="",k=Fp;if(o!=null&&(o.unstable_strictMode===!0&&(g=!0),o.identifierPrefix!==void 0&&(y=o.identifierPrefix),o.onRecoverableError!==void 0&&(k=o.onRecoverableError)),s=Pp(s,null,r,1,o??null,g,!1,y,k),r[Pn]=s.current,hs(r),d)for(r=0;r<d.length;r++)o=d[r],g=o._getVersion,g=g(o._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[o,g]:s.mutableSourceEagerHydrationData.push(o,g);return new bu(s)},Bt.render=function(r,s,o){if(!ku(s))throw Error(n(200));return Cu(null,r,s,!1,o)},Bt.unmountComponentAtNode=function(r){if(!ku(r))throw Error(n(40));return r._reactRootContainer?(jr(function(){Cu(null,null,r,!1,function(){r._reactRootContainer=null,r[Pn]=null})}),!0):!1},Bt.unstable_batchedUpdates=Vl,Bt.unstable_renderSubtreeIntoContainer=function(r,s,o,d){if(!ku(o))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return Cu(r,s,o,!1,d)},Bt.version="18.3.1-next-f1338f8080-20240426",Bt}var Vp;function $0(){if(Vp)return ic.exports;Vp=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ic.exports=Fy(),ic.exports}var qp;function jy(){if(qp)return _u;qp=1;var e=$0();return _u.createRoot=e.createRoot,_u.hydrateRoot=e.hydrateRoot,_u}var By=jy();/**
42
+ * react-router v7.18.2
43
+ *
44
+ * Copyright (c) Remix Software Inc.
45
+ *
46
+ * This source code is licensed under the MIT license found in the
47
+ * LICENSE.md file in the root directory of this source tree.
48
+ *
49
+ * @license MIT
50
+ */var gd=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,W0=/^[\\/]{2}/;function Uy(e,t){return t+e.replace(/\\/g,"/")}var Qp="popstate";function Gp(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Hy(e={}){function t(i,a){var p;let u=(p=a.state)==null?void 0:p.masked,{pathname:l,search:c,hash:f}=u||i.location;return Hc("",{pathname:l,search:c,hash:f},a.state&&a.state.usr||null,a.state&&a.state.key||"default",u?{pathname:i.location.pathname,search:i.location.search,hash:i.location.hash}:void 0)}function n(i,a){return typeof a=="string"?a:Ks(a)}return $y(t,n,null,e)}function et(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function xn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function zy(){return Math.random().toString(36).substring(2,10)}function Kp(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Hc(e,t,n=null,i,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Fi(t):t,state:n,key:t&&t.key||i||zy(),mask:a}}function Ks({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Fi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let i=e.indexOf("?");i>=0&&(t.search=e.substring(i),e=e.substring(0,i)),e&&(t.pathname=e)}return t}function $y(e,t,n,i={}){let{window:a=document.defaultView,v5Compat:u=!1}=i,l=a.history,c="POP",f=null,p=T();p==null&&(p=0,l.replaceState({...l.state,idx:p},""));function T(){return(l.state||{idx:null}).idx}function E(){c="POP";let D=T(),A=D==null?null:D-p;p=D,f&&f({action:c,location:v.location,delta:A})}function x(D,A){c="PUSH";let R=Gp(D)?D:Hc(v.location,D,A);p=T()+1;let U=Kp(R,p),W=v.createHref(R.mask||R);try{l.pushState(U,"",W)}catch(q){if(q instanceof DOMException&&q.name==="DataCloneError")throw q;a.location.assign(W)}u&&f&&f({action:c,location:v.location,delta:1})}function b(D,A){c="REPLACE";let R=Gp(D)?D:Hc(v.location,D,A);p=T();let U=Kp(R,p),W=v.createHref(R.mask||R);l.replaceState(U,"",W),u&&f&&f({action:c,location:v.location,delta:0})}function C(D){return Wy(a,D)}let v={get action(){return c},get location(){return e(a,l)},listen(D){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(Qp,E),f=D,()=>{a.removeEventListener(Qp,E),f=null}},createHref(D){return t(a,D)},createURL:C,encodeLocation(D){let A=C(D);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:x,replace:b,go(D){return l.go(D)}};return v}function Wy(e,t,n=!1){let i="http://localhost";e&&(i=e.location.origin!=="null"?e.location.origin:e.location.href),et(i,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:Ks(t);return a=a.replace(/ $/,"%20"),!n&&W0.test(a)&&(a=i+a),new URL(a,i)}function Y0(e,t,n="/"){return Yy(e,t,n,!1)}function Yy(e,t,n,i,a){let u=typeof t=="string"?Fi(t):t,l=Wn(u.pathname||"/",n);if(l==null)return null;let c=Vy(e),f=null,p=K0(l);for(let T=0;f==null&&T<c.length;++T)f=nx(c[T],p,i);return f}function Vy(e){let t=V0(e);return qy(t),t}function V0(e,t=[],n=[],i="",a=!1){let u=(l,c,f=a,p)=>{let T={relativePath:p===void 0?l.path||"":p,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};if(T.relativePath.startsWith("/")){if(!T.relativePath.startsWith(i)&&f)return;et(T.relativePath.startsWith(i),`Absolute route path "${T.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),T.relativePath=T.relativePath.slice(i.length)}let E=Tn([i,T.relativePath]),x=n.concat(T);l.children&&l.children.length>0&&(et(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${E}".`),V0(l.children,t,x,E,f)),!(l.path==null&&!l.index)&&t.push({path:E,score:ex(E,l.index),routesMeta:x.map((b,C)=>{let[v,D]=G0(b.relativePath,b.caseSensitive,C===x.length-1);return{...b,matcher:v,compiledParams:D}})})};return e.forEach((l,c)=>{var f;if(l.path===""||!((f=l.path)!=null&&f.includes("?")))u(l,c);else for(let p of q0(l.path))u(l,c,!0,p)}),t}function q0(e){let t=e.split("/");if(t.length===0)return[];let[n,...i]=t,a=n.endsWith("?"),u=n.replace(/\?$/,"");if(i.length===0)return a?[u,""]:[u];let l=q0(i.join("/")),c=[];return c.push(...l.map(f=>f===""?u:[u,f].join("/"))),a&&c.push(...l),c.map(f=>e.startsWith("/")&&f===""?"/":f)}function qy(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:tx(t.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var Qy=/^:[\w-]+$/,Gy=3,Ky=2,Xy=1,Jy=10,Zy=-2,Xp=e=>e==="*";function ex(e,t){let n=e.split("/"),i=n.length;return n.some(Xp)&&(i+=Zy),t&&(i+=Ky),n.filter(a=>!Xp(a)).reduce((a,u)=>a+(Qy.test(u)?Gy:u===""?Xy:Jy),i)}function tx(e,t){return e.length===t.length&&e.slice(0,-1).every((i,a)=>i===t[a])?e[e.length-1]-t[t.length-1]:0}function nx(e,t,n=!1){let{routesMeta:i}=e,a={},u="/",l=[];for(let c=0;c<i.length;++c){let f=i[c],p=c===i.length-1,T=u==="/"?t:t.slice(u.length)||"/",E={path:f.relativePath,caseSensitive:f.caseSensitive,end:p},x=f.matcher&&f.compiledParams?Q0(E,T,f.matcher,f.compiledParams):Xs(E,T),b=f.route;if(!x&&p&&n&&!i[i.length-1].route.index&&(x=Xs({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},T)),!x)return null;Object.assign(a,x.params),l.push({params:a,pathname:Tn([u,x.pathname]),pathnameBase:sx(Tn([u,x.pathnameBase])),route:b}),x.pathnameBase!=="/"&&(u=Tn([u,x.pathnameBase]))}return l}function Xs(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,i]=G0(e.path,e.caseSensitive,e.end);return Q0(e,t,n,i)}function Q0(e,t,n,i){let a=t.match(n);if(!a)return null;let u=a[0],l=u.replace(/(.)\/+$/,"$1"),c=a.slice(1);return{params:i.reduce((p,{paramName:T,isOptional:E},x)=>{if(T==="*"){let C=c[x]||"";l=u.slice(0,u.length-C.length).replace(/(.)\/+$/,"$1")}const b=c[x];return E&&!b?p[T]=void 0:p[T]=(b||"").replace(/%2F/g,"/"),p},{}),pathname:u,pathnameBase:l,pattern:e}}function G0(e,t=!1,n=!0){xn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let i=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,c,f,p,T)=>{if(i.push({paramName:c,isOptional:f!=null}),f){let E=T.charAt(p+l.length);return E&&E!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),i]}function K0(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return xn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Wn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,i=e.charAt(n);return i&&i!=="/"?null:e.slice(n)||"/"}function rx(e,t="/"){let{pathname:n,search:i="",hash:a=""}=typeof e=="string"?Fi(e):e,u;return n?(n=X0(n),n.startsWith("/")?u=Jp(n.substring(1),"/"):u=Jp(n,t)):u=t,{pathname:u,search:ax(i),hash:ux(a)}}function Jp(e,t){let n=Wu(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function uc(e,t,n,i){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ix(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ed(e){let t=ix(e);return t.map((n,i)=>i===t.length-1?n.pathname:n.pathnameBase)}function Zu(e,t,n,i=!1){let a;typeof e=="string"?a=Fi(e):(a={...e},et(!a.pathname||!a.pathname.includes("?"),uc("?","pathname","search",a)),et(!a.pathname||!a.pathname.includes("#"),uc("#","pathname","hash",a)),et(!a.search||!a.search.includes("#"),uc("#","search","hash",a)));let u=e===""||a.pathname==="",l=u?"/":a.pathname,c;if(l==null)c=n;else{let E=t.length-1;if(!i&&l.startsWith("..")){let x=l.split("/");for(;x[0]==="..";)x.shift(),E-=1;a.pathname=x.join("/")}c=E>=0?t[E]:"/"}let f=rx(a,c),p=l&&l!=="/"&&l.endsWith("/"),T=(u||l===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(p||T)&&(f.pathname+="/"),f}var X0=e=>e.replace(/[\\/]{2,}/g,"/"),Tn=e=>X0(e.join("/")),Wu=e=>e.replace(/\/+$/,""),sx=e=>Wu(e).replace(/^\/*/,"/"),ax=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ux=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,ox=class{constructor(e,t,n,i=!1){this.status=e,this.statusText=t||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function lx(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function cx(e){let t=e.map(n=>n.route.path).filter(Boolean);return Tn(t)||"/"}var J0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Z0(e,t){let n=e;if(typeof n!="string"||!gd.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let i=n,a=!1;if(J0)try{let u=new URL(window.location.href),l=W0.test(n)?new URL(Uy(n,u.protocol)):new URL(n),c=Wn(l.pathname,t);l.origin===u.origin&&c!=null?n=c+l.search+l.hash:a=!0}catch{xn(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var eg=["POST","PUT","PATCH","DELETE"];new Set(eg);var dx=["GET",...eg];new Set(dx);var fx=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function hx(e){try{return fx.includes(new URL(e).protocol)}catch{return!1}}var ji=_.createContext(null);ji.displayName="DataRouter";var eo=_.createContext(null);eo.displayName="DataRouterState";var tg=_.createContext(!1);function px(){return _.useContext(tg)}var ng=_.createContext({isTransitioning:!1});ng.displayName="ViewTransition";var mx=_.createContext(new Map);mx.displayName="Fetchers";var gx=_.createContext(null);gx.displayName="Await";var Xt=_.createContext(null);Xt.displayName="Navigation";var na=_.createContext(null);na.displayName="Location";var Ln=_.createContext({outlet:null,matches:[],isDataRoute:!1});Ln.displayName="Route";var Td=_.createContext(null);Td.displayName="RouteError";var rg="REACT_ROUTER_ERROR",Ex="REDIRECT",Tx="ROUTE_ERROR_RESPONSE";function yx(e){if(e.startsWith(`${rg}:${Ex}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function xx(e){if(e.startsWith(`${rg}:${Tx}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new ox(t.status,t.statusText,t.data)}catch{}}function bx(e,{relative:t}={}){et(Jr(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:i}=_.useContext(Xt),{hash:a,pathname:u,search:l}=ra(e,{relative:t}),c=u;return n!=="/"&&(c=u==="/"?n:Tn([n,u])),i.createHref({pathname:c,search:l,hash:a})}function Jr(){return _.useContext(na)!=null}function bn(){return et(Jr(),"useLocation() may be used only in the context of a <Router> component."),_.useContext(na).location}function Zp(e){et(Jr(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=bn();return _.useMemo(()=>Xs(e,K0(t)),[t,e])}var ig="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function sg(e){_.useContext(Xt).static||_.useLayoutEffect(e)}function yd(){let{isDataRoute:e}=_.useContext(Ln);return e?Dx():kx()}function kx(){et(Jr(),"useNavigate() may be used only in the context of a <Router> component.");let e=_.useContext(ji),{basename:t,navigator:n}=_.useContext(Xt),{matches:i}=_.useContext(Ln),{pathname:a}=bn(),u=JSON.stringify(Ed(i)),l=_.useRef(!1);return sg(()=>{l.current=!0}),_.useCallback((f,p={})=>{if(xn(l.current,ig),!l.current)return;if(typeof f=="number"){n.go(f);return}let T=Zu(f,JSON.parse(u),a,p.relative==="path");e==null&&t!=="/"&&(T.pathname=T.pathname==="/"?t:Tn([t,T.pathname])),(p.replace?n.replace:n.push)(T,p.state,p)},[t,n,u,a,e])}_.createContext(null);function ra(e,{relative:t}={}){let{matches:n}=_.useContext(Ln),{pathname:i}=bn(),a=JSON.stringify(Ed(n));return _.useMemo(()=>Zu(e,JSON.parse(a),i,t==="path"),[e,a,i,t])}function Cx(e,t){return ag(e,t)}function ag(e,t,n){var D;et(Jr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=_.useContext(Xt),{matches:a}=_.useContext(Ln),u=a[a.length-1],l=u?u.params:{},c=u?u.pathname:"/",f=u?u.pathnameBase:"/",p=u&&u.route;{let A=p&&p.path||"";og(c,!p||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${A}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
51
+
52
+ Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let T=bn(),E;if(t){let A=typeof t=="string"?Fi(t):t;et(f==="/"||((D=A.pathname)==null?void 0:D.startsWith(f)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${A.pathname}" was given in the \`location\` prop.`),E=A}else E=T;let x=E.pathname||"/",b=x;if(f!=="/"){let A=f.replace(/^\//,"").split("/");b="/"+x.replace(/^\//,"").split("/").slice(A.length).join("/")}let C=n&&n.state.matches.length?n.state.matches.map(A=>Object.assign(A,{route:n.manifest[A.route.id]||A.route})):Y0(e,{pathname:b});xn(p||C!=null,`No routes matched location "${E.pathname}${E.search}${E.hash}" `),xn(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${E.pathname}${E.search}${E.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=wx(C&&C.map(A=>Object.assign({},A,{params:Object.assign({},l,A.params),pathname:Tn([f,i.encodeLocation?i.encodeLocation(A.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?f:Tn([f,i.encodeLocation?i.encodeLocation(A.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),a,n);return t&&v?_.createElement(na.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...E},navigationType:"POP"}},v):v}function Sx(){let e=Ox(),t=lx(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:i},u={padding:"2px 4px",backgroundColor:i},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=_.createElement(_.Fragment,null,_.createElement("p",null,"💿 Hey developer 👋"),_.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",_.createElement("code",{style:u},"ErrorBoundary")," or"," ",_.createElement("code",{style:u},"errorElement")," prop on your route.")),_.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),n?_.createElement("pre",{style:a},n):null,l)}var _x=_.createElement(Sx,null),ug=class extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=xx(e.digest);n&&(e=n)}let t=e!==void 0?_.createElement(Ln.Provider,{value:this.props.routeContext},_.createElement(Td.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?_.createElement(vx,{error:e},t):t}};ug.contextType=tg;var oc=new WeakMap;function vx({children:e,error:t}){let{basename:n}=_.useContext(Xt);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let i=yx(t.digest);if(i){let a=oc.get(t);if(a)throw a;let u=Z0(i.location,n),l=u.absoluteURL||u.to;if(hx(l))throw new Error("Invalid redirect location");if(J0&&!oc.get(t))if(u.isExternal||i.reloadDocument)window.location.href=l;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:i.replace}));throw oc.set(t,c),c}return _.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l}`})}}return e}function Nx({routeContext:e,match:t,children:n}){let i=_.useContext(ji);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(Ln.Provider,{value:e},n)}function wx(e,t=[],n){let i=n==null?void 0:n.state;if(e==null){if(!i)return null;if(i.errors)e=i.matches;else if(t.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let a=e,u=i==null?void 0:i.errors;if(u!=null){let T=a.findIndex(E=>E.route.id&&(u==null?void 0:u[E.route.id])!==void 0);et(T>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),a=a.slice(0,Math.min(a.length,T+1))}let l=!1,c=-1;if(n&&i){l=i.renderFallback;for(let T=0;T<a.length;T++){let E=a[T];if((E.route.HydrateFallback||E.route.hydrateFallbackElement)&&(c=T),E.route.id){let{loaderData:x,errors:b}=i,C=E.route.loader&&!x.hasOwnProperty(E.route.id)&&(!b||b[E.route.id]===void 0);if(E.route.lazy||C){n.isStatic&&(l=!0),c>=0?a=a.slice(0,c+1):a=[a[0]];break}}}}let f=n==null?void 0:n.onError,p=i&&f?(T,E)=>{var x,b;f(T,{location:i.location,params:((b=(x=i.matches)==null?void 0:x[0])==null?void 0:b.params)??{},pattern:cx(i.matches),errorInfo:E})}:void 0;return a.reduceRight((T,E,x)=>{let b,C=!1,v=null,D=null;i&&(b=u&&E.route.id?u[E.route.id]:void 0,v=E.route.errorElement||_x,l&&(c<0&&x===0?(og("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,D=null):c===x&&(C=!0,D=E.route.hydrateFallbackElement||null)));let A=t.concat(a.slice(0,x+1)),R=()=>{let U;return b?U=v:C?U=D:E.route.Component?U=_.createElement(E.route.Component,null):E.route.element?U=E.route.element:U=T,_.createElement(Nx,{match:E,routeContext:{outlet:T,matches:A,isDataRoute:i!=null},children:U})};return i&&(E.route.ErrorBoundary||E.route.errorElement||x===0)?_.createElement(ug,{location:i.location,revalidation:i.revalidation,component:v,error:b,children:R(),routeContext:{outlet:null,matches:A,isDataRoute:!0},onError:p}):R()},null)}function xd(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ax(e){let t=_.useContext(ji);return et(t,xd(e)),t}function Ix(e){let t=_.useContext(eo);return et(t,xd(e)),t}function Lx(e){let t=_.useContext(Ln);return et(t,xd(e)),t}function bd(e){let t=Lx(e),n=t.matches[t.matches.length-1];return et(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Rx(){return bd("useRouteId")}function Ox(){var i;let e=_.useContext(Td),t=Ix("useRouteError"),n=bd("useRouteError");return e!==void 0?e:(i=t.errors)==null?void 0:i[n]}function Dx(){let{router:e}=Ax("useNavigate"),t=bd("useNavigate"),n=_.useRef(!1);return sg(()=>{n.current=!0}),_.useCallback(async(a,u={})=>{xn(n.current,ig),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...u}))},[e,t])}var em={};function og(e,t,n){!t&&!em[e]&&(em[e]=!0,xn(!1,n))}_.memo(Px);function Px({routes:e,manifest:t,future:n,state:i,isStatic:a,onError:u}){return ag(e,void 0,{manifest:t,state:i,isStatic:a,onError:u})}function Mx({to:e,replace:t,state:n,relative:i}){et(Jr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=_.useContext(Xt);xn(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=_.useContext(Ln),{pathname:l}=bn(),c=yd(),f=Zu(e,Ed(u),l,i==="path"),p=JSON.stringify(f);return _.useEffect(()=>{c(JSON.parse(p),{replace:t,state:n,relative:i})},[c,p,i,t,n]),null}function Li(e){et(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Fx({basename:e="/",children:t=null,location:n,navigationType:i="POP",navigator:a,static:u=!1,useTransitions:l}){et(!Jr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),f=_.useMemo(()=>({basename:c,navigator:a,static:u,useTransitions:l,future:{}}),[c,a,u,l]);typeof n=="string"&&(n=Fi(n));let{pathname:p="/",search:T="",hash:E="",state:x=null,key:b="default",mask:C}=n,v=_.useMemo(()=>{let D=Wn(p,c);return D==null?null:{location:{pathname:D,search:T,hash:E,state:x,key:b,mask:C},navigationType:i}},[c,p,T,E,x,b,i,C]);return xn(v!=null,`<Router basename="${c}"> is not able to match the URL "${p}${T}${E}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:_.createElement(Xt.Provider,{value:f},_.createElement(na.Provider,{children:t,value:v}))}function jx({children:e,location:t}){return Cx(zc(e),t)}function zc(e,t=[]){let n=[];return _.Children.forEach(e,(i,a)=>{if(!_.isValidElement(i))return;let u=[...t,a];if(i.type===_.Fragment){n.push.apply(n,zc(i.props.children,u));return}et(i.type===Li,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),et(!i.props.index||!i.props.children,"An index route cannot have child routes.");let l={id:i.props.id||u.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(l.children=zc(i.props.children,u)),n.push(l)}),n}var Ou="get",Du="application/x-www-form-urlencoded";function to(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Bx(e){return to(e)&&e.tagName.toLowerCase()==="button"}function Ux(e){return to(e)&&e.tagName.toLowerCase()==="form"}function Hx(e){return to(e)&&e.tagName.toLowerCase()==="input"}function zx(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function $x(e,t){return e.button===0&&(!t||t==="_self")&&!zx(e)}var vu=null;function Wx(){if(vu===null)try{new FormData(document.createElement("form"),0),vu=!1}catch{vu=!0}return vu}var Yx=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function lc(e){return e!=null&&!Yx.has(e)?(xn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Du}"`),null):e}function Vx(e,t){let n,i,a,u,l;if(Ux(e)){let c=e.getAttribute("action");i=c?Wn(c,t):null,n=e.getAttribute("method")||Ou,a=lc(e.getAttribute("enctype"))||Du,u=new FormData(e)}else if(Bx(e)||Hx(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||c.getAttribute("action");if(i=f?Wn(f,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||Ou,a=lc(e.getAttribute("formenctype"))||lc(c.getAttribute("enctype"))||Du,u=new FormData(c,e),!Wx()){let{name:p,type:T,value:E}=e;if(T==="image"){let x=p?`${p}.`:"";u.append(`${x}x`,"0"),u.append(`${x}y`,"0")}else p&&u.append(p,E)}}else{if(to(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Ou,i=null,a=Du,l=e}return u&&a==="text/plain"&&(l=u,u=void 0),{action:i,method:n.toLowerCase(),encType:a,formData:u,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function kd(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function lg(e,t,n,i){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${i}`:a.pathname=`${a.pathname}.${i}`:a.pathname==="/"?a.pathname=`_root.${i}`:t&&Wn(a.pathname,t)==="/"?a.pathname=`${Wu(t)}/_root.${i}`:a.pathname=`${Wu(a.pathname)}.${i}`,a}async function qx(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Qx(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Gx(e,t,n){let i=await Promise.all(e.map(async a=>{let u=t.routes[a.route.id];if(u){let l=await qx(u,n);return l.links?l.links():[]}return[]}));return Zx(i.flat(1).filter(Qx).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function tm(e,t,n,i,a,u){let l=(f,p)=>n[p]?f.route.id!==n[p].route.id:!0,c=(f,p)=>{var T;return n[p].pathname!==f.pathname||((T=n[p].route.path)==null?void 0:T.endsWith("*"))&&n[p].params["*"]!==f.params["*"]};return u==="assets"?t.filter((f,p)=>l(f,p)||c(f,p)):u==="data"?t.filter((f,p)=>{var E;let T=i.routes[f.route.id];if(!T||!T.hasLoader)return!1;if(l(f,p)||c(f,p))return!0;if(f.route.shouldRevalidate){let x=f.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((E=n[0])==null?void 0:E.params)||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function Kx(e,t,{includeHydrateFallback:n}={}){return Xx(e.map(i=>{let a=t.routes[i.route.id];if(!a)return[];let u=[a.module];return a.clientActionModule&&(u=u.concat(a.clientActionModule)),a.clientLoaderModule&&(u=u.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(u=u.concat(a.hydrateFallbackModule)),a.imports&&(u=u.concat(a.imports)),u}).flat(1))}function Xx(e){return[...new Set(e)]}function Jx(e){let t={},n=Object.keys(e).sort();for(let i of n)t[i]=e[i];return t}function Zx(e,t){let n=new Set;return new Set(t),e.reduce((i,a)=>{let u=JSON.stringify(Jx(a));return n.has(u)||(n.add(u),i.push({key:u,link:a})),i},[])}function Cd(){let e=_.useContext(ji);return kd(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function e2(){let e=_.useContext(eo);return kd(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Sd=_.createContext(void 0);Sd.displayName="FrameworkContext";function no(){let e=_.useContext(Sd);return kd(e,"You must render this element inside a <HydratedRouter> element"),e}function t2(e,t){let n=_.useContext(Sd),[i,a]=_.useState(!1),[u,l]=_.useState(!1),{onFocus:c,onBlur:f,onMouseEnter:p,onMouseLeave:T,onTouchStart:E}=t,x=_.useRef(null);_.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let v=A=>{A.forEach(R=>{l(R.isIntersecting)})},D=new IntersectionObserver(v,{threshold:.5});return x.current&&D.observe(x.current),()=>{D.disconnect()}}},[e]),_.useEffect(()=>{if(i){let v=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(v)}}},[i]);let b=()=>{a(!0)},C=()=>{a(!1),l(!1)};return n?e!=="intent"?[u,x,{}]:[u,x,{onFocus:Rs(c,b),onBlur:Rs(f,C),onMouseEnter:Rs(p,b),onMouseLeave:Rs(T,C),onTouchStart:Rs(E,b)}]:[!1,x,{}]}function Rs(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function n2({page:e,...t}){let n=px(),{nonce:i}=no(),{router:a}=Cd(),u=_.useMemo(()=>Y0(a.routes,e,a.basename),[a.routes,e,a.basename]);return u?(t.nonce==null&&i&&(t={...t,nonce:i}),n?_.createElement(i2,{page:e,matches:u,...t}):_.createElement(s2,{page:e,matches:u,...t})):null}function r2(e){let{manifest:t,routeModules:n}=no(),[i,a]=_.useState([]);return _.useEffect(()=>{let u=!1;return Gx(e,t,n).then(l=>{u||a(l)}),()=>{u=!0}},[e,t,n]),i}function i2({page:e,matches:t,...n}){let i=bn(),{future:a}=no(),{basename:u}=Cd(),l=_.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let c=lg(e,u,a.v8_trailingSlashAwareDataRequests,"rsc"),f=!1,p=[];for(let T of t)typeof T.route.shouldRevalidate=="function"?f=!0:p.push(T.route.id);return f&&p.length>0&&c.searchParams.set("_routes",p.join(",")),[c.pathname+c.search]},[u,a.v8_trailingSlashAwareDataRequests,e,i,t]);return _.createElement(_.Fragment,null,l.map(c=>_.createElement("link",{key:c,rel:"prefetch",as:"fetch",href:c,...n})))}function s2({page:e,matches:t,...n}){let i=bn(),{future:a,manifest:u,routeModules:l}=no(),{basename:c}=Cd(),{loaderData:f,matches:p}=e2(),T=_.useMemo(()=>tm(e,t,p,u,i,"data"),[e,t,p,u,i]),E=_.useMemo(()=>tm(e,t,p,u,i,"assets"),[e,t,p,u,i]),x=_.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let v=new Set,D=!1;if(t.forEach(R=>{var W;let U=u.routes[R.route.id];!U||!U.hasLoader||(!T.some(q=>q.route.id===R.route.id)&&R.route.id in f&&((W=l[R.route.id])!=null&&W.shouldRevalidate)||U.hasClientLoader?D=!0:v.add(R.route.id))}),v.size===0)return[];let A=lg(e,c,a.v8_trailingSlashAwareDataRequests,"data");return D&&v.size>0&&A.searchParams.set("_routes",t.filter(R=>v.has(R.route.id)).map(R=>R.route.id).join(",")),[A.pathname+A.search]},[c,a.v8_trailingSlashAwareDataRequests,f,i,u,T,t,e,l]),b=_.useMemo(()=>Kx(E,u),[E,u]),C=r2(E);return _.createElement(_.Fragment,null,x.map(v=>_.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...n})),b.map(v=>_.createElement("link",{key:v,rel:"modulepreload",href:v,...n})),C.map(({key:v,link:D})=>_.createElement("link",{key:v,nonce:n.nonce,...D,crossOrigin:D.crossOrigin??n.crossOrigin})))}function a2(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var u2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{u2&&(window.__reactRouterVersion="7.18.2")}catch{}function o2({basename:e,children:t,useTransitions:n,window:i}){let a=_.useRef();a.current==null&&(a.current=Hy({window:i,v5Compat:!0}));let u=a.current,[l,c]=_.useState({action:u.action,location:u.location}),f=_.useCallback(p=>{n===!1?c(p):_.startTransition(()=>c(p))},[n]);return _.useLayoutEffect(()=>u.listen(f),[u,f]),_.createElement(Fx,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:u,useTransitions:n})}var _d=_.forwardRef(function({onClick:t,discover:n="render",prefetch:i="none",relative:a,reloadDocument:u,replace:l,mask:c,state:f,target:p,to:T,preventScrollReset:E,viewTransition:x,defaultShouldRevalidate:b,...C},v){let{basename:D,navigator:A,useTransitions:R}=_.useContext(Xt),U=typeof T=="string"&&gd.test(T),W=Z0(T,D);T=W.to;let q=bx(T,{relative:a}),B=bn(),ae=null;if(c){let ee=Zu(c,[],B.mask?B.mask.pathname:"/",!0);D!=="/"&&(ee.pathname=ee.pathname==="/"?D:Tn([D,ee.pathname])),ae=A.createHref(ee)}let[Z,ce,M]=t2(i,C),me=f2(T,{replace:l,mask:c,state:f,target:p,preventScrollReset:E,relative:a,viewTransition:x,defaultShouldRevalidate:b,useTransitions:R});function V(ee){t&&t(ee),ee.defaultPrevented||me(ee)}let pe=!(W.isExternal||u),de=_.createElement("a",{...C,...M,href:(pe?ae:void 0)||W.absoluteURL||q,onClick:pe?V:t,ref:a2(v,ce),target:p,"data-discover":!U&&n==="render"?"true":void 0});return Z&&!U?_.createElement(_.Fragment,null,de,_.createElement(n2,{page:q})):de});_d.displayName="Link";var l2=_.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:i="",end:a=!1,style:u,to:l,viewTransition:c,children:f,...p},T){let E=ra(l,{relative:p.relative}),x=bn(),b=_.useContext(eo),{navigator:C,basename:v}=_.useContext(Xt),D=b!=null&&E2(E)&&c===!0,A=C.encodeLocation?C.encodeLocation(E).pathname:E.pathname,R=x.pathname,U=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(R=R.toLowerCase(),U=U?U.toLowerCase():null,A=A.toLowerCase()),U&&v&&(U=Wn(U,v)||U);const W=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let q=R===A||!a&&R.startsWith(A)&&R.charAt(W)==="/",B=U!=null&&(U===A||!a&&U.startsWith(A)&&U.charAt(A.length)==="/"),ae={isActive:q,isPending:B,isTransitioning:D},Z=q?t:void 0,ce;typeof i=="function"?ce=i(ae):ce=[i,q?"active":null,B?"pending":null,D?"transitioning":null].filter(Boolean).join(" ");let M=typeof u=="function"?u(ae):u;return _.createElement(_d,{...p,"aria-current":Z,className:ce,ref:T,style:M,to:l,viewTransition:c},typeof f=="function"?f(ae):f)});l2.displayName="NavLink";var c2=_.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:i,replace:a,state:u,method:l=Ou,action:c,onSubmit:f,relative:p,preventScrollReset:T,viewTransition:E,defaultShouldRevalidate:x,...b},C)=>{let{useTransitions:v}=_.useContext(Xt),D=m2(),A=g2(c,{relative:p}),R=l.toLowerCase()==="get"?"get":"post",U=typeof c=="string"&&gd.test(c),W=q=>{if(f&&f(q),q.defaultPrevented)return;q.preventDefault();let B=q.nativeEvent.submitter,ae=(B==null?void 0:B.getAttribute("formmethod"))||l,Z=()=>D(B||q.currentTarget,{fetcherKey:t,method:ae,navigate:n,replace:a,state:u,relative:p,preventScrollReset:T,viewTransition:E,defaultShouldRevalidate:x});v&&n!==!1?_.startTransition(()=>Z()):Z()};return _.createElement("form",{ref:C,method:R,action:A,onSubmit:i?f:W,...b,"data-discover":!U&&e==="render"?"true":void 0})});c2.displayName="Form";function d2(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function cg(e){let t=_.useContext(ji);return et(t,d2(e)),t}function f2(e,{target:t,replace:n,mask:i,state:a,preventScrollReset:u,relative:l,viewTransition:c,defaultShouldRevalidate:f,useTransitions:p}={}){let T=yd(),E=bn(),x=ra(e,{relative:l});return _.useCallback(b=>{if($x(b,t)){b.preventDefault();let C=n!==void 0?n:Ks(E)===Ks(x),v=()=>T(e,{replace:C,mask:i,state:a,preventScrollReset:u,relative:l,viewTransition:c,defaultShouldRevalidate:f});p?_.startTransition(()=>v()):v()}},[E,T,x,n,i,a,t,e,u,l,c,f,p])}var h2=0,p2=()=>`__${String(++h2)}__`;function m2(){let{router:e}=cg("useSubmit"),{basename:t}=_.useContext(Xt),n=Rx(),i=e.fetch,a=e.navigate;return _.useCallback(async(u,l={})=>{let{action:c,method:f,encType:p,formData:T,body:E}=Vx(u,t);if(l.navigate===!1){let x=l.fetcherKey||p2();await i(x,n,l.action||c,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:T,body:E,formMethod:l.method||f,formEncType:l.encType||p,flushSync:l.flushSync})}else await a(l.action||c,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:T,body:E,formMethod:l.method||f,formEncType:l.encType||p,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[i,a,t,n])}function g2(e,{relative:t}={}){let{basename:n}=_.useContext(Xt),i=_.useContext(Ln);et(i,"useFormAction must be used inside a RouteContext");let[a]=i.matches.slice(-1),u={...ra(e||".",{relative:t})},l=bn();if(e==null){u.search=l.search;let c=new URLSearchParams(u.search),f=c.getAll("index");if(f.some(T=>T==="")){c.delete("index"),f.filter(E=>E).forEach(E=>c.append("index",E));let T=c.toString();u.search=T?`?${T}`:""}}return(!e||e===".")&&a.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(u.pathname=u.pathname==="/"?n:Tn([n,u.pathname])),Ks(u)}function E2(e,{relative:t}={}){let n=_.useContext(ng);et(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=cg("useViewTransitionState"),a=ra(e,{relative:t});if(!n.isTransitioning)return!1;let u=Wn(n.currentLocation.pathname,i)||n.currentLocation.pathname,l=Wn(n.nextLocation.pathname,i)||n.nextLocation.pathname;return Xs(a.pathname,l)!=null||Xs(a.pathname,u)!=null}const nm=e=>{let t;const n=new Set,i=(p,T)=>{const E=typeof p=="function"?p(t):p;if(!Object.is(E,t)){const x=t;t=T??(typeof E!="object"||E===null)?E:Object.assign({},t,E),n.forEach(b=>b(t,x))}},a=()=>t,c={setState:i,getState:a,getInitialState:()=>f,subscribe:p=>(n.add(p),()=>n.delete(p))},f=t=e(i,a,c);return c},T2=(e=>e?nm(e):nm),y2=e=>e;function x2(e,t=y2){const n=Us.useSyncExternalStore(e.subscribe,Us.useCallback(()=>t(e.getState()),[e,t]),Us.useCallback(()=>t(e.getInitialState()),[e,t]));return Us.useDebugValue(n),n}const rm=e=>{const t=T2(e),n=i=>x2(t,i);return Object.assign(n,t),n},b2=(e=>e?rm(e):rm),dg="invoke_sub_agent";function k2(e){var u;const t=(u=e._meta)==null?void 0:u.kiro;if((t==null?void 0:t.kind)==="agent-subtask")return dg;const n=t==null?void 0:t.serverName;if(!n)return;const i=e.title??"",a=`@${n}/`;return`${n}/${i.startsWith(a)?i.slice(a.length):i}`}const vd="Attached files: ";function fg(e){return e.split(`
53
+ `).filter(t=>!t.startsWith(vd)).join(`
54
+ `).trim()}function im(){return{turnStatus:"idle",contextUsagePercentage:0,compacting:!1}}function Pu(e,t,n=Date.now()){const i=[...e.items];return e.streamingThought.trim()&&i.push({type:"message",message:{id:`t-${t}`,role:"thinking",text:e.streamingThought.trim(),timestamp:n}}),e.streamingText.trim()&&i.push({type:"message",message:{id:`a-${t}`,role:"assistant",text:e.streamingText,timestamp:n}}),i}function sm(e){return e.map(t=>t.type==="tool_call"&&(t.tool.status==="pending"||t.tool.status==="in_progress")?{type:"tool_call",tool:{...t.tool,status:"failed"}}:t)}function C2(e,t,n,i){var a,u;if(t.sessionUpdate==="agent_message_chunk"){const l=((a=t.content)==null?void 0:a.text)??"";return{...e,streamingText:e.streamingText+l}}if(t.sessionUpdate==="agent_thought_chunk"){const l=((u=t.content)==null?void 0:u.text)??"";return{...e,streamingThought:e.streamingThought+l}}if(t.sessionUpdate==="tool_call"){const l=t,c=k2(l);return{items:[...Pu(e,`s-${n}`,i),{type:"tool_call",tool:{id:l.toolCallId,name:c,title:l.title??l.toolCallId,kind:l.kind,status:l.status??"pending",input:l.rawInput,content:l.content??[]}}],streamingText:"",streamingThought:""}}if(t.sessionUpdate==="tool_call_update"){const l=t;return{...e,items:e.items.map(c=>c.type==="tool_call"&&c.tool.id===l.toolCallId?{type:"tool_call",tool:{...c.tool,status:l.status??c.tool.status,output:l.rawOutput??c.tool.output,content:l.content??c.tool.content}}:c)}}return e}const S2=(e,t)=>t.updatedAt.localeCompare(e.updatedAt);function hg(e,t){const n=e.find(a=>a.chatId===t.chatId),i=n&&n.updatedAt.localeCompare(t.updatedAt)>0?{...t,updatedAt:n.updatedAt}:t;return[...e.filter(a=>a.chatId!==t.chatId),i].sort(S2)}function _2(e,t,n){const i=e.find(a=>a.chatId===t);return i?hg(e,{...i,updatedAt:n}):e}function pg(e){const t=e.toLowerCase();return t.includes("credential")||t.includes("expired")||t.includes("not authenticated")||t.includes("unauthorized")||t.includes("kiro-cli login")?{title:"Kiro isn't authenticated",fix:"Run `kiro-cli login` on the server, then retry.",sessionWide:!0}:t.includes("a turn is already running")?{title:"A turn is already running",fix:"Wait for the current turn to finish, or stop it first."}:t.includes("enoent")||t.includes("spawn")||t.includes("command not found")?{title:"Couldn't start kiro-cli",fix:"Check that KIRO_BIN points at an executable kiro-cli.",sessionWide:!0}:t.includes("timed out")?{title:"The request timed out"}:{title:"Turn failed"}}function v2(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;const t=Array.from(e,n=>n.toString(16).padStart(2,"0")).join("");return[t.slice(0,8),t.slice(8,12),t.slice(12,16),t.slice(16,20),t.slice(20)].join("-")}const ge=b2((e,t)=>({chats:[],models:[],agents:[],defaultAgentId:"vibe",activeId:null,chatId:null,loadingChatId:null,modes:[],items:[],appliedSeq:0,remainingOlder:0,observability:im(),subagents:[],fsVersion:{},watchedPaths:[],streamingText:"",streamingThought:"",pending:[],chatNotice:null,connStatus:"closed",createError:null,reloadingId:null,previewPath:null,setConnStatus:n=>e({connStatus:n}),setCreateError:n=>e({createError:n}),setReloadingId:n=>e({reloadingId:n}),openFilePreview:n=>e({previewPath:n}),closeFilePreview:()=>e({previewPath:null}),setSubagents:n=>e({subagents:n}),markCancelling:()=>e(n=>n.observability.turnStatus==="running"?{observability:{...n.observability,turnStatus:"cancelling"}}:{}),setCurrentModel:n=>e({currentModelId:n}),setCurrentEffort:n=>e({currentEffort:n}),setCurrentAgent:n=>e(i=>({currentModeId:n,chats:i.activeId?i.chats.map(a=>a.chatId===i.activeId?{...a,agentId:n}:a):i.chats})),setCompacting:n=>e(i=>i.observability.compacting===n?{}:{observability:{...i.observability,compacting:n}}),markPendingSending:n=>e(i=>({pending:i.pending.map(a=>a.id===n?{...a,status:"sending",error:void 0}:a)})),renameChatRow:(n,i)=>e(a=>({chats:a.chats.map(u=>u.chatId===n?{...u,title:i}:u)})),pinChatRow:(n,i)=>e(a=>({chats:a.chats.map(u=>u.chatId===n?{...u,pinned:i}:u)})),bumpFsPath:n=>e(i=>({fsVersion:{...i.fsVersion,[n]:(i.fsVersion[n]??0)+1}})),setWatchedPaths:n=>e({watchedPaths:n}),setChats:n=>e({chats:n}),setModels:n=>e({models:n}),setAgents:(n,i)=>e({agents:n,defaultAgentId:i}),setLoadingChat:n=>e({loadingChatId:n}),loadDetail:(n,i)=>e(a=>({activeId:n.summary.chatId,chatId:n.summary.chatId,loadingChatId:null,chats:hg(a.chats,n.summary),modes:n.modes,currentModeId:n.currentModeId,currentModelId:n.summary.modelId,currentEffort:n.summary.effortLevel,observability:n.observability,items:n.transcript,appliedSeq:n.head,remainingOlder:Math.max(0,n.transcriptTotal-n.transcript.length),streamingText:"",streamingThought:"",pending:i!=null&&i.keepPending?a.pending:[],chatNotice:null,subagents:[]})),prependItems:n=>e(i=>({items:[...n,...i.items],remainingOlder:Math.max(0,i.remainingOlder-n.length)})),newChatId:()=>{const n=v2();return e({chatId:n}),n},clearActive:()=>e({activeId:null,loadingChatId:null,modes:[],items:[],appliedSeq:0,remainingOlder:0,observability:im(),streamingText:"",streamingThought:"",pending:[],chatNotice:null,currentModeId:void 0,currentModelId:void 0,currentEffort:void 0,previewPath:null,subagents:[]}),dismissChatNotice:()=>e({chatNotice:null}),setChatNotice:n=>e({chatNotice:n}),addPending:n=>e(i=>({pending:[...i.pending,{...n,status:"sending"}]})),dropPending:n=>e(i=>({pending:i.pending.filter(a=>a.id!==n)})),markPendingFailed:(n,i)=>e(a=>({pending:a.pending.map(u=>u.id===n?{...u,status:"failed",error:i}:u)})),applyEvent:n=>{const i=t(),a=n.payload;if(!(n.seq<=i.appliedSeq))switch(e({appliedSeq:n.seq}),a.kind){case"turn_started":{const u=a.prompt.filter(T=>T.type==="text").map(T=>T.text).join(""),l=fg(u),c=i.pending.findIndex(T=>T.status==="sending"&&!T.steer),f=new Date(n.ts).toISOString(),p=_2(i.chats,n.chatId,f);e({items:[...i.items,{type:"message",message:{id:`u-${n.seq}`,role:"user",text:l,timestamp:n.ts,attachments:a.attachments}}],pending:c===-1?i.pending:i.pending.filter((T,E)=>E!==c),chats:p,streamingText:"",observability:{...i.observability,turnStatus:"running"}});break}case"session_update":{const u=C2(i,a.update,n.seq,n.ts);u!==i&&e({items:u.items,streamingText:u.streamingText,streamingThought:u.streamingThought});break}case"turn_ended":{const u=Pu(i,`s-${n.seq}`,n.ts),l=a.stopReason==="cancelled"?[...sm(u),{type:"turn_interrupted",id:`int-${n.seq}`,timestamp:n.ts}]:u;e({items:a.stats?[...l,{type:"turn_stats",id:`ts-${n.seq}`,...a.stats}]:l,chatNotice:null,streamingText:"",streamingThought:"",observability:{...i.observability,turnStatus:"idle"}});break}case"turn_error":{const u=pg(a.message);e({items:[...sm(Pu(i,`s-${n.seq}`,n.ts)),{type:"turn_error",id:`err-${n.seq}`,message:a.message,timestamp:n.ts}],chatNotice:u.sessionWide?{title:u.title,fix:u.fix,detail:a.message}:i.chatNotice,streamingText:"",streamingThought:"",observability:{...i.observability,turnStatus:"idle"}});break}case"subagents_changed":e({subagents:a.subagents});break;case"metadata":e({observability:{...i.observability,contextUsagePercentage:a.params.contextUsagePercentage??i.observability.contextUsagePercentage,contextBreakdown:a.params.contextBreakdown??i.observability.contextBreakdown,sessionCredits:a.params.sessionCredits??i.observability.sessionCredits}});break;case"settings_changed":e({currentModelId:a.modelId??i.currentModelId,currentEffort:a.effortLevel??void 0,chats:i.chats.map(u=>u.chatId===n.chatId?{...u,modelId:a.modelId??u.modelId,effortLevel:a.effortLevel??void 0}:u)});break;case"steer_injected":e({items:[...Pu(i,`s-${n.seq}`,n.ts),{type:"message",message:{id:`s-${n.seq}`,role:"user",text:a.text,timestamp:n.ts,steer:!0}}],streamingText:"",streamingThought:"",pending:i.pending.filter(u=>u.id!==a.clientId)});break;case"steer_dropped":a.clientId&&i.markPendingFailed(a.clientId,"The turn ended before Casper read this. Retry to send it.");break;case"prompt_id":{const u=[...i.items];for(let l=u.length-1;l>=0;l--){const c=u[l];if(c.type==="message"&&c.message.role==="user"&&!c.message.steer){c.message.messageId||(u[l]={...c,message:{...c.message,messageId:a.messageId}},e({items:u}));break}}break}case"compaction":{const u=a.params.status.type!=="started",l=a.params.summary??"";e({observability:{...i.observability,compacting:!u},items:u&&l.trim()?[...i.items,{type:"compaction",id:`c-${n.seq}`,summary:l,timestamp:n.ts}]:i.items});break}case"process_exited":e({observability:{...i.observability,turnStatus:"idle",compacting:!1}});break}}}));async function Ve(e,t,n){const i={};n!==void 0&&(i["content-type"]="application/json");const a=await fetch(t,{method:e,headers:i,credentials:"same-origin",body:n!==void 0?JSON.stringify(n):void 0});if(a.status===401)throw new Error("Unauthorized");if(!a.ok){const l=await a.text();let c="";try{c=JSON.parse(l).error??""}catch{}throw new Error(c||`${e} ${t} failed (${a.status}): ${l}`)}const u=await a.text();return u?JSON.parse(u):{}}function N2(e){return Ve("POST","/api/login",{token:e})}function w2(){return Ve("POST","/api/logout")}const Qe={devices:()=>Ve("GET","/api/devices"),revokeDevice:e=>Ve("DELETE",`/api/devices/${e}`),logoutAll:()=>Ve("POST","/api/logout-all"),models:()=>Ve("GET","/api/models"),agents:()=>Ve("GET","/api/agents"),listDirs:e=>Ve("GET",`/api/fs/dirs?path=${encodeURIComponent(e)}`),listChats:()=>Ve("GET","/api/chats"),createChat:e=>Ve("POST","/api/chats",e),getChat:e=>Ve("GET",`/api/chats/${e}`),transcriptPage:(e,t,n)=>Ve("GET",`/api/chats/${e}/transcript?offset=${t}&limit=${n}`),subagents:e=>Ve("GET",`/api/chats/${e}/subagents`),subagentDetail:(e,t)=>Ve("GET",`/api/chats/${e}/subagents/${t}`),deleteChat:e=>Ve("DELETE",`/api/chats/${e}`),renameChat:(e,t)=>Ve("POST",`/api/chats/${e}/rename`,{title:t}),pinChat:(e,t)=>Ve("POST",`/api/chats/${e}/pin`,{pinned:t}),setChatCwd:(e,t)=>Ve("POST",`/api/chats/${e}/cwd`,{cwd:t}),reloadChat:e=>Ve("POST",`/api/chats/${e}/reload`),chatUsage:e=>Ve("GET",`/api/chats/${e}/usage`),settings:()=>Ve("GET","/api/settings"),updateDefaults:e=>Ve("PUT","/api/settings/defaults",e),tools:()=>Ve("GET","/api/tools"),addMcpServer:e=>Ve("POST","/api/tools/mcp",e),setMcpServerDisabled:(e,t)=>Ve("PUT",`/api/tools/mcp/${encodeURIComponent(e)}`,{disabled:t}),removeMcpServer:e=>Ve("DELETE",`/api/tools/mcp/${encodeURIComponent(e)}`),branchChat:(e,t)=>Ve("POST",`/api/chats/${e}/branch`,{messageId:t}),rewindChat:(e,t)=>Ve("POST",`/api/chats/${e}/rewind`,{messageId:t}),tree:(e,t="")=>Ve("GET",`/api/chats/${e}/tree?path=${encodeURIComponent(t)}`),downloadUrl:(e,t)=>t.startsWith("/")?`/api/fs/file?download=1&path=${encodeURIComponent(t)}`:`/api/chats/${e}/download?path=${encodeURIComponent(t)}`,previewUrl:(e,t)=>t.startsWith("/")?`/api/fs/file?path=${encodeURIComponent(t)}`:`/api/chats/${e}/preview?path=${encodeURIComponent(t)}`,uploadFiles:async(e,t)=>{const n=new FormData;for(const a of t)n.append("files",a,a.name);const i=await fetch(`/api/chats/${encodeURIComponent(e)}/uploads`,{method:"POST",credentials:"same-origin",body:n});if(i.status===401)throw new Error("Unauthorized");if(!i.ok){const a=await i.text();throw new Error(`Upload failed (${i.status}): ${a}`)}return await i.json()}},Mu={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},A2=8e3,mg=25e3,I2=1e4;function am(e){return e.state===void 0||e.state===Mu.CLOSED||e.state===Mu.CLOSING?!0:e.state===Mu.CONNECTING?e.now-e.connectingSince>A2:e.now-e.lastMessageAt>mg+I2}function L2(e){return e.state===Mu.OPEN&&e.now-e.lastMessageAt>mg}const R2=1008;class O2{constructor(t,n,i=0){Oe(this,"ws",null);Oe(this,"cursor",0);Oe(this,"closedByUser",!1);Oe(this,"backoff",500);Oe(this,"reconnectTimer",null);Oe(this,"connectingSince",0);Oe(this,"lastMessageAt",0);Oe(this,"watchdog",null);Oe(this,"queued",[]);Oe(this,"flushFrame",null);Oe(this,"eager",()=>{this.closedByUser||am(this.sample())&&this.connect()});Oe(this,"onVisibility",()=>{document.visibilityState==="visible"&&this.eager()});this.chatId=t,this.handlers=n,this.cursor=i,window.addEventListener("online",this.eager),document.addEventListener("visibilitychange",this.onVisibility)}sample(){var t;return{state:(t=this.ws)==null?void 0:t.readyState,connectingSince:this.connectingSince,lastMessageAt:this.lastMessageAt,now:Date.now()}}startWatchdog(){this.watchdog===null&&(this.watchdog=window.setInterval(()=>{if(this.closedByUser)return;const t=this.sample();am(t)?this.connect():L2(t)&&this.send({type:"ping"})},5e3))}reset(t){this.cursor=t}connect(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null);const t=this.ws;t&&(this.ws=null,t.onopen=null,t.onmessage=null,t.onclose=null,t.onerror=null,(t.readyState===WebSocket.OPEN||t.readyState===WebSocket.CONNECTING)&&t.close()),this.connectingSince=Date.now(),this.lastMessageAt=Date.now(),this.startWatchdog(),this.handlers.onStatus(this.cursor>0?"reconnecting":"connecting");const i=`${location.protocol==="https:"?"wss":"ws"}://${location.host}/ws?chatId=${encodeURIComponent(this.chatId)}&cursor=${this.cursor}`,a=new WebSocket(i);this.ws=a,a.onopen=()=>{this.ws===a&&(this.backoff=500,this.handlers.onStatus("replaying"))},a.onmessage=u=>{var c,f,p,T,E,x;if(this.ws!==a)return;this.lastMessageAt=Date.now();const l=JSON.parse(u.data);if(l.type==="event"){l.event.seq>this.cursor&&(this.cursor=l.event.seq,this.queue(l.event));return}switch(this.flush(),l.type){case"replay_complete":this.handlers.onStatus("connected");break;case"resync":this.handlers.onStatus("resyncing"),this.handlers.onResync();break;case"ack":(f=(c=this.handlers).onAck)==null||f.call(c,l.action,l.ok,l.error);break;case"error":console.warn("ws error:",l.message),(T=(p=this.handlers).onServerError)==null||T.call(p,l.message);break;case"fs_changed":(x=(E=this.handlers).onFsChanged)==null||x.call(E,l.path);break}},a.onclose=u=>{var l,c;if(this.ws===a){if(this.flush(),this.closedByUser){this.handlers.onStatus("closed");return}if(u.code===R2){this.closedByUser=!0,this.handlers.onStatus("closed"),(c=(l=this.handlers).onUnauthorized)==null||c.call(l);return}this.handlers.onStatus("reconnecting"),this.reconnectTimer=window.setTimeout(()=>this.connect(),this.backoff),this.backoff=Math.min(this.backoff*1.7,1e4)}},a.onerror=()=>{this.ws===a&&a.close()}}queue(t){if(this.queued.push(t),this.flushFrame===null){if(typeof requestAnimationFrame!="function"){this.flush();return}this.flushFrame=requestAnimationFrame(()=>{this.flushFrame=null,this.flush()})}}flush(){this.flushFrame!==null&&(cancelAnimationFrame(this.flushFrame),this.flushFrame=null);const t=this.queued;this.queued=[];for(const n of t)this.handlers.onEvent(n)}send(t){var n;return((n=this.ws)==null?void 0:n.readyState)===WebSocket.OPEN?(this.ws.send(JSON.stringify(t)),!0):!1}prompt(t,n,i=!1){return this.send({type:"prompt",content:t,attachments:n,...i?{retry:i}:{}})}steer(t,n){return this.send({type:"steer",text:t,clientId:n})}cancel(){this.send({type:"cancel"})}setMode(t){this.send({type:"set_mode",modeId:t})}setModel(t){this.send({type:"set_model",modelId:t})}setEffort(t){this.send({type:"set_effort",effortLevel:t})}watchPaths(t){this.send({type:"watch_paths",paths:t})}execCommand(t){this.send({type:"exec_command",command:t})}close(){this.closedByUser=!0,this.flushFrame!==null&&cancelAnimationFrame(this.flushFrame),this.flushFrame=null,this.queued=[],window.removeEventListener("online",this.eager),document.removeEventListener("visibilitychange",this.onVisibility),this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.watchdog!==null&&(clearInterval(this.watchdog),this.watchdog=null);const t=this.ws;this.ws=null,t&&(t.onopen=null,t.onmessage=null,t.onclose=null,t.onerror=null,t.close())}}const gg="/c",Eg=`${gg}/:chatId`;function Fu(e){return`${gg}/${encodeURIComponent(e)}`}const Nd="/new",D2={prompt:"Message",cancel:"Stop",set_mode:"Agent change",set_model:"Model change",set_effort:"Effort change",steer:"Message",exec_command:"Command"},um=1e4;class P2{constructor(t={}){Oe(this,"api");Oe(this,"createSocket");Oe(this,"listCoalesceMs");Oe(this,"turnEndedRefreshMs");Oe(this,"compactTimeoutMs");Oe(this,"host",null);Oe(this,"socket",null);Oe(this,"openTarget",null);Oe(this,"handledRoute");Oe(this,"isDraft",!1);Oe(this,"lastSent",null);Oe(this,"lastSteer",null);Oe(this,"msgSeq",0);Oe(this,"firstPrompt",null);Oe(this,"lastCreateOpts",null);Oe(this,"listSeq",0);Oe(this,"listTimer",null);Oe(this,"prefetched",null);this.api=t.api??Qe,this.createSocket=t.createSocket??((n,i,a)=>new O2(n,i,a)),this.listCoalesceMs=t.listCoalesceMs??150,this.turnEndedRefreshMs=t.turnEndedRefreshMs??1200,this.compactTimeoutMs=t.compactTimeoutMs??12e4}attach(t){this.host=t}get state(){return ge.getState()}refreshSessions(){this.listTimer===null&&(this.listTimer=setTimeout(()=>{this.listTimer=null;const t=++this.listSeq;this.api.listChats().then(n=>{t===this.listSeq&&this.state.setChats(n.chats)}).catch(()=>{})},this.listCoalesceMs))}loadPickers(){this.api.models().then(t=>this.state.setModels(t.models)).catch(()=>{}),this.api.agents().then(t=>this.state.setAgents(t.agents,t.defaultAgentId)).catch(()=>{})}syncRoute(t,n){if(this.isDraft=n,n&&!this.state.chatId&&this.state.newChatId(),this.handledRoute!==t)if(this.handledRoute=t,t)this.openChat(t);else{this.openTarget=null,this.closeSocket();const i=this.state.activeId===null&&this.state.chatId!==null;this.state.clearActive(),i||this.state.newChatId(),this.refreshSessions()}}closeSocket(){var t;(t=this.socket)==null||t.close(),this.socket=null}async openChat(t,n){var a;if(this.state.activeId===t)return;this.openTarget=t,this.closeSocket(),this.state.setConnStatus("connecting"),n||this.state.setLoadingChat(t);let i;if(n)i=n;else try{const u=this.takePrefetch(t);i=u?await u.catch(()=>this.api.getChat(t)):await this.api.getChat(t)}catch(u){if(this.openTarget!==t)return;this.state.setConnStatus("closed"),this.state.setLoadingChat(null),console.error("open session failed:",u),(a=this.host)==null||a.navigate("/",{replace:!0});return}this.openTarget===t&&(this.state.loadDetail(i,{keepPending:!!n}),this.socket=this.createSocket(t,this.socketHandlers(t),i.head),this.socket.connect())}prefetchChat(t){if(t===this.state.activeId||t===this.openTarget)return;const n=this.prefetched;if(n&&n.id===t&&Date.now()-n.at<um)return;const i=this.api.getChat(t);i.catch(()=>{}),this.prefetched={id:t,at:Date.now(),detail:i}}takePrefetch(t){const n=this.prefetched;return this.prefetched=null,n&&n.id===t&&Date.now()-n.at<um?n.detail:null}dropPrefetch(t){var n;((n=this.prefetched)==null?void 0:n.id)===t&&(this.prefetched=null)}socketHandlers(t){return{onEvent:n=>{const i=n.seq>this.state.appliedSeq;this.state.applyEvent(n),i&&((n.payload.kind==="turn_started"||n.payload.kind==="title_changed")&&this.refreshSessions(),n.payload.kind==="history_replaced"&&this.refetch(t),n.payload.kind==="turn_ended"&&setTimeout(()=>this.refreshSessions(),this.turnEndedRefreshMs))},onStatus:n=>{if(this.state.setConnStatus(n),n==="connected"&&this.firstPrompt){const i=this.firstPrompt;this.firstPrompt=null,this.deliver(i.id,i.content,i.attachments)}},onResync:()=>this.refetch(t),onAck:(n,i,a)=>{if(i)return;const u=a??"The server rejected the request.";if(n==="prompt"){this.lastSent&&this.state.markPendingFailed(this.lastSent,u);return}if(n==="steer"){this.lastSteer&&this.state.markPendingFailed(this.lastSteer,u);return}console.error(`${D2[n]??n} rejected:`,u)},onFsChanged:n=>this.state.bumpFsPath(n),onUnauthorized:()=>{var n;this.closeSocket(),this.state.clearActive(),(n=this.host)==null||n.onLock()},onServerError:n=>{console.error("server error:",n)}}}async refetch(t){var i;const n=await this.api.getChat(t);this.openTarget===t&&(this.state.loadDetail(n),(i=this.socket)==null||i.reset(n.head))}async createChat(t){var n;this.closeSocket(),this.state.setConnStatus("connecting"),this.state.setCreateError(null),this.lastCreateOpts=t;try{const i=await this.api.createChat({chatId:this.state.chatId??void 0,cwd:t.cwd||void 0,agentId:t.agentId,modelId:t.modelId,effortLevel:t.effortLevel,freshWorkspace:!t.cwd});this.refreshSessions();const a=i.summary.chatId;return this.handledRoute=a,this.isDraft=!1,(n=this.host)==null||n.navigate(Fu(a)),this.openChat(a,i),!0}catch(i){return this.state.setConnStatus("closed"),this.state.setCreateError(i instanceof Error?i.message:"Failed to create session"),!1}}retryCreate(){this.lastCreateOpts&&this.createChat(this.lastCreateOpts)}dismissCreateError(){var t;this.state.setCreateError(null),(t=this.host)==null||t.navigate("/")}startDraft(){var t;this.openTarget=null,this.closeSocket(),this.state.clearActive(),this.state.newChatId(),this.state.setCreateError(null),(t=this.host)==null||t.navigate(Nd)}send(t,n,i={}){const a=`pending-${this.msgSeq++}`,u=fg(t.filter(l=>l.type==="text").map(l=>l.text).join(`
55
+ `));if(this.state.addPending({id:a,text:u,attachments:n,content:t}),this.isDraft){const{currentModeId:l,currentModelId:c,currentEffort:f}=this.state;this.createChat({agentId:l,modelId:c,effortLevel:f}).then(p=>{p?this.firstPrompt={id:a,content:t,attachments:n}:this.state.markPendingFailed(a,"Could not start the session.")});return}this.deliver(a,t,n,i.retry)}steer(t){const n=t.trim();if(!n)return;const i=`pending-${this.msgSeq++}`;this.state.addPending({id:i,text:n,content:[{type:"text",text:n}],steer:!0}),this.deliverSteer(i,n)}deliverSteer(t,n){var i;this.lastSteer=t,!((i=this.socket)!=null&&i.steer(n,t))&&this.state.markPendingFailed(t,"Not connected to the server - reconnecting. Retry once the status dot is green.")}deliver(t,n,i,a=!1){var u;this.lastSent=t,!((u=this.socket)!=null&&u.prompt(n,i,a))&&this.state.markPendingFailed(t,this.socket?"Not connected to the server - reconnecting. Retry once the status dot is green.":"No active session socket.")}retrySend(t){const n=this.state.pending.find(i=>i.id===t);if(n){if(n.steer&&this.state.observability.turnStatus==="running"){this.state.markPendingSending(t),this.deliverSteer(t,n.text);return}if(n.steer){this.state.dropPending(t),this.send(n.content);return}this.state.markPendingSending(t),this.deliver(t,n.content,n.attachments)}}retryTurn(t){this.send([{type:"text",text:t}],void 0,{retry:!0})}cancel(){var t;(t=this.socket)==null||t.cancel(),this.state.markCancelling()}changeModel(t){var n;(n=this.socket)==null||n.setModel(t),this.state.setCurrentModel(t),this.socket||this.state.setCurrentEffort(void 0)}changeEffort(t){var n;(n=this.socket)==null||n.setEffort(t),this.state.setCurrentEffort(t)}async branchFrom(t){var i;const n=this.state.activeId;if(n)try{const a=await this.api.branchChat(n,t);this.refreshSessions();const u=a.summary.chatId;this.handledRoute=u,(i=this.host)==null||i.navigate(Fu(u)),await this.openChat(u,a)}catch(a){this.cutFailed(n,"Couldn't branch the chat",a)}}async editPrompt(t,n,i){var c;const a=this.state.activeId;if(!a)return!1;let u;try{u=await this.api.rewindChat(a,t)}catch(f){return this.cutFailed(a,"Couldn't edit the message",f),!1}if(this.state.activeId!==a)return!1;this.state.loadDetail(u),(c=this.socket)==null||c.reset(u.head),this.refreshSessions();const l=[];return i!=null&&i.length&&l.push({type:"text",text:vd+i.map(f=>f.path).join(", ")+`
56
+ `}),n.trim()&&l.push({type:"text",text:n.trim()}),l.length>0&&this.send(l,i),!0}cutFailed(t,n,i){if(this.state.activeId!==t)return;const a=i instanceof Error?i.message:"The server rejected the request.";this.state.setChatNotice({title:n,fix:a,detail:a})}changeAgent(t){var n;(n=this.socket)==null||n.setMode(t),this.state.setCurrentAgent(t)}compact(){var t;(t=this.socket)==null||t.execCommand("compact"),this.state.setCompacting(!0),setTimeout(()=>this.state.setCompacting(!1),this.compactTimeoutMs)}async reloadChat(){var n;const t=this.state.activeId;if(!(!t||this.state.reloadingId===t)){this.state.setReloadingId(t);try{const i=await this.api.reloadChat(t);if(this.state.activeId!==t)return;this.state.loadDetail(i),(n=this.socket)==null||n.reset(i.head),this.loadPickers()}catch(i){if(this.state.activeId!==t)return;const a=i instanceof Error?i.message:"The server rejected the reload.";this.state.setChatNotice({title:"Couldn't reload the session",fix:a,detail:a})}finally{this.state.reloadingId===t&&this.state.setReloadingId(null)}}}watchPaths(t){var n;(n=this.socket)==null||n.watchPaths(t)}async deleteChat(t){var n;this.dropPrefetch(t);try{await this.api.deleteChat(t)}catch{console.error("delete session failed"),this.refreshSessions();return}this.state.activeId===t?(n=this.host)==null||n.navigate("/"):this.refreshSessions()}async renameChat(t,n){this.dropPrefetch(t),this.state.renameChatRow(t,n),await this.api.renameChat(t,n).catch(()=>{console.error("rename session failed")}),this.refreshSessions()}async pinChat(t,n){this.dropPrefetch(t),this.state.pinChatRow(t,n),await this.api.pinChat(t,n).catch(()=>{console.error("pin session failed")}),this.refreshSessions()}goToChat(t){var n;(n=this.host)==null||n.navigate(Fu(t))}markLoading(t){t!==this.state.activeId&&this.state.setLoadingChat(t)}lock(){var t,n;this.closeSocket(),this.state.clearActive(),(t=this.host)==null||t.navigate("/",{replace:!0}),(n=this.host)==null||n.onLock()}get canSend(){return this.isDraft||ge.getState().activeId!==null}}const We=new P2;function wd(e){return e.observability.turnStatus==="idle"&&!e.observability.compacting}function Tg(e){const t=e.trim().slice(0,4e3);return!t||!We.canSend||!wd(ge.getState())?!1:(We.send([{type:"text",text:t}]),!0)}const cc=1440*60*1e3;function M2(e,t=new Date){const n=new Date(t);n.setHours(0,0,0,0);const i=n.getTime(),a=[{label:"Today",chats:[]},{label:"Yesterday",chats:[]},{label:"Previous 7 days",chats:[]},{label:"Previous 30 days",chats:[]},{label:"Older",chats:[]}];for(const u of e){const l=Date.parse(u.updatedAt),c=l>=i?0:l>=i-cc?1:l>=i-7*cc?2:l>=i-30*cc?3:4;a[c].chats.push(u)}return a.filter(u=>u.chats.length>0)}function kr({size:e=14,className:t}){return h.jsx("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:h.jsx("polyline",{points:"6 9 12 15 18 9"})})}function F2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:[h.jsx("circle",{cx:"4",cy:"12",r:"1.8"}),h.jsx("circle",{cx:"12",cy:"12",r:"1.8"}),h.jsx("circle",{cx:"20",cy:"12",r:"1.8"})]})}function j2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:[h.jsx("circle",{cx:"12",cy:"5",r:"1.9"}),h.jsx("circle",{cx:"12",cy:"12",r:"1.9"}),h.jsx("circle",{cx:"12",cy:"19",r:"1.9"})]})}function yg({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M20 11a8 8 0 0 0-13.6-4.5L3 9"}),h.jsx("polyline",{points:"3 4 3 9 8 9"}),h.jsx("path",{d:"M4 13a8 8 0 0 0 13.6 4.5L21 15"}),h.jsx("polyline",{points:"21 20 21 15 16 15"})]})}function ro({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),h.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function $c({size:e=16,className:t}){return h.jsx("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:h.jsx("polyline",{points:"20 6 9 17 4 12"})})}function Ad({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z"}),h.jsx("line",{x1:"12",y1:"9.5",x2:"12",y2:"13.5"}),h.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]})}function B2({size:e=18,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("rect",{x:"4",y:"11",width:"16",height:"10",rx:"2"}),h.jsx("path",{d:"M8 11V7a4 4 0 0 1 8 0v4"})]})}function br({size:e=28,className:t}){return h.jsx("svg",{className:`spinner ${t??""}`,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round","aria-hidden":!0,children:h.jsx("path",{d:"M12 3a9 9 0 1 0 9 9"})})}function om({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M12 19V5"}),h.jsx("path",{d:"m5 12 7-7 7 7"})]})}function U2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8","aria-hidden":!0,children:[h.jsx("circle",{cx:"12",cy:"12",r:"9.5"}),h.jsx("rect",{x:"8.5",y:"8.5",width:"7",height:"7",rx:"1.2",fill:"currentColor",stroke:"none"})]})}function lm({size:e=16,className:t}){return h.jsx("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none","aria-hidden":!0,children:h.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})})}function Id({size:e=20,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),h.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}function xg({size:e=20,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("circle",{cx:"11",cy:"11",r:"7"}),h.jsx("line",{x1:"21",y1:"21",x2:"16.5",y2:"16.5"})]})}function bg({size:e=16,className:t}){return h.jsx("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:h.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})})}function H2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2v1"}),h.jsx("path",{d:"M2 10l2.5 9h15l2.5-9H7.5"})]})}function kg({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),h.jsx("polyline",{points:"14 2 14 8 20 8"})]})}function cm({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),h.jsx("polyline",{points:"14 2 14 8 20 8"}),h.jsx("polyline",{points:"9 15 7 13 9 11"}),h.jsx("polyline",{points:"15 11 17 13 15 15"})]})}function z2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),h.jsx("polyline",{points:"14 2 14 8 20 8"}),h.jsx("circle",{cx:"12",cy:"15",r:"2"}),h.jsx("path",{d:"M12 11v2"}),h.jsx("path",{d:"M12 17v1"})]})}function $2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),h.jsx("polyline",{points:"14 2 14 8 20 8"}),h.jsx("line",{x1:"8",y1:"13",x2:"16",y2:"13"}),h.jsx("line",{x1:"8",y1:"17",x2:"14",y2:"17"})]})}function W2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),h.jsx("polyline",{points:"14 2 14 8 20 8"}),h.jsx("circle",{cx:"10",cy:"14",r:"2"}),h.jsx("path",{d:"M20 17l-3-3-5 5"})]})}function Y2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),h.jsx("polyline",{points:"14 2 14 8 20 8"}),h.jsx("path",{d:"M8 13h3v3H8z"}),h.jsx("line",{x1:"14",y1:"13",x2:"16",y2:"13"}),h.jsx("line",{x1:"14",y1:"16",x2:"16",y2:"16"})]})}function V2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),h.jsx("polyline",{points:"14 2 14 8 20 8"}),h.jsx("polyline",{points:"8 15 10 13 8 11"}),h.jsx("line",{x1:"12",y1:"16",x2:"16",y2:"16"})]})}function q2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),h.jsx("polyline",{points:"7 10 12 15 17 10"}),h.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]})}function dc({size:e=20,className:t}){return h.jsx("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":!0,children:h.jsx("path",{d:"M4 7h16M4 12h16M4 17h10"})})}function Q2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"}),h.jsx("line",{x1:"9",y1:"14",x2:"15",y2:"14"}),h.jsx("line",{x1:"9",y1:"18",x2:"13",y2:"18"})]})}function G2({size:e=18,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("polyline",{points:"4 14 10 14 10 20"}),h.jsx("polyline",{points:"20 10 14 10 14 4"}),h.jsx("line",{x1:"14",y1:"10",x2:"21",y2:"3"}),h.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]})}function K2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z"}),h.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function X2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("polyline",{points:"16 18 22 12 16 6"}),h.jsx("polyline",{points:"8 6 2 12 8 18"})]})}function J2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("polyline",{points:"15 3 21 3 21 9"}),h.jsx("polyline",{points:"9 21 3 21 3 15"}),h.jsx("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),h.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]})}function Z2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("polyline",{points:"4 14 10 14 10 20"}),h.jsx("polyline",{points:"20 10 14 10 14 4"}),h.jsx("line",{x1:"14",y1:"10",x2:"21",y2:"3"}),h.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]})}function eb({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M12 20h9"}),h.jsx("path",{d:"M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"})]})}function tb({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("circle",{cx:"6",cy:"5",r:"2"}),h.jsx("circle",{cx:"6",cy:"19",r:"2"}),h.jsx("circle",{cx:"18",cy:"7",r:"2"}),h.jsx("path",{d:"M6 7v10"}),h.jsx("path",{d:"M18 9c0 5-12 3-12 8"})]})}function Cg({size:e=14,className:t}){return h.jsx("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:h.jsx("polyline",{points:"9 6 15 12 9 18"})})}function nb({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("circle",{cx:"12",cy:"12",r:"3"}),h.jsx("path",{d:"M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1Z"})]})}function rb({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M4 7h16"}),h.jsx("path",{d:"M10 11v6M14 11v6"}),h.jsx("path",{d:"M6 7l1 12a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-12"}),h.jsx("path",{d:"M9 7V4h6v3"})]})}function ib({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("rect",{x:"3",y:"4",width:"18",height:"12",rx:"2"}),h.jsx("path",{d:"M8 20h8M12 16v4"})]})}function sb({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("rect",{x:"7",y:"3",width:"10",height:"18",rx:"2"}),h.jsx("path",{d:"M11 17h2"})]})}function ab({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("rect",{x:"3",y:"5",width:"18",height:"16",rx:"2"}),h.jsx("path",{d:"M3 10h18M8 3v4M16 3v4"})]})}var ia=$0();const Os=8,dm=6;function Sg({anchor:e,onClose:t,children:n}){const i=_.useRef(null),[a,u]=_.useState(null);return _.useLayoutEffect(()=>{const l=i.current;if(!e||!l)return;const c=e.getBoundingClientRect(),f=l.getBoundingClientRect(),p=c.bottom+dm,E=p+f.height+Os<=window.innerHeight?p:Math.max(Os,c.top-dm-f.height),x=Math.min(Math.max(Os,c.right-f.width),Math.max(Os,window.innerWidth-f.width-Os));u({top:E,left:x})},[e]),_.useEffect(()=>{const l=p=>{var E;const T=p.target;(E=i.current)!=null&&E.contains(T)||e!=null&&e.contains(T)||t()},c=p=>{p.key==="Escape"&&t()};document.addEventListener("mousedown",l),document.addEventListener("keydown",c);const f={capture:!0,passive:!0};return window.addEventListener("scroll",t,f),window.addEventListener("resize",t),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("keydown",c),window.removeEventListener("scroll",t,f),window.removeEventListener("resize",t)}},[e,t]),ia.createPortal(h.jsx("div",{ref:i,className:"menu-list menu-list-floating",role:"menu",style:a?{top:a.top,left:a.left}:{visibility:"hidden"},children:n}),document.body)}function ub(e,t){const n=e.trim().toLowerCase();if(!n)return 0;const i=t.toLowerCase();let a=0,u=0,l=-2;for(let c=0;c<n.length;c++){const f=n[c],p=i.indexOf(f,u);if(p===-1)return-1;a+=1,p===l+1&&(a+=3),(p===0||/\s|[-_/.]/.test(i[p-1]??""))&&(a+=2),l=p,u=p+1}return a}function ob({sessions:e,onOpen:t,onClose:n}){const[i,a]=_.useState(""),[u,l]=_.useState(0),c=_.useRef(null);_.useEffect(()=>{var E;(E=c.current)==null||E.focus()},[]);const f=_.useMemo(()=>i.trim()?e.map(E=>({s:E,score:ub(i,E.title)})).filter(E=>E.score>=0).sort((E,x)=>x.score-E.score).map(E=>E.s):e.slice(0,50),[e,i]);_.useEffect(()=>{l(0)},[i]);const p=E=>{t(E),We.goToChat(E),n()},T=E=>{if(E.key==="Escape")n();else if(E.key==="ArrowDown")E.preventDefault(),l(x=>Math.min(x+1,f.length-1));else if(E.key==="ArrowUp")E.preventDefault(),l(x=>Math.max(x-1,0));else if(E.key==="Enter"){E.preventDefault();const x=f[u];x&&p(x.chatId)}};return ia.createPortal(h.jsx("div",{className:"search-backdrop",onClick:n,children:h.jsxs("div",{className:"search-modal",role:"dialog","aria-label":"Search sessions",onClick:E=>E.stopPropagation(),children:[h.jsxs("div",{className:"search-field",children:[h.jsx(xg,{size:20,className:"search-field-icon"}),h.jsx("input",{ref:c,className:"search-modal-input",value:i,placeholder:"Search sessions…",onChange:E=>a(E.target.value),onKeyDown:T}),h.jsx("kbd",{className:"search-esc",children:"esc"})]}),h.jsx("div",{className:"search-results",children:f.length===0?h.jsx("p",{className:"search-empty",children:i.trim()?`No sessions match "${i}".`:"No sessions yet."}):f.map((E,x)=>h.jsxs("button",{className:`search-result ${x===u?"is-active":""}`,onMouseEnter:()=>l(x),onClick:()=>p(E.chatId),children:[h.jsx("span",{className:"search-result-title",children:E.title}),h.jsx("span",{className:"search-result-agent",children:E.agentId??"vibe"})]},E.chatId))})]})}),document.body)}function Yu(e){const t=Math.max(0,Math.round(e));return t<60?`${t}s`:t<3600?`${Math.floor(t/60)}m ${t%60}s`:`${Math.floor(t/3600)}h ${Math.floor(t%3600/60)}m`}function ju({ariaLabel:e,value:t,options:n,onChange:i}){const[a,u]=_.useState(!1),[l,c]=_.useState(0),f=_.useRef(null),p=n.find(x=>x.value===t);_.useEffect(()=>{if(!a)return;const x=b=>{f.current&&!f.current.contains(b.target)&&u(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[a]),_.useEffect(()=>{if(!a)return;const x=n.findIndex(b=>b.value===t);c(x>=0?x:0)},[a]);const T=x=>{i(x),u(!1)},E=x=>{if(!a){(x.key==="Enter"||x.key===" "||x.key==="ArrowDown")&&(x.preventDefault(),u(!0));return}if(x.key==="Escape")u(!1);else if(x.key==="ArrowDown")x.preventDefault(),c(b=>Math.min(b+1,n.length-1));else if(x.key==="ArrowUp")x.preventDefault(),c(b=>Math.max(b-1,0));else if(x.key==="Enter"){x.preventDefault();const b=n[l];b&&T(b.value)}};return h.jsxs("div",{className:"dd",ref:f,children:[h.jsxs("button",{type:"button",className:`dd-trigger ${a?"is-open":""}`,"aria-haspopup":"listbox","aria-expanded":a,onClick:()=>u(x=>!x),onKeyDown:E,"aria-label":e,children:[h.jsx("span",{className:"dd-value",children:(p==null?void 0:p.label)??t??"Select…"}),h.jsx(kr,{size:13,className:"dd-chevron"})]}),a&&h.jsx("div",{className:"dd-panel",role:"listbox",children:n.map((x,b)=>h.jsxs("button",{type:"button",role:"option","aria-selected":x.value===t,className:`dd-option ${b===l?"is-active":""} ${x.value===t?"is-selected":""}`,onMouseEnter:()=>c(b),onClick:()=>T(x.value),children:[h.jsx("span",{className:"dd-check",children:x.value===t&&h.jsx($c,{size:15})}),h.jsx("span",{className:"dd-option-label",children:x.label}),x.hint&&h.jsx("span",{className:"dd-option-hint",children:x.hint})]},x.value))})]})}const lb={none:"None",low:"Low",medium:"Medium",high:"High",xhigh:"Extra",max:"Max"};function Bu(e){return lb[e]??e.charAt(0).toUpperCase()+e.slice(1)}function cb({value:e,effort:t,draft:n,onChange:i,onEffortChange:a}){var me;const u=ge(V=>V.models),[l,c]=_.useState(!1),[f,p]=_.useState(!1),[T,E]=_.useState(0),[x,b]=_.useState(0),C=_.useRef(null),v=_.useRef(null),D=e??((me=u.find(V=>V.isDefault))==null?void 0:me.modelId),A=u.find(V=>V.modelId===D),R=(A==null?void 0:A.effortLevels)??[],U=n?A==null?void 0:A.defaultEffort:A==null?void 0:A.recommendedEffort,W=R.length>0?t&&R.includes(t)?t:U:void 0,q=u.length+(R.length>0?1:0),B=()=>{c(!1),p(!1)};_.useEffect(()=>{if(!l)return;const V=pe=>{C.current&&!C.current.contains(pe.target)&&B()};return document.addEventListener("mousedown",V),()=>document.removeEventListener("mousedown",V)},[l]),_.useEffect(()=>{var pe,de,ee;if(!l)return;const V=u.findIndex(K=>K.modelId===D);E(V>=0?V:0),(ee=(de=(pe=v.current)==null?void 0:pe.querySelector(".is-selected"))==null?void 0:de.scrollIntoView)==null||ee.call(de,{block:"nearest"})},[l]);const ae=()=>{const V=W?R.indexOf(W):0;b(V>=0?V:0),p(!0)},Z=V=>{V!==D&&i(V),B()},ce=V=>{V!==W&&a(V),B()},M=V=>{if(!l){(V.key==="Enter"||V.key===" "||V.key==="ArrowDown")&&(V.preventDefault(),c(!0));return}if(f){if(V.key==="Escape"||V.key==="ArrowLeft")V.preventDefault(),p(!1);else if(V.key==="ArrowDown")V.preventDefault(),b(pe=>Math.min(pe+1,R.length-1));else if(V.key==="ArrowUp")V.preventDefault(),b(pe=>Math.max(pe-1,0));else if(V.key==="Enter"){V.preventDefault();const pe=R[x];pe&&ce(pe)}return}if(V.key==="Escape")B();else if(V.key==="ArrowDown")V.preventDefault(),E(pe=>Math.min(pe+1,q-1));else if(V.key==="ArrowUp")V.preventDefault(),E(pe=>Math.max(pe-1,0));else if(V.key==="ArrowRight"&&T===u.length)V.preventDefault(),ae();else if(V.key==="Enter")if(V.preventDefault(),T===u.length)ae();else{const pe=u[T];pe&&Z(pe.modelId)}};return h.jsxs("div",{className:"dd mp",ref:C,children:[h.jsxs("button",{type:"button",className:`dd-trigger ${l?"is-open":""}`,"aria-haspopup":"listbox","aria-expanded":l,onClick:()=>l?B():c(!0),onKeyDown:M,"aria-label":"Model",children:[h.jsx("span",{className:"dd-value",children:(A==null?void 0:A.modelName)??D??"Select…"}),W&&h.jsx("span",{className:"mp-trigger-effort",children:Bu(W)}),h.jsx(kr,{size:13,className:"dd-chevron"})]}),l&&h.jsxs("div",{className:"mp-panel",children:[h.jsx("div",{className:"mp-list",role:"listbox","aria-label":"Models",ref:v,children:u.map((V,pe)=>h.jsxs("button",{type:"button",role:"option","aria-selected":V.modelId===D,className:`mp-option ${pe===T&&!f?"is-active":""} ${V.modelId===D?"is-selected":""}`,onMouseEnter:()=>{E(pe),p(!1)},onClick:()=>Z(V.modelId),children:[h.jsx("span",{className:"mp-option-name",children:V.modelName}),h.jsx("span",{className:"dd-option-hint",children:`${V.rateMultiplier}x`}),h.jsx("span",{className:"dd-check",children:V.modelId===D&&h.jsx($c,{size:15})})]},V.modelId))}),R.length>0&&W&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"mp-divider",role:"separator"}),h.jsxs("button",{type:"button",className:`mp-effort-row ${T===u.length||f?"is-active":""}`,"aria-haspopup":"listbox","aria-expanded":f,onMouseEnter:()=>{E(u.length),ae()},onClick:()=>f?p(!1):ae(),children:[h.jsx("span",{className:"mp-effort-label",children:"Effort"}),h.jsx("span",{className:"mp-effort-value",children:Bu(W)}),h.jsx(Cg,{size:13,className:"mp-effort-chevron"})]})]}),f&&R.length>0&&h.jsx("div",{className:"mp-effort",role:"listbox","aria-label":"Effort",children:R.map((V,pe)=>h.jsxs("button",{type:"button",role:"option","aria-selected":V===W,className:`mp-option mp-level ${pe===x?"is-active":""} ${V===W?"is-selected":""}`,onMouseEnter:()=>b(pe),onClick:()=>ce(V),children:[h.jsx("span",{className:"mp-option-name",children:Bu(V)}),V===(A==null?void 0:A.recommendedEffort)&&h.jsx("span",{className:"mp-pill",children:"Recommended"}),V==="max"&&h.jsxs("span",{className:"mp-pill is-warn",children:[h.jsx(Ad,{size:11}),"Uses the most credits"]}),h.jsx("span",{className:"dd-check",children:V===W&&h.jsx($c,{size:15})})]},V))})]})]})}function db({value:e,onChange:t}){const n=ge(c=>c.modes),i=ge(c=>c.agents),a=ge(c=>c.defaultAgentId),u=n.length>0?n:i,l=e??a;return h.jsx(ju,{ariaLabel:"Agent",value:l,onChange:t,options:u.map(c=>({value:c.id,label:c.name}))})}function fb(e,t=!1){const n=Date.parse(e);if(Number.isNaN(n))return"";const i=Math.round((Date.now()-n)/6e4),a=l=>t?`${l} ago`:l;if(i<1)return t?"just now":"now";if(i<60)return a(`${i}m`);const u=Math.round(i/60);return u<24?a(`${u}h`):a(`${Math.round(u/24)}d`)}function hb(e){if(!e)return"Unknown device";const t=/iPhone|iPad/.test(e)?"iOS":/Android/.test(e)?"Android":/Macintosh|Mac OS/.test(e)?"macOS":/Windows/.test(e)?"Windows":/Linux/.test(e)?"Linux":"Device",n=/Firefox/.test(e)?"Firefox":/Edg\//.test(e)?"Edge":/Chrome/.test(e)?"Chrome":/Safari/.test(e)?"Safari":"";return n?`${t} · ${n}`:t}function pb(e){return!!e&&/iPhone|iPad|Android/.test(e)}function mb({onSelfRevoked:e}){const[t,n]=_.useState(null),[i,a]=_.useState(!1),u=()=>Qe.devices().then(f=>n(f.devices)).catch(()=>n([]));_.useEffect(()=>{u()},[]);const l=async f=>{a(!0);try{if(await Qe.revokeDevice(f.id),f.current){e();return}await u()}finally{a(!1)}},c=async()=>{a(!0);try{await Qe.logoutAll(),e()}finally{a(!1)}};return h.jsxs("section",{className:"settings-card","aria-label":"Logged-in devices",children:[h.jsxs("header",{className:"settings-card-head",children:[h.jsxs("span",{className:"settings-card-title",children:["Logged-in devices ",t&&h.jsx("span",{className:"settings-count",children:t.length})]}),t&&t.length>1&&h.jsx("button",{className:"btn-sm btn-ghost device-revoke",disabled:i,onClick:()=>void c(),children:"Sign out all"})]}),t===null?h.jsx("p",{className:"settings-empty",children:"Loading…"}):t.length===0?h.jsx("p",{className:"settings-empty",children:"No active devices."}):t.map(f=>h.jsxs("div",{className:"settings-item",children:[h.jsx("span",{className:"settings-item-icon",children:pb(f.userAgent)?h.jsx(sb,{size:16}):h.jsx(ib,{size:16})}),h.jsxs("span",{className:"settings-item-text",children:[h.jsxs("span",{className:"settings-item-name",children:[hb(f.userAgent),f.current&&h.jsx("span",{className:"device-badge",children:"This device"})]}),h.jsxs("span",{className:"settings-item-desc",children:["Active ",fb(f.lastSeenAt,!0)]})]}),h.jsx("button",{className:"btn-sm btn-ghost device-revoke",disabled:i,onClick:()=>void l(f),children:"Sign out"})]},f.id))]})}const gb=[{id:"general",label:"General"},{id:"tools",label:"Tools"},{id:"account",label:"Account"},{id:"about",label:"About"}];function Eb({onClose:e,onLock:t}){const[n,i]=_.useState("general"),[a,u]=_.useState(null),[l,c]=_.useState(null),f=()=>Qe.settings().then(p=>u(p),p=>c(p instanceof Error?p.message:"Could not read the settings."));return _.useEffect(()=>{f();const p=T=>{T.key==="Escape"&&e()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[]),ia.createPortal(h.jsx("div",{className:"search-backdrop",onClick:e,children:h.jsxs("div",{className:"search-modal settings-modal",role:"dialog","aria-label":"Settings",onClick:p=>p.stopPropagation(),children:[h.jsxs("div",{className:"devices-head",children:[h.jsx("span",{className:"devices-title",children:"Settings"}),h.jsx("button",{className:"iconbtn settings-close","aria-label":"Close settings",onClick:e,children:h.jsx(ro,{size:16})})]}),h.jsxs("div",{className:"settings-body",children:[h.jsx("nav",{className:"settings-tabs",role:"tablist","aria-label":"Settings sections",children:gb.map(p=>h.jsx("button",{role:"tab","aria-selected":n===p.id,className:`settings-tab${n===p.id?" is-active":""}`,onClick:()=>i(p.id),children:p.label},p.id))}),h.jsxs("div",{className:`settings-pane settings-pane-${n}`,role:"tabpanel",children:[l&&h.jsx("p",{className:"settings-error",children:l}),n==="general"&&h.jsx(Tb,{settings:a,onError:c,onSaved:f}),n==="tools"&&h.jsx(kb,{onError:c}),n==="account"&&h.jsxs("div",{className:"settings-stack",children:[h.jsx(mb,{onSelfRevoked:t}),h.jsxs("section",{className:"settings-card","aria-label":"This browser",children:[h.jsx("header",{className:"settings-card-head",children:h.jsx("span",{className:"settings-card-title",children:"This browser"})}),h.jsx(Uu,{icon:h.jsx(B2,{size:16}),label:"Lock this app",hint:"Sign this browser out. Running chats keep going.",children:h.jsx("button",{className:"btn-sm",onClick:t,children:"Lock"})})]})]}),n==="about"&&h.jsx(yb,{settings:a})]})]})]})}),document.body)}function Uu({icon:e,label:t,hint:n,children:i}){return h.jsxs("div",{className:"settings-item",children:[e&&h.jsx("span",{className:"settings-item-icon",children:e}),h.jsxs("span",{className:"settings-item-text",children:[h.jsx("span",{className:"settings-item-name",children:t}),n&&h.jsx("span",{className:"settings-item-desc",children:n})]}),h.jsx("span",{className:"setting-control",children:i})]})}function Tb({settings:e,onError:t,onSaved:n}){const i=ge(f=>f.models),a=ge(f=>f.agents),u=i.find(f=>f.isDefault),l=(u==null?void 0:u.effortLevels)??[],c=async f=>{t(null);try{await Qe.updateDefaults(f),We.loadPickers(),n()}catch(p){t(p instanceof Error?p.message:"Could not save the setting.")}};return h.jsxs("div",{className:"settings-stack",children:[h.jsx("p",{className:"settings-note",children:"These are kiro’s own defaults, so the kiro CLI uses them too."}),h.jsxs("section",{className:"settings-card settings-card-menus","aria-label":"Defaults for new chats",children:[h.jsx("header",{className:"settings-card-head",children:h.jsx("span",{className:"settings-card-title",children:"Defaults for new chats"})}),h.jsx(Uu,{label:"Model",hint:"The model a new chat starts on.",children:h.jsx(ju,{ariaLabel:"Default model",value:u==null?void 0:u.modelId,onChange:f=>void c({modelId:f}),options:i.map(f=>({value:f.modelId,label:f.modelName,hint:`${f.rateMultiplier}x`}))})}),h.jsx(Uu,{label:"Effort",hint:"How long the model thinks before it answers.",children:u&&l.length>0?h.jsx(ju,{ariaLabel:"Default effort",value:u.defaultEffort,onChange:f=>void c({effort:{modelId:u.modelId,level:f}}),options:l.map(f=>({value:f,label:Bu(f)}))}):h.jsx("span",{className:"setting-none",children:"Not set for this model"})}),h.jsx(Uu,{label:"Agent",hint:"The agent a new chat uses.",children:h.jsx(ju,{ariaLabel:"Default agent",value:e==null?void 0:e.defaultAgentId,onChange:f=>void c({agentId:f}),options:a.map(f=>({value:f.id,label:f.name}))})})]})]})}function yb({settings:e}){if(!e)return h.jsx("p",{className:"settings-note",children:"Loading…"});const t=e.server,n=[{title:"Versions",rows:[["Casper",t.version],["kiro-cli",t.kiroVersion??"unknown"],["kiro-cli path",t.kiroBin]]},{title:"Server",rows:[["Listening on",`${t.host}:${t.port}`],["Login",t.authEnabled?"Required":"Off"],["Live sessions",`${t.liveSessions} of ${t.maxLiveSessions}`],["Running for",Yu(t.uptimeMs/1e3)]]},{title:"Folders",rows:[["File access root",t.fileRoot],["Default folder",t.defaultCwd],["Data folder",t.dataDir],["Config file",t.configFile]]}];return h.jsxs("div",{className:"settings-stack",children:[h.jsx("p",{className:"settings-note",children:"These come from the config file and the environment, and change on a restart."}),n.map(i=>h.jsxs("section",{className:"settings-card","aria-label":i.title,children:[h.jsx("header",{className:"settings-card-head",children:h.jsx("span",{className:"settings-card-title",children:i.title})}),h.jsx("dl",{className:"settings-about",children:i.rows.map(([a,u])=>h.jsxs("div",{className:"settings-about-row",children:[h.jsx("dt",{children:a}),h.jsx("dd",{children:u})]},a))})]},i.title))]})}function xb(e){return[...e.matchAll(/"([^"]*)"|'([^']*)'|(\S+)/g)].map(t=>t[1]??t[2]??t[3]??"")}function bb(e){const t={};for(const n of e.split(`
57
+ `)){const i=n.trim();if(!i)continue;const a=i.indexOf("=");if(a<=0)throw new Error(`Write each variable as NAME=value: ${i}`);t[i.slice(0,a).trim()]=i.slice(a+1).trim()}return t}function kb({onError:e}){const[t,n]=_.useState(null),[i,a]=_.useState(!1),[u,l]=_.useState(!1),[c,f]=_.useState({name:"",target:"",args:"",env:""}),p=()=>Qe.tools().then(n,C=>e(C instanceof Error?C.message:"Could not read the tools."));_.useEffect(()=>{p()},[]);const T=async C=>{a(!0),e(null);try{return await C(),await p(),!0}catch(v){return e(v instanceof Error?v.message:"That did not work."),!1}finally{a(!1)}},E=c.target.trim(),x=/^https?:\/\//.test(E),b=async()=>{let C;try{C=bb(c.env)}catch(D){e(D.message);return}await T(()=>Qe.addMcpServer({name:c.name.trim(),...x?{url:E}:{command:E,args:xb(c.args)},...Object.keys(C).length?{env:C}:{}}))&&(l(!1),f({name:"",target:"",args:"",env:""}))};return t?h.jsxs("div",{className:"settings-stack",children:[h.jsx("p",{className:"settings-note",children:"kiro reads these when a session starts: a new chat, or an open one after Reload."}),h.jsxs("section",{className:"settings-card","aria-label":"MCP servers",children:[h.jsxs("header",{className:"settings-card-head",children:[h.jsxs("span",{className:"settings-card-title",children:["MCP servers ",h.jsx("span",{className:"settings-count",children:t.mcpServers.length})]}),!u&&h.jsxs("button",{className:"btn-sm tools-add",onClick:()=>l(!0),children:[h.jsx(Id,{size:13}),"Add server"]})]}),u&&h.jsxs("div",{className:"mcp-form",children:[h.jsxs("label",{className:"mcp-field",children:[h.jsx("span",{children:"Name"}),h.jsx("input",{className:"settings-input","aria-label":"Server name",placeholder:"figma",value:c.name,onChange:C=>f({...c,name:C.target.value})})]}),h.jsxs("label",{className:"mcp-field",children:[h.jsx("span",{children:"Command or URL"}),h.jsx("input",{className:"settings-input","aria-label":"Command or URL",placeholder:"npx, or https://…",value:c.target,onChange:C=>f({...c,target:C.target.value})})]}),!x&&h.jsxs("label",{className:"mcp-field mcp-field-wide",children:[h.jsx("span",{children:"Arguments"}),h.jsx("input",{className:"settings-input","aria-label":"Arguments",placeholder:"-y figma-developer-mcp --stdio",value:c.args,onChange:C=>f({...c,args:C.target.value})})]}),h.jsxs("label",{className:"mcp-field mcp-field-wide",children:[h.jsx("span",{children:"Environment"}),h.jsx("textarea",{className:"settings-input settings-mono-input","aria-label":"Environment variables",placeholder:"API_KEY=… (one per line)",rows:2,value:c.env,onChange:C=>f({...c,env:C.target.value})})]}),h.jsxs("div",{className:"mcp-form-actions mcp-field-wide",children:[h.jsx("button",{className:"btn-sm btn-ghost",onClick:()=>l(!1),children:"Cancel"}),h.jsx("button",{className:"btn-sm btn-primary",disabled:i||!c.name.trim()||!E,onClick:()=>void b(),children:"Add server"})]})]}),t.mcpServers.length===0?h.jsx("p",{className:"settings-empty",children:"No servers in ~/.kiro/settings/mcp.json."}):t.mcpServers.map(C=>h.jsxs("div",{className:`settings-item${C.disabled?" is-off":""}`,children:[h.jsxs("span",{className:"settings-item-text",children:[h.jsxs("span",{className:"settings-item-name",children:[C.name,h.jsx("span",{className:"tools-tag",children:C.url?"HTTP":"stdio"}),C.disabled&&h.jsx("span",{className:"tools-tag is-off",children:"Off"})]}),h.jsx("code",{className:"settings-item-detail",children:C.url??[C.command,...C.args].join(" ")}),C.envKeys.length>0&&h.jsxs("span",{className:"settings-item-env",children:["env: ",C.envKeys.join(", ")]})]}),h.jsxs("span",{className:"settings-item-actions",children:[h.jsxs("label",{className:"switch",title:C.disabled?"Turn on":"Turn off",children:[h.jsx("input",{type:"checkbox","aria-label":`Use ${C.name}`,checked:!C.disabled,disabled:i,onChange:v=>void T(()=>Qe.setMcpServerDisabled(C.name,!v.target.checked))}),h.jsx("span",{className:"switch-track","aria-hidden":!0})]}),h.jsx("button",{className:"iconbtn tools-remove","aria-label":`Remove ${C.name}`,title:"Remove",disabled:i,onClick:()=>{window.confirm(`Remove ${C.name} from kiro's MCP servers?`)&&T(()=>Qe.removeMcpServer(C.name))},children:h.jsx(rb,{size:15})})]})]},C.name))]}),h.jsxs("section",{className:"settings-card","aria-label":"Skills",children:[h.jsxs("header",{className:"settings-card-head",children:[h.jsxs("span",{className:"settings-card-title",children:["Skills ",h.jsx("span",{className:"settings-count",children:t.skills.length})]}),h.jsx("span",{className:"settings-card-where",children:"~/.kiro/skills"})]}),t.skills.length===0?h.jsx("p",{className:"settings-empty",children:"No skills in ~/.kiro/skills."}):t.skills.map(C=>h.jsxs("a",{className:"settings-item settings-item-link",href:Qe.previewUrl("",C.path),target:"_blank",rel:"noopener noreferrer",children:[h.jsxs("span",{className:"settings-item-text",children:[h.jsx("span",{className:"settings-item-name",children:C.name}),C.description&&h.jsx("span",{className:"settings-item-desc",children:C.description})]}),h.jsx(Cg,{size:14,className:"settings-item-chevron"})]},C.path))]})]}):h.jsx("p",{className:"settings-note",children:"Loading…"})}function Cb({title:e,message:t,confirmLabel:n="Confirm",danger:i=!1,onConfirm:a,onCancel:u}){return _.useEffect(()=>{const l=c=>{c.key==="Escape"&&u()};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[u]),ia.createPortal(h.jsx("div",{className:"confirm-backdrop",onClick:l=>{l.target===l.currentTarget&&u()},children:h.jsxs("div",{className:"confirm-modal",role:"dialog","aria-modal":"true","aria-label":e,children:[h.jsx("h3",{className:"confirm-title",children:e}),t&&h.jsx("p",{className:"confirm-message",children:t}),h.jsxs("div",{className:"confirm-actions",children:[h.jsx("button",{className:"btn-ghost",onClick:u,children:"Cancel"}),h.jsx("button",{className:i?"btn-danger":"btn-primary",onClick:a,autoFocus:!0,children:n})]})]})}),document.body)}const _g="casper.groupChatsByDate",Sb=1e3,_b=80;function vb(){try{return localStorage.getItem(_g)==="1"}catch{return!1}}function Nb(e){try{localStorage.setItem(_g,e?"1":"0")}catch{}}function wb({sessions:e,activeId:t,loadingId:n,onOpen:i,onPrefetch:a,onNew:u,onDelete:l,onRename:c,onPin:f,onLock:p}){const[T,E]=_.useState(!1),[x,b]=_.useState(!1),[C,v]=_.useState(null),[D,A]=_.useState(null),[R,U]=_.useState(null),[W,q]=_.useState(null),[B,ae]=_.useState(""),[Z,ce]=_.useState(vb),[M,me]=_.useState(!1),[V,pe]=_.useState(()=>new Set),de=_.useCallback(()=>{v(null),A(null)},[]),ee=_.useRef(null),K=_.useRef(null);_.useEffect(()=>()=>{ee.current&&clearTimeout(ee.current),K.current&&clearTimeout(K.current)},[]);const Te=()=>{K.current&&clearTimeout(K.current),K.current=null},J=fe=>{Te(),K.current=setTimeout(()=>a(fe),_b)},le=fe=>{const Se=fe.currentTarget;me(Se.scrollTop>0),Se.classList.add("is-scrolling"),ee.current&&clearTimeout(ee.current),ee.current=setTimeout(()=>Se.classList.remove("is-scrolling"),Sb)},S=fe=>{const Se=B.trim();Se&&c(fe,Se),q(null)},P=e.filter(fe=>fe.pinned),G=e.filter(fe=>!fe.pinned),L=()=>{Nb(!Z),ce(!Z)},we=fe=>pe(Se=>{const rt=new Set(Se);return rt.has(fe)?rt.delete(fe):rt.add(fe),rt}),Re=h.jsx("button",{className:`iconbtn sidebar-section-btn sidebar-group-btn${Z?" is-on":""}`,"aria-label":"Group chats by date","aria-pressed":Z,title:Z?"Stop grouping by date":"Group by date",onClick:L,children:h.jsx(ab,{size:15})}),_e=(fe,Se,rt)=>h.jsxs("div",{className:"sidebar-section-head",children:[rt===void 0?h.jsx("span",{className:"sidebar-section-title",children:fe}):h.jsxs("button",{className:"sidebar-section-toggle","aria-expanded":rt,onClick:()=>we(fe),children:[h.jsx("span",{className:"sidebar-section-title",children:fe}),h.jsx(kr,{size:12,className:`sidebar-section-chevron${rt?"":" is-closed"}`})]}),Se]}),Ue=(fe,Se,rt)=>{const Nr=!V.has(fe);return h.jsxs("section",{className:"sidebar-section","aria-label":fe,children:[_e(fe,rt,Nr),Nr&&h.jsx("div",{className:"sidebar-list",children:Se.map(De)})]},fe)},De=fe=>h.jsxs("div",{className:`srow ${fe.chatId===t?"is-active":""} ${C===fe.chatId?"is-menu-open":""}`,children:[W===fe.chatId?h.jsx("input",{className:"srow-rename",autoFocus:!0,onFocus:Se=>Se.currentTarget.select(),value:B,onChange:Se=>ae(Se.target.value),onBlur:()=>S(fe.chatId),onKeyDown:Se=>{Se.key==="Enter"&&S(fe.chatId),Se.key==="Escape"&&q(null)},onClick:Se=>Se.stopPropagation()}):h.jsxs(_d,{className:"srow-open",to:Fu(fe.chatId),onPointerEnter:Se=>{Se.pointerType==="mouse"&&J(fe.chatId)},onPointerLeave:Te,onPointerDown:()=>a(fe.chatId),onFocus:()=>a(fe.chatId),onClick:Se=>{Se.metaKey||Se.ctrlKey||Se.shiftKey||Se.altKey||i(fe.chatId)},children:[h.jsx("span",{className:"sb-icon",children:n===fe.chatId?h.jsx(br,{size:12,className:"srow-spinner"}):h.jsx("span",{className:"srow-dot"})}),h.jsx("span",{className:"srow-title",title:fe.title,children:fe.title})]}),h.jsxs("div",{className:"srow-menu",children:[h.jsx("button",{className:"iconbtn srow-menu-btn","aria-label":"Session actions","aria-haspopup":"menu","aria-expanded":C===fe.chatId,onClick:Se=>{Se.stopPropagation();const rt=C===fe.chatId;A(rt?null:Se.currentTarget),v(rt?null:fe.chatId)},children:h.jsx(j2,{size:16})}),C===fe.chatId&&h.jsxs(Sg,{anchor:D,onClose:de,children:[h.jsx("button",{className:"menu-item",onClick:()=>{de(),f(fe.chatId,!fe.pinned)},children:fe.pinned?"Unpin":"Pin"}),h.jsx("button",{className:"menu-item",onClick:()=>{ae(fe.title),q(fe.chatId),de()},children:"Rename"}),h.jsx("button",{className:"menu-item menu-item-danger",onClick:()=>{de(),U(fe.chatId)},children:"Delete"})]})]})]},fe.chatId);return h.jsxs("aside",{className:"sidebar",children:[h.jsx("header",{className:`sidebar-head${M?" is-scrolled":""}`,children:h.jsxs("span",{className:"brand",children:[h.jsx("img",{className:"brand-logo",src:"/logo.svg",alt:""}),h.jsx("span",{className:"wordmark",children:"Casper"})]})}),h.jsxs("div",{className:"sidebar-scroll",onScroll:le,children:[h.jsxs("nav",{className:"sidebar-nav","aria-label":"Casper",children:[h.jsxs("button",{className:"snav-item",onClick:u,children:[h.jsx("span",{className:"sb-icon",children:h.jsx(Id,{size:18})}),"New"]}),h.jsxs("button",{className:"snav-item",onClick:()=>E(!0),children:[h.jsx("span",{className:"sb-icon",children:h.jsx(xg,{size:17})}),"Search"]}),h.jsxs("button",{className:"snav-item",onClick:()=>b(!0),children:[h.jsx("span",{className:"sb-icon",children:h.jsx(nb,{size:17})}),"Settings"]})]}),P.length>0&&Ue("Pinned",P),e.length===0?h.jsxs(h.Fragment,{children:[_e("Chats",Re),h.jsx("div",{className:"sidebar-list",children:h.jsx("p",{className:"sidebar-empty",children:"No sessions yet. Start one and it keeps running while you're away."})})]}):Z?M2(G).map((fe,Se)=>Ue(fe.label,fe.chats,Se===0?Re:void 0)):G.length>0&&Ue("Chats",G,Re)]}),T&&h.jsx(ob,{sessions:e,onOpen:i,onClose:()=>E(!1)}),x&&h.jsx(Eb,{onClose:()=>b(!1),onLock:()=>{b(!1),p()}}),R&&h.jsx(Cb,{title:"Delete session?",message:"This session and its history will be permanently deleted. This can't be undone.",confirmLabel:"Delete",danger:!0,onConfirm:()=>{const fe=R;U(null),l(fe)},onCancel:()=>U(null)})]})}const Ab="modulepreload",Ib=function(e){return"/"+e},fm={},Wc=function(t,n,i){let a=Promise.resolve();if(n&&n.length>0){let l=function(p){return Promise.all(p.map(T=>Promise.resolve(T).then(E=>({status:"fulfilled",value:E}),E=>({status:"rejected",reason:E}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));a=l(n.map(p=>{if(p=Ib(p),p in fm)return;fm[p]=!0;const T=p.endsWith(".css"),E=T?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${E}`))return;const x=document.createElement("link");if(x.rel=T?"stylesheet":Ab,T||(x.as="script"),x.crossOrigin="",x.href=p,f&&x.setAttribute("nonce",f),document.head.appendChild(x),T)return new Promise((b,C)=>{x.addEventListener("load",b),x.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${p}`)))})}))}function u(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return a.then(l=>{for(const c of l||[])c.status==="rejected"&&u(c.reason);return t().catch(u)})};function hm(e){const t=[],n=String(e||"");let i=n.indexOf(","),a=0,u=!1;for(;!u;){i===-1&&(i=n.length,u=!0);const l=n.slice(a,i).trim();(l||!u)&&t.push(l),a=i+1,i=n.indexOf(",",a)}return t}function vg(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Lb=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Rb=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ob={};function pm(e,t){return(Ob.jsx?Rb:Lb).test(e)}const Db=/[ \t\n\f\r]/g;function Pb(e){return typeof e=="object"?e.type==="text"?mm(e.value):!1:mm(e)}function mm(e){return e.replace(Db,"")===""}class sa{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}sa.prototype.normal={};sa.prototype.property={};sa.prototype.space=void 0;function Ng(e,t){const n={},i={};for(const a of e)Object.assign(n,a.property),Object.assign(i,a.normal);return new sa(n,i,t)}function Js(e){return e.toLowerCase()}class $t{constructor(t,n){this.attribute=n,this.property=t}}$t.prototype.attribute="";$t.prototype.booleanish=!1;$t.prototype.boolean=!1;$t.prototype.commaOrSpaceSeparated=!1;$t.prototype.commaSeparated=!1;$t.prototype.defined=!1;$t.prototype.mustUseProperty=!1;$t.prototype.number=!1;$t.prototype.overloadedBoolean=!1;$t.prototype.property="";$t.prototype.spaceSeparated=!1;$t.prototype.space=void 0;let Mb=0;const Le=Zr(),dt=Zr(),Yc=Zr(),ue=Zr(),Ge=Zr(),Qr=Zr(),Gt=Zr();function Zr(){return 2**++Mb}const Vc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Le,booleanish:dt,commaOrSpaceSeparated:Gt,commaSeparated:Qr,number:ue,overloadedBoolean:Yc,spaceSeparated:Ge},Symbol.toStringTag,{value:"Module"})),fc=Object.keys(Vc);class Ld extends $t{constructor(t,n,i,a){let u=-1;if(super(t,n),gm(this,"space",a),typeof i=="number")for(;++u<fc.length;){const l=fc[u];gm(this,fc[u],(i&Vc[l])===Vc[l])}}}Ld.prototype.defined=!0;function gm(e,t,n){n&&(e[t]=n)}function Bi(e){const t={},n={};for(const[i,a]of Object.entries(e.properties)){const u=new Ld(i,e.transform(e.attributes||{},i),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(u.mustUseProperty=!0),t[i]=u,n[Js(i)]=i,n[Js(u.attribute)]=i}return new sa(t,n,e.space)}const wg=Bi({properties:{ariaActiveDescendant:null,ariaAtomic:dt,ariaAutoComplete:null,ariaBusy:dt,ariaChecked:dt,ariaColCount:ue,ariaColIndex:ue,ariaColSpan:ue,ariaControls:Ge,ariaCurrent:null,ariaDescribedBy:Ge,ariaDetails:null,ariaDisabled:dt,ariaDropEffect:Ge,ariaErrorMessage:null,ariaExpanded:dt,ariaFlowTo:Ge,ariaGrabbed:dt,ariaHasPopup:null,ariaHidden:dt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ge,ariaLevel:ue,ariaLive:null,ariaModal:dt,ariaMultiLine:dt,ariaMultiSelectable:dt,ariaOrientation:null,ariaOwns:Ge,ariaPlaceholder:null,ariaPosInSet:ue,ariaPressed:dt,ariaReadOnly:dt,ariaRelevant:null,ariaRequired:dt,ariaRoleDescription:Ge,ariaRowCount:ue,ariaRowIndex:ue,ariaRowSpan:ue,ariaSelected:dt,ariaSetSize:ue,ariaSort:null,ariaValueMax:ue,ariaValueMin:ue,ariaValueNow:ue,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Ag(e,t){return t in e?e[t]:t}function Ig(e,t){return Ag(e,t.toLowerCase())}const Fb=Bi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Qr,acceptCharset:Ge,accessKey:Ge,action:null,allow:null,allowFullScreen:Le,allowPaymentRequest:Le,allowUserMedia:Le,alpha:Le,alt:null,as:null,async:Le,autoCapitalize:null,autoComplete:Ge,autoFocus:Le,autoPlay:Le,blocking:Ge,capture:null,charSet:null,checked:Le,cite:null,className:Ge,closedBy:null,colorSpace:null,cols:ue,colSpan:ue,command:null,commandFor:null,content:null,contentEditable:dt,controls:Le,controlsList:Ge,coords:ue|Qr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Le,defer:Le,dir:null,dirName:null,disabled:Le,download:Yc,draggable:dt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Le,formTarget:null,headers:Ge,height:ue,hidden:Yc,high:ue,href:null,hrefLang:null,htmlFor:Ge,httpEquiv:Ge,id:null,imageSizes:null,imageSrcSet:null,inert:Le,inputMode:null,integrity:null,is:null,isMap:Le,itemId:null,itemProp:Ge,itemRef:Ge,itemScope:Le,itemType:Ge,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Le,low:ue,manifest:null,max:null,maxLength:ue,media:null,method:null,min:null,minLength:ue,multiple:Le,muted:Le,name:null,nonce:null,noModule:Le,noValidate:Le,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:Le,optimum:ue,pattern:null,ping:Ge,placeholder:null,playsInline:Le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Le,referrerPolicy:null,rel:Ge,required:Le,reversed:Le,rows:ue,rowSpan:ue,sandbox:Ge,scope:null,scoped:Le,seamless:Le,selected:Le,shadowRootClonable:Le,shadowRootCustomElementRegistry:Le,shadowRootDelegatesFocus:Le,shadowRootMode:null,shadowRootSerializable:Le,shape:null,size:ue,sizes:null,slot:null,span:ue,spellCheck:dt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ue,step:null,style:null,tabIndex:ue,target:null,title:null,translate:null,type:null,typeMustMatch:Le,useMap:null,value:dt,width:ue,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ge,axis:null,background:null,bgColor:null,border:ue,borderColor:null,bottomMargin:ue,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Le,declare:Le,event:null,face:null,frame:null,frameBorder:null,hSpace:ue,leftMargin:ue,link:null,longDesc:null,lowSrc:null,marginHeight:ue,marginWidth:ue,noResize:Le,noHref:Le,noShade:Le,noWrap:Le,object:null,profile:null,prompt:null,rev:null,rightMargin:ue,rules:null,scheme:null,scrolling:dt,standby:null,summary:null,text:null,topMargin:ue,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ue,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Le,disablePictureInPicture:Le,disableRemotePlayback:Le,exportParts:Qr,part:Ge,prefix:null,property:null,results:ue,security:null,unselectable:null},space:"html",transform:Ig}),jb=Bi({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",maskType:"mask-type",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:Gt,accentHeight:ue,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ue,amplitude:ue,arabicForm:null,ascent:ue,attributeName:null,attributeType:null,azimuth:ue,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ue,by:null,calcMode:null,capHeight:ue,className:Ge,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ue,diffuseConstant:ue,direction:null,display:null,dur:null,divisor:ue,dominantBaseline:null,download:Le,dx:null,dy:null,edgeMode:null,editable:null,elevation:ue,enableBackground:null,end:null,event:null,exponent:ue,externalResourcesRequired:null,fill:null,fillOpacity:ue,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Qr,g2:Qr,glyphName:Qr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ue,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ue,horizOriginX:ue,horizOriginY:ue,id:null,ideographic:ue,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ue,k:ue,k1:ue,k2:ue,k3:ue,k4:ue,kernelMatrix:Gt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ue,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ue,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ue,overlineThickness:ue,paintOrder:null,panose1:null,path:null,pathLength:ue,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ge,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ue,pointsAtY:ue,pointsAtZ:ue,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Gt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Gt,rev:Gt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Gt,requiredFeatures:Gt,requiredFonts:Gt,requiredFormats:Gt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ue,specularExponent:ue,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ue,strikethroughThickness:ue,string:null,stroke:null,strokeDashArray:Gt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ue,strokeOpacity:ue,strokeWidth:null,style:null,surfaceScale:ue,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Gt,tabIndex:ue,tableValues:null,target:null,targetX:ue,targetY:ue,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Gt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ue,underlineThickness:ue,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ue,values:null,vAlphabetic:ue,vMathematical:ue,vectorEffect:null,vHanging:ue,vIdeographic:ue,version:null,vertAdvY:ue,vertOriginX:ue,vertOriginY:ue,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ue,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ag}),Lg=Bi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Rg=Bi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ig}),Og=Bi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Bb={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"},Ub=/[A-Z]/g,Em=/-[a-z]/g,Hb=/^data[-\w.:]+$/i;function io(e,t){const n=Js(t);let i=t,a=$t;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Hb.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(Em,$b);i="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!Em.test(u)){let l=u.replace(Ub,zb);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}a=Ld}return new a(i,t)}function zb(e){return"-"+e.toLowerCase()}function $b(e){return e.charAt(1).toUpperCase()}const aa=Ng([wg,Fb,Lg,Rg,Og],"html"),Cr=Ng([wg,jb,Lg,Rg,Og],"svg");function Tm(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Dg(e){return e.join(" ").trim()}var Ii={},hc,ym;function Wb(){if(ym)return hc;ym=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
58
+ `,p="/",T="*",E="",x="comment",b="declaration";function C(D,A){if(typeof D!="string")throw new TypeError("First argument must be a string");if(!D)return[];A=A||{};var R=1,U=1;function W(de){var ee=de.match(t);ee&&(R+=ee.length);var K=de.lastIndexOf(f);U=~K?de.length-K:U+de.length}function q(){var de={line:R,column:U};return function(ee){return ee.position=new B(de),ce(),ee}}function B(de){this.start=de,this.end={line:R,column:U},this.source=A.source}B.prototype.content=D;function ae(de){var ee=new Error(A.source+":"+R+":"+U+": "+de);if(ee.reason=de,ee.filename=A.source,ee.line=R,ee.column=U,ee.source=D,!A.silent)throw ee}function Z(de){var ee=de.exec(D);if(ee){var K=ee[0];return W(K),D=D.slice(K.length),ee}}function ce(){Z(n)}function M(de){var ee;for(de=de||[];ee=me();)ee!==!1&&de.push(ee);return de}function me(){var de=q();if(!(p!=D.charAt(0)||T!=D.charAt(1))){for(var ee=2;E!=D.charAt(ee)&&(T!=D.charAt(ee)||p!=D.charAt(ee+1));)++ee;if(ee+=2,E===D.charAt(ee-1))return ae("End of comment missing");var K=D.slice(2,ee-2);return U+=2,W(K),D=D.slice(ee),U+=2,de({type:x,comment:K})}}function V(){var de=q(),ee=Z(i);if(ee){if(me(),!Z(a))return ae("property missing ':'");var K=Z(u),Te=de({type:b,property:v(ee[0].replace(e,E)),value:K?v(K[0].replace(e,E)):E});return Z(l),Te}}function pe(){var de=[];M(de);for(var ee;ee=V();)ee!==!1&&(de.push(ee),M(de));return de}return ce(),pe()}function v(D){return D?D.replace(c,E):E}return hc=C,hc}var xm;function Yb(){if(xm)return Ii;xm=1;var e=Ii&&Ii.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.default=n;const t=e(Wb());function n(i,a){let u=null;if(!i||typeof i!="string")return u;const l=(0,t.default)(i),c=typeof a=="function";return l.forEach(f=>{if(f.type!=="declaration")return;const{property:p,value:T}=f;c?a(p,T,f):T&&(u=u||{},u[p]=T)}),u}return Ii}var Ds={},bm;function Vb(){if(bm)return Ds;bm=1,Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,u=function(p){return!p||n.test(p)||e.test(p)},l=function(p,T){return T.toUpperCase()},c=function(p,T){return"".concat(T,"-")},f=function(p,T){return T===void 0&&(T={}),u(p)?p:(p=p.toLowerCase(),T.reactCompat?p=p.replace(a,c):p=p.replace(i,c),p.replace(t,l))};return Ds.camelCase=f,Ds}var Ps,km;function qb(){if(km)return Ps;km=1;var e=Ps&&Ps.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(Yb()),n=Vb();function i(a,u){var l={};return!a||typeof a!="string"||(0,t.default)(a,function(c,f){c&&f&&(l[(0,n.camelCase)(c,u)]=f)}),l}return i.default=i,Ps=i,Ps}var Qb=qb();const Gb=pd(Qb),so=Pg("end"),Rn=Pg("start");function Pg(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function Mg(e){const t=Rn(e),n=so(e);if(t&&n)return{start:t,end:n}}function zs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Cm(e.position):"start"in e||"end"in e?Cm(e):"line"in e||"column"in e?qc(e):""}function qc(e){return Sm(e&&e.line)+":"+Sm(e&&e.column)}function Cm(e){return qc(e&&e.start)+"-"+qc(e&&e.end)}function Sm(e){return e&&typeof e=="number"?e:1}class At extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let a="",u={},l=!1;if(n&&("line"in n&&"column"in n?u={place:n}:"start"in n&&"end"in n?u={place:n}:"type"in n?u={ancestors:[n],place:n.position}:u={...n}),typeof t=="string"?a=t:!u.cause&&t&&(l=!0,a=t.message,u.cause=t),!u.ruleId&&!u.source&&typeof i=="string"){const f=i.indexOf(":");f===-1?u.ruleId=i:(u.source=i.slice(0,f),u.ruleId=i.slice(f+1))}if(!u.place&&u.ancestors&&u.ancestors){const f=u.ancestors[u.ancestors.length-1];f&&(u.place=f.position)}const c=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=c?c.line:void 0,this.name=zs(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=l&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}At.prototype.file="";At.prototype.name="";At.prototype.reason="";At.prototype.message="";At.prototype.stack="";At.prototype.column=void 0;At.prototype.line=void 0;At.prototype.ancestors=void 0;At.prototype.cause=void 0;At.prototype.fatal=void 0;At.prototype.place=void 0;At.prototype.ruleId=void 0;At.prototype.source=void 0;const Rd={}.hasOwnProperty,Kb=new Map,Xb=/[A-Z]/g,Jb=new Set(["table","tbody","thead","tfoot","tr"]),Zb=new Set(["td","th"]),Fg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ek(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=ok(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=uk(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Cr:aa,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},u=jg(a,e,void 0);return u&&typeof u!="string"?u:a.create(e,a.Fragment,{children:u||void 0},void 0)}function jg(e,t,n){if(t.type==="element")return tk(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return nk(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ik(e,t,n);if(t.type==="mdxjsEsm")return rk(e,t);if(t.type==="root")return sk(e,t,n);if(t.type==="text")return ak(e,t)}function tk(e,t,n){const i=e.schema;let a=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(a=Cr,e.schema=a),e.ancestors.push(t);const u=Ug(e,t.tagName,!1),l=lk(e,t);let c=Dd(e,t);return Jb.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!Pb(f):!0})),Bg(e,l,u,t),Od(l,c),e.ancestors.pop(),e.schema=i,e.create(t,u,l,n)}function nk(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}Zs(e,t.position)}function rk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Zs(e,t.position)}function ik(e,t,n){const i=e.schema;let a=i;t.name==="svg"&&i.space==="html"&&(a=Cr,e.schema=a),e.ancestors.push(t);const u=t.name===null?e.Fragment:Ug(e,t.name,!0),l=ck(e,t),c=Dd(e,t);return Bg(e,l,u,t),Od(l,c),e.ancestors.pop(),e.schema=i,e.create(t,u,l,n)}function sk(e,t,n){const i={};return Od(i,Dd(e,t)),e.create(t,e.Fragment,i,n)}function ak(e,t){return t.value}function Bg(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function Od(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function uk(e,t,n){return i;function i(a,u,l,c){const p=Array.isArray(l.children)?n:t;return c?p(u,l,c):p(u,l)}}function ok(e,t){return n;function n(i,a,u,l){const c=Array.isArray(u.children),f=Rn(i);return t(a,u,l,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function lk(e,t){const n={};let i,a;for(a in t.properties)if(a!=="children"&&Rd.call(t.properties,a)){const u=dk(e,a,t.properties[a]);if(u){const[l,c]=u;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&Zb.has(t.tagName)?i=c:n[l]=c}}if(i){const u=n.style||(n.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function ck(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const u=i.data.estree.body[0];u.type;const l=u.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Zs(e,t.position);else{const a=i.name;let u;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const c=i.value.data.estree.body[0];c.type,u=e.evaluater.evaluateExpression(c.expression)}else Zs(e,t.position);else u=i.value===null?!0:i.value;n[a]=u}return n}function Dd(e,t){const n=[];let i=-1;const a=e.passKeys?new Map:Kb;for(;++i<t.children.length;){const u=t.children[i];let l;if(e.passKeys){const f=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(f){const p=a.get(f)||0;l=f+"-"+p,a.set(f,p+1)}}const c=jg(e,u,l);c!==void 0&&n.push(c)}return n}function dk(e,t,n){const i=io(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?vg(n):Dg(n)),i.property==="style"){let a=typeof n=="object"?n:fk(e,String(n));return e.stylePropertyNameCase==="css"&&(a=hk(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&i.space?Bb[i.property]||i.property:i.attribute,n]}}function fk(e,t){try{return Gb(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,a=new At("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Fg+"#cannot-parse-style-attribute",a}}function Ug(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let u=-1,l;for(;++u<a.length;){const c=pm(a[u])?{type:"Identifier",name:a[u]}:{type:"Literal",value:a[u]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(u&&c.type==="Literal"),optional:!1}:c}i=l}else i=pm(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const a=i.value;return Rd.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(i);Zs(e)}function Zs(e,t){const n=new At("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Fg+"#cannot-handle-mdx-estrees-without-createevaluater",n}function hk(e){const t={};let n;for(n in e)Rd.call(e,n)&&(t[pk(n)]=e[n]);return t}function pk(e){let t=e.replace(Xb,mk);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function mk(e){return"-"+e.toLowerCase()}const pc={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"]},gk={};function Pd(e,t){const n=gk,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Hg(e,i,a)}function Hg(e,t,n){if(Ek(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return _m(e.children,t,n)}return Array.isArray(e)?_m(e,t,n):""}function _m(e,t,n){const i=[];let a=-1;for(;++a<e.length;)i[a]=Hg(e[a],t,n);return i.join("")}function Ek(e){return!!(e&&typeof e=="object")}const vm=document.createElement("i");function Md(e){const t="&"+e+";";vm.innerHTML=t;const n=vm.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Kt(e,t,n,i){const a=e.length;let u=0,l;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,i.length<1e4)l=Array.from(i),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);u<i.length;)l=i.slice(u,u+1e4),l.unshift(t,0),e.splice(...l),u+=1e4,t+=1e4}function an(e,t){return e.length>0?(Kt(e,e.length,0,t),e):t}const Nm={}.hasOwnProperty;function zg(e){const t={};let n=-1;for(;++n<e.length;)Tk(t,e[n]);return t}function Tk(e,t){let n;for(n in t){const a=(Nm.call(e,n)?e[n]:void 0)||(e[n]={}),u=t[n];let l;if(u)for(l in u){Nm.call(a,l)||(a[l]=[]);const c=u[l];yk(a[l],Array.isArray(c)?c:c?[c]:[])}}}function yk(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);Kt(e,0,0,i)}function $g(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function yn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ot=Sr(/[A-Za-z]/),Nt=Sr(/[\dA-Za-z]/),xk=Sr(/[#-'*+\--9=?A-Z^-~]/);function Vu(e){return e!==null&&(e<32||e===127)}const Qc=Sr(/\d/),bk=Sr(/[\dA-Fa-f]/),kk=Sr(/[!-/:-@[-`{-~]/);function Ce(e){return e!==null&&e<-2}function Ke(e){return e!==null&&(e<0||e===32)}function Be(e){return e===-2||e===-1||e===32}const ao=Sr(new RegExp("\\p{P}|\\p{S}","u")),Kr=Sr(/\s/);function Sr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ui(e){const t=[];let n=-1,i=0,a=0;for(;++n<e.length;){const u=e.charCodeAt(n);let l="";if(u===37&&Nt(e.charCodeAt(n+1))&&Nt(e.charCodeAt(n+2)))a=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(l=String.fromCharCode(u));else if(u>55295&&u<57344){const c=e.charCodeAt(n+1);u<56320&&c>56319&&c<57344?(l=String.fromCharCode(u,c),a=1):l="�"}else l=String.fromCharCode(u);l&&(t.push(e.slice(i,n),encodeURIComponent(l)),i=n+a+1,l=""),a&&(n+=a,a=0)}return t.join("")+e.slice(i)}function je(e,t,n,i){const a=i?i-1:Number.POSITIVE_INFINITY;let u=0;return l;function l(f){return Be(f)?(e.enter(n),c(f)):t(f)}function c(f){return Be(f)&&u++<a?(e.consume(f),c):(e.exit(n),t(f))}}const Ck={tokenize:Sk};function Sk(e){const t=e.attempt(this.parser.constructs.contentInitial,i,a);let n;return t;function i(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),je(e,t,"linePrefix")}function a(c){return e.enter("paragraph"),u(c)}function u(c){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Ce(c)?(e.consume(c),e.exit("chunkText"),u):(e.consume(c),l)}}const _k={tokenize:vk},wm={tokenize:Nk};function vk(e){const t=this,n=[];let i=0,a,u,l;return c;function c(U){if(i<n.length){const W=n[i];return t.containerState=W[1],e.attempt(W[0].continuation,f,p)(U)}return p(U)}function f(U){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&R();const W=t.events.length;let q=W,B;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){B=t.events[q][1].end;break}A(i);let ae=W;for(;ae<t.events.length;)t.events[ae][1].end={...B},ae++;return Kt(t.events,q+1,0,t.events.slice(W)),t.events.length=ae,p(U)}return c(U)}function p(U){if(i===n.length){if(!a)return x(U);if(a.currentConstruct&&a.currentConstruct.concrete)return C(U);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(wm,T,E)(U)}function T(U){return a&&R(),A(i),x(U)}function E(U){return t.parser.lazy[t.now().line]=i!==n.length,l=t.now().offset,C(U)}function x(U){return t.containerState={},e.attempt(wm,b,C)(U)}function b(U){return i++,n.push([t.currentConstruct,t.containerState]),x(U)}function C(U){if(U===null){a&&R(),A(0),e.consume(U);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:u}),v(U)}function v(U){if(U===null){D(e.exit("chunkFlow"),!0),A(0),e.consume(U);return}return Ce(U)?(e.consume(U),D(e.exit("chunkFlow")),i=0,t.interrupt=void 0,c):(e.consume(U),v)}function D(U,W){const q=t.sliceStream(U);if(W&&q.push(null),U.previous=u,u&&(u.next=U),u=U,a.defineSkip(U.start),a.write(q),t.parser.lazy[U.start.line]){let B=a.events.length;for(;B--;)if(a.events[B][1].start.offset<l&&(!a.events[B][1].end||a.events[B][1].end.offset>l))return;const ae=t.events.length;let Z=ae,ce,M;for(;Z--;)if(t.events[Z][0]==="exit"&&t.events[Z][1].type==="chunkFlow"){if(ce){M=t.events[Z][1].end;break}ce=!0}for(A(i),B=ae;B<t.events.length;)t.events[B][1].end={...M},B++;Kt(t.events,Z+1,0,t.events.slice(ae)),t.events.length=B}}function A(U){let W=n.length;for(;W-- >U;){const q=n[W];t.containerState=q[1],q[0].exit.call(t,e)}n.length=U}function R(){a.write([null]),u=void 0,a=void 0,t.containerState._closeFlow=void 0}}function Nk(e,t,n){return je(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Pi(e){if(e===null||Ke(e)||Kr(e))return 1;if(ao(e))return 2}function uo(e,t,n){const i=[];let a=-1;for(;++a<e.length;){const u=e[a].resolveAll;u&&!i.includes(u)&&(t=u(t,n),i.push(u))}return t}const Gc={name:"attention",resolveAll:wk,tokenize:Ak};function wk(e,t){let n=-1,i,a,u,l,c,f,p,T;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const E={...e[i][1].end},x={...e[n][1].start};Am(E,-f),Am(x,f),l={type:f>1?"strongSequence":"emphasisSequence",start:E,end:{...e[i][1].end}},c={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},u={type:f>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},a={type:f>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[i][1].end={...l.start},e[n][1].start={...c.end},p=[],e[i][1].end.offset-e[i][1].start.offset&&(p=an(p,[["enter",e[i][1],t],["exit",e[i][1],t]])),p=an(p,[["enter",a,t],["enter",l,t],["exit",l,t],["enter",u,t]]),p=an(p,uo(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),p=an(p,[["exit",u,t],["enter",c,t],["exit",c,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(T=2,p=an(p,[["enter",e[n][1],t],["exit",e[n][1],t]])):T=0,Kt(e,i-1,n-i+3,p),n=i+p.length-T-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Ak(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,a=Pi(i);let u;return l;function l(f){return u=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===u)return e.consume(f),c;const p=e.exit("attentionSequence"),T=Pi(f),E=!T||T===2&&a||n.includes(f),x=!a||a===2&&T||n.includes(i);return p._open=!!(u===42?E:E&&(a||!x)),p._close=!!(u===42?x:x&&(T||!E)),t(f)}}function Am(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ik={name:"autolink",tokenize:Lk};function Lk(e,t,n){let i=0;return a;function a(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(b){return Ot(b)?(e.consume(b),l):b===64?n(b):p(b)}function l(b){return b===43||b===45||b===46||Nt(b)?(i=1,c(b)):p(b)}function c(b){return b===58?(e.consume(b),i=0,f):(b===43||b===45||b===46||Nt(b))&&i++<32?(e.consume(b),c):(i=0,p(b))}function f(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||Vu(b)?n(b):(e.consume(b),f)}function p(b){return b===64?(e.consume(b),T):xk(b)?(e.consume(b),p):n(b)}function T(b){return Nt(b)?E(b):n(b)}function E(b){return b===46?(e.consume(b),i=0,T):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):x(b)}function x(b){if((b===45||Nt(b))&&i++<63){const C=b===45?x:E;return e.consume(b),C}return n(b)}}const ua={partial:!0,tokenize:Rk};function Rk(e,t,n){return i;function i(u){return Be(u)?je(e,a,"linePrefix")(u):a(u)}function a(u){return u===null||Ce(u)?t(u):n(u)}}const Wg={continuation:{tokenize:Dk},exit:Pk,name:"blockQuote",tokenize:Ok};function Ok(e,t,n){const i=this;return a;function a(l){if(l===62){const c=i.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),u}return n(l)}function u(l){return Be(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function Dk(e,t,n){const i=this;return a;function a(l){return Be(l)?je(e,u,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):u(l)}function u(l){return e.attempt(Wg,t,n)(l)}}function Pk(e){e.exit("blockQuote")}const Yg={name:"characterEscape",tokenize:Mk};function Mk(e,t,n){return i;function i(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),a}function a(u){return kk(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(u)}}const Vg={name:"characterReference",tokenize:Fk};function Fk(e,t,n){const i=this;let a=0,u,l;return c;function c(E){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),f}function f(E){return E===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(E),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),u=31,l=Nt,T(E))}function p(E){return E===88||E===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(E),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,l=bk,T):(e.enter("characterReferenceValue"),u=7,l=Qc,T(E))}function T(E){if(E===59&&a){const x=e.exit("characterReferenceValue");return l===Nt&&!Md(i.sliceSerialize(x))?n(E):(e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(E)&&a++<u?(e.consume(E),T):n(E)}}const Im={partial:!0,tokenize:Bk},Lm={concrete:!0,name:"codeFenced",tokenize:jk};function jk(e,t,n){const i=this,a={partial:!0,tokenize:q};let u=0,l=0,c;return f;function f(B){return p(B)}function p(B){const ae=i.events[i.events.length-1];return u=ae&&ae[1].type==="linePrefix"?ae[2].sliceSerialize(ae[1],!0).length:0,c=B,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),T(B)}function T(B){return B===c?(l++,e.consume(B),T):l<3?n(B):(e.exit("codeFencedFenceSequence"),Be(B)?je(e,E,"whitespace")(B):E(B))}function E(B){return B===null||Ce(B)?(e.exit("codeFencedFence"),i.interrupt?t(B):e.check(Im,v,W)(B)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(B))}function x(B){return B===null||Ce(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),E(B)):Be(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),je(e,b,"whitespace")(B)):B===96&&B===c?n(B):(e.consume(B),x)}function b(B){return B===null||Ce(B)?E(B):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),C(B))}function C(B){return B===null||Ce(B)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),E(B)):B===96&&B===c?n(B):(e.consume(B),C)}function v(B){return e.attempt(a,W,D)(B)}function D(B){return e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),A}function A(B){return u>0&&Be(B)?je(e,R,"linePrefix",u+1)(B):R(B)}function R(B){return B===null||Ce(B)?e.check(Im,v,W)(B):(e.enter("codeFlowValue"),U(B))}function U(B){return B===null||Ce(B)?(e.exit("codeFlowValue"),R(B)):(e.consume(B),U)}function W(B){return e.exit("codeFenced"),t(B)}function q(B,ae,Z){let ce=0;return M;function M(ee){return B.enter("lineEnding"),B.consume(ee),B.exit("lineEnding"),me}function me(ee){return B.enter("codeFencedFence"),Be(ee)?je(B,V,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ee):V(ee)}function V(ee){return ee===c?(B.enter("codeFencedFenceSequence"),pe(ee)):Z(ee)}function pe(ee){return ee===c?(ce++,B.consume(ee),pe):ce>=l?(B.exit("codeFencedFenceSequence"),Be(ee)?je(B,de,"whitespace")(ee):de(ee)):Z(ee)}function de(ee){return ee===null||Ce(ee)?(B.exit("codeFencedFence"),ae(ee)):Z(ee)}}}function Bk(e,t,n){const i=this;return a;function a(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),u)}function u(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}const mc={name:"codeIndented",tokenize:Hk},Uk={partial:!0,tokenize:zk};function Hk(e,t,n){const i=this;return a;function a(p){return e.enter("codeIndented"),je(e,u,"linePrefix",5)(p)}function u(p){const T=i.events[i.events.length-1];return T&&T[1].type==="linePrefix"&&T[2].sliceSerialize(T[1],!0).length>=4?l(p):n(p)}function l(p){return p===null?f(p):Ce(p)?e.attempt(Uk,l,f)(p):(e.enter("codeFlowValue"),c(p))}function c(p){return p===null||Ce(p)?(e.exit("codeFlowValue"),l(p)):(e.consume(p),c)}function f(p){return e.exit("codeIndented"),t(p)}}function zk(e,t,n){const i=this;return a;function a(l){return i.parser.lazy[i.now().line]?n(l):Ce(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):je(e,u,"linePrefix",5)(l)}function u(l){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):Ce(l)?a(l):n(l)}}const $k={name:"codeText",previous:Yk,resolve:Wk,tokenize:Vk};function Wk(e){let t=e.length-4,n=3,i,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)a===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(a=i):(i===t||e[i][1].type==="lineEnding")&&(e[a][1].type="codeTextData",i!==a+2&&(e[a][1].end=e[i-1][1].end,e.splice(a+2,i-a-2),t-=i-a-2,i=a+2),a=void 0);return e}function Yk(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Vk(e,t,n){let i=0,a,u;return l;function l(E){return e.enter("codeText"),e.enter("codeTextSequence"),c(E)}function c(E){return E===96?(e.consume(E),i++,c):(e.exit("codeTextSequence"),f(E))}function f(E){return E===null?n(E):E===32?(e.enter("space"),e.consume(E),e.exit("space"),f):E===96?(u=e.enter("codeTextSequence"),a=0,T(E)):Ce(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),f):(e.enter("codeTextData"),p(E))}function p(E){return E===null||E===32||E===96||Ce(E)?(e.exit("codeTextData"),f(E)):(e.consume(E),p)}function T(E){return E===96?(e.consume(E),a++,T):a===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(E)):(u.type="codeTextData",p(E))}}class qk{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const a=n||0;this.setCursor(Math.trunc(t));const u=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return i&&Ms(this.left,i),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ms(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ms(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ms(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ms(this.left,n.reverse())}}}function Ms(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function qg(e){const t={};let n=-1,i,a,u,l,c,f,p;const T=new qk(e);for(;++n<T.length;){for(;n in t;)n=t[n];if(i=T.get(n),n&&i[1].type==="chunkFlow"&&T.get(n-1)[1].type==="listItemPrefix"&&(f=i[1]._tokenizer.events,u=0,u<f.length&&f[u][1].type==="lineEndingBlank"&&(u+=2),u<f.length&&f[u][1].type==="content"))for(;++u<f.length&&f[u][1].type!=="content";)f[u][1].type==="chunkText"&&(f[u][1]._isInFirstContentOfListItem=!0,u++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,Qk(T,n)),n=t[n],p=!0);else if(i[1]._container){for(u=n,a=void 0;u--;)if(l=T.get(u),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(a&&(T.get(a)[1].type="lineEndingBlank"),l[1].type="lineEnding",a=u);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;a&&(i[1].end={...T.get(a)[1].start},c=T.slice(a,n),c.unshift(i),T.splice(a,n-a+1,c))}}return Kt(e,0,Number.POSITIVE_INFINITY,T.slice(0)),!p}function Qk(e,t){const n=e.get(t)[1],i=e.get(t)[2];let a=t-1;const u=[];let l=n._tokenizer;l||(l=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,f=[],p={};let T,E,x=-1,b=n,C=0,v=0;const D=[v];for(;b;){for(;e.get(++a)[1]!==b;);u.push(a),b._tokenizer||(T=i.sliceStream(b),b.next||T.push(null),E&&l.defineSkip(b.start),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(T),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),E=b,b=b.next}for(b=n;++x<c.length;)c[x][0]==="exit"&&c[x-1][0]==="enter"&&c[x][1].type===c[x-1][1].type&&c[x][1].start.line!==c[x][1].end.line&&(v=x+1,D.push(v),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(l.events=[],b?(b._tokenizer=void 0,b.previous=void 0):D.pop(),x=D.length;x--;){const A=c.slice(D[x],D[x+1]),R=u.pop();f.push([R,R+A.length-1]),e.splice(R,2,A)}for(f.reverse(),x=-1;++x<f.length;)p[C+f[x][0]]=C+f[x][1],C+=f[x][1]-f[x][0]-1;return p}const Gk={resolve:Xk,tokenize:Jk},Kk={partial:!0,tokenize:Zk};function Xk(e){return qg(e),e}function Jk(e,t){let n;return i;function i(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(c)}function a(c){return c===null?u(c):Ce(c)?e.check(Kk,l,u)(c):(e.consume(c),a)}function u(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function Zk(e,t,n){const i=this;return a;function a(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),je(e,u,"linePrefix")}function u(l){if(l===null||Ce(l))return n(l);const c=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):e.interrupt(i.parser.constructs.flow,n,t)(l)}}function Qg(e,t,n,i,a,u,l,c,f){const p=f||Number.POSITIVE_INFINITY;let T=0;return E;function E(A){return A===60?(e.enter(i),e.enter(a),e.enter(u),e.consume(A),e.exit(u),x):A===null||A===32||A===41||Vu(A)?n(A):(e.enter(i),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),v(A))}function x(A){return A===62?(e.enter(u),e.consume(A),e.exit(u),e.exit(a),e.exit(i),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===62?(e.exit("chunkString"),e.exit(c),x(A)):A===null||A===60||Ce(A)?n(A):(e.consume(A),A===92?C:b)}function C(A){return A===60||A===62||A===92?(e.consume(A),b):b(A)}function v(A){return!T&&(A===null||A===41||Ke(A))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(i),t(A)):T<p&&A===40?(e.consume(A),T++,v):A===41?(e.consume(A),T--,v):A===null||A===32||A===40||Vu(A)?n(A):(e.consume(A),A===92?D:v)}function D(A){return A===40||A===41||A===92?(e.consume(A),v):v(A)}}function Gg(e,t,n,i,a,u){const l=this;let c=0,f;return p;function p(b){return e.enter(i),e.enter(a),e.consume(b),e.exit(a),e.enter(u),T}function T(b){return c>999||b===null||b===91||b===93&&!f||b===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(b):b===93?(e.exit(u),e.enter(a),e.consume(b),e.exit(a),e.exit(i),t):Ce(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),T):(e.enter("chunkString",{contentType:"string"}),E(b))}function E(b){return b===null||b===91||b===93||Ce(b)||c++>999?(e.exit("chunkString"),T(b)):(e.consume(b),f||(f=!Be(b)),b===92?x:E)}function x(b){return b===91||b===92||b===93?(e.consume(b),c++,E):E(b)}}function Kg(e,t,n,i,a,u){let l;return c;function c(x){return x===34||x===39||x===40?(e.enter(i),e.enter(a),e.consume(x),e.exit(a),l=x===40?41:x,f):n(x)}function f(x){return x===l?(e.enter(a),e.consume(x),e.exit(a),e.exit(i),t):(e.enter(u),p(x))}function p(x){return x===l?(e.exit(u),f(l)):x===null?n(x):Ce(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),je(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),T(x))}function T(x){return x===l||x===null||Ce(x)?(e.exit("chunkString"),p(x)):(e.consume(x),x===92?E:T)}function E(x){return x===l||x===92?(e.consume(x),T):T(x)}}function $s(e,t){let n;return i;function i(a){return Ce(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,i):Be(a)?je(e,i,n?"linePrefix":"lineSuffix")(a):t(a)}}const eC={name:"definition",tokenize:nC},tC={partial:!0,tokenize:rC};function nC(e,t,n){const i=this;let a;return u;function u(b){return e.enter("definition"),l(b)}function l(b){return Gg.call(i,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function c(b){return a=yn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),f):n(b)}function f(b){return Ke(b)?$s(e,p)(b):p(b)}function p(b){return Qg(e,T,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function T(b){return e.attempt(tC,E,E)(b)}function E(b){return Be(b)?je(e,x,"whitespace")(b):x(b)}function x(b){return b===null||Ce(b)?(e.exit("definition"),i.parser.defined.push(a),t(b)):n(b)}}function rC(e,t,n){return i;function i(c){return Ke(c)?$s(e,a)(c):n(c)}function a(c){return Kg(e,u,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function u(c){return Be(c)?je(e,l,"whitespace")(c):l(c)}function l(c){return c===null||Ce(c)?t(c):n(c)}}const iC={name:"hardBreakEscape",tokenize:sC};function sC(e,t,n){return i;function i(u){return e.enter("hardBreakEscape"),e.consume(u),a}function a(u){return Ce(u)?(e.exit("hardBreakEscape"),t(u)):n(u)}}const aC={name:"headingAtx",resolve:uC,tokenize:oC};function uC(e,t){let n=e.length-2,i=3,a,u;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(a={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},u={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},Kt(e,i,n-i+1,[["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t]])),e}function oC(e,t,n){let i=0;return a;function a(T){return e.enter("atxHeading"),u(T)}function u(T){return e.enter("atxHeadingSequence"),l(T)}function l(T){return T===35&&i++<6?(e.consume(T),l):T===null||Ke(T)?(e.exit("atxHeadingSequence"),c(T)):n(T)}function c(T){return T===35?(e.enter("atxHeadingSequence"),f(T)):T===null||Ce(T)?(e.exit("atxHeading"),t(T)):Be(T)?je(e,c,"whitespace")(T):(e.enter("atxHeadingText"),p(T))}function f(T){return T===35?(e.consume(T),f):(e.exit("atxHeadingSequence"),c(T))}function p(T){return T===null||T===35||Ke(T)?(e.exit("atxHeadingText"),c(T)):(e.consume(T),p)}}const lC=["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"],Rm=["pre","script","style","textarea"],cC={concrete:!0,name:"htmlFlow",resolveTo:hC,tokenize:pC},dC={partial:!0,tokenize:gC},fC={partial:!0,tokenize:mC};function hC(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function pC(e,t,n){const i=this;let a,u,l,c,f;return p;function p(L){return T(L)}function T(L){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(L),E}function E(L){return L===33?(e.consume(L),x):L===47?(e.consume(L),u=!0,v):L===63?(e.consume(L),a=3,i.interrupt?t:S):Ot(L)?(e.consume(L),l=String.fromCharCode(L),D):n(L)}function x(L){return L===45?(e.consume(L),a=2,b):L===91?(e.consume(L),a=5,c=0,C):Ot(L)?(e.consume(L),a=4,i.interrupt?t:S):n(L)}function b(L){return L===45?(e.consume(L),i.interrupt?t:S):n(L)}function C(L){const we="CDATA[";return L===we.charCodeAt(c++)?(e.consume(L),c===we.length?i.interrupt?t:V:C):n(L)}function v(L){return Ot(L)?(e.consume(L),l=String.fromCharCode(L),D):n(L)}function D(L){if(L===null||L===47||L===62||Ke(L)){const we=L===47,Re=l.toLowerCase();return!we&&!u&&Rm.includes(Re)?(a=1,i.interrupt?t(L):V(L)):lC.includes(l.toLowerCase())?(a=6,we?(e.consume(L),A):i.interrupt?t(L):V(L)):(a=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(L):u?R(L):U(L))}return L===45||Nt(L)?(e.consume(L),l+=String.fromCharCode(L),D):n(L)}function A(L){return L===62?(e.consume(L),i.interrupt?t:V):n(L)}function R(L){return Be(L)?(e.consume(L),R):M(L)}function U(L){return L===47?(e.consume(L),M):L===58||L===95||Ot(L)?(e.consume(L),W):Be(L)?(e.consume(L),U):M(L)}function W(L){return L===45||L===46||L===58||L===95||Nt(L)?(e.consume(L),W):q(L)}function q(L){return L===61?(e.consume(L),B):Be(L)?(e.consume(L),q):U(L)}function B(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),f=L,ae):Be(L)?(e.consume(L),B):Z(L)}function ae(L){return L===f?(e.consume(L),f=null,ce):L===null||Ce(L)?n(L):(e.consume(L),ae)}function Z(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||Ke(L)?q(L):(e.consume(L),Z)}function ce(L){return L===47||L===62||Be(L)?U(L):n(L)}function M(L){return L===62?(e.consume(L),me):n(L)}function me(L){return L===null||Ce(L)?V(L):Be(L)?(e.consume(L),me):n(L)}function V(L){return L===45&&a===2?(e.consume(L),K):L===60&&a===1?(e.consume(L),Te):L===62&&a===4?(e.consume(L),P):L===63&&a===3?(e.consume(L),S):L===93&&a===5?(e.consume(L),le):Ce(L)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(dC,G,pe)(L)):L===null||Ce(L)?(e.exit("htmlFlowData"),pe(L)):(e.consume(L),V)}function pe(L){return e.check(fC,de,G)(L)}function de(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),ee}function ee(L){return L===null||Ce(L)?pe(L):(e.enter("htmlFlowData"),V(L))}function K(L){return L===45?(e.consume(L),S):V(L)}function Te(L){return L===47?(e.consume(L),l="",J):V(L)}function J(L){if(L===62){const we=l.toLowerCase();return Rm.includes(we)?(e.consume(L),P):V(L)}return Ot(L)&&l.length<8?(e.consume(L),l+=String.fromCharCode(L),J):V(L)}function le(L){return L===93?(e.consume(L),S):V(L)}function S(L){return L===62?(e.consume(L),P):L===45&&a===2?(e.consume(L),S):V(L)}function P(L){return L===null||Ce(L)?(e.exit("htmlFlowData"),G(L)):(e.consume(L),P)}function G(L){return e.exit("htmlFlow"),t(L)}}function mC(e,t,n){const i=this;return a;function a(l){return Ce(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),u):n(l)}function u(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}function gC(e,t,n){return i;function i(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(ua,t,n)}}const EC={name:"htmlText",tokenize:TC};function TC(e,t,n){const i=this;let a,u,l;return c;function c(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),f}function f(S){return S===33?(e.consume(S),p):S===47?(e.consume(S),q):S===63?(e.consume(S),U):Ot(S)?(e.consume(S),Z):n(S)}function p(S){return S===45?(e.consume(S),T):S===91?(e.consume(S),u=0,C):Ot(S)?(e.consume(S),R):n(S)}function T(S){return S===45?(e.consume(S),b):n(S)}function E(S){return S===null?n(S):S===45?(e.consume(S),x):Ce(S)?(l=E,Te(S)):(e.consume(S),E)}function x(S){return S===45?(e.consume(S),b):E(S)}function b(S){return S===62?K(S):S===45?x(S):E(S)}function C(S){const P="CDATA[";return S===P.charCodeAt(u++)?(e.consume(S),u===P.length?v:C):n(S)}function v(S){return S===null?n(S):S===93?(e.consume(S),D):Ce(S)?(l=v,Te(S)):(e.consume(S),v)}function D(S){return S===93?(e.consume(S),A):v(S)}function A(S){return S===62?K(S):S===93?(e.consume(S),A):v(S)}function R(S){return S===null||S===62?K(S):Ce(S)?(l=R,Te(S)):(e.consume(S),R)}function U(S){return S===null?n(S):S===63?(e.consume(S),W):Ce(S)?(l=U,Te(S)):(e.consume(S),U)}function W(S){return S===62?K(S):U(S)}function q(S){return Ot(S)?(e.consume(S),B):n(S)}function B(S){return S===45||Nt(S)?(e.consume(S),B):ae(S)}function ae(S){return Ce(S)?(l=ae,Te(S)):Be(S)?(e.consume(S),ae):K(S)}function Z(S){return S===45||Nt(S)?(e.consume(S),Z):S===47||S===62||Ke(S)?ce(S):n(S)}function ce(S){return S===47?(e.consume(S),K):S===58||S===95||Ot(S)?(e.consume(S),M):Ce(S)?(l=ce,Te(S)):Be(S)?(e.consume(S),ce):K(S)}function M(S){return S===45||S===46||S===58||S===95||Nt(S)?(e.consume(S),M):me(S)}function me(S){return S===61?(e.consume(S),V):Ce(S)?(l=me,Te(S)):Be(S)?(e.consume(S),me):ce(S)}function V(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),a=S,pe):Ce(S)?(l=V,Te(S)):Be(S)?(e.consume(S),V):(e.consume(S),de)}function pe(S){return S===a?(e.consume(S),a=void 0,ee):S===null?n(S):Ce(S)?(l=pe,Te(S)):(e.consume(S),pe)}function de(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||Ke(S)?ce(S):(e.consume(S),de)}function ee(S){return S===47||S===62||Ke(S)?ce(S):n(S)}function K(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function Te(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),J}function J(S){return Be(S)?je(e,le,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):le(S)}function le(S){return e.enter("htmlTextData"),l(S)}}const Fd={name:"labelEnd",resolveAll:kC,resolveTo:CC,tokenize:SC},yC={tokenize:_C},xC={tokenize:vC},bC={tokenize:NC};function kC(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const a=i.type==="labelImage"?4:2;i.type="data",t+=a}}return e.length!==n.length&&Kt(e,0,e.length,n),e}function CC(e,t){let n=e.length,i=0,a,u,l,c;for(;n--;)if(a=e[n][1],u){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(u=n,a.type!=="labelLink")){i=2;break}}else a.type==="labelEnd"&&(l=n);const f={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[u][1].start},end:{...e[l][1].end}},T={type:"labelText",start:{...e[u+i+2][1].end},end:{...e[l-2][1].start}};return c=[["enter",f,t],["enter",p,t]],c=an(c,e.slice(u+1,u+i+3)),c=an(c,[["enter",T,t]]),c=an(c,uo(t.parser.constructs.insideSpan.null,e.slice(u+i+4,l-3),t)),c=an(c,[["exit",T,t],e[l-2],e[l-1],["exit",p,t]]),c=an(c,e.slice(l+1)),c=an(c,[["exit",f,t]]),Kt(e,u,e.length,c),e}function SC(e,t,n){const i=this;let a=i.events.length,u,l;for(;a--;)if((i.events[a][1].type==="labelImage"||i.events[a][1].type==="labelLink")&&!i.events[a][1]._balanced){u=i.events[a][1];break}return c;function c(x){return u?u._inactive?E(x):(l=i.parser.defined.includes(yn(i.sliceSerialize({start:u.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),f):n(x)}function f(x){return x===40?e.attempt(yC,T,l?T:E)(x):x===91?e.attempt(xC,T,l?p:E)(x):l?T(x):E(x)}function p(x){return e.attempt(bC,T,E)(x)}function T(x){return t(x)}function E(x){return u._balanced=!0,n(x)}}function _C(e,t,n){return i;function i(E){return e.enter("resource"),e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),a}function a(E){return Ke(E)?$s(e,u)(E):u(E)}function u(E){return E===41?T(E):Qg(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(E)}function l(E){return Ke(E)?$s(e,f)(E):T(E)}function c(E){return n(E)}function f(E){return E===34||E===39||E===40?Kg(e,p,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(E):T(E)}function p(E){return Ke(E)?$s(e,T)(E):T(E)}function T(E){return E===41?(e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),e.exit("resource"),t):n(E)}}function vC(e,t,n){const i=this;return a;function a(c){return Gg.call(i,e,u,l,"reference","referenceMarker","referenceString")(c)}function u(c){return i.parser.defined.includes(yn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function NC(e,t,n){return i;function i(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),a}function a(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),t):n(u)}}const wC={name:"labelStartImage",resolveAll:Fd.resolveAll,tokenize:AC};function AC(e,t,n){const i=this;return a;function a(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),u}function u(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(c):t(c)}}const IC={name:"labelStartLink",resolveAll:Fd.resolveAll,tokenize:LC};function LC(e,t,n){const i=this;return a;function a(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),u}function u(l){return l===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(l):t(l)}}const gc={name:"lineEnding",tokenize:RC};function RC(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),je(e,t,"linePrefix")}}const Hu={name:"thematicBreak",tokenize:OC};function OC(e,t,n){let i=0,a;return u;function u(p){return e.enter("thematicBreak"),l(p)}function l(p){return a=p,c(p)}function c(p){return p===a?(e.enter("thematicBreakSequence"),f(p)):i>=3&&(p===null||Ce(p))?(e.exit("thematicBreak"),t(p)):n(p)}function f(p){return p===a?(e.consume(p),i++,f):(e.exit("thematicBreakSequence"),Be(p)?je(e,c,"whitespace")(p):c(p))}}const Ht={continuation:{tokenize:FC},exit:BC,name:"list",tokenize:MC},DC={partial:!0,tokenize:UC},PC={partial:!0,tokenize:jC};function MC(e,t,n){const i=this,a=i.events[i.events.length-1];let u=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,l=0;return c;function c(b){const C=i.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(C==="listUnordered"?!i.containerState.marker||b===i.containerState.marker:Qc(b)){if(i.containerState.type||(i.containerState.type=C,e.enter(C,{_container:!0})),C==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(Hu,n,p)(b):p(b);if(!i.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(b)}return n(b)}function f(b){return Qc(b)&&++l<10?(e.consume(b),f):(!i.interrupt||l<2)&&(i.containerState.marker?b===i.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),p(b)):n(b)}function p(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||b,e.check(ua,i.interrupt?n:T,e.attempt(DC,x,E))}function T(b){return i.containerState.initialBlankLine=!0,u++,x(b)}function E(b){return Be(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),x):n(b)}function x(b){return i.containerState.size=u+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function FC(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(ua,a,u);function a(c){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,je(e,t,"listItemIndent",i.containerState.size+1)(c)}function u(c){return i.containerState.furtherBlankLines||!Be(c)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,l(c)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(PC,t,l)(c))}function l(c){return i.containerState._closeFlow=!0,i.interrupt=void 0,je(e,e.attempt(Ht,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function jC(e,t,n){const i=this;return je(e,a,"listItemIndent",i.containerState.size+1);function a(u){const l=i.events[i.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===i.containerState.size?t(u):n(u)}}function BC(e){e.exit(this.containerState.type)}function UC(e,t,n){const i=this;return je(e,a,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(u){const l=i.events[i.events.length-1];return!Be(u)&&l&&l[1].type==="listItemPrefixWhitespace"?t(u):n(u)}}const Om={name:"setextUnderline",resolveTo:HC,tokenize:zC};function HC(e,t){let n=e.length,i,a,u;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!u&&e[n][1].type==="definition"&&(u=n);const l={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",u?(e.splice(a,0,["enter",l,t]),e.splice(u+1,0,["exit",e[i][1],t]),e[i][1].end={...e[u][1].end}):e[i][1]=l,e.push(["exit",l,t]),e}function zC(e,t,n){const i=this;let a;return u;function u(p){let T=i.events.length,E;for(;T--;)if(i.events[T][1].type!=="lineEnding"&&i.events[T][1].type!=="linePrefix"&&i.events[T][1].type!=="content"){E=i.events[T][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||E)?(e.enter("setextHeadingLine"),a=p,l(p)):n(p)}function l(p){return e.enter("setextHeadingLineSequence"),c(p)}function c(p){return p===a?(e.consume(p),c):(e.exit("setextHeadingLineSequence"),Be(p)?je(e,f,"lineSuffix")(p):f(p))}function f(p){return p===null||Ce(p)?(e.exit("setextHeadingLine"),t(p)):n(p)}}const $C={tokenize:WC};function WC(e){const t=this,n=e.attempt(ua,i,e.attempt(this.parser.constructs.flowInitial,a,je(e,e.attempt(this.parser.constructs.flow,a,e.attempt(Gk,a)),"linePrefix")));return n;function i(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const YC={resolveAll:Jg()},VC=Xg("string"),qC=Xg("text");function Xg(e){return{resolveAll:Jg(e==="text"?QC:void 0),tokenize:t};function t(n){const i=this,a=this.parser.constructs[e],u=n.attempt(a,l,c);return l;function l(T){return p(T)?u(T):c(T)}function c(T){if(T===null){n.consume(T);return}return n.enter("data"),n.consume(T),f}function f(T){return p(T)?(n.exit("data"),u(T)):(n.consume(T),f)}function p(T){if(T===null)return!0;const E=a[T];let x=-1;if(E)for(;++x<E.length;){const b=E[x];if(!b.previous||b.previous.call(i,i.previous))return!0}return!1}}}function Jg(e){return t;function t(n,i){let a=-1,u;for(;++a<=n.length;)u===void 0?n[a]&&n[a][1].type==="data"&&(u=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==u+2&&(n[u][1].end=n[a-1][1].end,n.splice(u+2,a-u-2),a=u+2),u=void 0);return e?e(n,i):n}}function QC(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const i=e[n-1][1],a=t.sliceStream(i);let u=a.length,l=-1,c=0,f;for(;u--;){const p=a[u];if(typeof p=="string"){for(l=p.length;p.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(p===-2)f=!0,c++;else if(p!==-1){u++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const p={type:n===e.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?l:i.start._bufferIndex+l,_index:i.start._index+u,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...p.start},i.start.offset===i.end.offset?Object.assign(i,p):(e.splice(n,0,["enter",p,t],["exit",p,t]),n+=2)}n++}return e}const GC={42:Ht,43:Ht,45:Ht,48:Ht,49:Ht,50:Ht,51:Ht,52:Ht,53:Ht,54:Ht,55:Ht,56:Ht,57:Ht,62:Wg},KC={91:eC},XC={[-2]:mc,[-1]:mc,32:mc},JC={35:aC,42:Hu,45:[Om,Hu],60:cC,61:Om,95:Hu,96:Lm,126:Lm},ZC={38:Vg,92:Yg},eS={[-5]:gc,[-4]:gc,[-3]:gc,33:wC,38:Vg,42:Gc,60:[Ik,EC],91:IC,92:[iC,Yg],93:Fd,95:Gc,96:$k},tS={null:[Gc,YC]},nS={null:[42,95]},rS={null:[]},iS=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:nS,contentInitial:KC,disable:rS,document:GC,flow:JC,flowInitial:XC,insideSpan:tS,string:ZC,text:eS},Symbol.toStringTag,{value:"Module"}));function sS(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},u=[];let l=[],c=[];const f={attempt:ae(q),check:ae(B),consume:R,enter:U,exit:W,interrupt:ae(B,{interrupt:!0})},p={code:null,containerState:{},defineSkip:v,events:[],now:C,parser:e,previous:null,sliceSerialize:x,sliceStream:b,write:E};let T=t.tokenize.call(p,f);return t.resolveAll&&u.push(t),p;function E(me){return l=an(l,me),D(),l[l.length-1]!==null?[]:(Z(t,0),p.events=uo(u,p.events,p),p.events)}function x(me,V){return uS(b(me),V)}function b(me){return aS(l,me)}function C(){const{_bufferIndex:me,_index:V,line:pe,column:de,offset:ee}=i;return{_bufferIndex:me,_index:V,line:pe,column:de,offset:ee}}function v(me){a[me.line]=me.column,M()}function D(){let me;for(;i._index<l.length;){const V=l[i._index];if(typeof V=="string")for(me=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===me&&i._bufferIndex<V.length;)A(V.charCodeAt(i._bufferIndex));else A(V)}}function A(me){T=T(me)}function R(me){Ce(me)?(i.line++,i.column=1,i.offset+=me===-3?2:1,M()):me!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===l[i._index].length&&(i._bufferIndex=-1,i._index++)),p.previous=me}function U(me,V){const pe=V||{};return pe.type=me,pe.start=C(),p.events.push(["enter",pe,p]),c.push(pe),pe}function W(me){const V=c.pop();return V.end=C(),p.events.push(["exit",V,p]),V}function q(me,V){Z(me,V.from)}function B(me,V){V.restore()}function ae(me,V){return pe;function pe(de,ee,K){let Te,J,le,S;return Array.isArray(de)?G(de):"tokenize"in de?G([de]):P(de);function P(_e){return Ue;function Ue(De){const fe=De!==null&&_e[De],Se=De!==null&&_e.null,rt=[...Array.isArray(fe)?fe:fe?[fe]:[],...Array.isArray(Se)?Se:Se?[Se]:[]];return G(rt)(De)}}function G(_e){return Te=_e,J=0,_e.length===0?K:L(_e[J])}function L(_e){return Ue;function Ue(De){return S=ce(),le=_e,_e.partial||(p.currentConstruct=_e),_e.name&&p.parser.constructs.disable.null.includes(_e.name)?Re():_e.tokenize.call(V?Object.assign(Object.create(p),V):p,f,we,Re)(De)}}function we(_e){return me(le,S),ee}function Re(_e){return S.restore(),++J<Te.length?L(Te[J]):K}}}function Z(me,V){me.resolveAll&&!u.includes(me)&&u.push(me),me.resolve&&Kt(p.events,V,p.events.length-V,me.resolve(p.events.slice(V),p)),me.resolveTo&&(p.events=me.resolveTo(p.events,p))}function ce(){const me=C(),V=p.previous,pe=p.currentConstruct,de=p.events.length,ee=Array.from(c);return{from:de,restore:K};function K(){i=me,p.previous=V,p.currentConstruct=pe,p.events.length=de,c=ee,M()}}function M(){i.line in a&&i.column<2&&(i.column=a[i.line],i.offset+=a[i.line]-1)}}function aS(e,t){const n=t.start._index,i=t.start._bufferIndex,a=t.end._index,u=t.end._bufferIndex;let l;if(n===a)l=[e[n].slice(i,u)];else{if(l=e.slice(n,a),i>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(i):l.shift()}u>0&&l.push(e[a].slice(0,u))}return l}function uS(e,t){let n=-1;const i=[];let a;for(;++n<e.length;){const u=e[n];let l;if(typeof u=="string")l=u;else switch(u){case-5:{l="\r";break}case-4:{l=`
59
+ `;break}case-3:{l=`\r
60
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&a)continue;l=" ";break}default:l=String.fromCharCode(u)}a=u===-2,i.push(l)}return i.join("")}function oS(e){const i={constructs:zg([iS,...(e||{}).extensions||[]]),content:a(Ck),defined:[],document:a(_k),flow:a($C),lazy:{},string:a(VC),text:a(qC)};return i;function a(u){return l;function l(c){return sS(i,u,c)}}}function lS(e){for(;!qg(e););return e}const Dm=/[\0\t\n\r]/g;function cS(){let e=1,t="",n=!0,i;return a;function a(u,l,c){const f=[];let p,T,E,x,b;for(u=t+(typeof u=="string"?u.toString():new TextDecoder(l||void 0).decode(u)),E=0,t="",n&&(u.charCodeAt(0)===65279&&E++,n=void 0);E<u.length;){if(Dm.lastIndex=E,p=Dm.exec(u),x=p&&p.index!==void 0?p.index:u.length,b=u.charCodeAt(x),!p){t=u.slice(E);break}if(b===10&&E===x&&i)f.push(-3),i=void 0;else switch(i&&(f.push(-5),i=void 0),E<x&&(f.push(u.slice(E,x)),e+=x-E),b){case 0:{f.push(65533),e++;break}case 9:{for(T=Math.ceil(e/4)*4,f.push(-2);e++<T;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:i=!0,e=1}E=x+1}return c&&(i&&f.push(-5),t&&f.push(t),f.push(null)),f}}const dS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function fS(e){return e.replace(dS,hS)}function hS(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),u=a===120||a===88;return $g(n.slice(u?2:1),u?16:10)}return Md(n)||e}const Zg={}.hasOwnProperty;function pS(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),mS(n)(lS(oS(n).document().write(cS()(e,t,!0))))}function mS(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(si),autolinkProtocol:ce,autolinkEmail:ce,atxHeading:u(Vi),blockQuote:u(Se),characterEscape:ce,characterReference:ce,codeFenced:u(rt),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:u(rt,l),codeText:u(Nr,l),codeTextData:ce,data:ce,codeFlowValue:ce,definition:u(ri),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:u(Yi),hardBreakEscape:u(qi),hardBreakTrailing:u(qi),htmlFlow:u(ii,l),htmlFlowData:ce,htmlText:u(ii,l),htmlTextData:ce,image:u(pa),label:l,link:u(si),listItem:u(Qn),listItemValue:x,listOrdered:u(qn,E),listUnordered:u(qn),paragraph:u(Qi),reference:L,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:u(Vi),strong:u(ma),thematicBreak:u(Ea)},exit:{atxHeading:f(),atxHeadingSequence:q,autolink:f(),autolinkEmail:fe,autolinkProtocol:De,blockQuote:f(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:Re,characterReferenceMarkerNumeric:Re,characterReferenceValue:_e,characterReference:Ue,codeFenced:f(D),codeFencedFence:v,codeFencedFenceInfo:b,codeFencedFenceMeta:C,codeFlowValue:M,codeIndented:f(A),codeText:f(ee),codeTextData:M,data:M,definition:f(),definitionDestinationString:W,definitionLabelString:R,definitionTitleString:U,emphasis:f(),hardBreakEscape:f(V),hardBreakTrailing:f(V),htmlFlow:f(pe),htmlFlowData:M,htmlText:f(de),htmlTextData:M,image:f(Te),label:le,labelText:J,lineEnding:me,link:f(K),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:we,resourceDestinationString:S,resourceTitleString:P,resource:G,setextHeading:f(Z),setextHeadingLineSequence:ae,setextHeadingText:B,strong:f(),thematicBreak:f()}};e1(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(X){let he={type:"root",children:[]};const Ae={stack:[he],tokenStack:[],config:t,enter:c,exit:p,buffer:l,resume:T,data:n},Pe=[];let He=-1;for(;++He<X.length;)if(X[He][1].type==="listOrdered"||X[He][1].type==="listUnordered")if(X[He][0]==="enter")Pe.push(He);else{const yt=Pe.pop();He=a(X,yt,He)}for(He=-1;++He<X.length;){const yt=t[X[He][0]];Zg.call(yt,X[He][1].type)&&yt[X[He][1].type].call(Object.assign({sliceSerialize:X[He][2].sliceSerialize},Ae),X[He][1])}if(Ae.tokenStack.length>0){const yt=Ae.tokenStack[Ae.tokenStack.length-1];(yt[1]||Pm).call(Ae,void 0,yt[0])}for(he.position={start:mr(X.length>0?X[0][1].start:{line:1,column:1,offset:0}),end:mr(X.length>0?X[X.length-2][1].end:{line:1,column:1,offset:0})},He=-1;++He<t.transforms.length;)he=t.transforms[He](he)||he;return he}function a(X,he,Ae){let Pe=he-1,He=-1,yt=!1,Dn,Jt,Gn,wr;for(;++Pe<=Ae;){const xt=X[Pe];switch(xt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{xt[0]==="enter"?He++:He--,wr=void 0;break}case"lineEndingBlank":{xt[0]==="enter"&&(Dn&&!wr&&!He&&!Gn&&(Gn=Pe),wr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:wr=void 0}if(!He&&xt[0]==="enter"&&xt[1].type==="listItemPrefix"||He===-1&&xt[0]==="exit"&&(xt[1].type==="listUnordered"||xt[1].type==="listOrdered")){if(Dn){let Cn=Pe;for(Jt=void 0;Cn--;){const Wt=X[Cn];if(Wt[1].type==="lineEnding"||Wt[1].type==="lineEndingBlank"){if(Wt[0]==="exit")continue;Jt&&(X[Jt][1].type="lineEndingBlank",yt=!0),Wt[1].type="lineEnding",Jt=Cn}else if(!(Wt[1].type==="linePrefix"||Wt[1].type==="blockQuotePrefix"||Wt[1].type==="blockQuotePrefixWhitespace"||Wt[1].type==="blockQuoteMarker"||Wt[1].type==="listItemIndent"))break}Gn&&(!Jt||Gn<Jt)&&(Dn._spread=!0),Dn.end=Object.assign({},Jt?X[Jt][1].start:xt[1].end),X.splice(Jt||Pe,0,["exit",Dn,xt[2]]),Pe++,Ae++}if(xt[1].type==="listItemPrefix"){const Cn={type:"listItem",_spread:!1,start:Object.assign({},xt[1].start),end:void 0};Dn=Cn,X.splice(Pe,0,["enter",Cn,xt[2]]),Pe++,Ae++,Gn=void 0,wr=!0}}}return X[he][1]._spread=yt,Ae}function u(X,he){return Ae;function Ae(Pe){c.call(this,X(Pe),Pe),he&&he.call(this,Pe)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(X,he,Ae){this.stack[this.stack.length-1].children.push(X),this.stack.push(X),this.tokenStack.push([he,Ae||void 0]),X.position={start:mr(he.start),end:void 0}}function f(X){return he;function he(Ae){X&&X.call(this,Ae),p.call(this,Ae)}}function p(X,he){const Ae=this.stack.pop(),Pe=this.tokenStack.pop();if(Pe)Pe[0].type!==X.type&&(he?he.call(this,X,Pe[0]):(Pe[1]||Pm).call(this,X,Pe[0]));else throw new Error("Cannot close `"+X.type+"` ("+zs({start:X.start,end:X.end})+"): it’s not open");Ae.position.end=mr(X.end)}function T(){return Pd(this.stack.pop())}function E(){this.data.expectingFirstListItemValue=!0}function x(X){if(this.data.expectingFirstListItemValue){const he=this.stack[this.stack.length-2];he.start=Number.parseInt(this.sliceSerialize(X),10),this.data.expectingFirstListItemValue=void 0}}function b(){const X=this.resume(),he=this.stack[this.stack.length-1];he.lang=X}function C(){const X=this.resume(),he=this.stack[this.stack.length-1];he.meta=X}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function D(){const X=this.resume(),he=this.stack[this.stack.length-1];he.value=X.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const X=this.resume(),he=this.stack[this.stack.length-1];he.value=X.replace(/(\r?\n|\r)$/g,"")}function R(X){const he=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=he,Ae.identifier=yn(this.sliceSerialize(X)).toLowerCase()}function U(){const X=this.resume(),he=this.stack[this.stack.length-1];he.title=X}function W(){const X=this.resume(),he=this.stack[this.stack.length-1];he.url=X}function q(X){const he=this.stack[this.stack.length-1];if(!he.depth){const Ae=this.sliceSerialize(X).length;he.depth=Ae}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function ae(X){const he=this.stack[this.stack.length-1];he.depth=this.sliceSerialize(X).codePointAt(0)===61?1:2}function Z(){this.data.setextHeadingSlurpLineEnding=void 0}function ce(X){const Ae=this.stack[this.stack.length-1].children;let Pe=Ae[Ae.length-1];(!Pe||Pe.type!=="text")&&(Pe=ga(),Pe.position={start:mr(X.start),end:void 0},Ae.push(Pe)),this.stack.push(Pe)}function M(X){const he=this.stack.pop();he.value+=this.sliceSerialize(X),he.position.end=mr(X.end)}function me(X){const he=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ae=he.children[he.children.length-1];Ae.position.end=mr(X.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(he.type)&&(ce.call(this,X),M.call(this,X))}function V(){this.data.atHardBreak=!0}function pe(){const X=this.resume(),he=this.stack[this.stack.length-1];he.value=X}function de(){const X=this.resume(),he=this.stack[this.stack.length-1];he.value=X}function ee(){const X=this.resume(),he=this.stack[this.stack.length-1];he.value=X}function K(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const he=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=he,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function Te(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const he=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=he,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function J(X){const he=this.sliceSerialize(X),Ae=this.stack[this.stack.length-2];Ae.label=fS(he),Ae.identifier=yn(he).toLowerCase()}function le(){const X=this.stack[this.stack.length-1],he=this.resume(),Ae=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ae.type==="link"){const Pe=X.children;Ae.children=Pe}else Ae.alt=he}function S(){const X=this.resume(),he=this.stack[this.stack.length-1];he.url=X}function P(){const X=this.resume(),he=this.stack[this.stack.length-1];he.title=X}function G(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function we(X){const he=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=he,Ae.identifier=yn(this.sliceSerialize(X)).toLowerCase(),this.data.referenceType="full"}function Re(X){this.data.characterReferenceType=X.type}function _e(X){const he=this.sliceSerialize(X),Ae=this.data.characterReferenceType;let Pe;Ae?(Pe=$g(he,Ae==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Pe=Md(he);const He=this.stack[this.stack.length-1];He.value+=Pe}function Ue(X){const he=this.stack.pop();he.position.end=mr(X.end)}function De(X){M.call(this,X);const he=this.stack[this.stack.length-1];he.url=this.sliceSerialize(X)}function fe(X){M.call(this,X);const he=this.stack[this.stack.length-1];he.url="mailto:"+this.sliceSerialize(X)}function Se(){return{type:"blockquote",children:[]}}function rt(){return{type:"code",lang:null,meta:null,value:""}}function Nr(){return{type:"inlineCode",value:""}}function ri(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Yi(){return{type:"emphasis",children:[]}}function Vi(){return{type:"heading",depth:0,children:[]}}function qi(){return{type:"break"}}function ii(){return{type:"html",value:""}}function pa(){return{type:"image",title:null,url:"",alt:null}}function si(){return{type:"link",title:null,url:"",children:[]}}function qn(X){return{type:"list",ordered:X.type==="listOrdered",start:null,spread:X._spread,children:[]}}function Qn(X){return{type:"listItem",spread:X._spread,checked:null,children:[]}}function Qi(){return{type:"paragraph",children:[]}}function ma(){return{type:"strong",children:[]}}function ga(){return{type:"text",value:""}}function Ea(){return{type:"thematicBreak"}}}function mr(e){return{line:e.line,column:e.column,offset:e.offset}}function e1(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?e1(e,i):gS(e,i)}}function gS(e,t){let n;for(n in t)if(Zg.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function Pm(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+zs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+zs({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+zs({start:t.start,end:t.end})+") is still open")}function ES(e){const t=this;t.parser=n;function n(i){return pS(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function TS(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function yS(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
61
+ `}]}function xS(e,t){const n=t.value?t.value+`
62
+ `:"",i={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(i.className=["language-"+a[0]]);let u={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(u.data={meta:t.meta}),e.patch(t,u),u=e.applyData(t,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(t,u),u}function bS(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kS(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function CS(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),a=Ui(i.toLowerCase()),u=e.footnoteOrder.indexOf(i);let l,c=e.footnoteCounts.get(i);c===void 0?(c=0,e.footnoteOrder.push(i),l=e.footnoteOrder.length):l=u+1,c+=1,e.footnoteCounts.set(i,c);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,f);const p={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,p),e.applyData(t,p)}function SS(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _S(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function t1(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const a=e.all(t),u=a[0];u&&u.type==="text"?u.value="["+u.value:a.unshift({type:"text",value:"["});const l=a[a.length-1];return l&&l.type==="text"?l.value+=i:a.push({type:"text",value:i}),a}function vS(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return t1(e,t);const a={src:Ui(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(a.title=i.title);const u={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,u),e.applyData(t,u)}function NS(e,t){const n={src:Ui(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function wS(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function AS(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return t1(e,t);const a={href:Ui(i.url||"")};i.title!==null&&i.title!==void 0&&(a.title=i.title);const u={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,u),e.applyData(t,u)}function IS(e,t){const n={href:Ui(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function LS(e,t,n){const i=e.all(t),a=n?RS(n):n1(t),u={},l=[];if(typeof t.checked=="boolean"){const T=i[0];let E;T&&T.type==="element"&&T.tagName==="p"?E=T:(E={type:"element",tagName:"p",properties:{},children:[]},i.unshift(E)),E.children.length>0&&E.children.unshift({type:"text",value:" "}),E.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let c=-1;for(;++c<i.length;){const T=i[c];(a||c!==0||T.type!=="element"||T.tagName!=="p")&&l.push({type:"text",value:`
63
+ `}),T.type==="element"&&T.tagName==="p"&&!a?l.push(...T.children):l.push(T)}const f=i[i.length-1];f&&(a||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
64
+ `});const p={type:"element",tagName:"li",properties:u,children:l};return e.patch(t,p),e.applyData(t,p)}function RS(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=n1(n[i])}return t}function n1(e){const t=e.spread;return t??e.children.length>1}function OS(e,t){const n={},i=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<i.length;){const l=i[a];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const u={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,u),e.applyData(t,u)}function DS(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function PS(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function MS(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function FS(e,t){const n=e.all(t),i=n.shift(),a=[];if(i){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],l),a.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Rn(t.children[1]),f=so(t.children[t.children.length-1]);c&&f&&(l.position={start:c,end:f}),a.push(l)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,u),e.applyData(t,u)}function jS(e,t,n){const i=n?n.children:void 0,u=(i?i.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:t.children.length;let f=-1;const p=[];for(;++f<c;){const E=t.children[f],x={},b=l?l[f]:void 0;b&&(x.align=b);let C={type:"element",tagName:u,properties:x,children:[]};E&&(C.children=e.all(E),e.patch(E,C),C=e.applyData(E,C)),p.push(C)}const T={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(t,T),e.applyData(t,T)}function BS(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Mm=9,Fm=32;function US(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),a=0;const u=[];for(;i;)u.push(jm(t.slice(a,i.index),a>0,!0),i[0]),a=i.index+i[0].length,i=n.exec(t);return u.push(jm(t.slice(a),a>0,!1)),u.join("")}function jm(e,t,n){let i=0,a=e.length;if(t){let u=e.codePointAt(i);for(;u===Mm||u===Fm;)i++,u=e.codePointAt(i)}if(n){let u=e.codePointAt(a-1);for(;u===Mm||u===Fm;)a--,u=e.codePointAt(a-1)}return a>i?e.slice(i,a):""}function HS(e,t){const n={type:"text",value:US(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function zS(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const $S={blockquote:TS,break:yS,code:xS,delete:bS,emphasis:kS,footnoteReference:CS,heading:SS,html:_S,imageReference:vS,image:NS,inlineCode:wS,linkReference:AS,link:IS,listItem:LS,list:OS,paragraph:DS,root:PS,strong:MS,table:FS,tableCell:BS,tableRow:jS,text:HS,thematicBreak:zS,toml:Nu,yaml:Nu,definition:Nu,footnoteDefinition:Nu};function Nu(){}const r1=-1,oo=0,Ws=1,qu=2,jd=3,Bd=4,Ud=5,Hd=6,i1=7,s1=8,WS=typeof self=="object"?self:globalThis,Bm=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new WS[e](t)},YS=(e,t)=>{const n=(a,u)=>(e.set(u,a),a),i=a=>{if(e.has(a))return e.get(a);const[u,l]=t[a];switch(u){case oo:case r1:return n(l,a);case Ws:{const c=n([],a);for(const f of l)c.push(i(f));return c}case qu:{const c=n({},a);for(const[f,p]of l)c[i(f)]=i(p);return c}case jd:return n(new Date(l),a);case Bd:{const{source:c,flags:f}=l;return n(new RegExp(c,f),a)}case Ud:{const c=n(new Map,a);for(const[f,p]of l)c.set(i(f),i(p));return c}case Hd:{const c=n(new Set,a);for(const f of l)c.add(i(f));return c}case i1:{const{name:c,message:f}=l;return n(Bm(c,f),a)}case s1:return n(BigInt(l),a);case"BigInt":return n(Object(BigInt(l)),a);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(Bm(u,l),a)};return i},Um=e=>YS(new Map,e)(0),Vr="",{toString:VS}={},{keys:qS}=Object,Fs=e=>{const t=typeof e;if(t!=="object"||!e)return[oo,t];const n=VS.call(e).slice(8,-1);switch(n){case"Array":return[Ws,Vr];case"Object":return[qu,Vr];case"Date":return[jd,Vr];case"RegExp":return[Bd,Vr];case"Map":return[Ud,Vr];case"Set":return[Hd,Vr];case"DataView":return[Ws,n]}return n.includes("Array")?[Ws,n]:n.includes("Error")?[i1,n]:[qu,n]},wu=([e,t])=>e===oo&&(t==="function"||t==="symbol"),QS=(e,t,n,i)=>{const a=(l,c)=>{const f=i.push(l)-1;return n.set(c,f),f},u=l=>{if(n.has(l))return n.get(l);let[c,f]=Fs(l);switch(c){case oo:{let T=l;switch(f){case"bigint":c=s1,T=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);T=null;break;case"undefined":return a([r1],l)}return a([c,T],l)}case Ws:{if(f){let x=l;return f==="DataView"?x=new Uint8Array(l.buffer):f==="ArrayBuffer"&&(x=new Uint8Array(l)),a([f,[...x]],l)}const T=[],E=a([c,T],l);for(const x of l)T.push(u(x));return E}case qu:{if(f)switch(f){case"BigInt":return a([f,l.toString()],l);case"Boolean":case"Number":case"String":return a([f,l.valueOf()],l)}if(t&&"toJSON"in l)return u(l.toJSON());const T=[],E=a([c,T],l);for(const x of qS(l))(e||!wu(Fs(l[x])))&&T.push([u(x),u(l[x])]);return E}case jd:return a([c,isNaN(l.getTime())?Vr:l.toISOString()],l);case Bd:{const{source:T,flags:E}=l;return a([c,{source:T,flags:E}],l)}case Ud:{const T=[],E=a([c,T],l);for(const[x,b]of l)(e||!(wu(Fs(x))||wu(Fs(b))))&&T.push([u(x),u(b)]);return E}case Hd:{const T=[],E=a([c,T],l);for(const x of l)(e||!wu(Fs(x)))&&T.push(u(x));return E}}const{message:p}=l;return a([c,{name:f,message:p}],l)};return u},Hm=(e,{json:t,lossy:n}={})=>{const i=[];return QS(!(t||n),!!t,new Map,i)(e),i},Xr=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Um(Hm(e,t)):structuredClone(e):(e,t)=>Um(Hm(e,t));function GS(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function KS(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function XS(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||GS,i=e.options.footnoteBackLabel||KS,a=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let f=-1;for(;++f<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[f]);if(!p)continue;const T=e.all(p),E=String(p.identifier).toUpperCase(),x=Ui(E.toLowerCase());let b=0;const C=[],v=e.footnoteCounts.get(E);for(;v!==void 0&&++b<=v;){C.length>0&&C.push({type:"text",value:" "});let R=typeof n=="string"?n:n(f,b);typeof R=="string"&&(R={type:"text",value:R}),C.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(f,b),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const D=T[T.length-1];if(D&&D.type==="element"&&D.tagName==="p"){const R=D.children[D.children.length-1];R&&R.type==="text"?R.value+=" ":D.children.push({type:"text",value:" "}),D.children.push(...C)}else T.push(...C);const A={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(T,!0)};e.patch(p,A),c.push(A)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Xr(l),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
65
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
66
+ `}]}}const lo=(function(e){if(e==null)return t_;if(typeof e=="function")return co(e);if(typeof e=="object")return Array.isArray(e)?JS(e):ZS(e);if(typeof e=="string")return e_(e);throw new Error("Expected function, string, or object as test")});function JS(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=lo(e[n]);return co(i);function i(...a){let u=-1;for(;++u<t.length;)if(t[u].apply(this,a))return!0;return!1}}function ZS(e){const t=e;return co(n);function n(i){const a=i;let u;for(u in e)if(a[u]!==t[u])return!1;return!0}}function e_(e){return co(t);function t(n){return n&&n.type===e}}function co(e){return t;function t(n,i,a){return!!(n_(n)&&e.call(this,n,typeof i=="number"?i:void 0,a||void 0))}}function t_(){return!0}function n_(e){return e!==null&&typeof e=="object"&&"type"in e}const a1=[],r_=!0,Kc=!1,i_="skip";function u1(e,t,n,i){let a;typeof t=="function"&&typeof n!="function"?(i=n,n=t):a=t;const u=lo(a),l=i?-1:1;c(e,void 0,[])();function c(f,p,T){const E=f&&typeof f=="object"?f:{};if(typeof E.type=="string"){const b=typeof E.tagName=="string"?E.tagName:typeof E.name=="string"?E.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(f.type+(b?"<"+b+">":""))+")"})}return x;function x(){let b=a1,C,v,D;if((!t||u(f,p,T[T.length-1]||void 0))&&(b=s_(n(f,T)),b[0]===Kc))return b;if("children"in f&&f.children){const A=f;if(A.children&&b[0]!==i_)for(v=(i?A.children.length:-1)+l,D=T.concat(A);v>-1&&v<A.children.length;){const R=A.children[v];if(C=c(R,v,D)(),C[0]===Kc)return C;v=typeof C[1]=="number"?C[1]:v+l}}return b}}}function s_(e){return Array.isArray(e)?e:typeof e=="number"?[r_,e]:e==null?a1:[e]}function fo(e,t,n,i){let a,u,l;typeof t=="function"&&typeof n!="function"?(u=void 0,l=t,a=n):(u=t,l=n,a=i),u1(e,u,c,a);function c(f,p){const T=p[p.length-1],E=T?T.children.indexOf(f):void 0;return l(f,E,T)}}const Xc={}.hasOwnProperty,a_={};function u_(e,t){const n=t||a_,i=new Map,a=new Map,u=new Map,l={...$S,...n.handlers},c={all:p,applyData:l_,definitionById:i,footnoteById:a,footnoteCounts:u,footnoteOrder:[],handlers:l,one:f,options:n,patch:o_,wrap:d_};return fo(e,function(T){if(T.type==="definition"||T.type==="footnoteDefinition"){const E=T.type==="definition"?i:a,x=String(T.identifier).toUpperCase();E.has(x)||E.set(x,T)}}),c;function f(T,E){const x=T.type,b=c.handlers[x];if(Xc.call(c.handlers,x)&&b)return b(c,T,E);if(c.options.passThrough&&c.options.passThrough.includes(x)){if("children"in T){const{children:v,...D}=T,A=Xr(D);return A.children=c.all(T),A}return Xr(T)}return(c.options.unknownHandler||c_)(c,T,E)}function p(T){const E=[];if("children"in T){const x=T.children;let b=-1;for(;++b<x.length;){const C=c.one(x[b],T);if(C){if(b&&x[b-1].type==="break"&&(!Array.isArray(C)&&C.type==="text"&&(C.value=zm(C.value)),!Array.isArray(C)&&C.type==="element")){const v=C.children[0];v&&v.type==="text"&&(v.value=zm(v.value))}Array.isArray(C)?E.push(...C):E.push(C)}}}return E}}function o_(e,t){e.position&&(t.position=Mg(e))}function l_(e,t){let n=t;if(e&&e.data){const i=e.data.hName,a=e.data.hChildren,u=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const l="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:l}}n.type==="element"&&u&&Object.assign(n.properties,Xr(u)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function c_(e,t){const n=t.data||{},i="value"in t&&!(Xc.call(n,"hProperties")||Xc.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function d_(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
67
+ `});++i<e.length;)i&&n.push({type:"text",value:`
68
+ `}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
69
+ `}),n}function zm(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function $m(e,t){const n=u_(e,t),i=n.one(e,void 0),a=XS(n),u=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return a&&u.children.push({type:"text",value:`
70
+ `},a),u}function f_(e,t){return e&&"run"in e?async function(n,i){const a=$m(n,{file:i,...t});await e.run(a,i)}:function(n,i){return $m(n,{file:i,...e||t})}}function Wm(e){if(e)throw e}var Ec,Ym;function h_(){if(Ym)return Ec;Ym=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},u=function(p){if(!p||t.call(p)!=="[object Object]")return!1;var T=e.call(p,"constructor"),E=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!T&&!E)return!1;var x;for(x in p);return typeof x>"u"||e.call(p,x)},l=function(p,T){n&&T.name==="__proto__"?n(p,T.name,{enumerable:!0,configurable:!0,value:T.newValue,writable:!0}):p[T.name]=T.newValue},c=function(p,T){if(T==="__proto__")if(e.call(p,T)){if(i)return i(p,T).value}else return;return p[T]};return Ec=function f(){var p,T,E,x,b,C,v=arguments[0],D=1,A=arguments.length,R=!1;for(typeof v=="boolean"&&(R=v,v=arguments[1]||{},D=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});D<A;++D)if(p=arguments[D],p!=null)for(T in p)E=c(v,T),x=c(p,T),v!==x&&(R&&x&&(u(x)||(b=a(x)))?(b?(b=!1,C=E&&a(E)?E:[]):C=E&&u(E)?E:{},l(v,{name:T,newValue:f(R,C,x)})):typeof x<"u"&&l(v,{name:T,newValue:x}));return v},Ec}var p_=h_();const Tc=pd(p_);function Jc(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function m_(){const e=[],t={run:n,use:i};return t;function n(...a){let u=-1;const l=a.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...a);function c(f,...p){const T=e[++u];let E=-1;if(f){l(f);return}for(;++E<a.length;)(p[E]===null||p[E]===void 0)&&(p[E]=a[E]);a=p,T?g_(T,c)(...p):l(null,...p)}}function i(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function g_(e,t){let n;return i;function i(...l){const c=e.length>l.length;let f;c&&l.push(a);try{f=e.apply(this,l)}catch(p){const T=p;if(c&&n)throw T;return a(T)}c||(f&&f.then&&typeof f.then=="function"?f.then(u,a):f instanceof Error?a(f):u(f))}function a(l,...c){n||(n=!0,t(l,...c))}function u(l){a(null,l)}}const An={basename:E_,dirname:T_,extname:y_,join:x_,sep:"/"};function E_(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');oa(e);let n=0,i=-1,a=e.length,u;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(u){n=a+1;break}}else i<0&&(u=!0,i=a+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let l=-1,c=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(u){n=a+1;break}}else l<0&&(u=!0,l=a+1),c>-1&&(e.codePointAt(a)===t.codePointAt(c--)?c<0&&(i=a):(c=-1,i=l));return n===i?i=l:i<0&&(i=e.length),e.slice(n,i)}function T_(e){if(oa(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function y_(e){oa(e);let t=e.length,n=-1,i=0,a=-1,u=0,l;for(;t--;){const c=e.codePointAt(t);if(c===47){if(l){i=t+1;break}continue}n<0&&(l=!0,n=t+1),c===46?a<0?a=t:u!==1&&(u=1):a>-1&&(u=-1)}return a<0||n<0||u===0||u===1&&a===n-1&&a===i+1?"":e.slice(a,n)}function x_(...e){let t=-1,n;for(;++t<e.length;)oa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":b_(n)}function b_(e){oa(e);const t=e.codePointAt(0)===47;let n=k_(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function k_(e,t){let n="",i=0,a=-1,u=0,l=-1,c,f;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(a===l-1||u===1))if(a!==l-1&&u===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",i=0):(n=n.slice(0,f),i=n.length-1-n.lastIndexOf("/")),a=l,u=0;continue}}else if(n.length>0){n="",i=0,a=l,u=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(a+1,l):n=e.slice(a+1,l),i=l-a-1;a=l,u=0}else c===46&&u>-1?u++:u=-1}return n}function oa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const C_={cwd:S_};function S_(){return"/"}function Zc(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function __(e){if(typeof e=="string")e=new URL(e);else if(!Zc(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return v_(e)}function v_(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const yc=["history","path","basename","stem","extname","dirname"];class o1{constructor(t){let n;t?Zc(t)?n={path:t}:typeof t=="string"||N_(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":C_.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<yc.length;){const u=yc[i];u in n&&n[u]!==void 0&&n[u]!==null&&(this[u]=u==="history"?[...n[u]]:n[u])}let a;for(a in n)yc.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?An.basename(this.path):void 0}set basename(t){bc(t,"basename"),xc(t,"basename"),this.path=An.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?An.dirname(this.path):void 0}set dirname(t){Vm(this.basename,"dirname"),this.path=An.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?An.extname(this.path):void 0}set extname(t){if(xc(t,"extname"),Vm(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=An.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Zc(t)&&(t=__(t)),bc(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?An.basename(this.path,this.extname):void 0}set stem(t){bc(t,"stem"),xc(t,"stem"),this.path=An.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const a=this.message(t,n,i);throw a.fatal=!0,a}info(t,n,i){const a=this.message(t,n,i);return a.fatal=void 0,a}message(t,n,i){const a=new At(t,n,i);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function xc(e,t){if(e&&e.includes(An.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+An.sep+"`")}function bc(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Vm(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function N_(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const w_=(function(e){const i=this.constructor.prototype,a=i[e],u=function(){return a.apply(u,arguments)};return Object.setPrototypeOf(u,i),u}),A_={}.hasOwnProperty;class zd extends w_{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=m_()}copy(){const t=new zd;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(Tc(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Sc("data",this.frozen),this.namespace[t]=n,this):A_.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Sc("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const a=n.call(t,...i);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Au(t),i=this.parser||this.Parser;return kc("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),kc("process",this.parser||this.Parser),Cc("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(u,l){const c=Au(t),f=i.parse(c);i.run(f,c,function(T,E,x){if(T||!E||!x)return p(T);const b=E,C=i.stringify(b,x);R_(C)?x.value=C:x.result=C,p(T,x)});function p(T,E){T||!E?l(T):u?u(E):n(void 0,E)}}}processSync(t){let n=!1,i;return this.freeze(),kc("processSync",this.parser||this.Parser),Cc("processSync",this.compiler||this.Compiler),this.process(t,a),Qm("processSync","process",n),i;function a(u,l){n=!0,Wm(u),i=l}}run(t,n,i){qm(t),this.freeze();const a=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?u(void 0,i):new Promise(u);function u(l,c){const f=Au(n);a.run(t,f,p);function p(T,E,x){const b=E||t;T?c(T):l?l(b):i(void 0,b,x)}}}runSync(t,n){let i=!1,a;return this.run(t,n,u),Qm("runSync","run",i),a;function u(l,c){Wm(l),a=c,i=!0}}stringify(t,n){this.freeze();const i=Au(n),a=this.compiler||this.Compiler;return Cc("stringify",a),qm(t),a(t,i)}use(t,...n){const i=this.attachers,a=this.namespace;if(Sc("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function u(p){if(typeof p=="function")f(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[T,...E]=p;f(T,E)}else l(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function l(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");c(p.plugins),p.settings&&(a.settings=Tc(!0,a.settings,p.settings))}function c(p){let T=-1;if(p!=null)if(Array.isArray(p))for(;++T<p.length;){const E=p[T];u(E)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function f(p,T){let E=-1,x=-1;for(;++E<i.length;)if(i[E][0]===p){x=E;break}if(x===-1)i.push([p,...T]);else if(T.length>0){let[b,...C]=T;const v=i[x][1];Jc(v)&&Jc(b)&&(b=Tc(!0,v,b)),i[x]=[p,b,...C]}}}}const I_=new zd().freeze();function kc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Cc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Sc(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function qm(e){if(!Jc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Qm(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Au(e){return L_(e)?e:new o1(e)}function L_(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function R_(e){return typeof e=="string"||O_(e)}function O_(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const D_="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Gm=[],Km={allowDangerousHtml:!0},P_=/^(https?|ircs?|mailto|xmpp)$/i,M_=[{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:"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 F_(e){const t=j_(e),n=B_(e);return U_(t.runSync(t.parse(n),n),e)}function j_(e){const t=e.rehypePlugins||Gm,n=e.remarkPlugins||Gm,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Km}:Km;return I_().use(ES).use(n).use(f_,i).use(t)}function B_(e){const t=e.children||"",n=new o1;return typeof t=="string"&&(n.value=t),n}function U_(e,t){const n=t.allowedElements,i=t.allowElement,a=t.components,u=t.disallowedElements,l=t.skipHtml,c=t.unwrapDisallowed,f=t.urlTransform||H_;for(const T of M_)Object.hasOwn(t,T.from)&&(""+T.from+(T.to?"use `"+T.to+"` instead":"remove it")+D_+T.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),fo(e,p),ek(e,{Fragment:h.Fragment,components:a,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function p(T,E,x){if(T.type==="raw"&&x&&typeof E=="number")return l?x.children.splice(E,1):x.children[E]={type:"text",value:T.value},E;if(T.type==="element"){let b;for(b in pc)if(Object.hasOwn(pc,b)&&Object.hasOwn(T.properties,b)){const C=T.properties[b],v=pc[b];(v===null||v.includes(T.tagName))&&(T.properties[b]=f(String(C||""),b,T))}}if(T.type==="element"){let b=n?!n.includes(T.tagName):u?u.includes(T.tagName):!1;if(!b&&i&&typeof E=="number"&&(b=!i(T,E,x)),b&&x&&typeof E=="number")return c&&T.children?x.children.splice(E,1,...T.children):x.children.splice(E,1),E}}}function H_(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||i!==-1&&t>i||P_.test(e.slice(0,t))?e:""}function Xm(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,a=n.indexOf(t);for(;a!==-1;)i++,a=n.indexOf(t,a+t.length);return i}function z_(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function $_(e,t,n){const a=lo((n||{}).ignore||[]),u=W_(t);let l=-1;for(;++l<u.length;)u1(e,"text",c);function c(p,T){let E=-1,x;for(;++E<T.length;){const b=T[E],C=x?x.children:void 0;if(a(b,C?C.indexOf(b):void 0,x))return;x=b}if(x)return f(p,T)}function f(p,T){const E=T[T.length-1],x=u[l][0],b=u[l][1];let C=0;const D=E.children.indexOf(p);let A=!1,R=[];x.lastIndex=0;let U=x.exec(p.value);for(;U;){const W=U.index,q={index:U.index,input:U.input,stack:[...T,p]};let B=b(...U,q);if(typeof B=="string"&&(B=B.length>0?{type:"text",value:B}:void 0),B===!1?x.lastIndex=W+1:(C!==W&&R.push({type:"text",value:p.value.slice(C,W)}),Array.isArray(B)?R.push(...B):B&&R.push(B),C=W+U[0].length,A=!0),!x.global)break;U=x.exec(p.value)}return A?(C<p.value.length&&R.push({type:"text",value:p.value.slice(C)}),E.children.splice(D,1,...R)):R=[p],D+R.length}}function W_(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<n.length;){const a=n[i];t.push([Y_(a[0]),V_(a[1])])}return t}function Y_(e){return typeof e=="string"?new RegExp(z_(e),"g"):e}function V_(e){return typeof e=="function"?e:function(){return e}}const _c="phrasing",vc=["autolink","link","image","label"];function q_(){return{transforms:[ev],enter:{literalAutolink:G_,literalAutolinkEmail:Nc,literalAutolinkHttp:Nc,literalAutolinkWww:Nc},exit:{literalAutolink:Z_,literalAutolinkEmail:J_,literalAutolinkHttp:K_,literalAutolinkWww:X_}}}function Q_(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:_c,notInConstruct:vc},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:_c,notInConstruct:vc},{character:":",before:"[ps]",after:"\\/",inConstruct:_c,notInConstruct:vc}]}}function G_(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Nc(e){this.config.enter.autolinkProtocol.call(this,e)}function K_(e){this.config.exit.autolinkProtocol.call(this,e)}function X_(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function J_(e){this.config.exit.autolinkEmail.call(this,e)}function Z_(e){this.exit(e)}function ev(e){$_(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,tv],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),nv]],{ignore:["link","linkReference"]})}function tv(e,t,n,i,a){let u="";if(!l1(a)||(/^w/i.test(t)&&(n=t+n,t="",u="http://"),!rv(n)))return!1;const l=iv(n+i);if(!l[0])return!1;const c={type:"link",title:null,url:u+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[c,{type:"text",value:l[1]}]:c}function nv(e,t,n,i){return!l1(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function rv(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function iv(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const a=Xm(e,"(");let u=Xm(e,")");for(;i!==-1&&a>u;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),u++;return[e,n]}function l1(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Kr(n)||ao(n))&&(!t||n!==47)}c1.peek=hv;function sv(){this.buffer()}function av(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function uv(){this.buffer()}function ov(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function lv(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function cv(e){this.exit(e)}function dv(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function fv(e){this.exit(e)}function hv(){return"["}function c1(e,t,n,i){const a=n.createTracker(i);let u=a.move("[^");const l=n.enter("footnoteReference"),c=n.enter("reference");return u+=a.move(n.safe(n.associationId(e),{after:"]",before:u})),c(),l(),u+=a.move("]"),u}function pv(){return{enter:{gfmFootnoteCallString:sv,gfmFootnoteCall:av,gfmFootnoteDefinitionLabelString:uv,gfmFootnoteDefinition:ov},exit:{gfmFootnoteCallString:lv,gfmFootnoteCall:cv,gfmFootnoteDefinitionLabelString:dv,gfmFootnoteDefinition:fv}}}function mv(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:c1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,a,u,l){const c=u.createTracker(l);let f=c.move("[^");const p=u.enter("footnoteDefinition"),T=u.enter("label");return f+=c.move(u.safe(u.associationId(i),{before:f,after:"]"})),T(),f+=c.move("]:"),i.children&&i.children.length>0&&(c.shift(4),f+=c.move((t?`
71
+ `:" ")+u.indentLines(u.containerFlow(i,c.current()),t?d1:gv))),p(),f}}function gv(e,t,n){return t===0?e:d1(e,t,n)}function d1(e,t,n){return(n?"":" ")+e}const Ev=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];f1.peek=kv;function Tv(){return{canContainEols:["delete"],enter:{strikethrough:xv},exit:{strikethrough:bv}}}function yv(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Ev}],handlers:{delete:f1}}}function xv(e){this.enter({type:"delete",children:[]},e)}function bv(e){this.exit(e)}function f1(e,t,n,i){const a=n.createTracker(i),u=n.enter("strikethrough");let l=a.move("~~");return l+=n.containerPhrasing(e,{...a.current(),before:l,after:"~"}),l+=a.move("~~"),u(),l}function kv(){return"~"}function Cv(e){return e.length}function Sv(e,t){const n=t||{},i=(n.align||[]).concat(),a=n.stringLength||Cv,u=[],l=[],c=[],f=[];let p=0,T=-1;for(;++T<e.length;){const v=[],D=[];let A=-1;for(e[T].length>p&&(p=e[T].length);++A<e[T].length;){const R=_v(e[T][A]);if(n.alignDelimiters!==!1){const U=a(R);D[A]=U,(f[A]===void 0||U>f[A])&&(f[A]=U)}v.push(R)}l[T]=v,c[T]=D}let E=-1;if(typeof i=="object"&&"length"in i)for(;++E<p;)u[E]=Jm(i[E]);else{const v=Jm(i);for(;++E<p;)u[E]=v}E=-1;const x=[],b=[];for(;++E<p;){const v=u[E];let D="",A="";v===99?(D=":",A=":"):v===108?D=":":v===114&&(A=":");let R=n.alignDelimiters===!1?1:Math.max(1,f[E]-D.length-A.length);const U=D+"-".repeat(R)+A;n.alignDelimiters!==!1&&(R=D.length+R+A.length,R>f[E]&&(f[E]=R),b[E]=R),x[E]=U}l.splice(1,0,x),c.splice(1,0,b),T=-1;const C=[];for(;++T<l.length;){const v=l[T],D=c[T];E=-1;const A=[];for(;++E<p;){const R=v[E]||"";let U="",W="";if(n.alignDelimiters!==!1){const q=f[E]-(D[E]||0),B=u[E];B===114?U=" ".repeat(q):B===99?q%2?(U=" ".repeat(q/2+.5),W=" ".repeat(q/2-.5)):(U=" ".repeat(q/2),W=U):W=" ".repeat(q)}n.delimiterStart!==!1&&!E&&A.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&R==="")&&(n.delimiterStart!==!1||E)&&A.push(" "),n.alignDelimiters!==!1&&A.push(U),A.push(R),n.alignDelimiters!==!1&&A.push(W),n.padding!==!1&&A.push(" "),(n.delimiterEnd!==!1||E!==p-1)&&A.push("|")}C.push(n.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return C.join(`
72
+ `)}function _v(e){return e==null?"":String(e)}function Jm(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const Zm={}.hasOwnProperty;function h1(e,t){const n=t||{};function i(a,...u){let l=i.invalid;const c=i.handlers;if(a&&Zm.call(a,e)){const f=String(a[e]);l=Zm.call(c,f)?c[f]:i.unknown}if(l)return l.call(this,a,...u)}return i.handlers=n.handlers||{},i.invalid=n.invalid,i.unknown=n.unknown,i}function vv(e,t,n,i){const a=n.enter("blockquote"),u=n.createTracker(i);u.move("> "),u.shift(2);const l=n.indentLines(n.containerFlow(e,u.current()),Nv);return a(),l}function Nv(e,t,n){return">"+(n?"":" ")+e}function wv(e,t){return e0(e,t.inConstruct,!0)&&!e0(e,t.notInConstruct,!1)}function e0(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function t0(e,t,n,i){let a=-1;for(;++a<n.unsafe.length;)if(n.unsafe[a].character===`
73
+ `&&wv(n.stack,n.unsafe[a]))return/[ \t]/.test(i.before)?"":" ";return`\\
74
+ `}function p1(e,t){const n=String(e);let i=n.indexOf(t),a=i,u=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===a?++u>l&&(l=u):u=1,a=i+t.length,i=n.indexOf(t,a);return l}function Av(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Iv(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Lv(e,t,n,i){const a=Iv(n),u=e.value||"",l=a==="`"?"GraveAccent":"Tilde";if(Av(e,n)){const E=n.enter("codeIndented"),x=n.indentLines(u,Rv);return E(),x}const c=n.createTracker(i),f=a.repeat(Math.max(p1(u,a)+1,3)),p=n.enter("codeFenced");let T=c.move(f);if(e.lang){const E=n.enter(`codeFencedLang${l}`);T+=c.move(n.safe(e.lang,{before:T,after:" ",encode:["`"],...c.current()})),E()}if(e.lang&&e.meta){const E=n.enter(`codeFencedMeta${l}`);T+=c.move(" "),T+=c.move(n.safe(e.meta,{before:T,after:`
75
+ `,encode:["`"],...c.current()})),E()}return T+=c.move(`
76
+ `),u&&(T+=c.move(u+`
77
+ `)),T+=c.move(f),p(),T}function Rv(e,t,n){return(n?"":" ")+e}function $d(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Ov(e,t,n,i){const a=$d(n),u=a==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const f=n.createTracker(i);let p=f.move("[");return p+=f.move(n.safe(n.associationId(e),{before:p,after:"]",...f.current()})),p+=f.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),p+=f.move("<"),p+=f.move(n.safe(e.url,{before:p,after:">",...f.current()})),p+=f.move(">")):(c=n.enter("destinationRaw"),p+=f.move(n.safe(e.url,{before:p,after:e.title?" ":`
78
+ `,...f.current()}))),c(),e.title&&(c=n.enter(`title${u}`),p+=f.move(" "+a),p+=f.move(n.safe(e.title,{before:p,after:a,...f.current()})),p+=f.move(a),c()),l(),p}function Dv(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function ea(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Qu(e,t,n){const i=Pi(e),a=Pi(t);return i===void 0?a===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}m1.peek=Pv;function m1(e,t,n,i){const a=Dv(n),u=n.enter("emphasis"),l=n.createTracker(i),c=l.move(a);let f=l.move(n.containerPhrasing(e,{after:a,before:c,...l.current()}));const p=f.charCodeAt(0),T=Qu(i.before.charCodeAt(i.before.length-1),p,a);T.inside&&(f=ea(p)+f.slice(1));const E=f.charCodeAt(f.length-1),x=Qu(i.after.charCodeAt(0),E,a);x.inside&&(f=f.slice(0,-1)+ea(E));const b=l.move(a);return u(),n.attentionEncodeSurroundingInfo={after:x.outside,before:T.outside},c+f+b}function Pv(e,t,n){return n.options.emphasis||"*"}function Mv(e,t){let n=!1;return fo(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,Kc}),!!((!e.depth||e.depth<3)&&Pd(e)&&(t.options.setext||n))}function Fv(e,t,n,i){const a=Math.max(Math.min(6,e.depth||1),1),u=n.createTracker(i);if(Mv(e,n)){const T=n.enter("headingSetext"),E=n.enter("phrasing"),x=n.containerPhrasing(e,{...u.current(),before:`
79
+ `,after:`
80
+ `});return E(),T(),x+`
81
+ `+(a===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
82
+ `))+1))}const l="#".repeat(a),c=n.enter("headingAtx"),f=n.enter("phrasing");u.move(l+" ");let p=n.containerPhrasing(e,{before:"# ",after:`
83
+ `,...u.current()});return/^[\t ]/.test(p)&&(p=ea(p.charCodeAt(0))+p.slice(1)),p=p?l+" "+p:l,n.options.closeAtx&&(p+=" "+l),f(),c(),p}g1.peek=jv;function g1(e){return e.value||""}function jv(){return"<"}E1.peek=Bv;function E1(e,t,n,i){const a=$d(n),u=a==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const f=n.createTracker(i);let p=f.move("![");return p+=f.move(n.safe(e.alt,{before:p,after:"]",...f.current()})),p+=f.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),p+=f.move("<"),p+=f.move(n.safe(e.url,{before:p,after:">",...f.current()})),p+=f.move(">")):(c=n.enter("destinationRaw"),p+=f.move(n.safe(e.url,{before:p,after:e.title?" ":")",...f.current()}))),c(),e.title&&(c=n.enter(`title${u}`),p+=f.move(" "+a),p+=f.move(n.safe(e.title,{before:p,after:a,...f.current()})),p+=f.move(a),c()),p+=f.move(")"),l(),p}function Bv(){return"!"}T1.peek=Uv;function T1(e,t,n,i){const a=e.referenceType,u=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(i);let f=c.move("![");const p=n.safe(e.alt,{before:f,after:"]",...c.current()});f+=c.move(p+"]["),l();const T=n.stack;n.stack=[],l=n.enter("reference");const E=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return l(),n.stack=T,u(),a==="full"||!p||p!==E?f+=c.move(E+"]"):a==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function Uv(){return"!"}y1.peek=Hv;function y1(e,t,n){let i=e.value||"",a="`",u=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(i);)a+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++u<n.unsafe.length;){const l=n.unsafe[u],c=n.compilePattern(l);let f;if(l.atBreak)for(;f=c.exec(i);){let p=f.index;i.charCodeAt(p)===10&&i.charCodeAt(p-1)===13&&p--,i=i.slice(0,p)+" "+i.slice(f.index+1)}}return a+i+a}function Hv(){return"`"}function x1(e,t){const n=Pd(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}b1.peek=zv;function b1(e,t,n,i){const a=$d(n),u=a==='"'?"Quote":"Apostrophe",l=n.createTracker(i);let c,f;if(x1(e,n)){const T=n.stack;n.stack=[],c=n.enter("autolink");let E=l.move("<");return E+=l.move(n.containerPhrasing(e,{before:E,after:">",...l.current()})),E+=l.move(">"),c(),n.stack=T,E}c=n.enter("link"),f=n.enter("label");let p=l.move("[");return p+=l.move(n.containerPhrasing(e,{before:p,after:"](",...l.current()})),p+=l.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),p+=l.move("<"),p+=l.move(n.safe(e.url,{before:p,after:">",...l.current()})),p+=l.move(">")):(f=n.enter("destinationRaw"),p+=l.move(n.safe(e.url,{before:p,after:e.title?" ":")",...l.current()}))),f(),e.title&&(f=n.enter(`title${u}`),p+=l.move(" "+a),p+=l.move(n.safe(e.title,{before:p,after:a,...l.current()})),p+=l.move(a),f()),p+=l.move(")"),c(),p}function zv(e,t,n){return x1(e,n)?"<":"["}k1.peek=$v;function k1(e,t,n,i){const a=e.referenceType,u=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(i);let f=c.move("[");const p=n.containerPhrasing(e,{before:f,after:"]",...c.current()});f+=c.move(p+"]["),l();const T=n.stack;n.stack=[],l=n.enter("reference");const E=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return l(),n.stack=T,u(),a==="full"||!p||p!==E?f+=c.move(E+"]"):a==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function $v(){return"["}function Wd(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Wv(e){const t=Wd(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Yv(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function C1(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Vv(e,t,n,i){const a=n.enter("list"),u=n.bulletCurrent;let l=e.ordered?Yv(n):Wd(n);const c=e.ordered?l==="."?")":".":Wv(n);let f=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const T=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&T&&(!T.children||!T.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(f=!0),C1(n)===l&&T){let E=-1;for(;++E<e.children.length;){const x=e.children[E];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(l=c),n.bulletCurrent=l;const p=n.containerFlow(e,i);return n.bulletLastUsed=l,n.bulletCurrent=u,a(),p}function qv(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Qv(e,t,n,i){const a=qv(n);let u=n.bulletCurrent||Wd(n);t&&t.type==="list"&&t.ordered&&(u=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+u);let l=u.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const c=n.createTracker(i);c.move(u+" ".repeat(l-u.length)),c.shift(l);const f=n.enter("listItem"),p=n.indentLines(n.containerFlow(e,c.current()),T);return f(),p;function T(E,x,b){return x?(b?"":" ".repeat(l))+E:(b?u:u+" ".repeat(l-u.length))+E}}function Gv(e,t,n,i){const a=n.enter("paragraph"),u=n.enter("phrasing"),l=n.containerPhrasing(e,i);return u(),a(),l}const Kv=lo(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Xv(e,t,n,i){return(e.children.some(function(l){return Kv(l)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function Jv(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}S1.peek=Zv;function S1(e,t,n,i){const a=Jv(n),u=n.enter("strong"),l=n.createTracker(i),c=l.move(a+a);let f=l.move(n.containerPhrasing(e,{after:a,before:c,...l.current()}));const p=f.charCodeAt(0),T=Qu(i.before.charCodeAt(i.before.length-1),p,a);T.inside&&(f=ea(p)+f.slice(1));const E=f.charCodeAt(f.length-1),x=Qu(i.after.charCodeAt(0),E,a);x.inside&&(f=f.slice(0,-1)+ea(E));const b=l.move(a+a);return u(),n.attentionEncodeSurroundingInfo={after:x.outside,before:T.outside},c+f+b}function Zv(e,t,n){return n.options.strong||"*"}function eN(e,t,n,i){return n.safe(e.value,i)}function tN(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function nN(e,t,n){const i=(C1(n)+(n.options.ruleSpaces?" ":"")).repeat(tN(n));return n.options.ruleSpaces?i.slice(0,-1):i}const _1={blockquote:vv,break:t0,code:Lv,definition:Ov,emphasis:m1,hardBreak:t0,heading:Fv,html:g1,image:E1,imageReference:T1,inlineCode:y1,link:b1,linkReference:k1,list:Vv,listItem:Qv,paragraph:Gv,root:Xv,strong:S1,text:eN,thematicBreak:nN};function rN(){return{enter:{table:iN,tableData:n0,tableHeader:n0,tableRow:aN},exit:{codeText:uN,table:sN,tableData:wc,tableHeader:wc,tableRow:wc}}}function iN(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function sN(e){this.exit(e),this.data.inTable=void 0}function aN(e){this.enter({type:"tableRow",children:[]},e)}function wc(e){this.exit(e)}function n0(e){this.enter({type:"tableCell",children:[]},e)}function uN(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,oN));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function oN(e,t){return t==="|"?t:e}function lN(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,a=t.stringLength,u=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
84
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:l,tableCell:f,tableRow:c}};function l(b,C,v,D){return p(T(b,v,D),b.align)}function c(b,C,v,D){const A=E(b,v,D),R=p([A]);return R.slice(0,R.indexOf(`
85
+ `))}function f(b,C,v,D){const A=v.enter("tableCell"),R=v.enter("phrasing"),U=v.containerPhrasing(b,{...D,before:u,after:u});return R(),A(),U}function p(b,C){return Sv(b,{align:C,alignDelimiters:i,padding:n,stringLength:a})}function T(b,C,v){const D=b.children;let A=-1;const R=[],U=C.enter("table");for(;++A<D.length;)R[A]=E(D[A],C,v);return U(),R}function E(b,C,v){const D=b.children;let A=-1;const R=[],U=C.enter("tableRow");for(;++A<D.length;)R[A]=f(D[A],b,C,v);return U(),R}function x(b,C,v){let D=_1.inlineCode(b,C,v);return v.stack.includes("tableCell")&&(D=D.replace(/\|/g,"\\$&")),D}}function cN(){return{exit:{taskListCheckValueChecked:r0,taskListCheckValueUnchecked:r0,paragraph:fN}}}function dN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:hN}}}function r0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function fN(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const i=n.children[0];if(i&&i.type==="text"){const a=t.children;let u=-1,l;for(;++u<a.length;){const c=a[u];if(c.type==="paragraph"){l=c;break}}l===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function hN(e,t,n,i){const a=e.children[0],u=typeof e.checked=="boolean"&&a&&a.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",c=n.createTracker(i);u&&c.move(l);let f=_1.listItem(e,t,n,{...i,...c.current()});return u&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),f;function p(T){return T+l}}function pN(){return[q_(),pv(),Tv(),rN(),cN()]}function mN(e){return{extensions:[Q_(),mv(e),yv(),lN(e),dN()]}}const gN={tokenize:kN,partial:!0},v1={tokenize:CN,partial:!0},N1={tokenize:SN,partial:!0},w1={tokenize:_N,partial:!0},EN={tokenize:vN,partial:!0},A1={name:"wwwAutolink",tokenize:xN,previous:L1},I1={name:"protocolAutolink",tokenize:bN,previous:R1},Yn={name:"emailAutolink",tokenize:yN,previous:O1},On={};function TN(){return{text:On}}let zr=48;for(;zr<123;)On[zr]=Yn,zr++,zr===58?zr=65:zr===91&&(zr=97);On[43]=Yn;On[45]=Yn;On[46]=Yn;On[95]=Yn;On[72]=[Yn,I1];On[104]=[Yn,I1];On[87]=[Yn,A1];On[119]=[Yn,A1];function yN(e,t,n){const i=this;let a,u;return l;function l(E){return!ed(E)||!O1.call(i,i.previous)||Yd(i.events)?n(E):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(E))}function c(E){return ed(E)?(e.consume(E),c):E===64?(e.consume(E),f):n(E)}function f(E){return E===46?e.check(EN,T,p)(E):E===45||E===95||Nt(E)?(u=!0,e.consume(E),f):T(E)}function p(E){return e.consume(E),a=!0,f}function T(E){return u&&a&&Ot(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(E)):n(E)}}function xN(e,t,n){const i=this;return a;function a(l){return l!==87&&l!==119||!L1.call(i,i.previous)||Yd(i.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(gN,e.attempt(v1,e.attempt(N1,u),n),n)(l))}function u(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function bN(e,t,n){const i=this;let a="",u=!1;return l;function l(E){return(E===72||E===104)&&R1.call(i,i.previous)&&!Yd(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(E),e.consume(E),c):n(E)}function c(E){if(Ot(E)&&a.length<5)return a+=String.fromCodePoint(E),e.consume(E),c;if(E===58){const x=a.toLowerCase();if(x==="http"||x==="https")return e.consume(E),f}return n(E)}function f(E){return E===47?(e.consume(E),u?p:(u=!0,f)):n(E)}function p(E){return E===null||Vu(E)||Ke(E)||Kr(E)||ao(E)?n(E):e.attempt(v1,e.attempt(N1,T),n)(E)}function T(E){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(E)}}function kN(e,t,n){let i=0;return a;function a(l){return(l===87||l===119)&&i<3?(i++,e.consume(l),a):l===46&&i===3?(e.consume(l),u):n(l)}function u(l){return l===null?n(l):t(l)}}function CN(e,t,n){let i,a,u;return l;function l(p){return p===46||p===95?e.check(w1,f,c)(p):p===null||Ke(p)||Kr(p)||p!==45&&ao(p)?f(p):(u=!0,e.consume(p),l)}function c(p){return p===95?i=!0:(a=i,i=void 0),e.consume(p),l}function f(p){return a||i||!u?n(p):t(p)}}function SN(e,t){let n=0,i=0;return a;function a(l){return l===40?(n++,e.consume(l),a):l===41&&i<n?u(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(w1,t,u)(l):l===null||Ke(l)||Kr(l)?t(l):(e.consume(l),a)}function u(l){return l===41&&i++,e.consume(l),a}}function _N(e,t,n){return i;function i(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),i):c===38?(e.consume(c),u):c===93?(e.consume(c),a):c===60||c===null||Ke(c)||Kr(c)?t(c):n(c)}function a(c){return c===null||c===40||c===91||Ke(c)||Kr(c)?t(c):i(c)}function u(c){return Ot(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),i):Ot(c)?(e.consume(c),l):n(c)}}function vN(e,t,n){return i;function i(u){return e.consume(u),a}function a(u){return Nt(u)?n(u):t(u)}}function L1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ke(e)}function R1(e){return!Ot(e)}function O1(e){return!(e===47||ed(e))}function ed(e){return e===43||e===45||e===46||e===95||Nt(e)}function Yd(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const NN={tokenize:PN,partial:!0};function wN(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:RN,continuation:{tokenize:ON},exit:DN}},text:{91:{name:"gfmFootnoteCall",tokenize:LN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:AN,resolveTo:IN}}}}function AN(e,t,n){const i=this;let a=i.events.length;const u=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l;for(;a--;){const f=i.events[a][1];if(f.type==="labelImage"){l=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return c;function c(f){if(!l||!l._balanced)return n(f);const p=yn(i.sliceSerialize({start:l.end,end:i.now()}));return p.codePointAt(0)!==94||!u.includes(p.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function IN(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},c=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",u,t],["enter",l,t],["exit",l,t],["exit",u,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...c),e}function LN(e,t,n){const i=this,a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u=0,l;return c;function c(E){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),f}function f(E){return E!==94?n(E):(e.enter("gfmFootnoteCallMarker"),e.consume(E),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(E){if(u>999||E===93&&!l||E===null||E===91||Ke(E))return n(E);if(E===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return a.includes(yn(i.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(E)}return Ke(E)||(l=!0),u++,e.consume(E),E===92?T:p}function T(E){return E===91||E===92||E===93?(e.consume(E),u++,p):p(E)}}function RN(e,t,n){const i=this,a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u,l=0,c;return f;function f(C){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(C){return C===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",T):n(C)}function T(C){if(l>999||C===93&&!c||C===null||C===91||Ke(C))return n(C);if(C===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return u=yn(i.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return Ke(C)||(c=!0),l++,e.consume(C),C===92?E:T}function E(C){return C===91||C===92||C===93?(e.consume(C),l++,T):T(C)}function x(C){return C===58?(e.enter("definitionMarker"),e.consume(C),e.exit("definitionMarker"),a.includes(u)||a.push(u),je(e,b,"gfmFootnoteDefinitionWhitespace")):n(C)}function b(C){return t(C)}}function ON(e,t,n){return e.check(ua,t,e.attempt(NN,t,n))}function DN(e){e.exit("gfmFootnoteDefinition")}function PN(e,t,n){const i=this;return je(e,a,"gfmFootnoteDefinitionIndent",5);function a(u){const l=i.events[i.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(u):n(u)}}function MN(e){let n=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:u,resolveAll:a};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function a(l,c){let f=-1;for(;++f<l.length;)if(l[f][0]==="enter"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._close){let p=f;for(;p--;)if(l[p][0]==="exit"&&l[p][1].type==="strikethroughSequenceTemporary"&&l[p][1]._open&&l[f][1].end.offset-l[f][1].start.offset===l[p][1].end.offset-l[p][1].start.offset){l[f][1].type="strikethroughSequence",l[p][1].type="strikethroughSequence";const T={type:"strikethrough",start:Object.assign({},l[p][1].start),end:Object.assign({},l[f][1].end)},E={type:"strikethroughText",start:Object.assign({},l[p][1].end),end:Object.assign({},l[f][1].start)},x=[["enter",T,c],["enter",l[p][1],c],["exit",l[p][1],c],["enter",E,c]],b=c.parser.constructs.insideSpan.null;b&&Kt(x,x.length,0,uo(b,l.slice(p+1,f),c)),Kt(x,x.length,0,[["exit",E,c],["enter",l[f][1],c],["exit",l[f][1],c],["exit",T,c]]),Kt(l,p-1,f-p+3,x),f=p+x.length-2;break}}for(f=-1;++f<l.length;)l[f][1].type==="strikethroughSequenceTemporary"&&(l[f][1].type="data");return l}function u(l,c,f){const p=this.previous,T=this.events;let E=0;return x;function x(C){return p===126&&T[T.length-1][1].type!=="characterEscape"?f(C):(l.enter("strikethroughSequenceTemporary"),b(C))}function b(C){const v=Pi(p);if(C===126)return E>1?f(C):(l.consume(C),E++,b);if(E<2&&!n)return f(C);const D=l.exit("strikethroughSequenceTemporary"),A=Pi(C);return D._open=!A||A===2&&!!v,D._close=!v||v===2&&!!A,c(C)}}}class FN{constructor(){this.map=[]}add(t,n,i){jN(this,t,n,i)}consume(t){if(this.map.sort(function(u,l){return u[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];i.push(t.slice()),t.length=0;let a=i.pop();for(;a;){for(const u of a)t.push(u);a=i.pop()}this.map.length=0}}function jN(e,t,n,i){let a=0;if(!(n===0&&i.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=n,e.map[a][2].push(...i);return}a+=1}e.map.push([t,n,i])}}function BN(e,t){let n=!1;const i=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const u=i.length-1;i[u]=i[u]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return i}function UN(){return{flow:{null:{name:"table",tokenize:HN,resolveAll:zN}}}}function HN(e,t,n){const i=this;let a=0,u=0,l;return c;function c(M){let me=i.events.length-1;for(;me>-1;){const de=i.events[me][1].type;if(de==="lineEnding"||de==="linePrefix")me--;else break}const V=me>-1?i.events[me][1].type:null,pe=V==="tableHead"||V==="tableRow"?B:f;return pe===B&&i.parser.lazy[i.now().line]?n(M):pe(M)}function f(M){return e.enter("tableHead"),e.enter("tableRow"),p(M)}function p(M){return M===124||(l=!0,u+=1),T(M)}function T(M){return M===null?n(M):Ce(M)?u>1?(u=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),b):n(M):Be(M)?je(e,T,"whitespace")(M):(u+=1,l&&(l=!1,a+=1),M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),l=!0,T):(e.enter("data"),E(M)))}function E(M){return M===null||M===124||Ke(M)?(e.exit("data"),T(M)):(e.consume(M),M===92?x:E)}function x(M){return M===92||M===124?(e.consume(M),E):E(M)}function b(M){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(M):(e.enter("tableDelimiterRow"),l=!1,Be(M)?je(e,C,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):C(M))}function C(M){return M===45||M===58?D(M):M===124?(l=!0,e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),v):q(M)}function v(M){return Be(M)?je(e,D,"whitespace")(M):D(M)}function D(M){return M===58?(u+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),A):M===45?(u+=1,A(M)):M===null||Ce(M)?W(M):q(M)}function A(M){return M===45?(e.enter("tableDelimiterFiller"),R(M)):q(M)}function R(M){return M===45?(e.consume(M),R):M===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),U):(e.exit("tableDelimiterFiller"),U(M))}function U(M){return Be(M)?je(e,W,"whitespace")(M):W(M)}function W(M){return M===124?C(M):M===null||Ce(M)?!l||a!==u?q(M):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(M)):q(M)}function q(M){return n(M)}function B(M){return e.enter("tableRow"),ae(M)}function ae(M){return M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),ae):M===null||Ce(M)?(e.exit("tableRow"),t(M)):Be(M)?je(e,ae,"whitespace")(M):(e.enter("data"),Z(M))}function Z(M){return M===null||M===124||Ke(M)?(e.exit("data"),ae(M)):(e.consume(M),M===92?ce:Z)}function ce(M){return M===92||M===124?(e.consume(M),Z):Z(M)}}function zN(e,t){let n=-1,i=!0,a=0,u=[0,0,0,0],l=[0,0,0,0],c=!1,f=0,p,T,E;const x=new FN;for(;++n<e.length;){const b=e[n],C=b[1];b[0]==="enter"?C.type==="tableHead"?(c=!1,f!==0&&(i0(x,t,f,p,T),T=void 0,f=0),p={type:"table",start:Object.assign({},C.start),end:Object.assign({},C.end)},x.add(n,0,[["enter",p,t]])):C.type==="tableRow"||C.type==="tableDelimiterRow"?(i=!0,E=void 0,u=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,T={type:"tableBody",start:Object.assign({},C.start),end:Object.assign({},C.end)},x.add(n,0,[["enter",T,t]])),a=C.type==="tableDelimiterRow"?2:T?3:1):a&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")?(i=!1,l[2]===0&&(u[1]!==0&&(l[0]=l[1],E=Iu(x,t,u,a,void 0,E),u=[0,0,0,0]),l[2]=n)):C.type==="tableCellDivider"&&(i?i=!1:(u[1]!==0&&(l[0]=l[1],E=Iu(x,t,u,a,void 0,E)),u=l,l=[u[1],n,0,0])):C.type==="tableHead"?(c=!0,f=n):C.type==="tableRow"||C.type==="tableDelimiterRow"?(f=n,u[1]!==0?(l[0]=l[1],E=Iu(x,t,u,a,n,E)):l[1]!==0&&(E=Iu(x,t,l,a,n,E)),a=0):a&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")&&(l[3]=n)}for(f!==0&&i0(x,t,f,p,T),x.consume(t.events),n=-1;++n<t.events.length;){const b=t.events[n];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=BN(t.events,n))}return e}function Iu(e,t,n,i,a,u){const l=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(u.end=Object.assign({},Ri(t.events,n[0])),e.add(n[0],0,[["exit",u,t]]));const f=Ri(t.events,n[1]);if(u={type:l,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",u,t]]),n[2]!==0){const p=Ri(t.events,n[2]),T=Ri(t.events,n[3]),E={type:c,start:Object.assign({},p),end:Object.assign({},T)};if(e.add(n[2],0,[["enter",E,t]]),i!==2){const x=t.events[n[2]],b=t.events[n[3]];if(x[1].end=Object.assign({},b[1].end),x[1].type="chunkText",x[1].contentType="text",n[3]>n[2]+1){const C=n[2]+1,v=n[3]-n[2]-1;e.add(C,v,[])}}e.add(n[3]+1,0,[["exit",E,t]])}return a!==void 0&&(u.end=Object.assign({},Ri(t.events,a)),e.add(a,0,[["exit",u,t]]),u=void 0),u}function i0(e,t,n,i,a){const u=[],l=Ri(t.events,n);a&&(a.end=Object.assign({},l),u.push(["exit",a,t])),i.end=Object.assign({},l),u.push(["exit",i,t]),e.add(n+1,0,u)}function Ri(e,t){const n=e[t],i=n[0]==="enter"?"start":"end";return n[1][i]}const $N={name:"tasklistCheck",tokenize:YN};function WN(){return{text:{91:$N}}}function YN(e,t,n){const i=this;return a;function a(f){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),u)}function u(f){return Ke(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),l):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),l):n(f)}function l(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(f)}function c(f){return Ce(f)?t(f):Be(f)?e.check({tokenize:VN},t,n)(f):n(f)}}function VN(e,t,n){return je(e,i,"whitespace");function i(a){return a===null?n(a):t(a)}}function qN(e){return zg([TN(),wN(),MN(e),UN(),WN()])}const QN={};function GN(e){const t=this,n=e||QN,i=t.data(),a=i.micromarkExtensions||(i.micromarkExtensions=[]),u=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),l=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);a.push(qN(n)),u.push(pN()),l.push(mN(n))}function KN(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:u},exit:{mathFlow:a,mathFlowFence:i,mathFlowFenceMeta:n,mathFlowValue:c,mathText:l,mathTextData:c}};function e(f){const p={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[p]}},f)}function t(){this.buffer()}function n(){const f=this.resume(),p=this.stack[this.stack.length-1];p.type,p.meta=f}function i(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function a(f){const p=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),T=this.stack[this.stack.length-1];T.type,this.exit(f),T.value=p;const E=T.data.hChildren[0];E.type,E.tagName,E.children.push({type:"text",value:p}),this.data.mathFlowInside=void 0}function u(f){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},f),this.buffer()}function l(f){const p=this.resume(),T=this.stack[this.stack.length-1];T.type,this.exit(f),T.value=p,T.data.hChildren.push({type:"text",value:p})}function c(f){this.config.enter.data.call(this,f),this.config.exit.data.call(this,f)}}function XN(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),i.peek=a,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
86
+ `,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:n,inlineMath:i}};function n(u,l,c,f){const p=u.value||"",T=c.createTracker(f),E="$".repeat(Math.max(p1(p,"$")+1,2)),x=c.enter("mathFlow");let b=T.move(E);if(u.meta){const C=c.enter("mathFlowMeta");b+=T.move(c.safe(u.meta,{after:`
87
+ `,before:b,encode:["$"],...T.current()})),C()}return b+=T.move(`
88
+ `),p&&(b+=T.move(p+`
89
+ `)),b+=T.move(E),x(),b}function i(u,l,c){let f=u.value||"",p=1;for(t||p++;new RegExp("(^|[^$])"+"\\$".repeat(p)+"([^$]|$)").test(f);)p++;const T="$".repeat(p);/[^ \r\n]/.test(f)&&(/^[ \r\n]/.test(f)&&/[ \r\n]$/.test(f)||/^\$|\$$/.test(f))&&(f=" "+f+" ");let E=-1;for(;++E<c.unsafe.length;){const x=c.unsafe[E];if(!x.atBreak)continue;const b=c.compilePattern(x);let C;for(;C=b.exec(f);){let v=C.index;f.codePointAt(v)===10&&f.codePointAt(v-1)===13&&v--,f=f.slice(0,v)+" "+f.slice(C.index+1)}}return T+f+T}function a(){return"$"}}const JN={tokenize:ZN,concrete:!0,name:"mathFlow"},s0={tokenize:e3,partial:!0};function ZN(e,t,n){const i=this,a=i.events[i.events.length-1],u=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0;let l=0;return c;function c(R){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),f(R)}function f(R){return R===36?(e.consume(R),l++,f):l<2?n(R):(e.exit("mathFlowFenceSequence"),je(e,p,"whitespace")(R))}function p(R){return R===null||Ce(R)?E(R):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),T(R))}function T(R){return R===null||Ce(R)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),E(R)):R===36?n(R):(e.consume(R),T)}function E(R){return e.exit("mathFlowFence"),i.interrupt?t(R):e.attempt(s0,x,D)(R)}function x(R){return e.attempt({tokenize:A,partial:!0},D,b)(R)}function b(R){return(u?je(e,C,"linePrefix",u+1):C)(R)}function C(R){return R===null?D(R):Ce(R)?e.attempt(s0,x,D)(R):(e.enter("mathFlowValue"),v(R))}function v(R){return R===null||Ce(R)?(e.exit("mathFlowValue"),C(R)):(e.consume(R),v)}function D(R){return e.exit("mathFlow"),t(R)}function A(R,U,W){let q=0;return je(R,B,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function B(ce){return R.enter("mathFlowFence"),R.enter("mathFlowFenceSequence"),ae(ce)}function ae(ce){return ce===36?(q++,R.consume(ce),ae):q<l?W(ce):(R.exit("mathFlowFenceSequence"),je(R,Z,"whitespace")(ce))}function Z(ce){return ce===null||Ce(ce)?(R.exit("mathFlowFence"),U(ce)):W(ce)}}}function e3(e,t,n){const i=this;return a;function a(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),u)}function u(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}function t3(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),{tokenize:i,resolve:n3,previous:r3,name:"mathText"};function i(a,u,l){let c=0,f,p;return T;function T(v){return a.enter("mathText"),a.enter("mathTextSequence"),E(v)}function E(v){return v===36?(a.consume(v),c++,E):c<2&&!n?l(v):(a.exit("mathTextSequence"),x(v))}function x(v){return v===null?l(v):v===36?(p=a.enter("mathTextSequence"),f=0,C(v)):v===32?(a.enter("space"),a.consume(v),a.exit("space"),x):Ce(v)?(a.enter("lineEnding"),a.consume(v),a.exit("lineEnding"),x):(a.enter("mathTextData"),b(v))}function b(v){return v===null||v===32||v===36||Ce(v)?(a.exit("mathTextData"),x(v)):(a.consume(v),b)}function C(v){return v===36?(a.consume(v),f++,C):f===c?(a.exit("mathTextSequence"),a.exit("mathText"),u(v)):(p.type="mathTextData",b(v))}}}function n3(e){let t=e.length-4,n=3,i,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[n][1].type="mathTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)a===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(a=i):(i===t||e[i][1].type==="lineEnding")&&(e[a][1].type="mathTextData",i!==a+2&&(e[a][1].end=e[i-1][1].end,e.splice(a+2,i-a-2),t-=i-a-2,i=a+2),a=void 0);return e}function r3(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function i3(e){return{flow:{36:JN},text:{36:t3(e)}}}const s3={};function a3(e){const t=this,n=e||s3,i=t.data(),a=i.micromarkExtensions||(i.micromarkExtensions=[]),u=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),l=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);a.push(i3(n)),u.push(KN()),l.push(XN(n))}const u3=[GN,a3],o3=/\\[a-zA-Z]+|[\^_]/,l3=/^\d[\d,.]*\s*(?:[kKmMbB]|bn|billion|million|thousand)?$/,c3=/^[a-zA-Z]{3,}$/,a0=/[=+\-*/<>≤≥±×÷]/,d3=/[.,;:!?]$/,f3=/\n/,h3=/\s+/,p3=/\d,\d{3}\b/,m3=/\d/;function g3(e){const t=e.trim();if(!t||f3.test(e))return!1;if(o3.test(t))return!0;if(l3.test(t))return!1;const n=t.split(h3),i=n.filter(u=>c3.test(u.replace(d3,"")));return i.length>=2||p3.test(t)?!1:!!(n.every(u=>u.length<=4)&&(n.length===1||a0.test(t))||a0.test(t)&&i.length===0)}function E3(e,t){if(e.startsWith("```",t)||e.startsWith("~~~",t)){const n=e.slice(t,t+3),i=e.indexOf(`
90
+ ${n}`,t+3);return i===-1?e.length:i+4}if(e[t]==="`"){let n=0;for(;e[t+n]==="`";)n++;const i=e.indexOf("`".repeat(n),t+n);return i===-1?t+n:i+n}return t}function T3(e){let t="",n=0;for(;n<e.length;){const i=E3(e,n);if(i>n){t+=e.slice(n,i),n=i;continue}if(e[n]==="$"&&e[n+1]==="$"){const a=e.indexOf("$$",n+2),u=a===-1?e.length:a+2;t+=e.slice(n,u),n=u;continue}if(e[n]==="$"&&e[n-1]!=="\\"){const a=e.indexOf("$",n+1);if(a!==-1){const u=e.slice(n+1,a);if(m3.test(e[a+1]??"")||!g3(u)){t+=`\\$${u}`,n=a;continue}t+=e.slice(n,a+1),n=a+1;continue}}t+=e[n],n++}return t}const u0=/[#.]/g;function y3(e,t){const n=e||"",i={};let a=0,u,l;for(;a<n.length;){u0.lastIndex=a;const c=u0.exec(n),f=n.slice(a,c?c.index:n.length);f&&(u?u==="#"?i.id=f:Array.isArray(i.className)?i.className.push(f):i.className=[f]:l=f,a+=f.length),c&&(u=c[0],a++)}return{type:"element",tagName:l||t||"div",properties:i,children:[]}}function D1(e,t,n){const i=n?C3(n):void 0;function a(u,l,...c){let f;if(u==null){f={type:"root",children:[]};const p=l;c.unshift(p)}else{f=y3(u,t);const p=f.tagName.toLowerCase(),T=i?i.get(p):void 0;if(f.tagName=T||p,x3(l))c.unshift(l);else for(const[E,x]of Object.entries(l))b3(e,f.properties,E,x)}for(const p of c)td(f.children,p);return f.type==="element"&&f.tagName==="template"&&(f.content={type:"root",children:f.children},f.children=[]),f}return a}function x3(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const i of n){const a=t[i];if(a&&typeof a=="object"){if(!Array.isArray(a))return!0;const u=a;for(const l of u)if(typeof l!="number"&&typeof l!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function b3(e,t,n,i){const a=io(e,n);let u;if(i!=null){if(typeof i=="number"){if(Number.isNaN(i))return;u=i}else typeof i=="boolean"?u=i:typeof i=="string"?a.spaceSeparated?u=Tm(i):a.commaSeparated?u=hm(i):a.commaOrSpaceSeparated?u=Tm(hm(i).join(" ")):u=o0(a,a.property,i):Array.isArray(i)?u=[...i]:u=a.property==="style"?k3(i):String(i);if(Array.isArray(u)){const l=[];for(const c of u)l.push(o0(a,a.property,c));u=l}a.property==="className"&&Array.isArray(t.className)&&(u=t.className.concat(u)),t[a.property]=u}}function td(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)td(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?td(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function o0(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Js(n)===Js(t)))return!0}return n}function k3(e){const t=[];for(const[n,i]of Object.entries(e))t.push([n,i].join(": "));return t.join("; ")}function C3(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const S3=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],_3=D1(aa,"div"),v3=D1(Cr,"g",S3);function N3(e){const t=String(e),n=[];return{toOffset:a,toPoint:i};function i(u){if(typeof u=="number"&&u>-1&&u<=t.length){let l=0;for(;;){let c=n[l];if(c===void 0){const f=l0(t,n[l-1]);c=f===-1?t.length+1:f+1,n[l]=c}if(c>u)return{line:l+1,column:u-(l>0?n[l-1]:0)+1,offset:u};l++}}}function a(u){if(u&&typeof u.line=="number"&&typeof u.column=="number"&&!Number.isNaN(u.line)&&!Number.isNaN(u.column)){for(;n.length<u.line;){const c=n[n.length-1],f=l0(t,c),p=f===-1?t.length+1:f+1;if(c===p)break;n.push(p)}const l=(u.line>1?n[u.line-2]:0)+u.column-1;if(l<n[u.line-1])return l}}}function l0(e,t){const n=e.indexOf("\r",t),i=e.indexOf(`
91
+ `,t);return i===-1?n:n===-1||n+1===i?i:n<i?n:i}const qr={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},P1={}.hasOwnProperty,w3=Object.prototype;function A3(e,t){const n=t||{};return Vd({file:n.file||void 0,location:!1,schema:n.space==="svg"?Cr:aa,verbose:n.verbose||!1},e)}function Vd(e,t){let n;switch(t.nodeName){case"#comment":{const i=t;return n={type:"comment",value:i.data},zu(e,i,n),n}case"#document":case"#document-fragment":{const i=t,a="mode"in i?i.mode==="quirks"||i.mode==="limited-quirks":!1;if(n={type:"root",children:M1(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const u=String(e.file),l=N3(u),c=l.toPoint(0),f=l.toPoint(u.length);n.position={start:c,end:f}}return n}case"#documentType":{const i=t;return n={type:"doctype"},zu(e,i,n),n}case"#text":{const i=t;return n={type:"text",value:i.value},zu(e,i,n),n}default:return n=I3(e,t),n}}function M1(e,t){let n=-1;const i=[];for(;++n<t.length;){const a=Vd(e,t[n]);i.push(a)}return i}function I3(e,t){const n=e.schema;e.schema=t.namespaceURI===qr.svg?Cr:aa;let i=-1;const a={};for(;++i<t.attrs.length;){const c=t.attrs[i],f=(c.prefix?c.prefix+":":"")+c.name;P1.call(w3,f)||(a[f]=c.value)}const l=(e.schema.space==="svg"?v3:_3)(t.tagName,a,M1(e,t.childNodes));if(zu(e,t,l),l.tagName==="template"){const c=t,f=c.sourceCodeLocation,p=f&&f.startTag&&Oi(f.startTag),T=f&&f.endTag&&Oi(f.endTag),E=Vd(e,c.content);p&&T&&e.file&&(E.position={start:p.end,end:T.start}),l.content=E}return e.schema=n,l}function zu(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const i=L3(e,n,t.sourceCodeLocation);i&&(e.location=!0,n.position=i)}}function L3(e,t,n){const i=Oi(n);if(t.type==="element"){const a=t.children[t.children.length-1];if(i&&!n.endTag&&a&&a.position&&a.position.end&&(i.end=Object.assign({},a.position.end)),e.verbose){const u={};let l;if(n.attrs)for(l in n.attrs)P1.call(n.attrs,l)&&(u[io(e.schema,l).property]=Oi(n.attrs[l]));n.startTag;const c=Oi(n.startTag),f=n.endTag?Oi(n.endTag):void 0,p={opening:c};f&&(p.closing=f),p.properties=u,t.data={position:p}}}return i}function Oi(e){const t=c0({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=c0({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function c0(e){return e.line&&e.column?e:void 0}const R3={},O3={}.hasOwnProperty,F1=h1("type",{handlers:{root:P3,element:U3,text:j3,comment:B3,doctype:F3}});function D3(e,t){const i=(t||R3).space;return F1(e,i==="svg"?Cr:aa)}function P3(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=qd(e.children,n,t),Hi(e,n),n}function M3(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=qd(e.children,n,t),Hi(e,n),n}function F3(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Hi(e,t),t}function j3(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Hi(e,t),t}function B3(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Hi(e,t),t}function U3(e,t){const n=t;let i=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=Cr);const a=[];let u;if(e.properties){for(u in e.properties)if(u!=="children"&&O3.call(e.properties,u)){const f=H3(i,u,e.properties[u]);f&&a.push(f)}}const l=i.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:qr[l],childNodes:[],parentNode:null};return c.childNodes=qd(e.children,c,i),Hi(e,c),e.tagName==="template"&&e.content&&(c.content=M3(e.content,i)),c}function H3(e,t,n){const i=io(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&i.boolean)return;Array.isArray(n)&&(n=i.commaSeparated?vg(n):Dg(n));const a={name:i.attribute,value:n===!0?"":String(n)};if(i.space&&i.space!=="html"&&i.space!=="svg"){const u=a.name.indexOf(":");u<0?a.prefix="":(a.name=a.name.slice(u+1),a.prefix=i.attribute.slice(0,u)),a.namespace=qr[i.space]}return a}function qd(e,t,n){let i=-1;const a=[];if(e)for(;++i<e.length;){const u=F1(e[i],n);u.parentNode=t,a.push(u)}return a}function Hi(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const z3=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],$3=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),nt="�";var N;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(N||(N={}));const Ut={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function j1(e){return e>=55296&&e<=57343}function W3(e){return e>=56320&&e<=57343}function Y3(e,t){return(e-55296)*1024+9216+t}function B1(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function U1(e){return e>=64976&&e<=65007||$3.has(e)}var Q;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(Q||(Q={}));const V3=65536;class q3{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=V3,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:i,col:a,offset:u}=this,l=a+n,c=u+n;return{code:t,startLine:i,endLine:i,startCol:l,endCol:l,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(W3(n))return this.pos++,this._addGap(),Y3(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,N.EOF;return this._err(Q.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let i=0;i<t.length;i++)if((this.html.charCodeAt(this.pos+i)|32)!==t.charCodeAt(i))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,N.EOF;const i=this.html.charCodeAt(n);return i===N.CARRIAGE_RETURN?N.LINE_FEED:i}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,N.EOF;let t=this.html.charCodeAt(this.pos);return t===N.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,N.LINE_FEED):t===N.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,j1(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===N.LINE_FEED||t===N.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){B1(t)?this._err(Q.controlCharacterInInputStream):U1(t)&&this._err(Q.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Fe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Fe||(Fe={}));function H1(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const Q3=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),G3=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function K3(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=G3.get(e))!==null&&t!==void 0?t:e}var Tt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Tt||(Tt={}));const X3=32;var xr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(xr||(xr={}));function nd(e){return e>=Tt.ZERO&&e<=Tt.NINE}function J3(e){return e>=Tt.UPPER_A&&e<=Tt.UPPER_F||e>=Tt.LOWER_A&&e<=Tt.LOWER_F}function Z3(e){return e>=Tt.UPPER_A&&e<=Tt.UPPER_Z||e>=Tt.LOWER_A&&e<=Tt.LOWER_Z||nd(e)}function ew(e){return e===Tt.EQUALS||Z3(e)}var Et;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Et||(Et={}));var $n;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})($n||($n={}));class tw{constructor(t,n,i){this.decodeTree=t,this.emitCodePoint=n,this.errors=i,this.state=Et.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=$n.Strict}startEntity(t){this.decodeMode=t,this.state=Et.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Et.EntityStart:return t.charCodeAt(n)===Tt.NUM?(this.state=Et.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Et.NamedEntity,this.stateNamedEntity(t,n));case Et.NumericStart:return this.stateNumericStart(t,n);case Et.NumericDecimal:return this.stateNumericDecimal(t,n);case Et.NumericHex:return this.stateNumericHex(t,n);case Et.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|X3)===Tt.LOWER_X?(this.state=Et.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Et.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,i,a){if(n!==i){const u=i-n;this.result=this.result*Math.pow(a,u)+Number.parseInt(t.substr(n,u),a),this.consumed+=u}}stateNumericHex(t,n){const i=n;for(;n<t.length;){const a=t.charCodeAt(n);if(nd(a)||J3(a))n+=1;else return this.addToNumericResult(t,i,n,16),this.emitNumericEntity(a,3)}return this.addToNumericResult(t,i,n,16),-1}stateNumericDecimal(t,n){const i=n;for(;n<t.length;){const a=t.charCodeAt(n);if(nd(a))n+=1;else return this.addToNumericResult(t,i,n,10),this.emitNumericEntity(a,2)}return this.addToNumericResult(t,i,n,10),-1}emitNumericEntity(t,n){var i;if(this.consumed<=n)return(i=this.errors)===null||i===void 0||i.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Tt.SEMI)this.consumed+=1;else if(this.decodeMode===$n.Strict)return 0;return this.emitCodePoint(K3(this.result),this.consumed),this.errors&&(t!==Tt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:i}=this;let a=i[this.treeIndex],u=(a&xr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const l=t.charCodeAt(n);if(this.treeIndex=nw(i,a,this.treeIndex+Math.max(1,u),l),this.treeIndex<0)return this.result===0||this.decodeMode===$n.Attribute&&(u===0||ew(l))?0:this.emitNotTerminatedNamedEntity();if(a=i[this.treeIndex],u=(a&xr.VALUE_LENGTH)>>14,u!==0){if(l===Tt.SEMI)return this.emitNamedEntityData(this.treeIndex,u,this.consumed+this.excess);this.decodeMode!==$n.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:i}=this,a=(i[n]&xr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,a,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,i){const{decodeTree:a}=this;return this.emitCodePoint(n===1?a[t]&~xr.VALUE_LENGTH:a[t+1],i),n===3&&this.emitCodePoint(a[t+2],i),i}end(){var t;switch(this.state){case Et.NamedEntity:return this.result!==0&&(this.decodeMode!==$n.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Et.NumericDecimal:return this.emitNumericEntity(0,2);case Et.NumericHex:return this.emitNumericEntity(0,3);case Et.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Et.EntityStart:return 0}}}function nw(e,t,n,i){const a=(t&xr.BRANCH_LENGTH)>>7,u=t&xr.JUMP_TABLE;if(a===0)return u!==0&&i===u?n:-1;if(u){const f=i-u;return f<0||f>=a?-1:e[n+f]-1}let l=n,c=l+a-1;for(;l<=c;){const f=l+c>>>1,p=e[f];if(p<i)l=f+1;else if(p>i)c=f-1;else return e[f+a]}return-1}var ne;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(ne||(ne={}));var Gr;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Gr||(Gr={}));var un;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(un||(un={}));var z;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(z||(z={}));var m;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(m||(m={}));const rw=new Map([[z.A,m.A],[z.ADDRESS,m.ADDRESS],[z.ANNOTATION_XML,m.ANNOTATION_XML],[z.APPLET,m.APPLET],[z.AREA,m.AREA],[z.ARTICLE,m.ARTICLE],[z.ASIDE,m.ASIDE],[z.B,m.B],[z.BASE,m.BASE],[z.BASEFONT,m.BASEFONT],[z.BGSOUND,m.BGSOUND],[z.BIG,m.BIG],[z.BLOCKQUOTE,m.BLOCKQUOTE],[z.BODY,m.BODY],[z.BR,m.BR],[z.BUTTON,m.BUTTON],[z.CAPTION,m.CAPTION],[z.CENTER,m.CENTER],[z.CODE,m.CODE],[z.COL,m.COL],[z.COLGROUP,m.COLGROUP],[z.DD,m.DD],[z.DESC,m.DESC],[z.DETAILS,m.DETAILS],[z.DIALOG,m.DIALOG],[z.DIR,m.DIR],[z.DIV,m.DIV],[z.DL,m.DL],[z.DT,m.DT],[z.EM,m.EM],[z.EMBED,m.EMBED],[z.FIELDSET,m.FIELDSET],[z.FIGCAPTION,m.FIGCAPTION],[z.FIGURE,m.FIGURE],[z.FONT,m.FONT],[z.FOOTER,m.FOOTER],[z.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[z.FORM,m.FORM],[z.FRAME,m.FRAME],[z.FRAMESET,m.FRAMESET],[z.H1,m.H1],[z.H2,m.H2],[z.H3,m.H3],[z.H4,m.H4],[z.H5,m.H5],[z.H6,m.H6],[z.HEAD,m.HEAD],[z.HEADER,m.HEADER],[z.HGROUP,m.HGROUP],[z.HR,m.HR],[z.HTML,m.HTML],[z.I,m.I],[z.IMG,m.IMG],[z.IMAGE,m.IMAGE],[z.INPUT,m.INPUT],[z.IFRAME,m.IFRAME],[z.KEYGEN,m.KEYGEN],[z.LABEL,m.LABEL],[z.LI,m.LI],[z.LINK,m.LINK],[z.LISTING,m.LISTING],[z.MAIN,m.MAIN],[z.MALIGNMARK,m.MALIGNMARK],[z.MARQUEE,m.MARQUEE],[z.MATH,m.MATH],[z.MENU,m.MENU],[z.META,m.META],[z.MGLYPH,m.MGLYPH],[z.MI,m.MI],[z.MO,m.MO],[z.MN,m.MN],[z.MS,m.MS],[z.MTEXT,m.MTEXT],[z.NAV,m.NAV],[z.NOBR,m.NOBR],[z.NOFRAMES,m.NOFRAMES],[z.NOEMBED,m.NOEMBED],[z.NOSCRIPT,m.NOSCRIPT],[z.OBJECT,m.OBJECT],[z.OL,m.OL],[z.OPTGROUP,m.OPTGROUP],[z.OPTION,m.OPTION],[z.P,m.P],[z.PARAM,m.PARAM],[z.PLAINTEXT,m.PLAINTEXT],[z.PRE,m.PRE],[z.RB,m.RB],[z.RP,m.RP],[z.RT,m.RT],[z.RTC,m.RTC],[z.RUBY,m.RUBY],[z.S,m.S],[z.SCRIPT,m.SCRIPT],[z.SEARCH,m.SEARCH],[z.SECTION,m.SECTION],[z.SELECT,m.SELECT],[z.SOURCE,m.SOURCE],[z.SMALL,m.SMALL],[z.SPAN,m.SPAN],[z.STRIKE,m.STRIKE],[z.STRONG,m.STRONG],[z.STYLE,m.STYLE],[z.SUB,m.SUB],[z.SUMMARY,m.SUMMARY],[z.SUP,m.SUP],[z.TABLE,m.TABLE],[z.TBODY,m.TBODY],[z.TEMPLATE,m.TEMPLATE],[z.TEXTAREA,m.TEXTAREA],[z.TFOOT,m.TFOOT],[z.TD,m.TD],[z.TH,m.TH],[z.THEAD,m.THEAD],[z.TITLE,m.TITLE],[z.TR,m.TR],[z.TRACK,m.TRACK],[z.TT,m.TT],[z.U,m.U],[z.UL,m.UL],[z.SVG,m.SVG],[z.VAR,m.VAR],[z.WBR,m.WBR],[z.XMP,m.XMP]]);function zi(e){var t;return(t=rw.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const se=m,iw={[ne.HTML]:new Set([se.ADDRESS,se.APPLET,se.AREA,se.ARTICLE,se.ASIDE,se.BASE,se.BASEFONT,se.BGSOUND,se.BLOCKQUOTE,se.BODY,se.BR,se.BUTTON,se.CAPTION,se.CENTER,se.COL,se.COLGROUP,se.DD,se.DETAILS,se.DIR,se.DIV,se.DL,se.DT,se.EMBED,se.FIELDSET,se.FIGCAPTION,se.FIGURE,se.FOOTER,se.FORM,se.FRAME,se.FRAMESET,se.H1,se.H2,se.H3,se.H4,se.H5,se.H6,se.HEAD,se.HEADER,se.HGROUP,se.HR,se.HTML,se.IFRAME,se.IMG,se.INPUT,se.LI,se.LINK,se.LISTING,se.MAIN,se.MARQUEE,se.MENU,se.META,se.NAV,se.NOEMBED,se.NOFRAMES,se.NOSCRIPT,se.OBJECT,se.OL,se.P,se.PARAM,se.PLAINTEXT,se.PRE,se.SCRIPT,se.SECTION,se.SELECT,se.SOURCE,se.STYLE,se.SUMMARY,se.TABLE,se.TBODY,se.TD,se.TEMPLATE,se.TEXTAREA,se.TFOOT,se.TH,se.THEAD,se.TITLE,se.TR,se.TRACK,se.UL,se.WBR,se.XMP]),[ne.MATHML]:new Set([se.MI,se.MO,se.MN,se.MS,se.MTEXT,se.ANNOTATION_XML]),[ne.SVG]:new Set([se.TITLE,se.FOREIGN_OBJECT,se.DESC]),[ne.XLINK]:new Set,[ne.XML]:new Set,[ne.XMLNS]:new Set},rd=new Set([se.H1,se.H2,se.H3,se.H4,se.H5,se.H6]);z.STYLE,z.SCRIPT,z.XMP,z.IFRAME,z.NOEMBED,z.NOFRAMES,z.PLAINTEXT;var w;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(w||(w={}));const lt={DATA:w.DATA,RCDATA:w.RCDATA,RAWTEXT:w.RAWTEXT,SCRIPT_DATA:w.SCRIPT_DATA,PLAINTEXT:w.PLAINTEXT,CDATA_SECTION:w.CDATA_SECTION};function sw(e){return e>=N.DIGIT_0&&e<=N.DIGIT_9}function Hs(e){return e>=N.LATIN_CAPITAL_A&&e<=N.LATIN_CAPITAL_Z}function aw(e){return e>=N.LATIN_SMALL_A&&e<=N.LATIN_SMALL_Z}function gr(e){return aw(e)||Hs(e)}function d0(e){return gr(e)||sw(e)}function Lu(e){return e+32}function z1(e){return e===N.SPACE||e===N.LINE_FEED||e===N.TABULATION||e===N.FORM_FEED}function f0(e){return z1(e)||e===N.SOLIDUS||e===N.GREATER_THAN_SIGN}function uw(e){return e===N.NULL?Q.nullCharacterReference:e>1114111?Q.characterReferenceOutsideUnicodeRange:j1(e)?Q.surrogateCharacterReference:U1(e)?Q.noncharacterCharacterReference:B1(e)||e===N.CARRIAGE_RETURN?Q.controlCharacterReference:null}class ow{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=w.DATA,this.returnState=w.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new q3(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new tw(Q3,(i,a)=>{this.preprocessor.pos=this.entityStartPos+a-1,this._flushCodePointConsumedAsCharacterReference(i)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Q.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:i=>{this._err(Q.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+i)},validateNumericCharacterReference:i=>{const a=uw(i);a&&this._err(a,1)}}:void 0)}_err(t,n=0){var i,a;(a=(i=this.handler).onParseError)===null||a===void 0||a.call(i,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,i){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||i==null||i()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Fe.START_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Fe.END_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Fe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Fe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const i=this.currentToken;if(H1(i,this.currentAttr.name)===null){if(i.attrs.push(this.currentAttr),i.location&&this.currentLocation){const a=(t=(n=i.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);a[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(Q.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=zi(t.tagName),t.type===Fe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(Q.endTagWithAttributes),t.selfClosing&&this._err(Q.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Fe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Fe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Fe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Fe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=z1(t)?Fe.WHITESPACE_CHARACTER:t===N.NULL?Fe.NULL_CHARACTER:Fe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Fe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=w.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?$n.Attribute:$n.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===w.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===w.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===w.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case w.DATA:{this._stateData(t);break}case w.RCDATA:{this._stateRcdata(t);break}case w.RAWTEXT:{this._stateRawtext(t);break}case w.SCRIPT_DATA:{this._stateScriptData(t);break}case w.PLAINTEXT:{this._statePlaintext(t);break}case w.TAG_OPEN:{this._stateTagOpen(t);break}case w.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case w.TAG_NAME:{this._stateTagName(t);break}case w.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case w.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case w.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case w.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case w.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case w.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case w.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case w.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case w.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case w.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case w.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case w.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case w.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case w.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case w.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case w.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case w.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case w.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case w.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case w.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case w.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case w.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case w.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case w.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case w.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case w.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case w.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case w.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case w.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case w.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case w.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case w.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case w.BOGUS_COMMENT:{this._stateBogusComment(t);break}case w.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case w.COMMENT_START:{this._stateCommentStart(t);break}case w.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case w.COMMENT:{this._stateComment(t);break}case w.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case w.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case w.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case w.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case w.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case w.COMMENT_END:{this._stateCommentEnd(t);break}case w.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case w.DOCTYPE:{this._stateDoctype(t);break}case w.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case w.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case w.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case w.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case w.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case w.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case w.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case w.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case w.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case w.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case w.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case w.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case w.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case w.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case w.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case w.CDATA_SECTION:{this._stateCdataSection(t);break}case w.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case w.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case w.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case w.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=w.TAG_OPEN;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this._emitCodePoint(t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case N.AMPERSAND:{this._startCharacterReference();break}case N.LESS_THAN_SIGN:{this.state=w.RCDATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(nt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case N.LESS_THAN_SIGN:{this.state=w.RAWTEXT_LESS_THAN_SIGN;break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(nt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=w.SCRIPT_DATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(nt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case N.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(nt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(gr(t))this._createStartTagToken(),this.state=w.TAG_NAME,this._stateTagName(t);else switch(t){case N.EXCLAMATION_MARK:{this.state=w.MARKUP_DECLARATION_OPEN;break}case N.SOLIDUS:{this.state=w.END_TAG_OPEN;break}case N.QUESTION_MARK:{this._err(Q.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=w.BOGUS_COMMENT,this._stateBogusComment(t);break}case N.EOF:{this._err(Q.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Q.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=w.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(gr(t))this._createEndTagToken(),this.state=w.TAG_NAME,this._stateTagName(t);else switch(t){case N.GREATER_THAN_SIGN:{this._err(Q.missingEndTagName),this.state=w.DATA;break}case N.EOF:{this._err(Q.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(Q.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=w.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=w.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this.state=w.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this.state=w.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(Q.unexpectedNullCharacter),n.tagName+=nt;break}case N.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Hs(t)?Lu(t):t)}}_stateRcdataLessThanSign(t){t===N.SOLIDUS?this.state=w.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=w.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){gr(t)?(this.state=w.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=w.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=w.BEFORE_ATTRIBUTE_NAME,!1;case N.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=w.SELF_CLOSING_START_TAG,!1;case N.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=w.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=w.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===N.SOLIDUS?this.state=w.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=w.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){gr(t)?(this.state=w.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=w.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=w.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case N.SOLIDUS:{this.state=w.SCRIPT_DATA_END_TAG_OPEN;break}case N.EXCLAMATION_MARK:{this.state=w.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=w.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){gr(t)?(this.state=w.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=w.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=w.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===N.HYPHEN_MINUS?(this.state=w.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=w.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===N.HYPHEN_MINUS?(this.state=w.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=w.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=w.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=w.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(nt);break}case N.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=w.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=w.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this.state=w.SCRIPT_DATA_ESCAPED,this._emitChars(nt);break}case N.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=w.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=w.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.GREATER_THAN_SIGN:{this.state=w.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this.state=w.SCRIPT_DATA_ESCAPED,this._emitChars(nt);break}case N.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=w.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===N.SOLIDUS?this.state=w.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:gr(t)?(this._emitChars("<"),this.state=w.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=w.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){gr(t)?(this.state=w.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=w.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=w.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Ut.SCRIPT,!1)&&f0(this.preprocessor.peek(Ut.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ut.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=w.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(nt);break}case N.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(nt);break}case N.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.GREATER_THAN_SIGN:{this.state=w.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(nt);break}case N.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===N.SOLIDUS?(this.state=w.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Ut.SCRIPT,!1)&&f0(this.preprocessor.peek(Ut.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ut.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=w.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this.state=w.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._err(Q.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=w.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=w.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this._leaveAttrName(),this.state=w.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._leaveAttrName(),this.state=w.BEFORE_ATTRIBUTE_VALUE;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:{this._err(Q.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.name+=nt;break}default:this.currentAttr.name+=String.fromCodePoint(Hs(t)?Lu(t):t)}}_stateAfterAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:{this.state=w.SELF_CLOSING_START_TAG;break}case N.EQUALS_SIGN:{this.state=w.BEFORE_ATTRIBUTE_VALUE;break}case N.GREATER_THAN_SIGN:{this.state=w.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=w.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{this.state=w.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this.state=w.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(Q.missingAttributeValue),this.state=w.DATA,this.emitCurrentTagToken();break}default:this.state=w.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case N.QUOTATION_MARK:{this.state=w.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=nt;break}case N.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case N.APOSTROPHE:{this.state=w.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=nt;break}case N.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=w.BEFORE_ATTRIBUTE_NAME;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=w.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=nt;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:case N.EQUALS_SIGN:case N.GRAVE_ACCENT:{this._err(Q.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case N.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=w.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this._leaveAttrValue(),this.state=w.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=w.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this._err(Q.missingWhitespaceBetweenAttributes),this.state=w.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case N.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=w.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this._err(Q.unexpectedSolidusInTag),this.state=w.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=w.DATA,this.emitCurrentComment(n);break}case N.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case N.NULL:{this._err(Q.unexpectedNullCharacter),n.data+=nt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Ut.DASH_DASH,!0)?(this._createCommentToken(Ut.DASH_DASH.length+1),this.state=w.COMMENT_START):this._consumeSequenceIfMatch(Ut.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ut.DOCTYPE.length+1),this.state=w.DOCTYPE):this._consumeSequenceIfMatch(Ut.CDATA_START,!0)?this.inForeignNode?this.state=w.CDATA_SECTION:(this._err(Q.cdataInHtmlContent),this._createCommentToken(Ut.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=w.BOGUS_COMMENT):this._ensureHibernation()||(this._err(Q.incorrectlyOpenedComment),this._createCommentToken(2),this.state=w.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case N.HYPHEN_MINUS:{this.state=w.COMMENT_START_DASH;break}case N.GREATER_THAN_SIGN:{this._err(Q.abruptClosingOfEmptyComment),this.state=w.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=w.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=w.COMMENT_END;break}case N.GREATER_THAN_SIGN:{this._err(Q.abruptClosingOfEmptyComment),this.state=w.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=w.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=w.COMMENT_END_DASH;break}case N.LESS_THAN_SIGN:{n.data+="<",this.state=w.COMMENT_LESS_THAN_SIGN;break}case N.NULL:{this._err(Q.unexpectedNullCharacter),n.data+=nt;break}case N.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case N.EXCLAMATION_MARK:{n.data+="!",this.state=w.COMMENT_LESS_THAN_SIGN_BANG;break}case N.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=w.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===N.HYPHEN_MINUS?this.state=w.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=w.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===N.HYPHEN_MINUS?this.state=w.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=w.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==N.GREATER_THAN_SIGN&&t!==N.EOF&&this._err(Q.nestedComment),this.state=w.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=w.COMMENT_END;break}case N.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=w.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=w.DATA,this.emitCurrentComment(n);break}case N.EXCLAMATION_MARK:{this.state=w.COMMENT_END_BANG;break}case N.HYPHEN_MINUS:{n.data+="-";break}case N.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=w.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{n.data+="--!",this.state=w.COMMENT_END_DASH;break}case N.GREATER_THAN_SIGN:{this._err(Q.incorrectlyClosedComment),this.state=w.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=w.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=w.BEFORE_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=w.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case N.EOF:{this._err(Q.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingWhitespaceBeforeDoctypeName),this.state=w.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Hs(t))this._createDoctypeToken(String.fromCharCode(Lu(t))),this.state=w.DOCTYPE_NAME;else switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.NULL:{this._err(Q.unexpectedNullCharacter),this._createDoctypeToken(nt),this.state=w.DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this._err(Q.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=w.DATA;break}case N.EOF:{this._err(Q.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=w.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=w.AFTER_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=w.DATA,this.emitCurrentDoctype(n);break}case N.NULL:{this._err(Q.unexpectedNullCharacter),n.name+=nt;break}case N.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Hs(t)?Lu(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.state=w.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Ut.PUBLIC,!1)?this.state=w.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ut.SYSTEM,!1)?this.state=w.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(Q.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=w.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=w.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(Q.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=w.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(Q.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=w.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(Q.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=w.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=w.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.publicId="",this.state=w.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.publicId="",this.state=w.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(Q.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=w.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=w.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=w.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(Q.unexpectedNullCharacter),n.publicId+=nt;break}case N.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=w.DATA;break}case N.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case N.APOSTROPHE:{this.state=w.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(Q.unexpectedNullCharacter),n.publicId+=nt;break}case N.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=w.DATA;break}case N.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=w.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case N.GREATER_THAN_SIGN:{this.state=w.DATA,this.emitCurrentDoctype(n);break}case N.QUOTATION_MARK:{this._err(Q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=w.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(Q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=w.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=w.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=w.DATA;break}case N.QUOTATION_MARK:{n.systemId="",this.state=w.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=w.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=w.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=w.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(Q.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=w.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(Q.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=w.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(Q.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=w.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=w.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.systemId="",this.state=w.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=w.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(Q.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=w.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=w.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=w.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(Q.unexpectedNullCharacter),n.systemId+=nt;break}case N.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=w.DATA;break}case N.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case N.APOSTROPHE:{this.state=w.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(Q.unexpectedNullCharacter),n.systemId+=nt;break}case N.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=w.DATA;break}case N.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=w.DATA;break}case N.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=w.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=w.DATA;break}case N.NULL:{this._err(Q.unexpectedNullCharacter);break}case N.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case N.RIGHT_SQUARE_BRACKET:{this.state=w.CDATA_SECTION_BRACKET;break}case N.EOF:{this._err(Q.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===N.RIGHT_SQUARE_BRACKET?this.state=w.CDATA_SECTION_END:(this._emitChars("]"),this.state=w.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case N.GREATER_THAN_SIGN:{this.state=w.DATA;break}case N.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=w.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(N.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&d0(this.preprocessor.peek(1))?w.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){d0(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===N.SEMICOLON&&this._err(Q.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const $1=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),h0=new Set([...$1,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),Gu=new Set([m.APPLET,m.CAPTION,m.HTML,m.MARQUEE,m.OBJECT,m.TABLE,m.TD,m.TEMPLATE,m.TH]),lw=new Set([...Gu,m.OL,m.UL]),cw=new Set([...Gu,m.BUTTON]),p0=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),m0=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),dw=new Set([m.TR,m.TEMPLATE,m.HTML]),fw=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),hw=new Set([m.TABLE,m.TEMPLATE,m.HTML]),pw=new Set([m.TD,m.TH]);class mw{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,i){this.treeAdapter=n,this.handler=i,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=m.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===m.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ne.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const i=this._indexOf(t);this.items[i]=n,i===this.stackTop&&(this.current=n)}insertAfter(t,n,i){const a=this._indexOf(t)+1;this.items.splice(a,0,n),this.tagIDs.splice(a,0,i),this.stackTop++,a===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,a===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==ne.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const i=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(i,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(rd,ne.HTML)}popUntilTableCellPopped(){this.popUntilPopped(pw,ne.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let i=this.stackTop;i>=0;i--)if(t.has(this.tagIDs[i])&&this.treeAdapter.getNamespaceURI(this.items[i])===n)return i;return-1}clearBackTo(t,n){const i=this._indexOfTagNames(t,n);this.shortenToLength(i+1)}clearBackToTableContext(){this.clearBackTo(hw,ne.HTML)}clearBackToTableBodyContext(){this.clearBackTo(fw,ne.HTML)}clearBackToTableRowContext(){this.clearBackTo(dw,ne.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===m.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===m.HTML}hasInDynamicScope(t,n){for(let i=this.stackTop;i>=0;i--){const a=this.tagIDs[i];switch(this.treeAdapter.getNamespaceURI(this.items[i])){case ne.HTML:{if(a===t)return!0;if(n.has(a))return!1;break}case ne.SVG:{if(m0.has(a))return!1;break}case ne.MATHML:{if(p0.has(a))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Gu)}hasInListItemScope(t){return this.hasInDynamicScope(t,lw)}hasInButtonScope(t){return this.hasInDynamicScope(t,cw)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ne.HTML:{if(rd.has(n))return!0;if(Gu.has(n))return!1;break}case ne.SVG:{if(m0.has(n))return!1;break}case ne.MATHML:{if(p0.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ne.HTML)switch(this.tagIDs[n]){case t:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ne.HTML)switch(this.tagIDs[t]){case m.TBODY:case m.THEAD:case m.TFOOT:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ne.HTML)switch(this.tagIDs[n]){case t:return!0;case m.OPTION:case m.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&$1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&h0.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&h0.has(this.currentTagId);)this.pop()}}const Ac=3;var In;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(In||(In={}));const g0={type:In.Marker};class gw{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const i=[],a=n.length,u=this.treeAdapter.getTagName(t),l=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const f=this.entries[c];if(f.type===In.Marker)break;const{element:p}=f;if(this.treeAdapter.getTagName(p)===u&&this.treeAdapter.getNamespaceURI(p)===l){const T=this.treeAdapter.getAttrList(p);T.length===a&&i.push({idx:c,attrs:T})}}return i}_ensureNoahArkCondition(t){if(this.entries.length<Ac)return;const n=this.treeAdapter.getAttrList(t),i=this._getNoahArkConditionCandidates(t,n);if(i.length<Ac)return;const a=new Map(n.map(l=>[l.name,l.value]));let u=0;for(let l=0;l<i.length;l++){const c=i[l];c.attrs.every(f=>a.get(f.name)===f.value)&&(u+=1,u>=Ac&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(g0)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:In.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const i=this.entries.indexOf(this.bookmark);this.entries.splice(i,0,{type:In.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(g0);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(i=>i.type===In.Marker||this.treeAdapter.getTagName(i.element)===t);return n&&n.type===In.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===In.Element&&n.element===t)}}const Er={createDocument(){return{nodeName:"#document",mode:un.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const i=e.childNodes.indexOf(n);e.childNodes.splice(i,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,i){const a=e.childNodes.find(u=>u.nodeName==="#documentType");if(a)a.name=t,a.publicId=n,a.systemId=i;else{const u={nodeName:"#documentType",name:t,publicId:n,systemId:i,parentNode:null};Er.appendChild(e,u)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Er.isTextNode(n)){n.value+=t;return}}Er.appendChild(e,Er.createTextNode(t))},insertTextBefore(e,t,n){const i=e.childNodes[e.childNodes.indexOf(n)-1];i&&Er.isTextNode(i)?i.value+=t:Er.insertBefore(e,Er.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(i=>i.name));for(let i=0;i<t.length;i++)n.has(t[i].name)||e.attrs.push(t[i])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},W1="html",Ew="about:legacy-compat",Tw="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Y1=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],yw=[...Y1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],xw=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),V1=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],bw=[...V1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function E0(e,t){return t.some(n=>e.startsWith(n))}function kw(e){return e.name===W1&&e.publicId===null&&(e.systemId===null||e.systemId===Ew)}function Cw(e){if(e.name!==W1)return un.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Tw)return un.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),xw.has(n))return un.QUIRKS;let i=t===null?yw:Y1;if(E0(n,i))return un.QUIRKS;if(i=t===null?V1:bw,E0(n,i))return un.LIMITED_QUIRKS}return un.NO_QUIRKS}const T0={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Sw="definitionurl",_w="definitionURL",vw=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),Nw=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ne.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ne.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ne.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ne.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ne.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ne.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ne.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ne.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ne.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ne.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ne.XMLNS}]]),ww=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),Aw=new Set([m.B,m.BIG,m.BLOCKQUOTE,m.BODY,m.BR,m.CENTER,m.CODE,m.DD,m.DIV,m.DL,m.DT,m.EM,m.EMBED,m.H1,m.H2,m.H3,m.H4,m.H5,m.H6,m.HEAD,m.HR,m.I,m.IMG,m.LI,m.LISTING,m.MENU,m.META,m.NOBR,m.OL,m.P,m.PRE,m.RUBY,m.S,m.SMALL,m.SPAN,m.STRONG,m.STRIKE,m.SUB,m.SUP,m.TABLE,m.TT,m.U,m.UL,m.VAR]);function Iw(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:i})=>i===Gr.COLOR||i===Gr.SIZE||i===Gr.FACE)||Aw.has(t)}function q1(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Sw){e.attrs[t].name=_w;break}}function Q1(e){for(let t=0;t<e.attrs.length;t++){const n=vw.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Qd(e){for(let t=0;t<e.attrs.length;t++){const n=Nw.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Lw(e){const t=ww.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=zi(e.tagName))}function Rw(e,t){return t===ne.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function Ow(e,t,n){if(t===ne.MATHML&&e===m.ANNOTATION_XML){for(let i=0;i<n.length;i++)if(n[i].name===Gr.ENCODING){const a=n[i].value.toLowerCase();return a===T0.TEXT_HTML||a===T0.APPLICATION_XML}}return t===ne.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function Dw(e,t,n,i){return(!i||i===ne.HTML)&&Ow(e,t,n)||(!i||i===ne.MATHML)&&Rw(e,t)}const Pw="hidden",Mw=8,Fw=3;var O;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(O||(O={}));const jw={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},G1=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),y0={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Er,onParseError:null};class x0{constructor(t,n,i=null,a=null){this.fragmentContext=i,this.scriptHandler=a,this.currentToken=null,this.stopped=!1,this.insertionMode=O.INITIAL,this.originalInsertionMode=O.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...y0,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new ow(this.options,this),this.activeFormattingElements=new gw(this.treeAdapter),this.fragmentContextID=i?zi(this.treeAdapter.getTagName(i)):m.UNKNOWN,this._setContextModes(i??this.document,this.fragmentContextID),this.openElements=new mw(this.document,this.treeAdapter,this)}static parse(t,n){const i=new this(n);return i.tokenizer.write(t,!0),i.document}static getFragmentParser(t,n){const i={...y0,...n};t??(t=i.treeAdapter.createElement(z.TEMPLATE,ne.HTML,[]));const a=i.treeAdapter.createElement("documentmock",ne.HTML,[]),u=new this(i,a,t);return u.fragmentContextID===m.TEMPLATE&&u.tmplInsertionModeStack.unshift(O.IN_TEMPLATE),u._initTokenizerForFragmentParsing(),u._insertFakeRootElement(),u._resetInsertionMode(),u._findFormInFragmentContext(),u}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,i){var a;if(!this.onParseError)return;const u=(a=t.location)!==null&&a!==void 0?a:jw,l={code:n,startLine:u.startLine,startCol:u.startCol,startOffset:u.startOffset,endLine:i?u.startLine:u.endLine,endCol:i?u.startCol:u.endCol,endOffset:i?u.startOffset:u.endOffset};this.onParseError(l)}onItemPush(t,n,i){var a,u;(u=(a=this.treeAdapter).onItemPush)===null||u===void 0||u.call(a,t),i&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var i,a;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(a=(i=this.treeAdapter).onItemPop)===null||a===void 0||a.call(i,t,this.openElements.current),n){let u,l;this.openElements.stackTop===0&&this.fragmentContext?(u=this.fragmentContext,l=this.fragmentContextID):{current:u,currentTagId:l}=this.openElements,this._setContextModes(u,l)}}_setContextModes(t,n){const i=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===ne.HTML;this.currentNotInHTML=!i,this.tokenizer.inForeignNode=!i&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ne.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=O.TEXT}switchToPlaintextParsing(){this.insertionMode=O.TEXT,this.originalInsertionMode=O.IN_BODY,this.tokenizer.state=lt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===z.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ne.HTML))switch(this.fragmentContextID){case m.TITLE:case m.TEXTAREA:{this.tokenizer.state=lt.RCDATA;break}case m.STYLE:case m.XMP:case m.IFRAME:case m.NOEMBED:case m.NOFRAMES:case m.NOSCRIPT:{this.tokenizer.state=lt.RAWTEXT;break}case m.SCRIPT:{this.tokenizer.state=lt.SCRIPT_DATA;break}case m.PLAINTEXT:{this.tokenizer.state=lt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",i=t.publicId||"",a=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,i,a),t.location){const l=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));l&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const i=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,i)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const i=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(i??this.document,t)}}_appendElement(t,n){const i=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(i,t.location)}_insertElement(t,n){const i=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(i,t.location),this.openElements.push(i,t.tagID)}_insertFakeElement(t,n){const i=this.treeAdapter.createElement(t,ne.HTML,[]);this._attachElementToTree(i,null),this.openElements.push(i,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ne.HTML,t.attrs),i=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,i),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(z.HTML,ne.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,m.HTML)}_appendCommentNode(t,n){const i=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,i),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}_insertCharacters(t){let n,i;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:i}=this._findFosterParentingLocation(),i?this.treeAdapter.insertTextBefore(n,t.chars,i):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const a=this.treeAdapter.getChildNodes(n),u=i?a.lastIndexOf(i):a.length,l=a[u-1];if(this.treeAdapter.getNodeSourceCodeLocation(l)){const{endLine:f,endCol:p,endOffset:T}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(l,{endLine:f,endCol:p,endOffset:T})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}_adoptNodes(t,n){for(let i=this.treeAdapter.getFirstChild(t);i;i=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(i),this.treeAdapter.appendChild(n,i)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const i=n.location,a=this.treeAdapter.getTagName(t),u=n.type===Fe.END_TAG&&a===n.tagName?{endTag:{...i},endLine:i.endLine,endCol:i.endCol,endOffset:i.endOffset}:{endLine:i.startLine,endCol:i.startCol,endOffset:i.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,u)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,i;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,i=this.fragmentContextID):{current:n,currentTagId:i}=this.openElements,t.tagID===m.SVG&&this.treeAdapter.getTagName(n)===z.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ne.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===m.MGLYPH||t.tagID===m.MALIGNMARK)&&i!==void 0&&!this._isIntegrationPoint(i,n,ne.HTML)}_processToken(t){switch(t.type){case Fe.CHARACTER:{this.onCharacter(t);break}case Fe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Fe.COMMENT:{this.onComment(t);break}case Fe.DOCTYPE:{this.onDoctype(t);break}case Fe.START_TAG:{this._processStartTag(t);break}case Fe.END_TAG:{this.onEndTag(t);break}case Fe.EOF:{this.onEof(t);break}case Fe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,i){const a=this.treeAdapter.getNamespaceURI(n),u=this.treeAdapter.getAttrList(n);return Dw(t,a,u,i)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(a=>a.type===In.Marker||this.openElements.contains(a.element)),i=n===-1?t-1:n-1;for(let a=i;a>=0;a--){const u=this.activeFormattingElements.entries[a];this._insertElement(u.token,this.treeAdapter.getNamespaceURI(u.element)),u.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=O.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(m.P),this.openElements.popUntilTagNamePopped(m.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case m.TR:{this.insertionMode=O.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=O.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=O.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=O.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=O.IN_TABLE;return}case m.BODY:{this.insertionMode=O.IN_BODY;return}case m.FRAMESET:{this.insertionMode=O.IN_FRAMESET;return}case m.SELECT:{this._resetInsertionModeForSelect(t);return}case m.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case m.HTML:{this.insertionMode=this.headElement?O.AFTER_HEAD:O.BEFORE_HEAD;return}case m.TD:case m.TH:{if(t>0){this.insertionMode=O.IN_CELL;return}break}case m.HEAD:{if(t>0){this.insertionMode=O.IN_HEAD;return}break}}this.insertionMode=O.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const i=this.openElements.tagIDs[n];if(i===m.TEMPLATE)break;if(i===m.TABLE){this.insertionMode=O.IN_SELECT_IN_TABLE;return}}this.insertionMode=O.IN_SELECT}_isElementCausesFosterParenting(t){return G1.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case m.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===ne.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case m.TABLE:{const i=this.treeAdapter.getParentNode(n);return i?{parent:i,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const i=this.treeAdapter.getNamespaceURI(t);return iw[i].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){pI(this,t);return}switch(this.insertionMode){case O.INITIAL:{js(this,t);break}case O.BEFORE_HTML:{Ys(this,t);break}case O.BEFORE_HEAD:{Vs(this,t);break}case O.IN_HEAD:{qs(this,t);break}case O.IN_HEAD_NO_SCRIPT:{Qs(this,t);break}case O.AFTER_HEAD:{Gs(this,t);break}case O.IN_BODY:case O.IN_CAPTION:case O.IN_CELL:case O.IN_TEMPLATE:{X1(this,t);break}case O.TEXT:case O.IN_SELECT:case O.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case O.IN_TABLE:case O.IN_TABLE_BODY:case O.IN_ROW:{Ic(this,t);break}case O.IN_TABLE_TEXT:{rE(this,t);break}case O.IN_COLUMN_GROUP:{Ku(this,t);break}case O.AFTER_BODY:{Xu(this,t);break}case O.AFTER_AFTER_BODY:{$u(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){hI(this,t);return}switch(this.insertionMode){case O.INITIAL:{js(this,t);break}case O.BEFORE_HTML:{Ys(this,t);break}case O.BEFORE_HEAD:{Vs(this,t);break}case O.IN_HEAD:{qs(this,t);break}case O.IN_HEAD_NO_SCRIPT:{Qs(this,t);break}case O.AFTER_HEAD:{Gs(this,t);break}case O.TEXT:{this._insertCharacters(t);break}case O.IN_TABLE:case O.IN_TABLE_BODY:case O.IN_ROW:{Ic(this,t);break}case O.IN_COLUMN_GROUP:{Ku(this,t);break}case O.AFTER_BODY:{Xu(this,t);break}case O.AFTER_AFTER_BODY:{$u(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){id(this,t);return}switch(this.insertionMode){case O.INITIAL:case O.BEFORE_HTML:case O.BEFORE_HEAD:case O.IN_HEAD:case O.IN_HEAD_NO_SCRIPT:case O.AFTER_HEAD:case O.IN_BODY:case O.IN_TABLE:case O.IN_CAPTION:case O.IN_COLUMN_GROUP:case O.IN_TABLE_BODY:case O.IN_ROW:case O.IN_CELL:case O.IN_SELECT:case O.IN_SELECT_IN_TABLE:case O.IN_TEMPLATE:case O.IN_FRAMESET:case O.AFTER_FRAMESET:{id(this,t);break}case O.IN_TABLE_TEXT:{Bs(this,t);break}case O.AFTER_BODY:{Yw(this,t);break}case O.AFTER_AFTER_BODY:case O.AFTER_AFTER_FRAMESET:{Vw(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case O.INITIAL:{qw(this,t);break}case O.BEFORE_HEAD:case O.IN_HEAD:case O.IN_HEAD_NO_SCRIPT:case O.AFTER_HEAD:{this._err(t,Q.misplacedDoctype);break}case O.IN_TABLE_TEXT:{Bs(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,Q.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?mI(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case O.INITIAL:{js(this,t);break}case O.BEFORE_HTML:{Qw(this,t);break}case O.BEFORE_HEAD:{Kw(this,t);break}case O.IN_HEAD:{kn(this,t);break}case O.IN_HEAD_NO_SCRIPT:{Zw(this,t);break}case O.AFTER_HEAD:{tA(this,t);break}case O.IN_BODY:{It(this,t);break}case O.IN_TABLE:{Mi(this,t);break}case O.IN_TABLE_TEXT:{Bs(this,t);break}case O.IN_CAPTION:{XA(this,t);break}case O.IN_COLUMN_GROUP:{Xd(this,t);break}case O.IN_TABLE_BODY:{mo(this,t);break}case O.IN_ROW:{go(this,t);break}case O.IN_CELL:{eI(this,t);break}case O.IN_SELECT:{aE(this,t);break}case O.IN_SELECT_IN_TABLE:{nI(this,t);break}case O.IN_TEMPLATE:{iI(this,t);break}case O.AFTER_BODY:{aI(this,t);break}case O.IN_FRAMESET:{uI(this,t);break}case O.AFTER_FRAMESET:{lI(this,t);break}case O.AFTER_AFTER_BODY:{dI(this,t);break}case O.AFTER_AFTER_FRAMESET:{fI(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?gI(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case O.INITIAL:{js(this,t);break}case O.BEFORE_HTML:{Gw(this,t);break}case O.BEFORE_HEAD:{Xw(this,t);break}case O.IN_HEAD:{Jw(this,t);break}case O.IN_HEAD_NO_SCRIPT:{eA(this,t);break}case O.AFTER_HEAD:{nA(this,t);break}case O.IN_BODY:{po(this,t);break}case O.TEXT:{HA(this,t);break}case O.IN_TABLE:{ta(this,t);break}case O.IN_TABLE_TEXT:{Bs(this,t);break}case O.IN_CAPTION:{JA(this,t);break}case O.IN_COLUMN_GROUP:{ZA(this,t);break}case O.IN_TABLE_BODY:{sd(this,t);break}case O.IN_ROW:{sE(this,t);break}case O.IN_CELL:{tI(this,t);break}case O.IN_SELECT:{uE(this,t);break}case O.IN_SELECT_IN_TABLE:{rI(this,t);break}case O.IN_TEMPLATE:{sI(this,t);break}case O.AFTER_BODY:{lE(this,t);break}case O.IN_FRAMESET:{oI(this,t);break}case O.AFTER_FRAMESET:{cI(this,t);break}case O.AFTER_AFTER_BODY:{$u(this,t);break}}}onEof(t){switch(this.insertionMode){case O.INITIAL:{js(this,t);break}case O.BEFORE_HTML:{Ys(this,t);break}case O.BEFORE_HEAD:{Vs(this,t);break}case O.IN_HEAD:{qs(this,t);break}case O.IN_HEAD_NO_SCRIPT:{Qs(this,t);break}case O.AFTER_HEAD:{Gs(this,t);break}case O.IN_BODY:case O.IN_TABLE:case O.IN_CAPTION:case O.IN_COLUMN_GROUP:case O.IN_TABLE_BODY:case O.IN_ROW:case O.IN_CELL:case O.IN_SELECT:case O.IN_SELECT_IN_TABLE:{tE(this,t);break}case O.TEXT:{zA(this,t);break}case O.IN_TABLE_TEXT:{Bs(this,t);break}case O.IN_TEMPLATE:{oE(this,t);break}case O.AFTER_BODY:case O.IN_FRAMESET:case O.AFTER_FRAMESET:case O.AFTER_AFTER_BODY:case O.AFTER_AFTER_FRAMESET:{Kd(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===N.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case O.IN_HEAD:case O.IN_HEAD_NO_SCRIPT:case O.AFTER_HEAD:case O.TEXT:case O.IN_COLUMN_GROUP:case O.IN_SELECT:case O.IN_SELECT_IN_TABLE:case O.IN_FRAMESET:case O.AFTER_FRAMESET:{this._insertCharacters(t);break}case O.IN_BODY:case O.IN_CAPTION:case O.IN_CELL:case O.IN_TEMPLATE:case O.AFTER_BODY:case O.AFTER_AFTER_BODY:case O.AFTER_AFTER_FRAMESET:{K1(this,t);break}case O.IN_TABLE:case O.IN_TABLE_BODY:case O.IN_ROW:{Ic(this,t);break}case O.IN_TABLE_TEXT:{nE(this,t);break}}}}function Bw(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):eE(e,t),n}function Uw(e,t){let n=null,i=e.openElements.stackTop;for(;i>=0;i--){const a=e.openElements.items[i];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[i])&&(n=a)}return n||(e.openElements.shortenToLength(Math.max(i,0)),e.activeFormattingElements.removeEntry(t)),n}function Hw(e,t,n){let i=t,a=e.openElements.getCommonAncestor(t);for(let u=0,l=a;l!==n;u++,l=a){a=e.openElements.getCommonAncestor(l);const c=e.activeFormattingElements.getElementEntry(l),f=c&&u>=Fw;!c||f?(f&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(l)):(l=zw(e,c),i===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(i),e.treeAdapter.appendChild(l,i),i=l)}return i}function zw(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),i=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,i),t.element=i,i}function $w(e,t,n){const i=e.treeAdapter.getTagName(t),a=zi(i);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(n);else{const u=e.treeAdapter.getNamespaceURI(t);a===m.TEMPLATE&&u===ne.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Ww(e,t,n){const i=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,u=e.treeAdapter.createElement(a.tagName,i,a.attrs);e._adoptNodes(t,u),e.treeAdapter.appendChild(t,u),e.activeFormattingElements.insertElementAfterBookmark(u,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,u,a.tagID)}function Gd(e,t){for(let n=0;n<Mw;n++){const i=Bw(e,t);if(!i)break;const a=Uw(e,i);if(!a)break;e.activeFormattingElements.bookmark=i;const u=Hw(e,a,i.element),l=e.openElements.getCommonAncestor(i.element);e.treeAdapter.detachNode(u),l&&$w(e,l,u),Ww(e,a,i)}}function id(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Yw(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Vw(e,t){e._appendCommentNode(t,e.document)}function Kd(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let i=e.openElements.stackTop;i>=n;i--)e._setEndLocation(e.openElements.items[i],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const i=e.openElements.items[0],a=e.treeAdapter.getNodeSourceCodeLocation(i);if(a&&!a.endTag&&(e._setEndLocation(i,t),e.openElements.stackTop>=1)){const u=e.openElements.items[1],l=e.treeAdapter.getNodeSourceCodeLocation(u);l&&!l.endTag&&e._setEndLocation(u,t)}}}}function qw(e,t){e._setDocumentType(t);const n=t.forceQuirks?un.QUIRKS:Cw(t);kw(t)||e._err(t,Q.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=O.BEFORE_HTML}function js(e,t){e._err(t,Q.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,un.QUIRKS),e.insertionMode=O.BEFORE_HTML,e._processToken(t)}function Qw(e,t){t.tagID===m.HTML?(e._insertElement(t,ne.HTML),e.insertionMode=O.BEFORE_HEAD):Ys(e,t)}function Gw(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&Ys(e,t)}function Ys(e,t){e._insertFakeRootElement(),e.insertionMode=O.BEFORE_HEAD,e._processToken(t)}function Kw(e,t){switch(t.tagID){case m.HTML:{It(e,t);break}case m.HEAD:{e._insertElement(t,ne.HTML),e.headElement=e.openElements.current,e.insertionMode=O.IN_HEAD;break}default:Vs(e,t)}}function Xw(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?Vs(e,t):e._err(t,Q.endTagWithoutMatchingOpenElement)}function Vs(e,t){e._insertFakeElement(z.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=O.IN_HEAD,e._processToken(t)}function kn(e,t){switch(t.tagID){case m.HTML:{It(e,t);break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:{e._appendElement(t,ne.HTML),t.ackSelfClosing=!0;break}case m.TITLE:{e._switchToTextParsing(t,lt.RCDATA);break}case m.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,lt.RAWTEXT):(e._insertElement(t,ne.HTML),e.insertionMode=O.IN_HEAD_NO_SCRIPT);break}case m.NOFRAMES:case m.STYLE:{e._switchToTextParsing(t,lt.RAWTEXT);break}case m.SCRIPT:{e._switchToTextParsing(t,lt.SCRIPT_DATA);break}case m.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=O.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(O.IN_TEMPLATE);break}case m.HEAD:{e._err(t,Q.misplacedStartTagForHeadElement);break}default:qs(e,t)}}function Jw(e,t){switch(t.tagID){case m.HEAD:{e.openElements.pop(),e.insertionMode=O.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{qs(e,t);break}case m.TEMPLATE:{ei(e,t);break}default:e._err(t,Q.endTagWithoutMatchingOpenElement)}}function ei(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,Q.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Q.endTagWithoutMatchingOpenElement)}function qs(e,t){e.openElements.pop(),e.insertionMode=O.AFTER_HEAD,e._processToken(t)}function Zw(e,t){switch(t.tagID){case m.HTML:{It(e,t);break}case m.BASEFONT:case m.BGSOUND:case m.HEAD:case m.LINK:case m.META:case m.NOFRAMES:case m.STYLE:{kn(e,t);break}case m.NOSCRIPT:{e._err(t,Q.nestedNoscriptInHead);break}default:Qs(e,t)}}function eA(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=O.IN_HEAD;break}case m.BR:{Qs(e,t);break}default:e._err(t,Q.endTagWithoutMatchingOpenElement)}}function Qs(e,t){const n=t.type===Fe.EOF?Q.openElementsLeftAfterEof:Q.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=O.IN_HEAD,e._processToken(t)}function tA(e,t){switch(t.tagID){case m.HTML:{It(e,t);break}case m.BODY:{e._insertElement(t,ne.HTML),e.framesetOk=!1,e.insertionMode=O.IN_BODY;break}case m.FRAMESET:{e._insertElement(t,ne.HTML),e.insertionMode=O.IN_FRAMESET;break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{e._err(t,Q.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),kn(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,Q.misplacedStartTagForHeadElement);break}default:Gs(e,t)}}function nA(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{Gs(e,t);break}case m.TEMPLATE:{ei(e,t);break}default:e._err(t,Q.endTagWithoutMatchingOpenElement)}}function Gs(e,t){e._insertFakeElement(z.BODY,m.BODY),e.insertionMode=O.IN_BODY,ho(e,t)}function ho(e,t){switch(t.type){case Fe.CHARACTER:{X1(e,t);break}case Fe.WHITESPACE_CHARACTER:{K1(e,t);break}case Fe.COMMENT:{id(e,t);break}case Fe.START_TAG:{It(e,t);break}case Fe.END_TAG:{po(e,t);break}case Fe.EOF:{tE(e,t);break}}}function K1(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function X1(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function rA(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function iA(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function sA(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ne.HTML),e.insertionMode=O.IN_FRAMESET)}function aA(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ne.HTML)}function uA(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&rd.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ne.HTML)}function oA(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ne.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function lA(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ne.HTML),n||(e.formElement=e.openElements.current))}function cA(e,t){e.framesetOk=!1;const n=t.tagID;for(let i=e.openElements.stackTop;i>=0;i--){const a=e.openElements.tagIDs[i];if(n===m.LI&&a===m.LI||(n===m.DD||n===m.DT)&&(a===m.DD||a===m.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==m.ADDRESS&&a!==m.DIV&&a!==m.P&&e._isSpecialElement(e.openElements.items[i],a))break}e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ne.HTML)}function dA(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ne.HTML),e.tokenizer.state=lt.PLAINTEXT}function fA(e,t){e.openElements.hasInScope(m.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ne.HTML),e.framesetOk=!1}function hA(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(z.A);n&&(Gd(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ne.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function pA(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ne.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function mA(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(Gd(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ne.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function gA(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ne.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function EA(e,t){e.treeAdapter.getDocumentMode(e.document)!==un.QUIRKS&&e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ne.HTML),e.framesetOk=!1,e.insertionMode=O.IN_TABLE}function J1(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ne.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Z1(e){const t=H1(e,Gr.TYPE);return t!=null&&t.toLowerCase()===Pw}function TA(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ne.HTML),Z1(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function yA(e,t){e._appendElement(t,ne.HTML),t.ackSelfClosing=!0}function xA(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,ne.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function bA(e,t){t.tagName=z.IMG,t.tagID=m.IMG,J1(e,t)}function kA(e,t){e._insertElement(t,ne.HTML),e.skipNextNewLine=!0,e.tokenizer.state=lt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=O.TEXT}function CA(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,lt.RAWTEXT)}function SA(e,t){e.framesetOk=!1,e._switchToTextParsing(t,lt.RAWTEXT)}function b0(e,t){e._switchToTextParsing(t,lt.RAWTEXT)}function _A(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ne.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===O.IN_TABLE||e.insertionMode===O.IN_CAPTION||e.insertionMode===O.IN_TABLE_BODY||e.insertionMode===O.IN_ROW||e.insertionMode===O.IN_CELL?O.IN_SELECT_IN_TABLE:O.IN_SELECT}function vA(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ne.HTML)}function NA(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ne.HTML)}function wA(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,ne.HTML)}function AA(e,t){e._reconstructActiveFormattingElements(),q1(t),Qd(t),t.selfClosing?e._appendElement(t,ne.MATHML):e._insertElement(t,ne.MATHML),t.ackSelfClosing=!0}function IA(e,t){e._reconstructActiveFormattingElements(),Q1(t),Qd(t),t.selfClosing?e._appendElement(t,ne.SVG):e._insertElement(t,ne.SVG),t.ackSelfClosing=!0}function k0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ne.HTML)}function It(e,t){switch(t.tagID){case m.I:case m.S:case m.B:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.SMALL:case m.STRIKE:case m.STRONG:{pA(e,t);break}case m.A:{hA(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{uA(e,t);break}case m.P:case m.DL:case m.OL:case m.UL:case m.DIV:case m.DIR:case m.NAV:case m.MAIN:case m.MENU:case m.ASIDE:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.DETAILS:case m.ADDRESS:case m.ARTICLE:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{aA(e,t);break}case m.LI:case m.DD:case m.DT:{cA(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{J1(e,t);break}case m.HR:{xA(e,t);break}case m.RB:case m.RTC:{NA(e,t);break}case m.RT:case m.RP:{wA(e,t);break}case m.PRE:case m.LISTING:{oA(e,t);break}case m.XMP:{CA(e,t);break}case m.SVG:{IA(e,t);break}case m.HTML:{rA(e,t);break}case m.BASE:case m.LINK:case m.META:case m.STYLE:case m.TITLE:case m.SCRIPT:case m.BGSOUND:case m.BASEFONT:case m.TEMPLATE:{kn(e,t);break}case m.BODY:{iA(e,t);break}case m.FORM:{lA(e,t);break}case m.NOBR:{mA(e,t);break}case m.MATH:{AA(e,t);break}case m.TABLE:{EA(e,t);break}case m.INPUT:{TA(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{yA(e,t);break}case m.IMAGE:{bA(e,t);break}case m.BUTTON:{fA(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{gA(e,t);break}case m.IFRAME:{SA(e,t);break}case m.SELECT:{_A(e,t);break}case m.OPTION:case m.OPTGROUP:{vA(e,t);break}case m.NOEMBED:case m.NOFRAMES:{b0(e,t);break}case m.FRAMESET:{sA(e,t);break}case m.TEXTAREA:{kA(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?b0(e,t):k0(e,t);break}case m.PLAINTEXT:{dA(e,t);break}case m.COL:case m.TH:case m.TD:case m.TR:case m.HEAD:case m.FRAME:case m.TBODY:case m.TFOOT:case m.THEAD:case m.CAPTION:case m.COLGROUP:break;default:k0(e,t)}}function LA(e,t){if(e.openElements.hasInScope(m.BODY)&&(e.insertionMode=O.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function RA(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=O.AFTER_BODY,lE(e,t))}function OA(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function DA(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(m.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(m.FORM):n&&e.openElements.remove(n))}function PA(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(z.P,m.P),e._closePElement()}function MA(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function FA(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function jA(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function BA(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function UA(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(z.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function eE(e,t){const n=t.tagName,i=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const u=e.openElements.items[a],l=e.openElements.tagIDs[a];if(i===l&&(i!==m.UNKNOWN||e.treeAdapter.getTagName(u)===n)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(u,l))break}}function po(e,t){switch(t.tagID){case m.A:case m.B:case m.I:case m.S:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.NOBR:case m.SMALL:case m.STRIKE:case m.STRONG:{Gd(e,t);break}case m.P:{PA(e);break}case m.DL:case m.UL:case m.OL:case m.DIR:case m.DIV:case m.NAV:case m.PRE:case m.MAIN:case m.MENU:case m.ASIDE:case m.BUTTON:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.ADDRESS:case m.ARTICLE:case m.DETAILS:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.LISTING:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{OA(e,t);break}case m.LI:{MA(e);break}case m.DD:case m.DT:{FA(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{jA(e);break}case m.BR:{UA(e);break}case m.BODY:{LA(e,t);break}case m.HTML:{RA(e,t);break}case m.FORM:{DA(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{BA(e,t);break}case m.TEMPLATE:{ei(e,t);break}default:eE(e,t)}}function tE(e,t){e.tmplInsertionModeStack.length>0?oE(e,t):Kd(e,t)}function HA(e,t){var n;t.tagID===m.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function zA(e,t){e._err(t,Q.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ic(e,t){if(e.openElements.currentTagId!==void 0&&G1.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=O.IN_TABLE_TEXT,t.type){case Fe.CHARACTER:{rE(e,t);break}case Fe.WHITESPACE_CHARACTER:{nE(e,t);break}}else la(e,t)}function $A(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ne.HTML),e.insertionMode=O.IN_CAPTION}function WA(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ne.HTML),e.insertionMode=O.IN_COLUMN_GROUP}function YA(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(z.COLGROUP,m.COLGROUP),e.insertionMode=O.IN_COLUMN_GROUP,Xd(e,t)}function VA(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ne.HTML),e.insertionMode=O.IN_TABLE_BODY}function qA(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(z.TBODY,m.TBODY),e.insertionMode=O.IN_TABLE_BODY,mo(e,t)}function QA(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function GA(e,t){Z1(t)?e._appendElement(t,ne.HTML):la(e,t),t.ackSelfClosing=!0}function KA(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ne.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Mi(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{qA(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{kn(e,t);break}case m.COL:{YA(e,t);break}case m.FORM:{KA(e,t);break}case m.TABLE:{QA(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{VA(e,t);break}case m.INPUT:{GA(e,t);break}case m.CAPTION:{$A(e,t);break}case m.COLGROUP:{WA(e,t);break}default:la(e,t)}}function ta(e,t){switch(t.tagID){case m.TABLE:{e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode());break}case m.TEMPLATE:{ei(e,t);break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:la(e,t)}}function la(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ho(e,t),e.fosterParentingEnabled=n}function nE(e,t){e.pendingCharacterTokens.push(t)}function rE(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Bs(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)la(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const iE=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function XA(e,t){const n=t.tagID;iE.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=O.IN_TABLE,Mi(e,t)):It(e,t)}function JA(e,t){const n=t.tagID;switch(n){case m.CAPTION:case m.TABLE:{e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=O.IN_TABLE,n===m.TABLE&&ta(e,t));break}case m.BODY:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:po(e,t)}}function Xd(e,t){switch(t.tagID){case m.HTML:{It(e,t);break}case m.COL:{e._appendElement(t,ne.HTML),t.ackSelfClosing=!0;break}case m.TEMPLATE:{kn(e,t);break}default:Ku(e,t)}}function ZA(e,t){switch(t.tagID){case m.COLGROUP:{e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=O.IN_TABLE);break}case m.TEMPLATE:{ei(e,t);break}case m.COL:break;default:Ku(e,t)}}function Ku(e,t){e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=O.IN_TABLE,e._processToken(t))}function mo(e,t){switch(t.tagID){case m.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ne.HTML),e.insertionMode=O.IN_ROW;break}case m.TH:case m.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(z.TR,m.TR),e.insertionMode=O.IN_ROW,go(e,t);break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE,Mi(e,t));break}default:Mi(e,t)}}function sd(e,t){const n=t.tagID;switch(t.tagID){case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE);break}case m.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE,ta(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:case m.TR:break;default:ta(e,t)}}function go(e,t){switch(t.tagID){case m.TH:case m.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ne.HTML),e.insertionMode=O.IN_CELL,e.activeFormattingElements.insertMarker();break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY,mo(e,t));break}default:Mi(e,t)}}function sE(e,t){switch(t.tagID){case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY);break}case m.TABLE:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY,sd(e,t));break}case m.TBODY:case m.TFOOT:case m.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(m.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY,sd(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:break;default:ta(e,t)}}function eI(e,t){const n=t.tagID;iE.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),go(e,t)):It(e,t)}function tI(e,t){const n=t.tagID;switch(n){case m.TD:case m.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=O.IN_ROW);break}case m.TABLE:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),sE(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:po(e,t)}}function aE(e,t){switch(t.tagID){case m.HTML:{It(e,t);break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._insertElement(t,ne.HTML);break}case m.OPTGROUP:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ne.HTML);break}case m.HR:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ne.HTML),t.ackSelfClosing=!0;break}case m.INPUT:case m.KEYGEN:case m.TEXTAREA:case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),t.tagID!==m.SELECT&&e._processStartTag(t));break}case m.SCRIPT:case m.TEMPLATE:{kn(e,t);break}}}function uE(e,t){switch(t.tagID){case m.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===m.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===m.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop();break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop();break}case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode());break}case m.TEMPLATE:{ei(e,t);break}}}function nI(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e._processStartTag(t)):aE(e,t)}function rI(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e.onEndTag(t)):uE(e,t)}function iI(e,t){switch(t.tagID){case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{kn(e,t);break}case m.CAPTION:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.tmplInsertionModeStack[0]=O.IN_TABLE,e.insertionMode=O.IN_TABLE,Mi(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=O.IN_COLUMN_GROUP,e.insertionMode=O.IN_COLUMN_GROUP,Xd(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=O.IN_TABLE_BODY,e.insertionMode=O.IN_TABLE_BODY,mo(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=O.IN_ROW,e.insertionMode=O.IN_ROW,go(e,t);break}default:e.tmplInsertionModeStack[0]=O.IN_BODY,e.insertionMode=O.IN_BODY,It(e,t)}}function sI(e,t){t.tagID===m.TEMPLATE&&ei(e,t)}function oE(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Kd(e,t)}function aI(e,t){t.tagID===m.HTML?It(e,t):Xu(e,t)}function lE(e,t){var n;if(t.tagID===m.HTML){if(e.fragmentContext||(e.insertionMode=O.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===m.HTML){e._setEndLocation(e.openElements.items[0],t);const i=e.openElements.items[1];i&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(i))===null||n===void 0)&&n.endTag)&&e._setEndLocation(i,t)}}else Xu(e,t)}function Xu(e,t){e.insertionMode=O.IN_BODY,ho(e,t)}function uI(e,t){switch(t.tagID){case m.HTML:{It(e,t);break}case m.FRAMESET:{e._insertElement(t,ne.HTML);break}case m.FRAME:{e._appendElement(t,ne.HTML),t.ackSelfClosing=!0;break}case m.NOFRAMES:{kn(e,t);break}}}function oI(e,t){t.tagID===m.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==m.FRAMESET&&(e.insertionMode=O.AFTER_FRAMESET))}function lI(e,t){switch(t.tagID){case m.HTML:{It(e,t);break}case m.NOFRAMES:{kn(e,t);break}}}function cI(e,t){t.tagID===m.HTML&&(e.insertionMode=O.AFTER_AFTER_FRAMESET)}function dI(e,t){t.tagID===m.HTML?It(e,t):$u(e,t)}function $u(e,t){e.insertionMode=O.IN_BODY,ho(e,t)}function fI(e,t){switch(t.tagID){case m.HTML:{It(e,t);break}case m.NOFRAMES:{kn(e,t);break}}}function hI(e,t){t.chars=nt,e._insertCharacters(t)}function pI(e,t){e._insertCharacters(t),e.framesetOk=!1}function cE(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ne.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function mI(e,t){if(Iw(t))cE(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),i=e.treeAdapter.getNamespaceURI(n);i===ne.MATHML?q1(t):i===ne.SVG&&(Lw(t),Q1(t)),Qd(t),t.selfClosing?e._appendElement(t,i):e._insertElement(t,i),t.ackSelfClosing=!0}}function gI(e,t){if(t.tagID===m.P||t.tagID===m.BR){cE(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const i=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(i)===ne.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(i);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}z.AREA,z.BASE,z.BASEFONT,z.BGSOUND,z.BR,z.COL,z.EMBED,z.FRAME,z.HR,z.IMG,z.INPUT,z.KEYGEN,z.LINK,z.META,z.PARAM,z.SOURCE,z.TRACK,z.WBR;const EI=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,TI=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),C0={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function dE(e,t){const n=wI(e),i=h1("type",{handlers:{root:yI,element:xI,text:bI,comment:hE,doctype:kI,raw:SI},unknown:_I}),a={parser:n?new x0(C0):x0.getFragmentParser(void 0,C0),handle(c){i(c,a)},stitches:!1,options:t||{}};i(e,a),$i(a,Rn());const u=n?a.parser.document:a.parser.getFragment(),l=A3(u,{file:a.options.file});return a.stitches&&fo(l,"comment",function(c,f,p){const T=c;if(T.value.stitch&&p&&f!==void 0){const E=p.children;return E[f]=T.value.stitch,f}}),l.type==="root"&&l.children.length===1&&l.children[0].type===e.type?l.children[0]:l}function fE(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function yI(e,t){fE(e.children,t)}function xI(e,t){vI(e,t),fE(e.children,t),NI(e,t)}function bI(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Fe.CHARACTER,chars:e.value,location:ca(e)};$i(t,Rn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function kI(e,t){const n={type:Fe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ca(e)};$i(t,Rn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function CI(e,t){t.stitches=!0;const n=AI(e);if("children"in e&&"children"in n){const i=dE({type:"root",children:e.children},t.options);n.children=i.children}hE({type:"comment",value:{stitch:n}},t)}function hE(e,t){const n=e.value,i={type:Fe.COMMENT,data:n,location:ca(e)};$i(t,Rn(e)),t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken)}function SI(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,pE(t,Rn(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(EI,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function _I(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))CI(n,t);else{let i="";throw TI.has(n.type)&&(i=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+i)}}function $i(e,t){pE(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=lt.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function pE(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function vI(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===lt.PLAINTEXT)return;$i(t,Rn(e));const i=t.parser.openElements.current;let a="namespaceURI"in i?i.namespaceURI:qr.html;a===qr.html&&n==="svg"&&(a=qr.svg);const u=D3({...e,children:[]},{space:a===qr.svg?"svg":"html"}),l={type:Fe.START_TAG,tagName:n,tagID:zi(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in u?u.attrs:[],location:ca(e)};t.parser.currentToken=l,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function NI(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&z3.includes(n)||t.parser.tokenizer.state===lt.PLAINTEXT)return;$i(t,so(e));const i={type:Fe.END_TAG,tagName:n,tagID:zi(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ca(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===lt.RCDATA||t.parser.tokenizer.state===lt.RAWTEXT||t.parser.tokenizer.state===lt.SCRIPT_DATA)&&(t.parser.tokenizer.state=lt.DATA)}function wI(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ca(e){const t=Rn(e)||{line:void 0,column:void 0,offset:void 0},n=so(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function AI(e){return"children"in e?Xr({...e,children:[]}):Xr(e)}function II(e){return function(t,n){return dE(t,{...e,file:n})}}const $r=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],ad={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...$r,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...$r],h2:[["className","sr-only"]],img:[...$r,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...$r,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...$r],table:[...$r],ul:[...$r,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},yr={}.hasOwnProperty;function LI(e,t){let n={type:"root",children:[]};const i={schema:t?{...ad,...t}:ad,stack:[]},a=mE(i,e);return a&&(Array.isArray(a)?a.length===1?n=a[0]:n.children=a:n=a),n}function mE(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return RI(e,n);case"doctype":return OI(e,n);case"element":return DI(e,n);case"root":return PI(e,n);case"text":return MI(e,n)}}}function RI(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",i=n.indexOf("-->"),u={type:"comment",value:i<0?n:n.slice(0,i)};return da(u,t),u}}function OI(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return da(n,t),n}}function DI(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const i=gE(e,t.children),a=FI(e,t.properties);e.stack.pop();let u=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(u=!0,e.schema.ancestors&&yr.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let f=-1;for(u=!1;++f<c.length;)e.stack.includes(c[f])&&(u=!0)}if(!u)return e.schema.strip&&!e.schema.strip.includes(n)?i:void 0;const l={type:"element",tagName:n,properties:a,children:i};return da(l,t),l}function PI(e,t){const i={type:"root",children:gE(e,t.children)};return da(i,t),i}function MI(e,t){const i={type:"text",value:typeof t.value=="string"?t.value:""};return da(i,t),i}function gE(e,t){const n=[];if(Array.isArray(t)){const i=t;let a=-1;for(;++a<i.length;){const u=mE(e,i[a]);u&&(Array.isArray(u)?n.push(...u):n.push(u))}}return n}function FI(e,t){const n=e.stack[e.stack.length-1],i=e.schema.attributes,a=e.schema.required,u=i&&yr.call(i,n)?i[n]:void 0,l=i&&yr.call(i,"*")?i["*"]:void 0,c=t&&typeof t=="object"?t:{},f={};let p;for(p in c)if(yr.call(c,p)){const T=c[p];let E=S0(e,_0(u,p),p,T);E==null&&(E=S0(e,_0(l,p),p,T)),E!=null&&(f[p]=E)}if(a&&yr.call(a,n)){const T=a[n];for(p in T)yr.call(T,p)&&!yr.call(f,p)&&(f[p]=T[p])}return f}function S0(e,t,n,i){return t?Array.isArray(i)?jI(e,t,n,i):EE(e,t,n,i):void 0}function jI(e,t,n,i){let a=-1;const u=[];for(;++a<i.length;){const l=EE(e,t,n,i[a]);(typeof l=="number"||typeof l=="string")&&u.push(l)}return u}function EE(e,t,n,i){if(!(typeof i!="boolean"&&typeof i!="number"&&typeof i!="string")&&BI(e,n,i)){if(typeof t=="object"&&t.length>1){let a=!1,u=0;for(;++u<t.length;){const l=t[u];if(l&&typeof l=="object"&&"flags"in l){if(l.test(String(i))){a=!0;break}}else if(l===i){a=!0;break}}if(!a)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+i:i}}function BI(e,t,n){const i=e.schema.protocols&&yr.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!i||i.length===0)return!0;const a=String(n),u=a.indexOf(":"),l=a.indexOf("?"),c=a.indexOf("#"),f=a.indexOf("/");if(u<0||f>-1&&u>f||l>-1&&u>l||c>-1&&u>c)return!0;let p=-1;for(;++p<i.length;){const T=i[p];if(u===T.length&&a.slice(0,T.length)===T)return!0}return!1}function da(e,t){const n=Mg(t);t.data&&(e.data=Xr(t.data)),n&&(e.position=n)}function _0(e,t){let n,i=-1;if(e)for(;++i<e.length;){const a=e[i],u=typeof a=="string"?a:a[0];if(u===t)return a;u==="data*"&&(n=a)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function UI(e){return function(t){return LI(t,e)}}const ud=ad,Wr=(e,...t)=>{var n;return[...((n=ud.attributes)==null?void 0:n[e])??[],...t]},HI={...ud,attributes:{...ud.attributes,p:Wr("p","align"),div:Wr("div","align"),h1:Wr("h1","align"),h2:Wr("h2","align"),h3:Wr("h3","align"),img:Wr("img","width","height","align"),a:Wr("a","align")}},zI=new Set(["code","pre","svg","math","style","script","textarea"]),$I="fade-word";function WI(e){const t=[];for(const n of e.split(/(\s+)/))if(n){if(/^\s+$/.test(n)){t.push({type:"text",value:n});continue}t.push({type:"element",tagName:"span",properties:{className:[$I]},children:[{type:"text",value:n}]})}return t}function TE(e){const t=e.children;if(!t)return;const n=[];for(const i of t){if(i.type==="text"){n.push(...WI(i.value??""));continue}if(i.type==="element"&&zI.has(i.tagName??"")){n.push(i);continue}TE(i),n.push(i)}e.children=n}function YI(){return e=>TE(e)}const VI=256*1024;let Yr=null,qI=0;const Ju=new Map;function v0(e,t){var n;(n=Ju.get(e))==null||n(t),Ju.delete(e)}function QI(){if(Yr)return Yr;try{Yr=new Worker(new URL("/assets/highlightWorker-DJp1Ce5p.js",import.meta.url),{type:"module"}),Yr.addEventListener("message",e=>v0(e.data.id,e.data.html)),Yr.addEventListener("error",()=>{for(const e of[...Ju.keys()])v0(e,null);Yr=null})}catch{return null}return Yr}async function Jd(e,t){if(e.length>VI)return null;const n=QI();if(!n)return null;const i=++qI;return new Promise(a=>{Ju.set(i,a),n.postMessage({id:i,code:e,lang:t})})}function GI({code:e,lang:t}){const[n,i]=_.useState(null);_.useEffect(()=>{let u=!1;return Jd(e,t).then(l=>{u||i(l)}).catch(()=>{u||i(null)}),()=>{u=!0}},[e,t]);const a=()=>{var u;return void((u=navigator.clipboard)==null?void 0:u.writeText(e))};return h.jsxs("div",{className:"codeblock",children:[h.jsxs("div",{className:"codeblock-bar",children:[h.jsx("span",{className:"codeblock-lang",children:t||"text"}),h.jsx("button",{className:"codeblock-copy",onClick:a,"aria-label":"Copy code",children:"copy"})]}),n?h.jsx("div",{className:"codeblock-body",dangerouslySetInnerHTML:{__html:n}}):h.jsx("pre",{className:"codeblock-body codeblock-plain",children:h.jsx("code",{children:e})})]})}let Lc=null;function KI(){return Lc||(Lc=Wc(()=>import("./mermaid.core-BeGqsnDU.js").then(e=>e.bp),[]).then(e=>(e.default.initialize({startOnLoad:!1,theme:"dark",securityLevel:"strict",themeVariables:{primaryColor:"#44475a",primaryTextColor:"#f8f8f2",primaryBorderColor:"#bd93f9",lineColor:"#8be9fd",fontFamily:"Inter, sans-serif"}}),e.default))),Lc}let XI=0;function JI({code:e}){const t=_.useRef(null),[n,i]=_.useState(!1);return _.useEffect(()=>{let a=!1;i(!1);const u=e.trim();if(u)return KI().then(async l=>{const c=await l.parse(u,{suppressErrors:!0});if(a||!c)return;const{svg:f}=await l.render(`mermaid-${XI++}`,u);a||!t.current||(t.current.innerHTML=f,i(!0))}).catch(()=>{}),()=>{a=!0}},[e]),h.jsxs("div",{className:"mermaid-wrap",children:[h.jsx("div",{className:`mermaid-block ${n?"":"is-hidden"}`,ref:t}),!n&&h.jsxs("div",{className:"codeblock",children:[h.jsx("div",{className:"codeblock-bar",children:h.jsx("span",{className:"codeblock-lang",children:"mermaid"})}),h.jsx("pre",{className:"codeblock-body codeblock-plain",children:h.jsx("code",{children:e})})]})]})}const ZI=/language-(\w+)/,e6=/\n$/,t6={code(e){const{className:t,children:n}=e,i=ZI.exec(t??""),a=String(n).replace(e6,"");if(!t&&!a.includes(`
92
+ `))return h.jsx("code",{className:"md-inline-code",children:a});const l=(i==null?void 0:i[1])??"";return l==="mermaid"?h.jsx(JI,{code:a}):h.jsx(GI,{code:a,lang:l})},a(e){return h.jsx("a",{...e,target:"_blank",rel:"noreferrer noopener"})}};let Di=null,N0=null;function yE(){return N0??(N0=Promise.all([Wc(()=>import("./index-9KBtl1l6.js"),__vite__mapDeps([0,1])),Wc(()=>Promise.resolve({}),__vite__mapDeps([2]))]).then(([e])=>{Di=e.default})),N0}let w0=!1;function n6(){if(w0||Di)return;w0=!0;const e=()=>void yE(),t=globalThis.requestIdleCallback;t?t(e):setTimeout(e,2e3)}const r6=/(^|[^\\])\$/,Wi=_.memo(function({text:t,html:n=!1,streaming:i=!1}){const a=_.useMemo(()=>T3(t),[t]),u=r6.test(a),[l,c]=_.useState(()=>Di!==null);_.useEffect(()=>{if(Di)return;if(!u){n6();return}let p=!0;return yE().then(()=>{p&&c(!0)}),()=>{p=!1}},[u]);const f=_.useMemo(()=>{const p=u&&Di?[Di]:[];return n?[II,[UI,HI],...p]:i?[...p,YI]:p},[n,i,u,l]);return h.jsx("div",{className:"md",children:h.jsx(F_,{remarkPlugins:u3,rehypePlugins:f,components:t6,children:a})})});function Vn({open:e,children:t}){const[n,i]=_.useState(e);_.useEffect(()=>{e&&i(!0)},[e]);const a=u=>{u.target===u.currentTarget&&u.propertyName==="grid-template-rows"&&!e&&i(!1)};return h.jsx("div",{className:`collapse ${e?"is-open":""}`,onTransitionEnd:a,children:h.jsx("div",{className:"collapse-inner",children:n?t:null})})}function i6(e,t){if(!e||!t)return null;if(!t.startsWith("/"))return I0(t.replace(/^\.\//,""));const n=A0(e),i=I0(A0(t));return i===null||i===n?null:i.startsWith(`${n}/`)?i.slice(n.length+1):null}const A0=e=>e.replace(/\/+$/,"");function I0(e){const t=e.startsWith("/"),n=[];for(const a of e.split("/"))if(!(a===""||a===".")){if(a!==".."){n.push(a);continue}if(n.length===0)return null;n.pop()}const i=n.join("/");return t?`/${i}`:i}const s6=4e5;function L0(e,t){const n=e.split(`
93
+ `),i=t.split(`
94
+ `),a=n.length,u=i.length;if(a*u>s6)return[...n.map(T=>({type:"del",text:T})),...i.map(T=>({type:"add",text:T}))];const l=Array.from({length:a+1},()=>new Array(u+1).fill(0));for(let T=a-1;T>=0;T--)for(let E=u-1;E>=0;E--)l[T][E]=n[T]===i[E]?l[T+1][E+1]+1:Math.max(l[T+1][E],l[T][E+1]);const c=[];let f=0,p=0;for(;f<a&&p<u;)n[f]===i[p]?(c.push({type:"ctx",text:n[f]}),f++,p++):l[f+1][p]>=l[f][p+1]?(c.push({type:"del",text:n[f]}),f++):(c.push({type:"add",text:i[p]}),p++);for(;f<a;)c.push({type:"del",text:n[f++]});for(;p<u;)c.push({type:"add",text:i[p++]});return c}const xE={loading:"lazy",decoding:"async",ref:e=>{e!=null&&e.complete&&(e.dataset.loaded="")},onLoad:e=>{e.currentTarget.dataset.loaded=""}},a6=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif"]);function u6(e){const t=e.toLowerCase(),n=t.lastIndexOf("."),i=n>0?t.slice(n+1):"";return a6.has(i)?"image":i==="pdf"?"pdf":i==="html"||i==="htm"?"html":i==="md"||i==="markdown"?"markdown":"text"}const o6={ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",mjs:"javascript",cjs:"javascript",json:"json",jsonl:"json",yaml:"yaml",yml:"yaml",md:"markdown",markdown:"markdown",html:"html",htm:"html",xml:"xml",css:"css",scss:"scss",less:"less",py:"python",rs:"rust",go:"go",java:"java",c:"c",h:"c",cpp:"cpp",cc:"cpp",cxx:"cpp",hpp:"cpp",cs:"csharp",rb:"ruby",php:"php",kt:"kotlin",kts:"kotlin",swift:"swift",zig:"zig",lua:"lua",tex:"latex",toml:"toml",ini:"ini",cfg:"ini",conf:"ini",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",dockerfile:"docker",sql:"sql",diff:"diff",patch:"diff",jsonc:"json",svg:"xml",vue:"vue",svelte:"svelte",env:"ini",proto:"proto",graphql:"graphql"};function od(e){return bE(e.trim().split("/").pop()??"")||"text"}function bE(e){const t=e.toLowerCase();if(t==="dockerfile")return"docker";if(t==="makefile")return"make";const n=t.split(".").pop()??"";return o6[n]??""}const zt=e=>!!e&&typeof e=="object";function fa(e){switch(e.name){case"shell":return"shell";case"write":case"strReplace":return"write";case"read":return"read";case"grep":return"grep";case"todo_list":return"todo";case"web_fetch":return"webfetch";case"web_search":return"websearch";case"introspect":return"introspect"}if(e.name)return"generic";const t=zt(e.input)?e.input:{},n=e.kind,i=typeof t.command=="string"?t.command:void 0,a=u=>Object.prototype.hasOwnProperty.call(t,u);return e.title==="todo_list"||a("tasks")||a("task_list_description")||a("completed_task_ids")||a("remove_task_ids")||i!==void 0&&["complete","add","remove","list"].includes(i)?"todo":n==="read"||Array.isArray(t.operations)||e.title==="read"?"read":e.title==="grep"||typeof t.pattern=="string"&&!a("operations")||n==="search"&&e.title!=="web_search"?"grep":n==="edit"||e.title==="write"||e.title==="strReplace"||(i==="create"||i==="strReplace"||i==="insert")&&typeof t.path=="string"||typeof t.oldStr=="string"&&typeof t.newStr=="string"?"write":n==="execute"||e.title==="shell"||typeof t.command=="string"?"shell":typeof t.url=="string"?"webfetch":typeof t.query=="string"&&(n==="search"||e.title==="web_search")?"websearch":e.title==="introspect"||typeof t.doc_path=="string"?"introspect":"generic"}const Tr=e=>typeof e=="string"?e:void 0,Rc=e=>e.split("/").pop()||e;function l6(e){if(typeof e.path=="string")return e.path;const t=Array.isArray(e.operations)?e.operations:[];for(const n of t){const i=zt(n)?n:null;if(i&&typeof i.path=="string")return i.path;if(i&&Array.isArray(i.image_paths)&&typeof i.image_paths[0]=="string")return i.image_paths[0]}}const c6={shell:["Ran","Running"],write:["Wrote","Writing"],read:["Read","Reading"],grep:["Searched","Searching"],todo:["Updated the task list","Updating the task list"],webfetch:["Fetched","Fetching"],websearch:["Searched the web","Searching the web"],introspect:["Looked up","Looking up"],generic:["Ran a tool","Running a tool"]};function d6(e,t){const n=zt(e.input)?e.input:null;if(n)switch(t){case"write":{const i=Tr(n.path);return i?Rc(i):void 0}case"read":{const i=l6(n);return i?Rc(i):void 0}case"grep":{const i=Tr(n.path);return Tr(n.pattern)??Tr(n.query)??(i?Rc(i):void 0)}case"introspect":return Tr(n.query)??Tr(n.doc_path);case"webfetch":{const i=Tr(n.url);if(!i)return;try{return new URL(i).hostname||i}catch{return i}}default:return}}function Zd(e,t){const n=zt(e.input)?e.input:null,i=n?Tr(n.__tool_use_purpose):void 0;if(i)return i;const a=fa(e),[u,l]=c6[a],c=d6(e,a),f=t?l:u;return c?`${f} ${c}`:a==="shell"?t?"Running a command":"Ran a command":f}const f6={shell:["ran a command",e=>`ran ${e} commands`],write:["wrote a file",e=>`wrote ${e} files`],read:["read a file",e=>`read ${e} files`],grep:["searched the code",e=>`searched the code ${e} times`],todo:["updated the task list",e=>`updated the task list ${e} times`],webfetch:["fetched a page",e=>`fetched ${e} pages`],websearch:["searched the web",e=>`searched the web ${e} times`],introspect:["looked something up",e=>`looked up ${e} things`],generic:["ran a tool",e=>`ran ${e} tools`]};function h6(e){const t=[],n=new Map;for(const u of e){const l=fa(u);n.has(l)||t.push(l),n.set(l,(n.get(l)??0)+1)}const a=t.map(u=>{const l=n.get(u),[c,f]=f6[u];return l===1?c:f(l)}).join(", ");return a.charAt(0).toUpperCase()+a.slice(1)}function p6(e){return e.length>0?h6(e):"Thought"}function ti(e){const t=[];for(const n of e)zt(n)&&(n.type==="content"&&zt(n.content)&&typeof n.content.text=="string"?t.push(n.content.text):n.type==="text"&&typeof n.text=="string"?t.push(n.text):n.kind==="text"&&typeof n.data=="string"&&t.push(n.data));return t.join("")}function ni(e){for(const t of e)if(zt(t)&&t.kind==="json"&&zt(t.data))return t.data;return null}function ef(e){const t=Object.keys(e);return t.length===1&&typeof e[t[0]]=="string"?e[t[0]]:null}function m6(e){if(e==null)return[];if(typeof e=="string")return e?[{kind:"text",data:e}]:[];if(zt(e)&&Array.isArray(e.items)){const t=[];for(const n of e.items)zt(n)&&(typeof n.Text=="string"?t.push({kind:"text",data:n.Text}):zt(n.Json)&&t.push({kind:"json",data:n.Json}));return t}return[]}function _r(e){return[...Array.isArray(e.content)?e.content:[],...m6(e.output)]}function g6(e){for(const t of e)if(zt(t)&&t.type==="diff"&&typeof t.oldText=="string"&&typeof t.newText=="string")return{path:typeof t.path=="string"?t.path:void 0,oldText:t.oldText,newText:t.newText};return null}function E6(e){let t=ni(e);if(!t||!Array.isArray(t.tasks)){const n=ti(e).trim();if(n.startsWith("{"))try{const i=JSON.parse(n);t=zt(i)?i:null}catch{t=null}}return t&&Array.isArray(t.tasks)?t.tasks.map(n=>{const i=zt(n)?n:{};return{desc:typeof i.task_description=="string"?i.task_description:"",done:i.completed===!0}}):null}const T6="show_widget";function kE(e){var a;if(!((a=e.name)!=null&&a.endsWith(T6)))return null;const t=e.input??{},n=typeof t.widget_code=="string"?t.widget_code:"";return{title:typeof t.title=="string"?t.title:"",code:n}}function y6(e){return e.replace(/_/g," ").trim()}function CE(e){var u;if(!((u=e.name)!=null&&u.endsWith("show_choice")))return null;const t=e.input??{},n=typeof t.question=="string"?t.question.trim():"",i=Array.isArray(t.options)?t.options:[],a=[];for(const l of i){const c=l??{},f=typeof c.label=="string"&&c.label.trim()?c.label:"";if(!f)continue;const p=typeof c.detail=="string"&&c.detail.trim()?c.detail:void 0,T=typeof c.prompt=="string"&&c.prompt.trim()?c.prompt:f;a.push({label:f,detail:p,prompt:T})}return!n||a.length<2?null:{question:n,options:a}}function x6(e,t){if(t===null)return{picked:null,superseded:!1};const n=e.find(i=>i.prompt.trim()===t.trim());return n?{picked:n.label,superseded:!1}:{picked:null,superseded:!0}}function SE(e){return e.name===dg}function b6(e){var a;const{items:t,pending:n}=ge.getState(),i=t.findIndex(u=>u.type==="tool_call"&&u.tool.id===e);if(i===-1)return null;for(const u of t.slice(i+1))if(u.type==="message"&&u.message.role==="user")return u.message.text;return((a=n[0])==null?void 0:a.text)??null}function k6({data:e,toolId:t}){const n=ge(E=>E.items),i=ge(E=>E.pending),a=ge(wd),[u,l]=_.useState(null),c=x6(e.options,n.length||i.length?b6(t):null),f=u??c.picked,p=f!==null||c.superseded,T=E=>{p||!a||Tg(E.prompt)&&l(E.label)};return h.jsxs("div",{className:"tpl-choice",children:[h.jsx("p",{className:"tpl-choice-q",children:e.question}),h.jsx("div",{className:"tpl-choice-opts",children:e.options.map(E=>{const x=f===E.label;return h.jsxs("button",{className:`tpl-choice-opt${x?" is-picked":""}`,onClick:()=>T(E),disabled:p||!a,"aria-pressed":x,children:[h.jsx("span",{className:"tpl-choice-label",children:E.label}),E.detail&&h.jsx("span",{className:"tpl-choice-detail",children:E.detail})]},E.label)})})]})}const C6=["https://cdnjs.cloudflare.com","https://cdn.jsdelivr.net","https://unpkg.com","https://esm.sh"];function S6(){const e=C6.join(" ");return["default-src 'none'",`script-src 'unsafe-inline' ${e}`,`style-src 'unsafe-inline' ${e} https://fonts.googleapis.com`,"img-src data: blob: https:","font-src data: https:",`connect-src ${e}`].join("; ")}const _6=`
95
+ (function () {
96
+ var parent = window.parent;
97
+ var root = document.getElementById('root');
98
+ var last = null;
99
+ var scripted = false;
100
+
101
+ function post(msg) { parent.postMessage(msg, '*'); }
102
+
103
+ window.casper = {
104
+ sendPrompt: function (text) {
105
+ if (typeof text !== 'string' || !text.trim()) return;
106
+ post({ type: 'casper:prompt', text: text.slice(0, 4000) });
107
+ },
108
+ };
109
+
110
+ // Guards against a second pass replacing nodes a widget's scripts are already driving.
111
+ function setContent(html) {
112
+ if (!root) root = document.getElementById('root');
113
+ if (!root || html === last) return;
114
+ last = html;
115
+ root.innerHTML = html;
116
+ }
117
+
118
+ // innerHTML leaves scripts inert; recreating them runs them. One at a time,
119
+ // waiting on anything with a src, or running them all at once risks
120
+ // "X is not defined" from a library that hasn't loaded yet.
121
+ function runScripts() {
122
+ if (scripted) return;
123
+ scripted = true;
124
+ var list = [].slice.call(root.querySelectorAll('script'));
125
+ var index = 0;
126
+
127
+ function next() {
128
+ if (index >= list.length) return;
129
+ var old = list[index++];
130
+ var fresh = document.createElement('script');
131
+ for (var a = 0; a < old.attributes.length; a++) {
132
+ fresh.setAttribute(old.attributes[a].name, old.attributes[a].value);
133
+ }
134
+ fresh.textContent = old.textContent;
135
+ var external = Boolean(old.getAttribute('src'));
136
+ if (external) {
137
+ fresh.async = false;
138
+ var moved = false;
139
+ var advance = function () {
140
+ if (moved) return;
141
+ moved = true;
142
+ next();
143
+ };
144
+ fresh.onload = advance;
145
+ fresh.onerror = advance;
146
+ // A CDN that never answers shouldn't strand the rest of the widget.
147
+ setTimeout(advance, 10000);
148
+ }
149
+ old.parentNode.replaceChild(fresh, old);
150
+ if (!external) next();
151
+ }
152
+
153
+ next();
154
+ }
155
+
156
+ var lastHeight = 0;
157
+
158
+ // Off #root rather than the document: in a frame the html box reports the
159
+ // viewport size the host already chose, not the content's. +2px absorbs
160
+ // fractional layout heights that otherwise leave a scrollbar.
161
+ function contentHeight() {
162
+ if (!root) root = document.getElementById('root');
163
+ var bottom = 0;
164
+ if (root) {
165
+ var box = root.getBoundingClientRect();
166
+ bottom = box.top + Math.max(root.scrollHeight, box.height);
167
+ }
168
+ var body = document.body ? document.body.scrollHeight : 0;
169
+ return Math.ceil(Math.max(bottom, body)) + 2;
170
+ }
171
+
172
+ function reportHeight() {
173
+ var h = contentHeight();
174
+ if (h !== lastHeight) { lastHeight = h; post({ type: 'casper:height', height: h }); }
175
+ }
176
+
177
+ if (window.ResizeObserver) {
178
+ var ro = new ResizeObserver(reportHeight);
179
+ ro.observe(document.documentElement);
180
+ if (root) ro.observe(root);
181
+ }
182
+
183
+ // Canvases and late fonts resize without tripping ResizeObserver, so poll too,
184
+ // briefly after content settles - a transcript full of widgets polling forever
185
+ // would read layout dozens of times a second.
186
+ var poll = null;
187
+ function pollHeight(ms) {
188
+ if (poll) clearInterval(poll);
189
+ var until = Date.now() + ms;
190
+ poll = setInterval(function () {
191
+ reportHeight();
192
+ if (Date.now() > until) { clearInterval(poll); poll = null; }
193
+ }, 250);
194
+ }
195
+
196
+ window.addEventListener('message', function (e) {
197
+ if (e.source !== parent) return;
198
+ var d = e.data;
199
+ if (!d || typeof d !== 'object') return;
200
+ if (d.type === 'casper:theme') {
201
+ document.getElementById('theme').textContent = ':root{' + d.css + '}';
202
+ return;
203
+ }
204
+ if (d.type !== 'casper:html') return;
205
+ setContent(d.html);
206
+ reportHeight();
207
+ runScripts();
208
+ pollHeight(4000);
209
+ });
210
+ })();
211
+ `,v6=`
212
+ *, *::before, *::after { box-sizing: border-box; }
213
+ html, body { margin: 0; padding: 0; background: transparent; }
214
+ /* The host sizes the frame to fit, so a scrollbar in here is always a measuring
215
+ error rather than something to scroll. */
216
+ html { overflow: hidden; }
217
+ body {
218
+ font-family: var(--font-body, system-ui, sans-serif);
219
+ font-size: 14px;
220
+ line-height: 1.5;
221
+ color: var(--color-text-primary, #f8f8f2);
222
+ overflow-x: hidden;
223
+ }
224
+ #root { overflow-x: hidden; }
225
+ a { color: var(--color-accent, #bd93f9); }
226
+ ::-webkit-scrollbar { width: 8px; height: 8px; }
227
+ ::-webkit-scrollbar-thumb { background: var(--color-border, #44475a); border-radius: 4px; }
228
+ `;function N6(){return`<!doctype html>
229
+ <html>
230
+ <head>
231
+ <meta charset="utf-8">
232
+ <meta http-equiv="Content-Security-Policy" content="${S6()}">
233
+ <meta name="color-scheme" content="dark">
234
+ <style>${v6}</style>
235
+ <style id="theme"></style>
236
+ </head>
237
+ <body><div id="root"></div>
238
+ <!-- Runtime last: it grabs #root on the way in, so the element has to exist. -->
239
+ <script>${_6}<\/script>
240
+ </body>
241
+ </html>`}const w6=N6(),A6=256*1024;function I6(){const e=getComputedStyle(document.documentElement),t=n=>e.getPropertyValue(n).trim();return[`--color-background-primary:${t("--n0")}`,`--color-background-secondary:${t("--n1")}`,`--color-border:${t("--n2")}`,`--color-text-secondary:${t("--n4")}`,`--color-text-primary:${t("--n5")}`,`--color-accent:${t("--frost")}`,`--color-accent-alt:${t("--aurora-purple")}`,`--color-teal:${t("--frost-teal")}`,`--color-green:${t("--aurora-green")}`,`--color-yellow:${t("--aurora-yellow")}`,`--color-orange:${t("--aurora-orange")}`,`--color-red:${t("--aurora-red")}`,`--font-body:${t("--font-body")}`,`--font-mono:${t("--font-mono")}`].join(";")}function L6({code:e}){const t=_.useRef(null),[n,i]=_.useState(!1),[a,u]=_.useState(120),l=e.length>A6;_.useEffect(()=>{const f=t.current;if(!f)return;const p=T=>{if(T.source!==f.contentWindow)return;const E=T.data;(E==null?void 0:E.type)==="casper:height"&&typeof E.height=="number"?u(Math.min(Math.max(E.height,40),2e3)):(E==null?void 0:E.type)==="casper:prompt"&&typeof E.text=="string"&&Tg(E.text)};return window.addEventListener("message",p),()=>window.removeEventListener("message",p)},[]),_.useEffect(()=>{var f,p;n&&((p=(f=t.current)==null?void 0:f.contentWindow)==null||p.postMessage({type:"casper:theme",css:I6()},"*"))},[n]),_.useEffect(()=>{var f,p;!n||l||(p=(f=t.current)==null?void 0:f.contentWindow)==null||p.postMessage({type:"casper:html",html:e.trimStart()},"*")},[e,n,l]);const c=()=>i(!0);return l?h.jsxs("div",{className:"widget-error",children:["Widget is ",Math.round(e.length/1024)," KB, too large to render."]}):h.jsx("div",{className:"widget-wrap",style:{height:a},children:h.jsx("iframe",{ref:t,className:"widget-frame",title:"Widget",sandbox:"allow-scripts",srcDoc:w6,onLoad:c})})}function _E(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}const R6=new Intl.NumberFormat(void 0,{maximumFractionDigits:2});function vE(e){return e>0&&e<.01?"<0.01":R6.format(e)}function O6(e){return!kE(e)&&!CE(e)&&!SE(e)}function D6(e){return e.type==="tool_call"&&O6(e.tool)?{type:"tool",item:e,tool:e.tool}:e.type==="message"&&e.message.role==="thinking"?{type:"thought",item:e,text:e.message.text}:null}function NE(e){const t=[];let n=[];const i=()=>{n.length===1?t.push(n[0]):n.length>1&&t.push({type:"run",members:n}),n=[]};for(const a of e){const u=D6(a);if(u){n.push(u);continue}i(),t.push({type:"other",item:a})}return i(),t}function wE(e){return e?e.type==="run"||e.type==="tool"||e.type==="thought":!1}const AE=_.memo(function({entries:t,lastActive:n,streamingThought:i="",arrivedLive:a=()=>!1,chatId:u,onOpenFile:l,readOnly:c=!1}){const f=_.useMemo(()=>{const p=new Map;for(const T of t)T.type==="run"&&p.set(T,T.members.map(Oc));return p},[t]);return h.jsx(h.Fragment,{children:t.map((p,T)=>{const E=T===t.length-1,x=E&&n,b=E&&i&&wE(p)?i:void 0;if(p.type==="run"){const v=p.members[0],D=v.type==="tool"?v.tool.id:v.item.message.id,A=p.members.some(R=>R.type==="tool"&&a(R.tool.id));return h.jsx(Mc,{rows:f.get(p),liveThought:b,arriving:A,active:x},D)}if(p.type==="tool")return b!==void 0?h.jsx(Mc,{rows:[Oc(p)],liveThought:b,arriving:a(p.tool.id),active:x},p.tool.id):h.jsx(B0,{tool:p.tool,arriving:a(p.tool.id),active:x},p.tool.id);if(p.type==="thought")return b!==void 0?h.jsx(Mc,{rows:[Oc(p)],liveThought:b},p.item.message.id):h.jsx(dd,{text:p.text,live:x},p.item.message.id);const C=p.item;return C.type==="message"?C.message.role==="thinking"?h.jsx(dd,{text:C.message.text,live:E&&n},C.message.id):C.message.role==="assistant"?h.jsx("div",{className:"msg msg-assistant",children:h.jsx(Wi,{text:C.message.text})},C.message.id):h.jsx(P6,{message:C.message,chatId:u,onOpenFile:l,readOnly:c},C.message.id):C.type==="tool_call"?h.jsx(B0,{tool:C.tool,arriving:a(C.tool.id)},C.tool.id):C.type==="turn_error"?h.jsx(R0,{id:C.id,message:C.message,readOnly:c},C.id):C.type==="turn_interrupted"?h.jsx(R0,{id:C.id,readOnly:c},C.id):C.type==="turn_stats"?h.jsx(F6,{elapsedMs:C.elapsedMs,credits:C.credits},C.id):h.jsx(j6,{summary:C.summary},C.id)})})});function P6({message:e,chatId:t,onOpenFile:n,readOnly:i}){const[a,u]=_.useState(!1),[l,c]=_.useState(e.text),[f,p]=_.useState(!1),T=ge(R=>wd(R)&&R.pending.length===0),E=_.useRef(null),x=e.messageId,b=!i&&!!(t&&x);_.useEffect(()=>{if(!a)return;const R=E.current;R&&(R.focus(),R.setSelectionRange(R.value.length,R.value.length))},[a]),_.useEffect(()=>{const R=E.current;!a||!R||(R.style.height="auto",R.style.height=`${Math.min(R.scrollHeight,320)}px`)},[a,l]);const C=e.attachments??[],v=T&&!f&&(l.trim().length>0||C.length>0),D=async()=>{if(!x||!v)return;p(!0),await We.editPrompt(x,l,C)||p(!1)},A=async()=>{!x||f||(p(!0),await We.branchFrom(x),p(!1))};return h.jsxs("div",{className:`msg-user-wrap${a?" is-editing":""}`,children:[h.jsxs("div",{className:`msg msg-user${a?" is-editing":""}`,children:[t&&C.length>0&&h.jsx(IE,{chatId:t,attachments:C,onOpen:n}),a?h.jsxs("div",{className:"msg-edit",children:[h.jsx("textarea",{ref:E,className:"msg-edit-input","aria-label":"Edit message",value:l,rows:1,onChange:R=>c(R.target.value),onKeyDown:R=>{R.key==="Escape"?(R.preventDefault(),u(!1),c(e.text)):R.key==="Enter"&&!R.shiftKey&&!R.nativeEvent.isComposing&&(R.preventDefault(),D())}}),h.jsxs("div",{className:"msg-edit-actions",children:[h.jsx("button",{type:"button",className:"btn-sm btn-ghost",onClick:()=>{u(!1),c(e.text)},children:"Cancel"}),h.jsx("button",{type:"button",className:"btn-sm btn-primary",disabled:!v,onClick:()=>void D(),children:f?"Sending…":"Send"})]})]}):e.text&&h.jsx("div",{className:"msg-user-text",children:e.text})]}),b&&!a&&h.jsxs("div",{className:"msg-user-actions",children:[h.jsx("button",{type:"button",className:"msg-action","aria-label":"Edit message",title:"Edit message",disabled:!T||f,onClick:()=>{c(e.text),u(!0)},children:h.jsx(eb,{size:14})}),h.jsx("button",{type:"button",className:"msg-action","aria-label":"Branch from here",title:"Branch from here: a new chat with the conversation up to this message's reply",disabled:!T||f,onClick:()=>void A(),children:h.jsx(tb,{size:14})})]})]})}function IE({chatId:e,attachments:t,onOpen:n}){return h.jsx("div",{className:"msg-attachments",children:t.map(i=>i.kind==="image"?h.jsx("a",{href:Qe.previewUrl(e,i.path),target:"_blank",rel:"noopener noreferrer",className:"msg-image-link",children:h.jsx("img",{src:Qe.previewUrl(e,i.path),alt:i.name,className:"msg-image",...xE})},i.path):h.jsxs("button",{type:"button",className:"msg-file",title:i.path,onClick:()=>n(i.path),children:[h.jsx(kg,{size:14}),h.jsx("span",{className:"msg-file-name",children:i.name}),h.jsx("span",{className:"msg-file-size",children:_E(i.size)})]},i.path))})}function Oc(e){return e.type==="tool"?{kind:"tool",tool:e.tool}:{kind:"thought",text:e.text}}function M6(e,t,n){if(t>0)return!0;for(let i=e.length-1;i>=0;i--){const a=e[i];if((a.type==="turn_error"||a.type==="turn_interrupted")&&a.id===n)return!1;if(a.type==="message"&&a.message.role==="user")return!0}return!1}function R0({id:e,message:t,readOnly:n=!1}){const i=t!==void 0,[a,u]=_.useState(!1),[l,c]=_.useState(!1),f=i?pg(t):null,p=ge(b=>!n&&M6(b.items,b.pending.length,e)),T=ge(b=>{for(let C=b.items.length-1;C>=0;C--){const v=b.items[C];if(v.type==="message"&&v.message.role==="user"&&!v.message.steer)return v.message.text}return""});if(p&&!i)return null;const E=()=>{var b;(b=navigator.clipboard)==null||b.writeText(t??"").then(()=>{c(!0),setTimeout(()=>c(!1),1500)},()=>{})},x=!!T&&!n&&!p;return h.jsxs("div",{className:`turn-end${i?" is-failed":""}${p?" is-settled":""}`,role:"status",children:[h.jsxs("div",{className:"turn-end-row",children:[h.jsx("span",{className:"turn-end-icon",children:i?h.jsx(Ad,{size:16}):h.jsx(U2,{size:16})}),h.jsx("span",{className:"turn-end-text",children:f?f.title:"Casper's response was interrupted"}),h.jsxs("span",{className:"turn-end-actions",children:[i&&h.jsxs("button",{className:"btn-sm btn-ghost",onClick:()=>u(b=>!b),"aria-expanded":a,children:[a?"Hide details":"Details",h.jsx("span",{className:`toolline-chevron ${a?"is-open":""}`,children:h.jsx(kr,{size:13})})]}),x&&h.jsxs("button",{className:"btn-sm",onClick:()=>We.retryTurn(T),children:[h.jsx(yg,{size:13}),"Retry"]})]})]}),i&&h.jsx(Vn,{open:a,children:h.jsxs("div",{className:"turn-end-body",children:[(f==null?void 0:f.fix)&&h.jsx("p",{className:"turn-end-fix",children:f.fix}),h.jsx("pre",{className:"turn-end-raw",children:t}),h.jsx("button",{className:"btn-sm",onClick:E,children:l?"Copied":"Copy details"})]})})]})}function F6({elapsedMs:e,credits:t}){const n=[...e?[e<1e4?`${(e/1e3).toFixed(1)}s`:Yu(e/1e3)]:[],...t?[`${vE(t)} credits`]:[]];return n.length===0?null:h.jsx("div",{className:"turn-stats",children:n.join(" · ")})}function j6({summary:e}){const[t,n]=_.useState(!1);return h.jsxs("div",{className:"compaction",children:[h.jsx("div",{className:"compaction-rule",children:h.jsxs("button",{className:"compaction-head",onClick:()=>n(i=>!i),"aria-expanded":t,children:[h.jsx(G2,{size:14,className:"compaction-icon"}),h.jsx("span",{className:"compaction-label",children:"Conversation compacted"}),h.jsx("span",{className:"compaction-toggle",children:t?"Hide summary":"Show summary"})]})}),t&&h.jsx("div",{className:"compaction-body",children:h.jsx(Wi,{text:e})})]})}function B6(e){const t=e.input;return typeof(t==null?void 0:t.name)=="string"?[{name:t.name}]:[]}function Dc(e){if(!e.createdAt)return 0;const n=(e.status==="working"||!e.updatedAt?Date.now():new Date(e.updatedAt).getTime())-new Date(e.createdAt).getTime();return n>0?n/1e3:0}function O0(e,t){const n=e.filter(u=>u.status==="completed"||u.status==="failed").length,i=e.length;return t?`Running ${i} ${i===1?"subagent":"subagents"}, ${n} done`:i===1?"Ran 1 subagent":`Ran ${i} subagents`}function U6({tool:e}){const t=ge(v=>v.activeId),n=ge(v=>v.subagents),i=ge(v=>v.setSubagents),a=_.useMemo(()=>B6(e),[e]),u=_.useMemo(()=>n.filter(v=>v.toolCallId===e.id),[n,e.id]),l=u.some(v=>v.status==="working"||v.status==="pending"),[c,f]=_.useState(e.status==="in_progress"||l);_.useEffect(()=>{l&&f(!0)},[l]);const[p,T]=_.useState("loading");_.useEffect(()=>{if(!t)return;let v=!0;return H6(t).then(D=>{v&&(i(D.subagents),T("loaded"))}).catch(()=>{v&&T("failed")}),()=>{v=!1}},[c,t,i]);const[E,x]=_.useState(null),b=e.status==="in_progress";if(p==="loaded"&&u.length===0&&!b)return null;const C=u.length>0?O0(u,l):a.length>0?O0(a.map(v=>({sessionId:v.name,stageName:v.name,status:b?"pending":"completed",createdAt:"",updatedAt:""})),b):b?"Running subagents":"Ran subagents";return h.jsxs("div",{className:"toolline-wrap",children:[h.jsxs("button",{className:"toolline",onClick:()=>f(v=>!v),"aria-expanded":c,children:[h.jsx("span",{className:`toolline-text ${l?"is-live":""}`,children:C}),h.jsx("span",{className:`toolline-chevron ${c?"is-open":""}`,children:h.jsx(kr,{size:13})})]}),h.jsx(Vn,{open:c,children:h.jsx("div",{className:"toolline-box",children:u.length>0?u.map(v=>h.jsx($6,{chatId:t,subagent:v,open:E===v.sessionId,onToggle:()=>x(D=>D===v.sessionId?null:v.sessionId)},v.sessionId)):p!=="failed"&&a.length>0?a.map(v=>h.jsx("div",{className:"toolline-row",children:h.jsxs("div",{className:"agent-row",children:[h.jsx("span",{className:"agent-dot"}),h.jsx("span",{className:"agent-name",children:v.name}),h.jsx("span",{className:"agent-what is-live",children:"Loading"})]})},v.name)):h.jsx("div",{className:"toolline-row",children:h.jsx("div",{className:"agent-row",children:h.jsx("span",{className:`agent-what ${p==="failed"?"":"is-live"}`,children:p==="failed"?"Couldn't load the subagents.":"Loading"})})})})})]})}const Pc=new Map;function H6(e){let t=Pc.get(e);return t||(t=Qe.subagents(e).finally(()=>Pc.delete(e)),Pc.set(e,t)),t}function z6(e){return e.status==="completed"?"Done":e.status==="failed"?e.activity??"Failed":e.activity??"Working"}function $6({chatId:e,subagent:t,open:n,onToggle:i}){const a=t.status==="working",[u,l]=_.useState(()=>Dc(t));return _.useEffect(()=>{if(l(Dc(t)),!a)return;const c=setInterval(()=>l(Dc(t)),1e3);return()=>clearInterval(c)},[a,t]),h.jsxs("div",{className:"toolline-row",children:[h.jsxs("button",{className:"agent-row",onClick:i,"aria-expanded":n,children:[h.jsx("span",{className:`agent-dot agent-dot-${t.status}`}),h.jsx("span",{className:"agent-name",children:t.stageName}),h.jsx("span",{className:`agent-what ${a?"is-live":""}`,children:z6(t)}),h.jsx("span",{className:"agent-time",children:t.status==="pending"?"":Yu(u)})]}),h.jsx(Vn,{open:n,children:h.jsx("div",{className:"agent-detail",children:e&&h.jsx(V6,{chatId:e,subagentId:t.sessionId,live:a,elapsed:Yu(u)})})})]})}const D0=6,P0=40,W6=3e3;function Y6(e){const t=e.filter(u=>u.type==="message"&&u.message.role==="assistant").length,n=e.filter(u=>u.type==="tool_call").length,i=t===1?"1 message":`${t} messages`,a=n===1?"1 tool call":`${n} tool calls`;return`${i} and ${a}`}function V6({chatId:e,subagentId:t,live:n,elapsed:i}){const a=ge(W=>W.openFilePreview),[u,l]=_.useState(null),[c,f]=_.useState(!1),[p,T]=_.useState(null),[E,x]=_.useState(D0);_.useEffect(()=>{let W=!0;const q=()=>Qe.subagentDetail(e,t).then(ae=>{W&&l(ae.transcript)}).catch(()=>{W&&f(!0)});if(q(),!n)return()=>void(W=!1);const B=setInterval(q,W6);return()=>{W=!1,clearInterval(B)}},[e,t,n]);const b=u==null?void 0:u.at(-1),C=!n&&(b==null?void 0:b.type)==="message"&&b.message.role==="assistant"?b:void 0,v=_.useMemo(()=>u?C?u.slice(0,-1):u:[],[u,C]),D=_.useMemo(()=>NE(v),[v]);if(c)return h.jsx("div",{className:"agent-note",children:"Couldn't load this subagent's transcript."});if(u===null)return h.jsx("div",{className:"agent-note",children:"Loading…"});const A=p??n,R=D.slice(-E),U=D.length-R.length;return h.jsxs("div",{className:"agent-transcript",children:[C&&h.jsx("div",{className:"msg msg-assistant",children:h.jsx(Wi,{text:C.message.text})}),D.length>0&&h.jsxs("div",{children:[h.jsxs("button",{className:"toolline",onClick:()=>T(!A),"aria-expanded":A,children:[h.jsxs("span",{className:"toolline-text",children:[Y6(u)," ",n?"so far":`over ${i}`]}),h.jsx("span",{className:`toolline-chevron ${A?"is-open":""}`,children:h.jsx(kr,{size:13})})]}),h.jsx(Vn,{open:A,children:h.jsxs("div",{className:`agent-steps ${E>D0?"is-paged":""}`,children:[U>0&&h.jsxs("button",{className:"agent-earlier",onClick:()=>{T(!0),x(W=>W+P0)},children:["Show ",Math.min(P0,U)," earlier of ",U]}),h.jsx(AE,{entries:R,lastActive:n,chatId:e,onOpenFile:a,readOnly:!0})]})})]})]})}const q6=_.memo(U6),wt=e=>e&&typeof e=="object"?e:null,qe=e=>typeof e=="string"?e:void 0,Q6=/\.(png|jpe?g|gif|webp|bmp|svg)$/i;function ld(e){const t=wt(e.input);if(!t)return[];if(!Array.isArray(t.operations)){const i=qe(t.path);return i&&Q6.test(i)&&fa(e)==="read"?[i]:[]}const n=[];for(const i of t.operations){const a=wt(i);if(a&&a.mode==="Image"&&Array.isArray(a.image_paths))for(const u of a.image_paths)typeof u=="string"&&n.push(u)}return n}const cd=e=>`/api/fs/file?path=${encodeURIComponent(e)}`,M0=new Map;function G6(e){let t=M0.get(e);return t||(t=fetch(cd(e),{method:"HEAD"}).then(n=>n.ok&&(n.headers.get("content-type")??"").startsWith("image/")).catch(()=>!1),M0.set(e,t)),t}function K6(e){const t=e.join(`
242
+ `),[n,i]=_.useState(null);return _.useEffect(()=>{if(!t)return;let a=!1;const u=t.split(`
243
+ `);return Promise.all(u.map(G6)).then(l=>{a||i({key:t,paths:u.filter((c,f)=>l[f])})}),()=>{a=!0}},[t]),t?(n==null?void 0:n.key)===t?n.paths:null:[]}function LE(e){const t=ld(e),n=K6(t),i=n??t,a=n4(e),u=t.length>0&&n!==null&&n.length===0&&a==null;return{images:i,body:a,hidden:u}}function X6({tool:e,arriving:t,active:n}){if(SE(e))return h.jsx(q6,{tool:e});const i=kE(e);if(i)return e.status==="failed"?h.jsxs("div",{className:"widget-error",children:["Widget ",y6(i.title)||"call"," failed."]}):i.code?h.jsx(L6,{code:i.code}):null;const a=CE(e);return a?h.jsx(k6,{data:a,toolId:e.id}):h.jsx(J6,{tool:e,arriving:t,active:n})}function RE({paths:e}){return e.length===0?null:h.jsx("div",{className:"toolcall-images",children:e.map(t=>h.jsx("a",{href:cd(t),target:"_blank",rel:"noopener noreferrer",className:"toolcall-image-link",children:h.jsx("img",{src:cd(t),alt:t.split("/").pop()??"image",className:"toolcall-image",...xE})},t))})}function J6({tool:e,arriving:t=!1,active:n=!1}){const i=e.status,[a,u]=_.useState(!1),{images:l,body:c,hidden:f}=LE(e),p=c!=null||l.length>0;return f?null:h.jsxs("div",{className:`toolline-wrap ${t?"is-arriving":""}`,children:[h.jsx(ha,{text:Zd(e,i==="in_progress"),detail:DE(e),live:i==="in_progress"||n&&i!=="failed",failed:i==="failed",open:a,onToggle:p?()=>u(T=>!T):void 0}),p&&h.jsx(Vn,{open:a,children:h.jsxs("div",{className:"toolcall-body",children:[h.jsx(RE,{paths:l}),c]})})]})}function ha({text:e,detail:t,live:n,failed:i,open:a,onToggle:u}){const l=h.jsxs(h.Fragment,{children:[h.jsx("span",{className:`toolline-text ${n?"is-live":""}`,children:e}),t&&h.jsx("span",{className:"toolline-detail",children:t}),u&&h.jsx("span",{className:`toolline-chevron ${a?"is-open":""}`,children:h.jsx(kr,{size:13})})]}),c=`toolline ${i?"is-failed":""}`;return u?h.jsx("button",{className:c,onClick:u,"aria-expanded":a,children:l}):h.jsx("div",{className:c,children:l})}function Z6({rows:e,liveThought:t,arriving:n=!1,active:i=!1}){const[a,u]=_.useState(!1),l=e.flatMap(T=>T.kind==="tool"?[T.tool]:[]),c=l.find(T=>T.status==="in_progress"),f=c?Zd(c,!0):t!==void 0?"Thinking":p6(l),p=!!c||t!==void 0||i;return h.jsxs("div",{className:`toolline-wrap ${n?"is-arriving":""}`,children:[h.jsx(ha,{text:f,live:p,failed:!1,open:a,onToggle:()=>u(T=>!T)}),h.jsx(Vn,{open:a,children:h.jsx("div",{className:"toolline-box",children:[...e.map((T,E)=>T.kind==="tool"?h.jsx(e4,{tool:T.tool},T.tool.id):h.jsx(F0,{text:T.text},`thought-${E}`)),...t!==void 0?[h.jsx(F0,{text:t,live:!0},`thought-${e.length}`)]:[]]})})]})}function e4({tool:e}){const t=e.status,[n,i]=_.useState(!1),{images:a,body:u,hidden:l}=LE(e),c=u!=null||a.length>0;return l?null:h.jsxs("div",{className:"toolline-row",children:[h.jsx(ha,{text:Zd(e,t==="in_progress"),detail:DE(e),live:t==="in_progress",failed:t==="failed",open:n,onToggle:c?()=>i(f=>!f):void 0}),c&&h.jsx(Vn,{open:n,children:h.jsxs("div",{className:"toolcall-body",children:[h.jsx(RE,{paths:a}),u]})})]})}function F0({text:e,live:t=!1}){const[n,i]=_.useState(!1);return!t&&!e.trim()?null:h.jsxs("div",{className:"toolline-row",children:[h.jsx(ha,{text:"Thinking",live:t,failed:!1,open:n,onToggle:()=>i(a=>!a)}),h.jsx(Vn,{open:n,children:h.jsx("div",{className:"toolcall-body",children:h.jsx("div",{className:"thought-text",children:e})})})]})}function t4({text:e,live:t=!1,arriving:n=!1}){const[i,a]=_.useState(!1);return!t&&!e.trim()?null:h.jsxs("div",{className:`toolline-wrap ${n?"is-arriving":""}`,children:[h.jsx(ha,{text:"Thinking",live:t,failed:!1,open:i,onToggle:()=>a(u=>!u)}),h.jsx(Vn,{open:i,children:h.jsx("div",{className:"toolcall-body",children:h.jsx("div",{className:"thought-text",children:e})})})]})}function n4(e){switch(fa(e)){case"shell":return r4(e);case"write":return i4(e);case"read":return a4(e);case"grep":return u4(e);case"todo":return o4(e);case"webfetch":return c4(e);case"websearch":return f4(e);case"introspect":return l4(e);default:return vr(e)}}function r4(e){const t=wt(e.input),n=qe(t==null?void 0:t.command)??"",i=_r(e),a=ni(i),u=a?qe(a.stdout)??"":ti(i),l=a?qe(a.stderr)??"":"",c=a?String(a.exit_status??""):"",f=c!==""&&!/\b0$/.test(c);return h.jsxs("div",{className:"shell-panel",children:[n&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"shell-label",children:"bash"}),h.jsx(on,{code:n,lang:"bash"})]}),u.trim()&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"shell-label",children:"Output"}),h.jsx(on,{code:u,lang:"text"})]}),l.trim()&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"shell-label",children:"Errors"}),h.jsx(on,{code:l,lang:"text"})]}),f&&h.jsx("div",{className:"toolcall-exit",children:c})]})}function OE({path:e}){const t=ge(l=>l.activeId),n=ge(l=>{var c;return((c=l.chats.find(f=>f.chatId===l.activeId))==null?void 0:c.cwd)??""}),i=ge(l=>l.openFilePreview),a=t?i6(n,e):null,u=a??e;return a?h.jsx("div",{className:"toolcall-file",children:h.jsx("button",{className:"toolcall-file-name",onClick:()=>i(a),title:`Preview ${e}`,children:u})}):h.jsx("div",{className:"toolcall-file",title:e,children:h.jsx("span",{className:"toolcall-file-name is-plain",children:u})})}function i4(e){const t=wt(e.input),n=qe(t==null?void 0:t.path)??"",i=p=>n?h.jsxs(h.Fragment,{children:[h.jsx(OE,{path:n}),p]}):p,a=qe(t==null?void 0:t.command);if(a==="create"||a==="insert"){const p=qe(t==null?void 0:t.content);if(p!==void 0)return i(h.jsx(on,{code:p,lang:od(n)}))}const u=qe(t==null?void 0:t.oldStr),l=qe(t==null?void 0:t.newStr);if(u!==void 0&&l!==void 0)return i(h.jsx(j0,{diff:L0(u,l)}));const c=g6(e.content);if(c)return i(h.jsx(j0,{diff:L0(c.oldText,c.newText)}));const f=qe(t==null?void 0:t.text);return i(f!==void 0?h.jsx(on,{code:f,lang:od(n)}):vr(e))}function s4(e){const t=/^\s*<file\b[^>]*>\s*<content>\n?([\s\S]*?)\n?<\/content>\s*<\/file>\s*$/.exec(e);return t?t[1]:e}function a4(e){const t=wt(e.input),n=t&&Array.isArray(t.operations)?t.operations:[],i=ti(_r(e));if(!n.length&&ld(e).length>0)return null;if(!i.trim())return ld(e).length>0?null:vr(e);const a=n.map(wt).find(f=>f&&f.mode!=="Image"),u=a?void 0:qe(t==null?void 0:t.path),l=u??(a&&typeof a.path=="string"?a.path:""),c=(a==null?void 0:a.mode)==="Line"||u?od(l):"text";return h.jsxs(h.Fragment,{children:[l&&h.jsx(OE,{path:l}),h.jsx(on,{code:u?s4(i):i,lang:c})]})}function u4(e){const t=_r(e),n=ni(t),i=n&&Array.isArray(n.results)?n.results.filter(u=>{const l=wt(u);return!!l&&(Array.isArray(l.matches)||typeof l.file=="string")}):null;if(i&&i.length>0)return h.jsx("div",{className:"grep",children:i.map((u,l)=>{const c=wt(u),f=c&&typeof c.file=="string"?c.file:"",p=c&&Array.isArray(c.matches)?c.matches.map(String):[];return h.jsxs("div",{className:"grep-file",children:[h.jsx("div",{className:"grep-fname",children:f}),h.jsx("pre",{className:"grep-matches",children:p.join(`
244
+ `)})]},l)})});const a=ti(t);return a.trim()?h.jsx(on,{code:a,lang:"text"}):vr(e)}function o4(e){const t=E6(_r(e));return t?t.length===0?h.jsx("div",{className:"todo-empty",children:"All tasks done."}):h.jsx("div",{className:"todo",children:t.map((n,i)=>h.jsxs("div",{className:`todo-item ${n.done?"is-done":""}`,children:[h.jsx("span",{className:"todo-check","aria-hidden":!0,children:n.done?"☑":"☐"}),h.jsx("span",{className:"todo-text",children:n.desc})]},i))}):vr(e)}function l4(e){const t=wt(e.input),n=qe(t==null?void 0:t.query)??qe(t==null?void 0:t.doc_path),i=_r(e),a=ni(i),u=(a?qe(a.documentation)??ef(a):null)??ti(i);return h.jsxs(h.Fragment,{children:[n&&h.jsxs("div",{className:"toolcall-section",children:[h.jsx("div",{className:"toolcall-label",children:"Query"}),h.jsx(on,{code:n,lang:"text"})]}),u.trim()?h.jsx("div",{className:"toolcall-doc",children:h.jsx(Wi,{text:u})}):vr(e)]})}function c4(e){const t=wt(e.input),n=qe(t==null?void 0:t.url),i=qe(t==null?void 0:t.mode),a=qe(t==null?void 0:t.search_terms),u=_r(e),l=ni(u),c=l?ef(l)??qe(l.content)??JSON.stringify(l,null,2):ti(u);return h.jsxs(h.Fragment,{children:[n&&h.jsxs("div",{className:"toolcall-meta",children:[h.jsx("a",{className:"toolcall-link",href:n,target:"_blank",rel:"noopener noreferrer",children:n}),i&&h.jsx("span",{className:"toolcall-tag",children:i})]}),a&&h.jsxs("div",{className:"toolcall-section",children:[h.jsx("div",{className:"toolcall-label",children:"Search terms"}),h.jsx(on,{code:a,lang:"text"})]}),c.trim()?h.jsx(on,{code:c,lang:"markdown"}):vr(e)]})}function d4(e){if(!e)return null;const t=Array.isArray(e.results)?e.results:Array.isArray(e.items)?e.items:Array.isArray(e.data)?e.data:null;if(!t)return null;const n=[];for(const i of t){const a=wt(i);a&&n.push({title:qe(a.title)??qe(a.name),url:qe(a.url)??qe(a.link)??qe(a.href),snippet:qe(a.snippet)??qe(a.description)??qe(a.content)??qe(a.text)})}return n.length?n:null}function f4(e){const t=_r(e),n=d4(ni(t)??wt(e.output));return n?h.jsx("ul",{className:"websearch",children:n.map((i,a)=>{const u=h4(i.url),l=i.title??i.url??"(untitled)";return h.jsx("li",{children:i.url?h.jsxs("a",{className:"websearch-row",href:i.url,target:"_blank",rel:"noopener noreferrer",title:i.url,children:[h.jsx("span",{className:"websearch-title",children:l}),u&&h.jsx("span",{className:"websearch-site",children:u})]}):h.jsx("span",{className:"websearch-row",children:h.jsx("span",{className:"websearch-title",children:l})})},a)})}):vr(e)}function h4(e){if(e)try{return new URL(e).hostname.replace(/^www\./,"")}catch{return}}function DE(e){if(fa(e)!=="websearch")return;const t=wt(e.input);if(!qe(t==null?void 0:t.__tool_use_purpose))return qe(t==null?void 0:t.query)}function vr(e){const t=e.input;let n="";if(typeof t=="string")n=t;else if(wt(t)){const{__tool_use_purpose:f,...p}=wt(t);n=JSON.stringify(p,null,2)}const i=_r(e),a=ni(i),u=a?ef(a):null,l=u??(a?JSON.stringify(a,null,2):ti(i)),c=u?"text":/^\s*[[{]/.test(l)?"json":"text";return h.jsxs(h.Fragment,{children:[n&&n!=="{}"&&h.jsxs("div",{className:"toolcall-section",children:[h.jsx("div",{className:"toolcall-label",children:"Input"}),h.jsx(on,{code:n,lang:wt(t)?"json":"text"})]}),l.trim()&&h.jsxs("div",{className:"toolcall-section",children:[h.jsx("div",{className:"toolcall-label",children:"Output"}),h.jsx(on,{code:l,lang:c})]})]})}function on({code:e,lang:t}){const[n,i]=_.useState(null);return _.useEffect(()=>{let a=!1;return Jd(e,t).then(u=>!a&&i(u)).catch(()=>!a&&i(null)),()=>{a=!0}},[e,t]),n?h.jsx("div",{className:"toolcode",dangerouslySetInnerHTML:{__html:n}}):h.jsx("pre",{className:"toolcode toolcode-plain",children:e})}function j0({diff:e}){return h.jsx("div",{className:"diff-body",children:e.map((t,n)=>h.jsxs("div",{className:`diff-line diff-${t.type}`,children:[h.jsx("span",{className:"diff-sign","aria-hidden":!0,children:t.type==="add"?"+":t.type==="del"?"-":" "}),h.jsx("span",{className:"diff-code",children:t.text||" "})]},n))})}const B0=_.memo(X6),Mc=_.memo(Z6),dd=_.memo(t4),p4=4,U0=300,m4=240,g4=80;function E4(e,t){if(e<=0)return{offset:0,limit:0};const n=Math.max(0,e-t);return{offset:n,limit:e-n}}function T4(e,t,n,i){const a=t-e,u=Math.max(0,i-n);return a>u+p4}class y4{constructor(t){Oe(this,"ports");Oe(this,"frames");Oe(this,"follow",!1);Oe(this,"lastScrollTop",0);Oe(this,"lastMaxTop",0);Oe(this,"anchor",null);Oe(this,"loadingOlder",!1);Oe(this,"showButton",!1);Oe(this,"initializedFor",null);Oe(this,"prevPendingCount",0);Oe(this,"raf",0);Oe(this,"content",{chatId:null,itemCount:0,pendingCount:0,remainingOlder:0});Oe(this,"followTick",()=>{var a,u;this.raf=0;const t=this.ports.element();if(!t||!this.follow)return;const n=this.bottomOf(t),i=n-t.scrollTop;if(i<=1||(u=(a=this.ports).reducedMotion)!=null&&u.call(a)){t.scrollTop=n,this.lastScrollTop=t.scrollTop,this.lastMaxTop=n;return}t.scrollTop+=Math.max(10,Math.ceil(i*.3)),this.lastScrollTop=t.scrollTop,this.lastMaxTop=n,this.raf=this.frames.request(this.followTick)});this.ports=t,this.frames=t.frames??{request:n=>requestAnimationFrame(n),cancel:n=>cancelAnimationFrame(n)}}reset(){this.follow=!1,this.prevPendingCount=0,this.anchor=null,this.cancelFollow(),this.setFlags({loadingOlder:!1,showScrollButton:!1})}dispose(){this.cancelFollow()}onContent(t){this.content=t;const n=this.ports.element();if(n){if(this.initializedFor!==t.chatId&&t.itemCount>0){this.initializedFor=t.chatId,this.follow=!1,n.scrollTop=this.bottomOf(n),this.lastScrollTop=n.scrollTop,this.lastMaxTop=this.bottomOf(n),this.prevPendingCount=t.pendingCount,this.setFlags({showScrollButton:!1}),this.fillIfShort(n);return}t.pendingCount>this.prevPendingCount&&(this.follow=!0),this.prevPendingCount=t.pendingCount,this.follow?this.scheduleFollow():this.updateButton(n),this.fillIfShort(n)}}fillIfShort(t){t.clientHeight>0&&this.bottomOf(t)<U0&&this.loadOlder()}onScroll(){const t=this.ports.element();if(!t)return;const n=this.bottomOf(t);T4(t.scrollTop,this.lastScrollTop,n,this.lastMaxTop)&&(this.follow=!1),this.lastScrollTop=t.scrollTop,this.lastMaxTop=n,this.updateButton(t),t.scrollTop<U0&&this.loadOlder()}jumpToLatest(){this.follow=!0,this.setFlags({showScrollButton:!1}),this.scheduleFollow()}restoreAnchor(){if(this.anchor==null)return;const t=this.ports.element();t&&(t.scrollTop=t.scrollHeight-this.anchor),this.anchor=null,this.setFlags({loadingOlder:!1})}loadOlder(){const t=this.ports.element(),n=this.content.chatId;if(!t||!n||this.loadingOlder||this.content.remainingOlder<=0)return;this.setFlags({loadingOlder:!0});const{offset:i,limit:a}=E4(this.content.remainingOlder,g4);this.ports.fetchPage(n,i,a).then(u=>{if(this.content.chatId!==n)return this.abandonPage();if(u.length===0)return this.abandonPage();const l=this.ports.element();l&&(this.anchor=l.scrollHeight-l.scrollTop),this.ports.prepend(u)}).catch(()=>{this.abandonPage(),console.error("could not load earlier transcript page")})}abandonPage(){this.anchor=null,this.setFlags({loadingOlder:!1})}scheduleFollow(){this.raf||(this.raf=this.frames.request(this.followTick))}cancelFollow(){this.raf&&this.frames.cancel(this.raf),this.raf=0}bottomOf(t){return t.scrollHeight-t.clientHeight}updateButton(t){const n=this.bottomOf(t)-t.scrollTop;this.setFlags({showScrollButton:n>m4})}setFlags(t){const n=t.loadingOlder??this.loadingOlder,i=t.showScrollButton??this.showButton;n===this.loadingOlder&&i===this.showButton||(this.loadingOlder=n,this.showButton=i,this.ports.onFlags({loadingOlder:n,showScrollButton:i}))}}const Fc=typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null;function x4(e){if(!e)return!1;if(e.type==="run"||e.type==="thought")return!0;if(e.type==="tool")return e.tool.status!=="failed";const t=e.item;return t.type==="message"?t.message.role==="thinking":t.type==="tool_call"&&t.tool.status==="in_progress"}const b4=_.memo(function(){const t=ge(M=>M.items),n=ge(M=>M.streamingText),i=ge(M=>M.streamingThought),a=ge(M=>M.pending),u=_.useMemo(()=>a.filter(M=>!M.steer),[a]),l=_.useMemo(()=>a.filter(M=>M.steer),[a]),c=u.some(M=>M.status==="sending"),f=ge(M=>M.observability.turnStatus),p=ge(M=>M.observability.compacting),T=ge(M=>M.activeId),E=ge(M=>M.openFilePreview),x=ge(M=>M.remainingOlder),b=_.useRef({session:null,ids:new Set});b.current.session!==T&&(b.current={session:T,ids:new Set(t.filter(M=>M.type==="tool_call").map(M=>M.tool.id))});const C=_.useCallback(M=>!b.current.ids.has(M),[]),v=_.useMemo(()=>NE(t),[t]),D=f==="running"&&!n&&u.length===0,A=!!i&&u.length===0||D&&x4(v.at(-1)),R=(f==="running"||c)&&!n&&!A,U=M=>h.jsxs("div",{className:`msg msg-user msg-pending ${M.status==="failed"?"is-failed":""}`,children:[T&&M.attachments&&M.attachments.length>0&&h.jsx(IE,{chatId:T,attachments:M.attachments,onOpen:E}),M.text&&h.jsx("div",{className:"msg-user-text",children:M.text}),M.status==="failed"&&h.jsxs("div",{className:"msg-failed",children:[h.jsx("span",{className:"msg-failed-why",children:M.error??"Failed to send."}),h.jsx("button",{className:"msg-retry",onClick:()=>We.retrySend(M.id),children:"Retry"})]})]},M.id),W=_.useRef(null),[q,B]=_.useState({loadingOlder:!1,showScrollButton:!1}),ae=_.useRef(null);ae.current||(ae.current=new y4({element:()=>W.current,fetchPage:(M,me,V)=>Qe.transcriptPage(M,me,V).then(pe=>pe.items),prepend:M=>ge.getState().prependItems(M),onFlags:B,reducedMotion:()=>(Fc==null?void 0:Fc.matches)??!1}));const Z=ae.current;_.useEffect(()=>(Z.reset(),()=>Z.dispose()),[T,Z]),_.useEffect(()=>{Z.onContent({chatId:T,itemCount:t.length,pendingCount:a.length,remainingOlder:x})},[t,n,i,a,T,p,x,Z]),_.useLayoutEffect(()=>{Z.restoreAnchor()},[t,Z]);const ce=t.length===0&&!n&&!i&&u.length===0;return h.jsxs("div",{className:"transcript-wrap",children:[q.loadingOlder&&h.jsxs("div",{className:"loading-older",role:"status",children:[h.jsx(br,{size:14}),h.jsx("span",{children:"Loading earlier messages…"})]}),h.jsxs("div",{className:"transcript",ref:W,onScroll:()=>Z.onScroll(),children:[ce&&h.jsxs("div",{className:"transcript-empty",children:[h.jsx("p",{className:"empty-title",children:"Casper is here."}),h.jsx("p",{className:"empty-sub",children:"Hand off a task. Casper keeps working server-side and has it ready when you get back."})]}),h.jsx(AE,{entries:v,lastActive:D,streamingThought:u.length===0?i:"",arrivedLive:C,chatId:T,onOpenFile:E}),u.map(U),i&&!wE(v.at(-1))&&u.length===0&&h.jsx(dd,{text:i,live:!0}),n&&h.jsx("div",{className:"msg msg-assistant",children:h.jsx(Wi,{text:n,streaming:!0})}),R&&h.jsxs("div",{className:"thinking",children:[h.jsx("span",{className:"thinking-dot"}),h.jsx("span",{className:"thinking-dot"}),h.jsx("span",{className:"thinking-dot"})]}),l.map(U),p&&h.jsx("div",{className:"compaction compaction-live",children:h.jsx("div",{className:"compaction-rule",children:h.jsxs("span",{className:"compaction-head",children:[h.jsx(br,{size:13,className:"compaction-icon"}),h.jsx("span",{className:"compaction-label",children:"Compacting conversation…"})]})})})]}),q.showScrollButton&&h.jsx("button",{className:"scroll-to-bottom",onClick:()=>Z.jumpToLatest(),"aria-label":"Scroll to latest",title:"Scroll to latest",children:h.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:h.jsx("polyline",{points:"6 9 12 15 18 9"})})})]})}),En="/",jc=2;function k4(e){if(!e||e===En)return En;const t=e.replace(/\/+$/,"").lastIndexOf(En);return t<=0?En:e.slice(0,t)}function C4(e){const t=[{name:En,path:En}];let n="";for(const i of e.split(En).filter(Boolean))n=`${n}${En}${i}`,t.push({name:i,path:n});return t}function S4(e,t){return t.slice(e.length).replace(/^\/+/,"")}function _4({initialPath:e,onChange:t,onSubmit:n}){const[i,a]=_.useState(e.trim()),[u,l]=_.useState(""),[c,f]=_.useState(null),[p,T]=_.useState(-1),[E,x]=_.useState(null),b=_.useRef(null),C=_.useRef(null),v=_.useRef(""),D=_.useRef(!1),A=_.useRef(i);A.current=i;const R=_.useRef(t);R.current=t;const U=_.useId(),W=`${U}-listbox`,q=_.useMemo(()=>{if(u.startsWith(En)||!i)return u;const S=i.endsWith(En)?i:i+En;return u?S+u:S},[i,u]);_.useEffect(()=>{v.current=q;const S=setTimeout(()=>{Qe.listDirs(q).then(P=>{v.current===q&&(f(P),!D.current&&P.dir&&(D.current=!0,A.current||a(P.dir)),R.current(P.target))}).catch(()=>{v.current===q&&f(null)})},150);return()=>clearTimeout(S)},[q]);const B=(c==null?void 0:c.entries)??[],ae=(c==null?void 0:c.dir)??i,Z=C4(ae),ce=Z.length>jc+2,M=ce?Z.slice(1,-jc):[],me=ce?Z.slice(-jc):Z.slice(1),V=Z[0],pe=Z[Z.length-1];_.useEffect(()=>{var P,G;if(p<0)return;const S=(P=C.current)==null?void 0:P.children[p];(G=S==null?void 0:S.scrollIntoView)==null||G.call(S,{block:"nearest"})},[p]);const de=S=>{var P;a(S),l(""),T(-1),(P=b.current)==null||P.focus()},ee=S=>{if(S.key==="ArrowDown"&&B.length>0)S.preventDefault(),T(P=>Math.min(P+1,B.length-1));else if(S.key==="ArrowUp"&&B.length>0)S.preventDefault(),T(P=>Math.max(P-1,-1));else if(S.key==="ArrowLeft"&&S.currentTarget.selectionStart===0&&!u)S.preventDefault(),de(k4(ae));else if(S.key==="Enter"){S.preventDefault();const P=p>=0?B[p]:void 0;P?de(P):n()}else S.key==="Escape"&&p>=0&&(S.stopPropagation(),T(-1))},K=c==null?void 0:c.target,Te=!!K&&(c==null?void 0:c.targetKind)==="missing",J=!!K&&(c==null?void 0:c.targetKind)==="file",le=(S,P="")=>h.jsx("button",{type:"button",className:`dirpick-crumb ${S===pe?"is-here":""} ${P}`,onClick:()=>S!==pe&&de(S.path),disabled:S===pe,title:S.path,children:S.name});return h.jsxs("div",{className:"dirpick",children:[h.jsxs("div",{className:"dirpick-crumbs",children:[le(V),M.length>0&&h.jsx("button",{type:"button",className:"dirpick-crumb dirpick-more","aria-haspopup":"menu","aria-expanded":E!==null,"aria-label":`Show ${M.length} folders above`,title:`${M.length} folders above`,onClick:S=>x(E?null:S.currentTarget),children:h.jsx(F2,{size:15})}),me.map((S,P)=>h.jsxs("span",{className:"dirpick-crumb-wrap",children:[(P>0||M.length>0)&&h.jsx("span",{className:"dirpick-sep",children:"/"}),le(S)]},S.path))]}),E&&h.jsx(Sg,{anchor:E,onClose:()=>x(null),children:M.map(S=>h.jsx("button",{className:"menu-item",onClick:()=>{x(null),de(S.path)},children:S.name},S.path))}),h.jsx("input",{ref:b,className:"dirpick-input",role:"combobox","aria-expanded":B.length>0,"aria-controls":W,"aria-autocomplete":"list","aria-label":"Working directory","aria-activedescendant":p>=0?`${U}-opt-${p}`:void 0,value:u,placeholder:"Search folders…",autoComplete:"off",spellCheck:!1,onChange:S=>{l(S.target.value),T(-1)},onKeyDown:ee}),h.jsxs("div",{ref:C,id:W,role:"listbox","aria-label":"Folders",className:"dirpick-list",children:[B.map((S,P)=>h.jsx("button",{id:`${U}-opt-${P}`,type:"button",role:"option","aria-selected":P===p,className:`dirpick-opt ${P===p?"is-active":""}`,title:S,onMouseDown:G=>G.preventDefault(),onClick:()=>de(S),children:h.jsx("span",{className:"dirpick-tail",children:h.jsx("span",{children:S4(ae,S)})})},S)),B.length===0&&h.jsx("div",{className:"dirpick-empty",children:u?"Nothing here matches.":"No subfolders."})]}),h.jsxs("div",{className:"dirpick-status","aria-live":"polite",children:[Te&&h.jsx("span",{className:"dirpick-note is-new",children:"This folder will be created"}),J&&h.jsx("span",{className:"dirpick-note is-bad",children:"That path is a file, not a folder"})]})]})}function v4({chatId:e,currentCwd:t,onChanged:n,onClose:i}){const[a,u]=_.useState(t??""),[l,c]=_.useState(!1),[f,p]=_.useState(null),T=_.useRef(!1);_.useEffect(()=>{const x=b=>{b.key==="Escape"&&i()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[i]);const E=async()=>{const x=a.trim();if(!(!x||l)){c(!0),p(null);try{const b=await Qe.setChatCwd(e,x);n(b.cwd),i()}catch(b){p(b.message)}finally{c(!1)}}};return h.jsx("div",{className:"sheet-backdrop",onMouseDown:x=>{T.current=x.target===x.currentTarget},onClick:x=>{x.target===x.currentTarget&&T.current&&i(),T.current=!1},children:h.jsxs("div",{className:"sheet",role:"dialog","aria-modal":"true","aria-labelledby":"change-folder-title",children:[h.jsx("h2",{className:"sheet-title",id:"change-folder-title",children:"Change working directory"}),h.jsx(_4,{initialPath:t??"",onChange:u,onSubmit:E}),f&&h.jsx("div",{className:"sheet-error",children:f}),h.jsxs("div",{className:"sheet-actions",children:[h.jsx("button",{className:"btn-ghost",onClick:i,disabled:l,children:"Cancel"}),h.jsx("button",{className:"btn-primary",onClick:E,disabled:l||!a.trim(),children:l?"Saving…":"Change folder"})]})]})})}function N4({name:e}){var n;switch((n=e.split(".").pop())==null?void 0:n.toLowerCase()){case"ts":case"tsx":case"js":case"jsx":case"mjs":case"py":case"rb":case"go":case"rs":case"java":case"c":case"cpp":case"h":case"hpp":case"vue":case"svelte":return h.jsx(cm,{size:15,className:"ftree-icon-svg ftree-icon-code"});case"json":case"yaml":case"yml":case"toml":case"ini":case"env":case"lock":return h.jsx(z2,{size:15,className:"ftree-icon-svg ftree-icon-config"});case"md":case"txt":case"rst":case"log":case"csv":return h.jsx($2,{size:15,className:"ftree-icon-svg ftree-icon-text"});case"css":case"scss":case"less":case"sass":return h.jsx(Y2,{size:15,className:"ftree-icon-svg ftree-icon-style"});case"html":case"svg":case"xml":return h.jsx(cm,{size:15,className:"ftree-icon-svg ftree-icon-markup"});case"png":case"jpg":case"jpeg":case"gif":case"webp":case"bmp":case"ico":case"avif":return h.jsx(W2,{size:15,className:"ftree-icon-svg ftree-icon-image"});case"sh":case"bash":case"zsh":case"fish":case"bat":case"ps1":return h.jsx(V2,{size:15,className:"ftree-icon-svg ftree-icon-terminal"});default:return h.jsx(kg,{size:15,className:"ftree-icon-svg"})}}function PE({entry:e,chatId:t,depth:n,onPreview:i,onExpanded:a}){const u=ge(E=>E.fsVersion[e.path]??0),[l,c]=_.useState({expanded:!1,children:null,loading:!1});_.useEffect(()=>{if(e.type==="directory")return a(e.path,l.expanded),()=>a(e.path,!1)},[e.path,e.type,l.expanded,a]),_.useEffect(()=>{if(!u||!l.expanded)return;let E=!0;return Qe.tree(t,e.path).then(x=>{E&&c(b=>({...b,children:x.entries}))}).catch(()=>{}),()=>{E=!1}},[u]);const f=_.useCallback(async()=>{if(e.type==="directory"&&!l.loading){if(l.expanded){c(E=>({...E,expanded:!1}));return}if(l.children===null){c(E=>({...E,loading:!0}));try{const E=await Qe.tree(t,e.path);c({expanded:!0,children:E.entries,loading:!1})}catch{c(E=>({...E,loading:!1}))}}else c(E=>({...E,expanded:!0}))}},[e,t,l.expanded,l.children,l.loading]),p=_.useCallback(()=>{e.type==="file"&&i(e)},[e,i]),T=n*16;return e.type==="directory"?h.jsxs(h.Fragment,{children:[h.jsxs("button",{className:"ftree-row ftree-dir",onClick:f,style:{paddingLeft:`${T+8}px`},children:[h.jsx("span",{className:`ftree-chevron ${l.expanded?"is-open":""}`,children:l.loading?h.jsx(br,{size:12}):h.jsx(kr,{size:12,className:"ftree-chevron-icon"})}),h.jsx("span",{className:"ftree-icon",children:l.expanded?h.jsx(H2,{size:15,className:"ftree-icon-svg ftree-icon-folder"}):h.jsx(bg,{size:15,className:"ftree-icon-svg ftree-icon-folder"})}),h.jsx("span",{className:"ftree-name",children:e.name})]}),l.expanded&&l.children&&h.jsxs("div",{className:"ftree-children",children:[l.children.map(E=>h.jsx(PE,{entry:E,chatId:t,depth:n+1,onPreview:i,onExpanded:a},E.path)),l.children.length===0&&h.jsx("div",{className:"ftree-empty",style:{paddingLeft:`${T+24}px`},children:"Empty"})]})]}):h.jsxs("div",{className:"ftree-row ftree-file",style:{paddingLeft:`${T+8}px`},onClick:p,children:[h.jsx("span",{className:"ftree-chevron ftree-chevron-spacer","aria-hidden":"true"}),h.jsx("span",{className:"ftree-icon",children:h.jsx(N4,{name:e.name})}),h.jsx("span",{className:"ftree-name",children:e.name}),e.size!=null&&h.jsx("span",{className:"ftree-size",children:_E(e.size)})]})}function w4({chatId:e,onClose:t}){var ae;const[n,i]=_.useState([]),[a,u]=_.useState(""),[l,c]=_.useState(!0),[f,p]=_.useState(null),[T,E]=_.useState(!1),x=ge(Z=>Z.chats),b=ge(Z=>Z.setWatchedPaths),C=ge(Z=>Z.fsVersion[""]??0),v=_.useRef(new Set),D=ge(Z=>Z.setChats),A=ge(Z=>Z.openFilePreview),R=ge(Z=>Z.observability.turnStatus!=="idle"||Z.observability.compacting),U=(ae=x.find(Z=>Z.chatId===e))==null?void 0:ae.cwd,W=_.useCallback(()=>{b(["",...v.current])},[b]),q=_.useCallback((Z,ce)=>{const M=v.current;ce!==M.has(Z)&&(ce?M.add(Z):M.delete(Z),W())},[W]);_.useEffect(()=>(W(),()=>b([])),[W,b]);const B=_.useCallback(async(Z=!1)=>{Z||c(!0),p(null);try{const ce=await Qe.tree(e);i(ce.entries),u(ce.cwd)}catch(ce){p(ce.message)}finally{Z||c(!1)}},[e]);return _.useEffect(()=>{B()},[B]),_.useEffect(()=>{C&&B(!0)},[C]),h.jsxs("div",{className:"ftree-panel",children:[h.jsxs("div",{className:"ftree-header",children:[h.jsx("span",{className:"ftree-title",title:a,children:"Files"}),h.jsx("button",{className:"ftree-refresh",onClick:()=>E(!0),disabled:R,title:R?"Change the folder after the turn":"Change working directory","aria-label":"Change working directory",children:h.jsx(bg,{size:14})}),t&&h.jsx("button",{className:"ftree-close",onClick:t,title:"Close file tree","aria-label":"Close file tree",children:h.jsx(ro,{size:15})})]}),a&&h.jsx("div",{className:"ftree-cwd",title:a,children:a}),h.jsxs("div",{className:"ftree-list",children:[l&&n.length===0&&h.jsx("div",{className:"ftree-loading",children:"Loading…"}),f&&h.jsxs("div",{className:"ftree-error",children:[f,h.jsx("button",{className:"ftree-repoint",onClick:()=>E(!0),disabled:R,title:R?"Change the folder after the turn":void 0,children:"Change folder…"})]}),!l&&!f&&n.length===0&&h.jsx("div",{className:"ftree-empty",children:"No files"}),!f&&n.map(Z=>h.jsx(PE,{entry:Z,chatId:e,depth:0,onPreview:ce=>A(ce.path),onExpanded:q},Z.path))]}),T&&h.jsx(v4,{chatId:e,currentCwd:a||U,onChanged:Z=>{D(x.map(ce=>ce.chatId===e?{...ce,cwd:Z}:ce)),B()},onClose:()=>E(!1)})]})}const Bc=e=>e.split("/").pop()||e;function A4({preview:e,chatId:t,onClose:n}){const[i,a]=_.useState(!1),[u,l]=_.useState({}),c=()=>{window.open(Qe.downloadUrl(t,e.path),"_blank")},f=b=>{b.target===b.currentTarget&&n()};_.useEffect(()=>{const b=C=>{C.key==="Escape"&&n()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[n]);const p=u[e.path]??!1,T=e.kind==="html"||e.kind==="markdown",E=T&&!p,x=e.kind!=="image"&&e.kind!=="pdf"&&!E;return h.jsx("div",{className:"fpreview-backdrop",onClick:f,children:h.jsxs("div",{className:`fpreview-modal${i?" fpreview-full":""}`,children:[h.jsxs("div",{className:"fpreview-header",children:[T&&!e.error&&h.jsxs("div",{className:"fpreview-seg",role:"group","aria-label":"Preview mode",children:[h.jsx("button",{className:`fpreview-seg-btn${p?"":" is-active"}`,onClick:()=>l(b=>({...b,[e.path]:!1})),title:"Rendered","aria-label":"Rendered","aria-pressed":!p,children:h.jsx(K2,{size:17})}),h.jsx("button",{className:`fpreview-seg-btn${p?" is-active":""}`,onClick:()=>l(b=>({...b,[e.path]:!0})),title:"Source","aria-label":"Source","aria-pressed":p,children:h.jsx(X2,{size:17})})]}),h.jsx("span",{className:"fpreview-name",title:e.path,children:e.name}),h.jsx("button",{className:"fpreview-dl",onClick:c,title:"Download file","aria-label":"Download file",children:h.jsx(q2,{size:18})}),h.jsx("button",{className:"fpreview-full-btn",onClick:()=>a(b=>!b),title:i?"Exit fullscreen":"Fullscreen","aria-label":i?"Exit fullscreen":"Fullscreen",children:i?h.jsx(Z2,{size:18}):h.jsx(J2,{size:18})}),h.jsx("button",{className:"fpreview-close",onClick:n,"aria-label":"Close preview",children:h.jsx(ro,{size:18})})]}),h.jsxs("div",{className:"fpreview-body",children:[e.loading&&h.jsx("div",{className:"fpreview-loading",children:h.jsx(br,{size:48})}),e.error&&h.jsx("div",{className:"ftree-error",children:e.error}),!e.loading&&!e.error&&e.kind==="image"&&h.jsx("img",{src:Qe.previewUrl(t,e.path),alt:e.name,className:"fpreview-image"}),!e.error&&e.kind==="pdf"&&h.jsx("iframe",{src:Qe.previewUrl(t,e.path),title:e.name,className:"fpreview-pdf"}),!e.error&&e.kind==="html"&&E&&h.jsx("iframe",{src:`${Qe.previewUrl(t,e.path)}&raw=1`,title:e.name,className:"fpreview-html",sandbox:"allow-scripts allow-forms"}),!e.loading&&!e.error&&e.kind==="markdown"&&E&&e.content!==null&&h.jsx("div",{className:"fpreview-md",children:h.jsx(Wi,{text:e.content,html:!0})}),!e.loading&&!e.error&&x&&e.highlightedHtml&&h.jsx("div",{className:"fpreview-highlighted",dangerouslySetInnerHTML:{__html:e.highlightedHtml}}),!e.loading&&!e.error&&x&&!e.highlightedHtml&&e.content!==null&&h.jsx("pre",{className:"fpreview-code",children:e.content})]})]})})}function I4(){const e=ge(l=>l.previewPath),t=ge(l=>l.activeId),n=ge(l=>l.closeFilePreview),[i,a]=_.useState(null),u=_.useCallback(()=>n(),[n]);return _.useEffect(()=>{if(!e||!t){a(null);return}let l=!1;const c=u6(Bc(e)),f=c!=="image"&&c!=="pdf";if(a({path:e,name:Bc(e),content:null,highlightedHtml:null,kind:c,loading:f,error:null}),!!f)return(async()=>{try{const p=await fetch(Qe.previewUrl(t,e),{credentials:"same-origin"});if(!p.ok)throw new Error(await p.text()||`HTTP ${p.status}`);const T=await p.text();if(l)return;a(b=>b&&b.path===e?{...b,content:T,loading:!1}:b);const E=bE(Bc(e));if(!E)return;const x=await Jd(T,E);if(l||!x)return;a(b=>b&&b.path===e?{...b,highlightedHtml:x}:b)}catch(p){if(l)return;a(T=>T&&T.path===e?{...T,loading:!1,error:p instanceof Error?p.message:"Could not read the file"}:T)}})(),()=>{l=!0}},[e,t]),!i||!t?null:ia.createPortal(h.jsx(A4,{preview:i,chatId:t,onClose:u}),document.body)}const gn=18,fd=2.5,hd=(gn-fd)/2,H0=2*Math.PI*hd;function L4(e){return e>85?"var(--aurora-red)":e>60?"var(--aurora-orange)":"var(--frost)"}const Ru=new Intl.NumberFormat;function R4(e){const t=new Date(`${e}T00:00:00`);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{month:"short",day:"numeric"})}const O4=[{key:"prompts",label:"Your messages",color:"var(--frost)"},{key:"responses",label:"Responses",color:"var(--frost-teal)"},{key:"tools",label:"Tools",color:"var(--aurora-purple)"},{key:"contextFiles",label:"Context files",color:"var(--aurora-yellow)"},{key:"sessionFiles",label:"Session files",color:"var(--aurora-green)"},{key:"memory",label:"Memory",color:"var(--aurora-orange)"}];function D4(e,t){if(!t)return[];const n=O4.filter(a=>t[a.key]>=.05).map(a=>({label:a.label,color:a.color,pct:t[a.key]}));if(n.length===0)return[];const i=e-n.reduce((a,u)=>a+u.pct,0);return i>=.05&&n.push({label:"System and other",color:"var(--n3)",pct:i}),n}function P4(){var U,W;const e=ge(q=>q.observability.contextUsagePercentage),t=ge(q=>q.observability.contextBreakdown),n=ge(q=>q.observability.sessionCredits),[i,a]=_.useState(null),u=ge(q=>q.observability.compacting),l=ge(q=>q.observability.turnStatus),c=ge(q=>q.activeId),f=ge(q=>q.currentModelId),p=ge(q=>q.models),[T,E]=_.useState(!1),x=_.useRef(null);_.useEffect(()=>{if(!T)return;const q=ae=>{x.current&&!x.current.contains(ae.target)&&E(!1)},B=ae=>{ae.key==="Escape"&&E(!1)};return document.addEventListener("mousedown",q),document.addEventListener("keydown",B),()=>{document.removeEventListener("mousedown",q),document.removeEventListener("keydown",B)}},[T]),_.useEffect(()=>{if(!T||!c)return;let q=!0;return Qe.chatUsage(c).then(B=>q&&a(B),()=>{}),()=>{q=!1}},[T,c]),_.useEffect(()=>a(null),[c]);const b=Math.max(0,Math.min(100,e)),C=L4(b),v=b/100*H0,D=(U=p.find(q=>q.modelId===f))==null?void 0:U.contextWindowTokens,A=D?Math.round(b/100*D):void 0,R=D4(b,t);return c?h.jsxs("div",{className:"ctx",ref:x,children:[h.jsx("button",{type:"button",className:"ctx-btn",onClick:()=>E(q=>!q),"aria-haspopup":"dialog","aria-expanded":T,"aria-label":`Context ${b.toFixed(0)}% used`,title:`Context ${b.toFixed(0)}% used`,children:h.jsx("svg",{width:gn,height:gn,viewBox:`0 0 ${gn} ${gn}`,"aria-hidden":!0,children:h.jsxs("g",{transform:`rotate(-90 ${gn/2} ${gn/2})`,children:[h.jsx("circle",{cx:gn/2,cy:gn/2,r:hd,fill:"none",stroke:"var(--n2)",strokeWidth:fd}),h.jsx("circle",{cx:gn/2,cy:gn/2,r:hd,fill:"none",stroke:C,strokeWidth:fd,strokeLinecap:"round",strokeDasharray:`${v} ${H0-v}`})]})})}),T&&h.jsxs("div",{className:"ctx-pop",role:"dialog","aria-label":"Context usage",children:[h.jsxs("div",{className:"ctx-pop-head",children:[h.jsx("span",{className:"ctx-pop-title",children:"Context used"}),h.jsxs("span",{className:"ctx-pop-pct",style:{color:C},children:[b.toFixed(1),"%"]})]}),h.jsx("div",{className:"ctx-pop-bar",children:R.length>0?R.map(q=>h.jsx("span",{className:"ctx-pop-bar-part",style:{width:`${Math.min(100,q.pct)}%`,background:q.color}},q.label)):h.jsx("span",{className:"ctx-pop-bar-fill",style:{width:`${b}%`,background:C}})}),R.length>0&&h.jsx("dl",{className:"ctx-pop-rows ctx-pop-parts",children:R.map(q=>h.jsxs("div",{className:"ctx-pop-row",children:[h.jsxs("dt",{children:[h.jsx("span",{className:"ctx-pop-dot",style:{background:q.color}}),q.label]}),h.jsxs("dd",{children:[q.pct.toFixed(1),"%"]})]},q.label))}),D?h.jsxs("dl",{className:"ctx-pop-rows",children:[h.jsxs("div",{className:"ctx-pop-row",children:[h.jsx("dt",{children:"Used"}),h.jsxs("dd",{children:[Ru.format(A??0)," tokens"]})]}),h.jsxs("div",{className:"ctx-pop-row",children:[h.jsx("dt",{children:"Window"}),h.jsxs("dd",{children:[Ru.format(D)," tokens"]})]})]}):h.jsx("p",{className:"ctx-pop-note",children:"Token counts need a selected model’s window size."}),((i==null?void 0:i.credits)!==void 0||n!==void 0||(i==null?void 0:i.account))&&h.jsxs("dl",{className:"ctx-pop-rows ctx-pop-credits",children:[((i==null?void 0:i.credits)!==void 0||n!==void 0)&&h.jsxs("div",{className:"ctx-pop-row",children:[h.jsx("dt",{children:"This chat"}),h.jsxs("dd",{children:[vE(Math.max((i==null?void 0:i.credits)??0,n??0))," credits"]})]}),(i==null?void 0:i.account)&&h.jsxs("div",{className:"ctx-pop-row",children:[h.jsx("dt",{title:i.account.planName,children:"This month"}),h.jsxs("dd",{children:[Ru.format(Math.round(i.account.used)),i.account.limit!==void 0&&` / ${Ru.format(i.account.limit)}`]})]}),((W=i==null?void 0:i.account)==null?void 0:W.resetsOn)&&h.jsxs("div",{className:"ctx-pop-row",children:[h.jsx("dt",{children:"Resets"}),h.jsx("dd",{children:R4(i.account.resetsOn)})]})]}),h.jsx("button",{type:"button",className:"ctx-pop-compact",disabled:u||l!=="idle",onClick:()=>{E(!1),We.compact()},children:u?"Compacting…":"Compact conversation"})]})]}):null}const z0=new Set(["image/png","image/jpeg","image/gif","image/webp","image/svg+xml"]);function M4({chatId:e,connStatus:t,draft:n}){const[i,a]=_.useState(""),[u,l]=_.useState([]),[c,f]=_.useState(!1),[p,T]=_.useState(null),E=ge(K=>K.observability.turnStatus),x=ge(K=>K.observability.compacting),b=ge(K=>K.currentModeId),C=ge(K=>K.currentModelId),v=ge(K=>K.currentEffort),D=E==="running",A=E==="cancelling",R=n||t==="connected",U=_.useRef(null),W=_.useRef(null),q=K=>new Promise((Te,J)=>{const le=new FileReader;le.onload=()=>Te(le.result.split(",")[1]??""),le.onerror=()=>J(new Error("Failed to read file")),le.readAsDataURL(K)}),B=_.useCallback(()=>{const K=W.current;K&&(K.style.height="auto",K.style.height=`${Math.min(K.scrollHeight,200)}px`)},[]);_.useEffect(()=>{B()},[i,B]);const ae=_.useCallback(K=>{const Te=K.map(J=>{const le=z0.has(J.type);return{id:`att-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,file:J,isImage:le,previewUrl:le?URL.createObjectURL(J):void 0}});l(J=>[...J,...Te])},[]),Z=async(K,Te,J)=>{const le=[];K.length>0&&le.push({type:"text",text:vd+K.map(S=>S.path).join(", ")+`
245
+ `});for(let S=0;S<K.length;S++){const P=K[S],G=Te[S];if(P&&P.kind==="image"&&G)try{const L=await q(G.file);le.push({type:"image",data:L,mimeType:P.mimeType})}catch{}}return J&&le.push({type:"text",text:J}),le},ce=D&&R&&!x&&!!i.trim()&&u.length===0,M=async()=>{const K=i.trim();if(ce){We.steer(K),a(""),requestAnimationFrame(()=>{W.current&&(W.current.style.height="auto")});return}if(!K&&u.length===0||D||A||x||!R||c)return;let Te=[];const J=u;if(J.length>0){if(!e){T("No chat to upload to.");return}f(!0),T(null);try{Te=(await Qe.uploadFiles(e,J.map(P=>P.file))).files}catch(S){T(S.message),f(!1);return}f(!1)}const le=await Z(Te,J,K);le.length!==0&&(We.send(le,Te.map(S=>({path:S.path,name:S.name,size:S.size,kind:S.kind}))),a(""),J.forEach(S=>S.previewUrl&&URL.revokeObjectURL(S.previewUrl)),l([]),requestAnimationFrame(()=>{W.current&&(W.current.style.height="auto")}))},me=K=>{K.key==="Enter"&&!K.shiftKey&&(K.preventDefault(),M())},V=_.useCallback(K=>{var le;const Te=(le=K.clipboardData)==null?void 0:le.items;if(!Te)return;const J=[];for(const S of Array.from(Te))if(S.kind==="file"&&z0.has(S.type)){const P=S.getAsFile();P&&J.push(P)}J.length>0&&(K.preventDefault(),ae(J))},[ae]),pe=K=>{K.target.files&&ae(Array.from(K.target.files)),K.target.value=""},de=K=>{l(Te=>{const J=Te.find(le=>le.id===K);return J!=null&&J.previewUrl&&URL.revokeObjectURL(J.previewUrl),Te.filter(le=>le.id!==K)})};_.useEffect(()=>()=>{l(K=>(K.forEach(Te=>Te.previewUrl&&URL.revokeObjectURL(Te.previewUrl)),K))},[]);const ee=(i.trim()||u.length>0)&&!D&&!A&&!x&&!c&&R;return h.jsxs("div",{className:"composer",children:[p&&h.jsx("div",{className:"composer-error",children:p}),u.length>0&&h.jsx("div",{className:"composer-attachments",children:u.map(K=>h.jsxs("div",{className:"composer-att",children:[K.isImage&&K.previewUrl?h.jsx("img",{src:K.previewUrl,alt:K.file.name,className:"composer-att-img"}):h.jsxs("div",{className:"composer-att-file",title:K.file.name,children:[h.jsx("span",{className:"composer-att-file-icon",children:"📄"}),h.jsx("span",{className:"composer-att-file-name",children:K.file.name})]}),h.jsx("button",{className:"composer-att-remove",onClick:()=>de(K.id),"aria-label":`Remove ${K.file.name}`,children:"×"})]},K.id))}),h.jsxs("div",{className:"composer-box",children:[h.jsx("textarea",{ref:W,className:"composer-input",value:i,onChange:K=>a(K.target.value),onKeyDown:me,onPaste:V,placeholder:"Write a message…",rows:1}),h.jsxs("div",{className:"composer-actions",children:[h.jsx("button",{className:"composer-plus",onClick:()=>{var K;return(K=U.current)==null?void 0:K.click()},disabled:!R||c,title:"Add photos & files","aria-label":"Add photos and files",children:h.jsx(Id,{size:18})}),h.jsxs("div",{className:"composer-actions-right",children:[h.jsx(P4,{}),h.jsx(db,{value:b,onChange:K=>We.changeAgent(K)}),h.jsx(cb,{value:C,effort:v,draft:n,onChange:K=>We.changeModel(K),onEffortChange:K=>We.changeEffort(K)}),ce?h.jsx("button",{className:"composer-btn composer-send",onClick:M,title:"Send to the running turn","aria-label":"Send to the running turn",children:h.jsx(om,{size:17})}):D?h.jsx("button",{className:"composer-btn composer-stop",onClick:()=>We.cancel(),title:"Stop","aria-label":"Stop",children:h.jsx(lm,{size:15})}):A?h.jsx("button",{className:"composer-btn composer-stop",disabled:!0,title:"Stopping…","aria-label":"Stopping",children:h.jsx(lm,{size:15})}):h.jsx("button",{className:"composer-btn composer-send",onClick:M,disabled:!ee,title:c?"Uploading…":"Send","aria-label":c?"Uploading":"Send",children:c?h.jsx(br,{size:15}):h.jsx(om,{size:17})})]})]})]}),h.jsx("input",{ref:U,type:"file",multiple:!0,onChange:pe,className:"composer-file-input"})]})}const F4={connecting:{cls:"busy",label:"Connecting"},replaying:{cls:"busy",label:"Catching up"},connected:{cls:"ok",label:"Live"},reconnecting:{cls:"busy",label:"Reconnecting"},resyncing:{cls:"busy",label:"Resyncing"},closed:{cls:"down",label:"Offline"}};function j4({status:e}){const{cls:t,label:n}=F4[e];return h.jsxs("span",{className:`conndot conndot-${t}`,children:[h.jsx("span",{className:"conndot-blip"}),h.jsx("span",{className:"conndot-label",children:n})]})}function B4({isDraft:e,navOpen:t,onToggleNav:n}){const i=ge(W=>W.loadingChatId),a=ge(W=>W.connStatus),u=ge(W=>W.createError),l=ge(W=>{var q;return(q=W.chats.find(B=>B.chatId===W.activeId))==null?void 0:q.title}),c=ge(W=>e&&W.pending.length===0&&W.items.length===0),f=ge(W=>W.activeId),p=ge(W=>W.chatId),T=ge(W=>W.chatNotice),E=ge(W=>W.reloadingId!==null&&W.reloadingId===W.activeId),x=ge(W=>W.observability.turnStatus==="running"),b=ge(W=>W.dismissChatNotice),[C,v]=_.useState(!1);if(_.useEffect(()=>{v(!1)},[f]),i)return h.jsxs("main",{className:"chatpane",children:[h.jsxs("header",{className:"chat-head",children:[h.jsx("button",{className:"navbtn",onClick:n,"aria-label":t?"Hide sessions":"Show sessions","aria-expanded":t,children:h.jsx(dc,{size:20})}),h.jsx("span",{className:"chat-title",children:"Opening session…"})]}),h.jsx("div",{className:"chat-blank",children:h.jsx(br,{size:48,className:"chat-spinner"})})]});if(u)return h.jsxs("main",{className:"chatpane",children:[h.jsxs("header",{className:"chat-head",children:[h.jsx("button",{className:"navbtn",onClick:n,"aria-label":t?"Hide sessions":"Show sessions","aria-expanded":t,children:h.jsx(dc,{size:20})}),h.jsx("span",{className:"chat-title",children:"New session"})]}),h.jsxs("div",{className:"chat-blank",children:[h.jsx("p",{className:"chat-blank-title",children:"Couldn't start the session"}),h.jsx("p",{className:"chat-blank-sub",children:u}),h.jsxs("div",{className:"chat-error-actions",children:[h.jsx("button",{className:"btn-primary",onClick:()=>We.retryCreate(),children:"Try again"}),h.jsx("button",{className:"btn-ghost",onClick:()=>We.dismissCreateError(),children:"Back to sessions"})]})]})]});const D=T&&h.jsxs("div",{className:"notice-banner",role:"alert",children:[h.jsx(Ad,{size:16,className:"notice-icon"}),h.jsxs("div",{className:"notice-text",children:[h.jsx("p",{className:"notice-title",children:T.title}),T.fix&&h.jsx("p",{className:"notice-sub",children:T.fix})]}),h.jsx("button",{className:"notice-x",onClick:b,"aria-label":"Dismiss",children:h.jsx(ro,{size:14})})]}),A=h.jsxs("div",{className:"composer-wrap",children:[D,h.jsx(M4,{chatId:p,connStatus:a,draft:e})]}),R=h.jsxs("div",{className:"chat-draft",children:[h.jsxs("div",{className:"draft-hero",children:[h.jsx("img",{className:"draft-logo",src:"/logo.svg",alt:""}),h.jsx("h1",{className:"draft-title",children:"Casper"})]}),A]}),U=h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"chat-body",children:h.jsx(b4,{})}),A]});return h.jsxs("main",{className:`chatpane chatpane-split ${C?"has-tree":""}`,children:[h.jsxs("div",{className:"chat-col",children:[h.jsxs("header",{className:"chat-head",children:[h.jsx("button",{className:"navbtn",onClick:n,"aria-label":t?"Hide sessions":"Show sessions","aria-expanded":t,children:h.jsx(dc,{size:20})}),!e&&h.jsx("span",{className:"chat-title",title:l,children:l??"Session"}),!e&&h.jsx(j4,{status:a}),!e&&h.jsx("button",{className:"chat-head-btn chat-reload",onClick:()=>void We.reloadChat(),disabled:E||x,title:x?"Reload after the turn":"Reload session","aria-label":"Reload session",children:E?h.jsx(br,{size:18}):h.jsx(yg,{size:18})}),!e&&h.jsx("button",{className:`chat-head-btn ftree-toggle ${C?"is-active":""}`,onClick:()=>v(W=>!W),title:"Toggle file tree","aria-label":"Toggle file tree","aria-pressed":C,children:h.jsx(Q2,{size:18})})]}),c?R:U]}),f&&h.jsxs("aside",{className:`ftree-aside ${C?"is-open":""}`,children:[C&&h.jsx(w4,{chatId:f,onClose:()=>v(!1)}),h.jsx(I4,{})]}),f&&C&&h.jsx("div",{className:"ftree-backdrop",onClick:()=>v(!1),"aria-hidden":!0})]})}function U4({onReady:e}){const[t,n]=_.useState(""),[i,a]=_.useState(null),[u,l]=_.useState(!1),c=async()=>{l(!0),a(null);try{await N2(t.trim()),e()}catch(f){a(f.message)}finally{l(!1)}};return h.jsxs("div",{className:"gate",children:[h.jsx("img",{className:"gate-logo",src:"/logo.svg",alt:""}),h.jsx("h1",{className:"gate-title",children:"Casper"}),h.jsx("p",{className:"gate-sub",children:"Enter your access token to continue."}),h.jsx("input",{className:"gate-input",type:"password",value:t,placeholder:"access token",onChange:f=>n(f.target.value),onKeyDown:f=>f.key==="Enter"&&c()}),i&&h.jsx("p",{className:"gate-error",children:i}),h.jsx("button",{className:"btn-primary gate-btn",onClick:c,disabled:u,children:u?"Checking…":"Continue"}),h.jsxs("p",{className:"gate-hint",children:["Don't have it? On the machine running Casper, run ",h.jsx("code",{children:"casper token"}),"."]})]})}const Uc=768;function H4(){const[e,t]=_.useState("checking");return _.useEffect(()=>{e==="checking"&&Qe.listChats().then(n=>{ge.getState().setChats(n.chats),t("ready")}).catch(()=>t("gate"))},[e]),e==="checking"?h.jsx("div",{className:"app-splash"}):e==="gate"?h.jsx(U4,{onReady:()=>t("ready")}):h.jsx(o2,{children:h.jsxs(jx,{children:[h.jsxs(Li,{element:h.jsx(z4,{onLock:()=>t("gate")}),children:[h.jsx(Li,{index:!0,element:null}),h.jsx(Li,{path:Nd,element:null}),h.jsx(Li,{path:Eg,element:null})]}),h.jsx(Li,{path:"*",element:h.jsx(Mx,{to:"/",replace:!0})})]})})}function z4({onLock:e}){var b;const t=ge(C=>C.chats),n=ge(C=>C.activeId),i=ge(C=>C.watchedPaths),a=ge(C=>C.connStatus),u=ge(C=>C.loadingChatId),l=yd(),c=((b=Zp(Eg))==null?void 0:b.params.chatId)??null,f=Zp(Nd)!==null||!c&&n===null;_.useEffect(()=>{We.attach({navigate:l,onLock:e})},[l,e]),_.useEffect(()=>{We.loadPickers(),ge.getState().chats.length===0&&We.refreshSessions()},[]),_.useEffect(()=>{We.syncRoute(c,f)},[c,f]),_.useEffect(()=>{a==="connected"&&We.watchPaths(i)},[i,a]);const p=_.useCallback(()=>{w2(),We.lock()},[]),[T,E]=_.useState(()=>window.innerWidth>Uc);_.useEffect(()=>{const C=window.matchMedia(`(max-width: ${Uc}px)`),v=D=>E(!D.matches);return C.addEventListener("change",v),()=>C.removeEventListener("change",v)},[]);const x=_.useCallback(()=>{window.innerWidth<=Uc&&E(!1)},[]);return h.jsxs("div",{className:`layout ${T?"nav-open":""}`,children:[h.jsx(wb,{sessions:t,activeId:n,loadingId:u,onOpen:C=>{We.markLoading(C),x()},onPrefetch:C=>We.prefetchChat(C),onNew:()=>{We.startDraft(),x()},onDelete:C=>void We.deleteChat(C),onRename:(C,v)=>void We.renameChat(C,v),onPin:(C,v)=>void We.pinChat(C,v),onLock:p}),T&&h.jsx("button",{className:"nav-scrim","aria-label":"Close session panel",onClick:()=>E(!1)}),h.jsx(B4,{navOpen:T,onToggleNav:()=>E(C=>!C),isDraft:f})]})}if("serviceWorker"in navigator){const e=!!navigator.serviceWorker.controller;let t=!1;navigator.serviceWorker.addEventListener("controllerchange",()=>{t||!e||(t=!0,window.location.reload())}),navigator.serviceWorker.ready.then(n=>{n.update().catch(()=>{}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&n.update().catch(()=>{})})}).catch(()=>{})}By.createRoot(document.getElementById("root")).render(h.jsx(Us.StrictMode,{children:h.jsx(H4,{})}));export{i_ as S,Wc as _,lo as c,pd as g,_3 as h,v3 as s,u1 as v,qr as w};