@joeyshi12/casper 0.10.0 → 0.10.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.
- package/dist/mcp.js +1 -1
- package/dist/server.js +177 -64
- package/dist/web/assets/{abnfDiagram-N423BO3Z-DuqqTYEM.js → abnfDiagram-N423BO3Z-BOt2oedB.js} +1 -1
- package/dist/web/assets/{arc-BbitKrIO.js → arc-CJ0OegkD.js} +1 -1
- package/dist/web/assets/{architectureDiagram-T3A2C74G-Dc0p1FLK.js → architectureDiagram-T3A2C74G-BaPzpGkE.js} +1 -1
- package/dist/web/assets/{blockDiagram-VBNYF7ZC-A2tZMhwX.js → blockDiagram-VBNYF7ZC-FhUU8yRq.js} +1 -1
- package/dist/web/assets/{c4Diagram-5PPSVZJV-BGYnWUNq.js → c4Diagram-5PPSVZJV-DiGoNhfT.js} +1 -1
- package/dist/web/assets/channel-6363Y3xP.js +1 -0
- package/dist/web/assets/{chunk-2GRJ4B5K-DGcSgggV.js → chunk-2GRJ4B5K-B-x5jVOB.js} +1 -1
- package/dist/web/assets/{chunk-2Q5K7J3B-Cqd5ykHS.js → chunk-2Q5K7J3B-DSh8M9q0.js} +1 -1
- package/dist/web/assets/{chunk-5RXB4S5H-4s-V0baK.js → chunk-5RXB4S5H-Btk7hl75.js} +1 -1
- package/dist/web/assets/{chunk-5VM5RSS4-DN_MfTRV.js → chunk-5VM5RSS4-CyplenJX.js} +1 -1
- package/dist/web/assets/{chunk-6Q2QTUOP-6-ncud5-.js → chunk-6Q2QTUOP-DtohW6Ga.js} +1 -1
- package/dist/web/assets/{chunk-GF5L2VYU-CkCAkajU.js → chunk-GF5L2VYU-VNW8BUeq.js} +1 -1
- package/dist/web/assets/{chunk-JWPE2WC7-B2HT0tHT.js → chunk-JWPE2WC7-BNS8VdV5.js} +1 -1
- package/dist/web/assets/{chunk-KBJHAD2P-DtYmpITE.js → chunk-KBJHAD2P-BV2Vf23h.js} +1 -1
- package/dist/web/assets/{chunk-RYQCIY6F-CqU4ZESr.js → chunk-RYQCIY6F-DYmETIxn.js} +1 -1
- package/dist/web/assets/{chunk-XXDRQBXY-5zlfmd8I.js → chunk-XXDRQBXY-HuXFE1c3.js} +1 -1
- package/dist/web/assets/classDiagram-JCYQIIEL-GUX5DKpE.js +1 -0
- package/dist/web/assets/classDiagram-v2-OCEON4UE-GUX5DKpE.js +1 -0
- package/dist/web/assets/{cose-bilkent-JH36ORCC-BtXxufQe.js → cose-bilkent-JH36ORCC-ChjYQYqW.js} +1 -1
- package/dist/web/assets/{cynefin-VYW2F7L2-DFLsp7Rj.js → cynefin-VYW2F7L2-0SvgqCiO.js} +1 -1
- package/dist/web/assets/{cynefinDiagram-MW4NZA55-BiXfZ5zy.js → cynefinDiagram-MW4NZA55-NEFmMNou.js} +1 -1
- package/dist/web/assets/{dagre-VZM6K2ZE-MBbBcp4r.js → dagre-VZM6K2ZE-D_p5IBF9.js} +1 -1
- package/dist/web/assets/{diagram-7IWD3JNH-BBJQPRUY.js → diagram-7IWD3JNH-CDZ5uJm4.js} +1 -1
- package/dist/web/assets/{diagram-B4RE2ZJO-D39huys8.js → diagram-B4RE2ZJO-Dzd-MSKW.js} +1 -1
- package/dist/web/assets/{diagram-LBJQPF4R-BEI6m3xw.js → diagram-LBJQPF4R-B6hsBa1t.js} +1 -1
- package/dist/web/assets/{diagram-Q27KOJAE-0mMWjfIY.js → diagram-Q27KOJAE-DJZkhdF3.js} +1 -1
- package/dist/web/assets/{diagram-UB23O5K3-Cq_AT0df.js → diagram-UB23O5K3-7nsFomCT.js} +1 -1
- package/dist/web/assets/{ebnfDiagram-BXEA7PRR-CspS7m6Z.js → ebnfDiagram-BXEA7PRR-B1f56hXD.js} +1 -1
- package/dist/web/assets/{erDiagram-JOGREHBK-B6NxTPkb.js → erDiagram-JOGREHBK-COrWC6hw.js} +1 -1
- package/dist/web/assets/{flowDiagram-UKHOOZJN-D3Pt3-cN.js → flowDiagram-UKHOOZJN-COS4lI6r.js} +1 -1
- package/dist/web/assets/{ganttDiagram-PKOTCBZU-CV4orYkm.js → ganttDiagram-PKOTCBZU-Lk2VUmay.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-DS77QQ5N-CANHeJZg.js → gitGraphDiagram-DS77QQ5N-DtAvGOFk.js} +1 -1
- package/dist/web/assets/index-BFfEb9Vs.js +253 -0
- package/dist/web/assets/index-CK9lPdh7.css +1 -0
- package/dist/web/assets/{index-Dewf4nkF.js → index-CTPzyuSS.js} +1 -1
- package/dist/web/assets/{infoDiagram-6WML65LV-ySSVfb1E.js → infoDiagram-6WML65LV-OKmxiILi.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-WSZJBQD7-C8PCYjFX.js → ishikawaDiagram-WSZJBQD7-BUc3kT4w.js} +1 -1
- package/dist/web/assets/{journeyDiagram-NVQOT4AX-BS_jBDBe.js → journeyDiagram-NVQOT4AX-DvBEKBLD.js} +1 -1
- package/dist/web/assets/{kanban-definition-27J2QSJJ-H6jhmFjt.js → kanban-definition-27J2QSJJ-CV7kLUrv.js} +1 -1
- package/dist/web/assets/{linear-YU9d9rPY.js → linear-nKe_FmKR.js} +1 -1
- package/dist/web/assets/{mermaid.core-DsId9yj5.js → mermaid.core-DQxD-Al4.js} +4 -4
- package/dist/web/assets/{mindmap-definition-FAOFIHXS-DVFyeioX.js → mindmap-definition-FAOFIHXS-DZ7D_fsY.js} +1 -1
- package/dist/web/assets/{pegDiagram-VL7TDLO6-BD4va82R.js → pegDiagram-VL7TDLO6-DsGgpFSF.js} +1 -1
- package/dist/web/assets/{pieDiagram-7S7Q4E2Y-CZAefhVe.js → pieDiagram-7S7Q4E2Y-B9M0nB9V.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-CIZ2JOQS-D3RB1kgH.js → quadrantDiagram-CIZ2JOQS-CHuiGp3C.js} +1 -1
- package/dist/web/assets/{railroadDiagram-AXF67PYL-Cvnf0WjF.js → railroadDiagram-AXF67PYL-BFNAk_rL.js} +1 -1
- package/dist/web/assets/{requirementDiagram-LRYGKXZP-C4B6vv6V.js → requirementDiagram-LRYGKXZP-DRh6dlwQ.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-W5VNT64P-C5xg3C0D.js → sankeyDiagram-W5VNT64P-ChkVLVRB.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-SI44F4Z6-DjWE-t7c.js → sequenceDiagram-SI44F4Z6-hVuQEWrZ.js} +1 -1
- package/dist/web/assets/{sizeCapture-X5ZJPWSS-Bf7ugfWa.js → sizeCapture-X5ZJPWSS-ZpEHmsZv.js} +1 -1
- package/dist/web/assets/{stateDiagram-OKZ733FA-DxEitXwP.js → stateDiagram-OKZ733FA-QPbFpYci.js} +1 -1
- package/dist/web/assets/stateDiagram-v2-UEYNNEHI-L8aPswP5.js +1 -0
- package/dist/web/assets/{swimlanes-SLNWSIFB-DMW3T9iR.js → swimlanes-SLNWSIFB-CT0EVasj.js} +2 -2
- package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-Bu9-A5QB.js +8 -0
- package/dist/web/assets/{timeline-definition-Z64GVDOM-whI5A_En.js → timeline-definition-Z64GVDOM-BPh850i9.js} +1 -1
- package/dist/web/assets/{vennDiagram-T6HMQDX7-DGdGbcJw.js → vennDiagram-T6HMQDX7-DOyN_2Pw.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-T6FBY63Y-CTNpUHSX.js → wardleyDiagram-T6FBY63Y-DvQUJsO9.js} +1 -1
- package/dist/web/assets/{xychartDiagram-ELKLHX3M-C2j32C85.js → xychartDiagram-ELKLHX3M-CvfYk_7X.js} +1 -1
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/dist/web/assets/channel-oev4WWHD.js +0 -1
- package/dist/web/assets/classDiagram-JCYQIIEL-D4FIkEsQ.js +0 -1
- package/dist/web/assets/classDiagram-v2-OCEON4UE-D4FIkEsQ.js +0 -1
- package/dist/web/assets/index-CK4YbLbU.js +0 -253
- package/dist/web/assets/index-Cz-T9NEB.css +0 -1
- package/dist/web/assets/stateDiagram-v2-UEYNNEHI-BV8yVaCo.js +0 -1
- package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-DZu5mMsy.js +0 -8
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CTPzyuSS.js","assets/katex-C5jXJg4s.js","assets/katex-BYZTj3zW.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var MT=Object.defineProperty;var FT=(e,t,n)=>t in e?MT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Le=(e,t,n)=>FT(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"]'))s(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&s(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();function Wc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $l={exports:{}},_s={},Wl={exports:{}},De={};/**
|
|
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 fp;function BT(){if(fp)return De;fp=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),g=Symbol.iterator;function x(F){return F===null||typeof F!="object"?null:(F=g&&F[g]||F["@@iterator"],typeof F=="function"?F:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,L={};function O(F,Y,N){this.props=F,this.context=Y,this.refs=L,this.updater=N||b}O.prototype.isReactComponent={},O.prototype.setState=function(F,Y){if(typeof F!="object"&&typeof F!="function"&&F!=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,F,Y,"setState")},O.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function v(){}v.prototype=O.prototype;function M(F,Y,N){this.props=F,this.context=Y,this.refs=L,this.updater=N||b}var z=M.prototype=new v;z.constructor=M,A(z,O.prototype),z.isPureReactComponent=!0;var J=Array.isArray,ne=Object.prototype.hasOwnProperty,D={current:null},Q={key:!0,ref:!0,__self:!0,__source:!0};function oe(F,Y,N){var he,Ce={},xe=null,Be=null;if(Y!=null)for(he in Y.ref!==void 0&&(Be=Y.ref),Y.key!==void 0&&(xe=""+Y.key),Y)ne.call(Y,he)&&!Q.hasOwnProperty(he)&&(Ce[he]=Y[he]);var Re=arguments.length-2;if(Re===1)Ce.children=N;else if(1<Re){for(var ze=Array(Re),at=0;at<Re;at++)ze[at]=arguments[at+2];Ce.children=ze}if(F&&F.defaultProps)for(he in Re=F.defaultProps,Re)Ce[he]===void 0&&(Ce[he]=Re[he]);return{$$typeof:e,type:F,key:xe,ref:Be,props:Ce,_owner:D.current}}function ce(F,Y){return{$$typeof:e,type:F.type,key:Y,ref:F.ref,props:F.props,_owner:F._owner}}function U(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function Z(F){var Y={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(N){return Y[N]})}var re=/\/+/g;function ke(F,Y){return typeof F=="object"&&F!==null&&F.key!=null?Z(""+F.key):Y.toString(36)}function de(F,Y,N,he,Ce){var xe=typeof F;(xe==="undefined"||xe==="boolean")&&(F=null);var Be=!1;if(F===null)Be=!0;else switch(xe){case"string":case"number":Be=!0;break;case"object":switch(F.$$typeof){case e:case t:Be=!0}}if(Be)return Be=F,Ce=Ce(Be),F=he===""?"."+ke(Be,0):he,J(Ce)?(N="",F!=null&&(N=F.replace(re,"$&/")+"/"),de(Ce,Y,N,"",function(at){return at})):Ce!=null&&(U(Ce)&&(Ce=ce(Ce,N+(!Ce.key||Be&&Be.key===Ce.key?"":(""+Ce.key).replace(re,"$&/")+"/")+F)),Y.push(Ce)),1;if(Be=0,he=he===""?".":he+":",J(F))for(var Re=0;Re<F.length;Re++){xe=F[Re];var ze=he+ke(xe,Re);Be+=de(xe,Y,N,ze,Ce)}else if(ze=x(F),typeof ze=="function")for(F=ze.call(F),Re=0;!(xe=F.next()).done;)xe=xe.value,ze=he+ke(xe,Re++),Be+=de(xe,Y,N,ze,Ce);else if(xe==="object")throw Y=String(F),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.");return Be}function ie(F,Y,N){if(F==null)return F;var he=[],Ce=0;return de(F,he,"","",function(xe){return Y.call(N,xe,Ce++)}),he}function ve(F){if(F._status===-1){var Y=F._result;Y=Y(),Y.then(function(N){(F._status===0||F._status===-1)&&(F._status=1,F._result=N)},function(N){(F._status===0||F._status===-1)&&(F._status=2,F._result=N)}),F._status===-1&&(F._status=0,F._result=Y)}if(F._status===1)return F._result.default;throw F._result}var Ie={current:null},ue={transition:null},Ee={ReactCurrentDispatcher:Ie,ReactCurrentBatchConfig:ue,ReactCurrentOwner:D};function S(){throw Error("act(...) is not supported in production builds of React.")}return De.Children={map:ie,forEach:function(F,Y,N){ie(F,function(){Y.apply(this,arguments)},N)},count:function(F){var Y=0;return ie(F,function(){Y++}),Y},toArray:function(F){return ie(F,function(Y){return Y})||[]},only:function(F){if(!U(F))throw Error("React.Children.only expected to receive a single React element child.");return F}},De.Component=O,De.Fragment=n,De.Profiler=a,De.PureComponent=M,De.StrictMode=s,De.Suspense=f,De.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ee,De.act=S,De.cloneElement=function(F,Y,N){if(F==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+F+".");var he=A({},F.props),Ce=F.key,xe=F.ref,Be=F._owner;if(Y!=null){if(Y.ref!==void 0&&(xe=Y.ref,Be=D.current),Y.key!==void 0&&(Ce=""+Y.key),F.type&&F.type.defaultProps)var Re=F.type.defaultProps;for(ze in Y)ne.call(Y,ze)&&!Q.hasOwnProperty(ze)&&(he[ze]=Y[ze]===void 0&&Re!==void 0?Re[ze]:Y[ze])}var ze=arguments.length-2;if(ze===1)he.children=N;else if(1<ze){Re=Array(ze);for(var at=0;at<ze;at++)Re[at]=arguments[at+2];he.children=Re}return{$$typeof:e,type:F.type,key:Ce,ref:xe,props:he,_owner:Be}},De.createContext=function(F){return F={$$typeof:l,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},F.Provider={$$typeof:o,_context:F},F.Consumer=F},De.createElement=oe,De.createFactory=function(F){var Y=oe.bind(null,F);return Y.type=F,Y},De.createRef=function(){return{current:null}},De.forwardRef=function(F){return{$$typeof:d,render:F}},De.isValidElement=U,De.lazy=function(F){return{$$typeof:E,_payload:{_status:-1,_result:F},_init:ve}},De.memo=function(F,Y){return{$$typeof:h,type:F,compare:Y===void 0?null:Y}},De.startTransition=function(F){var Y=ue.transition;ue.transition={};try{F()}finally{ue.transition=Y}},De.unstable_act=S,De.useCallback=function(F,Y){return Ie.current.useCallback(F,Y)},De.useContext=function(F){return Ie.current.useContext(F)},De.useDebugValue=function(){},De.useDeferredValue=function(F){return Ie.current.useDeferredValue(F)},De.useEffect=function(F,Y){return Ie.current.useEffect(F,Y)},De.useId=function(){return Ie.current.useId()},De.useImperativeHandle=function(F,Y,N){return Ie.current.useImperativeHandle(F,Y,N)},De.useInsertionEffect=function(F,Y){return Ie.current.useInsertionEffect(F,Y)},De.useLayoutEffect=function(F,Y){return Ie.current.useLayoutEffect(F,Y)},De.useMemo=function(F,Y){return Ie.current.useMemo(F,Y)},De.useReducer=function(F,Y,N){return Ie.current.useReducer(F,Y,N)},De.useRef=function(F){return Ie.current.useRef(F)},De.useState=function(F){return Ie.current.useState(F)},De.useSyncExternalStore=function(F,Y,N){return Ie.current.useSyncExternalStore(F,Y,N)},De.useTransition=function(){return Ie.current.useTransition()},De.version="18.3.1",De}var hp;function Yc(){return hp||(hp=1,Wl.exports=BT()),Wl.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 pp;function UT(){if(pp)return _s;pp=1;var e=Yc(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function l(d,f,h){var E,g={},x=null,b=null;h!==void 0&&(x=""+h),f.key!==void 0&&(x=""+f.key),f.ref!==void 0&&(b=f.ref);for(E in f)s.call(f,E)&&!o.hasOwnProperty(E)&&(g[E]=f[E]);if(d&&d.defaultProps)for(E in f=d.defaultProps,f)g[E]===void 0&&(g[E]=f[E]);return{$$typeof:t,type:d,key:x,ref:b,props:g,_owner:a.current}}return _s.Fragment=n,_s.jsx=l,_s.jsxs=l,_s}var mp;function jT(){return mp||(mp=1,$l.exports=UT()),$l.exports}var y=jT(),w=Yc();const Os=Wc(w);var yu={},Yl={exports:{}},Bt={},Vl={exports:{}},ql={};/**
|
|
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 gp;function HT(){return gp||(gp=1,(function(e){function t(ue,Ee){var S=ue.length;ue.push(Ee);e:for(;0<S;){var F=S-1>>>1,Y=ue[F];if(0<a(Y,Ee))ue[F]=Ee,ue[S]=Y,S=F;else break e}}function n(ue){return ue.length===0?null:ue[0]}function s(ue){if(ue.length===0)return null;var Ee=ue[0],S=ue.pop();if(S!==Ee){ue[0]=S;e:for(var F=0,Y=ue.length,N=Y>>>1;F<N;){var he=2*(F+1)-1,Ce=ue[he],xe=he+1,Be=ue[xe];if(0>a(Ce,S))xe<Y&&0>a(Be,Ce)?(ue[F]=Be,ue[xe]=S,F=xe):(ue[F]=Ce,ue[he]=S,F=he);else if(xe<Y&&0>a(Be,S))ue[F]=Be,ue[xe]=S,F=xe;else break e}}return Ee}function a(ue,Ee){var S=ue.sortIndex-Ee.sortIndex;return S!==0?S:ue.id-Ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,d=l.now();e.unstable_now=function(){return l.now()-d}}var f=[],h=[],E=1,g=null,x=3,b=!1,A=!1,L=!1,O=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function z(ue){for(var Ee=n(h);Ee!==null;){if(Ee.callback===null)s(h);else if(Ee.startTime<=ue)s(h),Ee.sortIndex=Ee.expirationTime,t(f,Ee);else break;Ee=n(h)}}function J(ue){if(L=!1,z(ue),!A)if(n(f)!==null)A=!0,ve(ne);else{var Ee=n(h);Ee!==null&&Ie(J,Ee.startTime-ue)}}function ne(ue,Ee){A=!1,L&&(L=!1,v(oe),oe=-1),b=!0;var S=x;try{for(z(Ee),g=n(f);g!==null&&(!(g.expirationTime>Ee)||ue&&!Z());){var F=g.callback;if(typeof F=="function"){g.callback=null,x=g.priorityLevel;var Y=F(g.expirationTime<=Ee);Ee=e.unstable_now(),typeof Y=="function"?g.callback=Y:g===n(f)&&s(f),z(Ee)}else s(f);g=n(f)}if(g!==null)var N=!0;else{var he=n(h);he!==null&&Ie(J,he.startTime-Ee),N=!1}return N}finally{g=null,x=S,b=!1}}var D=!1,Q=null,oe=-1,ce=5,U=-1;function Z(){return!(e.unstable_now()-U<ce)}function re(){if(Q!==null){var ue=e.unstable_now();U=ue;var Ee=!0;try{Ee=Q(!0,ue)}finally{Ee?ke():(D=!1,Q=null)}}else D=!1}var ke;if(typeof M=="function")ke=function(){M(re)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,ie=de.port2;de.port1.onmessage=re,ke=function(){ie.postMessage(null)}}else ke=function(){O(re,0)};function ve(ue){Q=ue,D||(D=!0,ke())}function Ie(ue,Ee){oe=O(function(){ue(e.unstable_now())},Ee)}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(ue){ue.callback=null},e.unstable_continueExecution=function(){A||b||(A=!0,ve(ne))},e.unstable_forceFrameRate=function(ue){0>ue||125<ue?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ce=0<ue?Math.floor(1e3/ue):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(ue){switch(x){case 1:case 2:case 3:var Ee=3;break;default:Ee=x}var S=x;x=Ee;try{return ue()}finally{x=S}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(ue,Ee){switch(ue){case 1:case 2:case 3:case 4:case 5:break;default:ue=3}var S=x;x=ue;try{return Ee()}finally{x=S}},e.unstable_scheduleCallback=function(ue,Ee,S){var F=e.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?F+S:F):S=F,ue){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=S+Y,ue={id:E++,callback:Ee,priorityLevel:ue,startTime:S,expirationTime:Y,sortIndex:-1},S>F?(ue.sortIndex=S,t(h,ue),n(f)===null&&ue===n(h)&&(L?(v(oe),oe=-1):L=!0,Ie(J,S-F))):(ue.sortIndex=Y,t(f,ue),A||b||(A=!0,ve(ne))),ue},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(ue){var Ee=x;return function(){var S=x;x=Ee;try{return ue.apply(this,arguments)}finally{x=S}}}})(ql)),ql}var Ep;function zT(){return Ep||(Ep=1,Vl.exports=HT()),Vl.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 Tp;function $T(){if(Tp)return Bt;Tp=1;var e=Yc(),t=zT();function n(r){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+r,u=1;u<arguments.length;u++)i+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,a={};function o(r,i){l(r,i),l(r+"Capture",i)}function l(r,i){for(a[r]=i,r=0;r<i.length;r++)s.add(i[r])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,h=/^[: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]*$/,E={},g={};function x(r){return f.call(g,r)?!0:f.call(E,r)?!1:h.test(r)?g[r]=!0:(E[r]=!0,!1)}function b(r,i,u,c){if(u!==null&&u.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return c?!1:u!==null?!u.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function A(r,i,u,c){if(i===null||typeof i>"u"||b(r,i,u,c))return!0;if(c)return!1;if(u!==null)switch(u.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function L(r,i,u,c,m,T,k){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=c,this.attributeNamespace=m,this.mustUseProperty=u,this.propertyName=r,this.type=i,this.sanitizeURL=T,this.removeEmptyString=k}var O={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){O[r]=new L(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var i=r[0];O[i]=new L(i,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){O[r]=new L(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){O[r]=new L(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){O[r]=new L(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){O[r]=new L(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){O[r]=new L(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){O[r]=new L(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){O[r]=new L(r,5,!1,r.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function M(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 i=r.replace(v,M);O[i]=new L(i,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var i=r.replace(v,M);O[i]=new L(i,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var i=r.replace(v,M);O[i]=new L(i,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){O[r]=new L(r,1,!1,r.toLowerCase(),null,!1,!1)}),O.xlinkHref=new L("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){O[r]=new L(r,1,!1,r.toLowerCase(),null,!0,!0)});function z(r,i,u,c){var m=O.hasOwnProperty(i)?O[i]:null;(m!==null?m.type!==0:c||!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(A(i,u,m,c)&&(u=null),c||m===null?x(i)&&(u===null?r.removeAttribute(i):r.setAttribute(i,""+u)):m.mustUseProperty?r[m.propertyName]=u===null?m.type===3?!1:"":u:(i=m.attributeName,c=m.attributeNamespace,u===null?r.removeAttribute(i):(m=m.type,u=m===3||m===4&&u===!0?"":""+u,c?r.setAttributeNS(c,i,u):r.setAttribute(i,u))))}var J=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ne=Symbol.for("react.element"),D=Symbol.for("react.portal"),Q=Symbol.for("react.fragment"),oe=Symbol.for("react.strict_mode"),ce=Symbol.for("react.profiler"),U=Symbol.for("react.provider"),Z=Symbol.for("react.context"),re=Symbol.for("react.forward_ref"),ke=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),ie=Symbol.for("react.memo"),ve=Symbol.for("react.lazy"),Ie=Symbol.for("react.offscreen"),ue=Symbol.iterator;function Ee(r){return r===null||typeof r!="object"?null:(r=ue&&r[ue]||r["@@iterator"],typeof r=="function"?r:null)}var S=Object.assign,F;function Y(r){if(F===void 0)try{throw Error()}catch(u){var i=u.stack.trim().match(/\n( *(at )?)/);F=i&&i[1]||""}return`
|
|
35
|
+
`+F+r}var N=!1;function he(r,i){if(!r||N)return"";N=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(W){var c=W}Reflect.construct(r,[],i)}else{try{i.call()}catch(W){c=W}r.call(i.prototype)}else{try{throw Error()}catch(W){c=W}r()}}catch(W){if(W&&c&&typeof W.stack=="string"){for(var m=W.stack.split(`
|
|
36
|
+
`),T=c.stack.split(`
|
|
37
|
+
`),k=m.length-1,I=T.length-1;1<=k&&0<=I&&m[k]!==T[I];)I--;for(;1<=k&&0<=I;k--,I--)if(m[k]!==T[I]){if(k!==1||I!==1)do if(k--,I--,0>I||m[k]!==T[I]){var P=`
|
|
38
|
+
`+m[k].replace(" at new "," at ");return r.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",r.displayName)),P}while(1<=k&&0<=I);break}}}finally{N=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?Y(r):""}function Ce(r){switch(r.tag){case 5:return Y(r.type);case 16:return Y("Lazy");case 13:return Y("Suspense");case 19:return Y("SuspenseList");case 0:case 2:case 15:return r=he(r.type,!1),r;case 11:return r=he(r.type.render,!1),r;case 1:return r=he(r.type,!0),r;default:return""}}function xe(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 Q:return"Fragment";case D:return"Portal";case ce:return"Profiler";case oe:return"StrictMode";case ke:return"Suspense";case de:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case Z:return(r.displayName||"Context")+".Consumer";case U:return(r._context.displayName||"Context")+".Provider";case re:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case ie:return i=r.displayName||null,i!==null?i:xe(r.type)||"Memo";case ve:i=r._payload,r=r._init;try{return xe(r(i))}catch{}}return null}function Be(r){var i=r.type;switch(r.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=i.render,r=r.displayName||r.name||"",i.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return xe(i);case 8:return i===oe?"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 i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function Re(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function ze(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function at(r){var i=ze(r)?"checked":"value",u=Object.getOwnPropertyDescriptor(r.constructor.prototype,i),c=""+r[i];if(!r.hasOwnProperty(i)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var m=u.get,T=u.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return m.call(this)},set:function(k){c=""+k,T.call(this,k)}}),Object.defineProperty(r,i,{enumerable:u.enumerable}),{getValue:function(){return c},setValue:function(k){c=""+k},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function Rn(r){r._valueTracker||(r._valueTracker=at(r))}function ua(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var u=i.getValue(),c="";return r&&(c=ze(r)?r.checked?"true":"false":r.value),r=c,r!==u?(i.setValue(r),!0):!1}function Jr(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 Bi(r,i){var u=i.checked;return S({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??r._wrapperState.initialChecked})}function Ui(r,i){var u=i.defaultValue==null?"":i.defaultValue,c=i.checked!=null?i.checked:i.defaultChecked;u=Re(i.value!=null?i.value:u),r._wrapperState={initialChecked:c,initialValue:u,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function ji(r,i){i=i.checked,i!=null&&z(r,"checked",i,!1)}function Zr(r,i){ji(r,i);var u=Re(i.value),c=i.type;if(u!=null)c==="number"?(u===0&&r.value===""||r.value!=u)&&(r.value=""+u):r.value!==""+u&&(r.value=""+u);else if(c==="submit"||c==="reset"){r.removeAttribute("value");return}i.hasOwnProperty("value")?ei(r,i.type,u):i.hasOwnProperty("defaultValue")&&ei(r,i.type,Re(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(r.defaultChecked=!!i.defaultChecked)}function oa(r,i,u){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var c=i.type;if(!(c!=="submit"&&c!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+r._wrapperState.initialValue,u||i===r.value||(r.value=i),r.defaultValue=i}u=r.name,u!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,u!==""&&(r.name=u)}function ei(r,i,u){(i!=="number"||Jr(r.ownerDocument)!==r)&&(u==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+u&&(r.defaultValue=""+u))}var Yn=Array.isArray;function Vn(r,i,u,c){if(r=r.options,i){i={};for(var m=0;m<u.length;m++)i["$"+u[m]]=!0;for(u=0;u<r.length;u++)m=i.hasOwnProperty("$"+r[u].value),r[u].selected!==m&&(r[u].selected=m),m&&c&&(r[u].defaultSelected=!0)}else{for(u=""+Re(u),i=null,m=0;m<r.length;m++){if(r[m].value===u){r[m].selected=!0,c&&(r[m].defaultSelected=!0);return}i!==null||r[m].disabled||(i=r[m])}i!==null&&(i.selected=!0)}}function Hi(r,i){if(i.dangerouslySetInnerHTML!=null)throw Error(n(91));return S({},i,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function la(r,i){var u=i.value;if(u==null){if(u=i.children,i=i.defaultValue,u!=null){if(i!=null)throw Error(n(92));if(Yn(u)){if(1<u.length)throw Error(n(93));u=u[0]}i=u}i==null&&(i=""),u=i}r._wrapperState={initialValue:Re(u)}}function ca(r,i){var u=Re(i.value),c=Re(i.defaultValue);u!=null&&(u=""+u,u!==r.value&&(r.value=u),i.defaultValue==null&&r.defaultValue!==u&&(r.defaultValue=u)),c!=null&&(r.defaultValue=""+c)}function da(r){var i=r.textContent;i===r._wrapperState.initialValue&&i!==""&&i!==null&&(r.value=i)}function q(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 le(r,i){return r==null||r==="http://www.w3.org/1999/xhtml"?q(i):r==="http://www.w3.org/2000/svg"&&i==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var Ne,Oe=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(i,u,c,m){MSApp.execUnsafeLocalFunction(function(){return r(i,u,c,m)})}:r})(function(r,i){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=i;else{for(Ne=Ne||document.createElement("div"),Ne.innerHTML="<svg>"+i.valueOf().toString()+"</svg>",i=Ne.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;i.firstChild;)r.appendChild(i.firstChild)}});function Ue(r,i){if(i){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=i;return}}r.textContent=i}var Et={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},On=["Webkit","ms","Moz","O"];Object.keys(Et).forEach(function(r){On.forEach(function(i){i=i+r.charAt(0).toUpperCase()+r.substring(1),Et[i]=Et[r]})});function Kt(r,i,u){return i==null||typeof i=="boolean"||i===""?"":u||typeof i!="number"||i===0||Et.hasOwnProperty(r)&&Et[r]?(""+i).trim():i+"px"}function qn(r,i){r=r.style;for(var u in i)if(i.hasOwnProperty(u)){var c=u.indexOf("--")===0,m=Kt(u,i[u],c);u==="float"&&(u="cssFloat"),c?r.setProperty(u,m):r[u]=m}}var Sr=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 Tt(r,i){if(i){if(Sr[r]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(n(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(n(61))}if(i.style!=null&&typeof i.style!="object")throw Error(n(62))}}function bn(r,i){if(r.indexOf("-")===-1)return typeof i.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 zt=null;function ro(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var io=null,ti=null,ni=null;function vd(r){if(r=ls(r)){if(typeof io!="function")throw Error(n(280));var i=r.stateNode;i&&(i=Da(i),io(r.stateNode,r.type,i))}}function wd(r){ti?ni?ni.push(r):ni=[r]:ti=r}function Id(){if(ti){var r=ti,i=ni;if(ni=ti=null,vd(r),i)for(r=0;r<i.length;r++)vd(i[r])}}function Ld(r,i){return r(i)}function Rd(){}var so=!1;function Od(r,i,u){if(so)return r(i,u);so=!0;try{return Ld(r,i,u)}finally{so=!1,(ti!==null||ni!==null)&&(Rd(),Id())}}function zi(r,i){var u=r.stateNode;if(u===null)return null;var c=Da(u);if(c===null)return null;u=c[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(r=r.type,c=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!c;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(n(231,i,typeof u));return u}var ao=!1;if(d)try{var $i={};Object.defineProperty($i,"passive",{get:function(){ao=!0}}),window.addEventListener("test",$i,$i),window.removeEventListener("test",$i,$i)}catch{ao=!1}function zg(r,i,u,c,m,T,k,I,P){var W=Array.prototype.slice.call(arguments,3);try{i.apply(u,W)}catch(X){this.onError(X)}}var Wi=!1,fa=null,ha=!1,uo=null,$g={onError:function(r){Wi=!0,fa=r}};function Wg(r,i,u,c,m,T,k,I,P){Wi=!1,fa=null,zg.apply($g,arguments)}function Yg(r,i,u,c,m,T,k,I,P){if(Wg.apply(this,arguments),Wi){if(Wi){var W=fa;Wi=!1,fa=null}else throw Error(n(198));ha||(ha=!0,uo=W)}}function _r(r){var i=r,u=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(u=i.return),r=i.return;while(r)}return i.tag===3?u:null}function Dd(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function Pd(r){if(_r(r)!==r)throw Error(n(188))}function Vg(r){var i=r.alternate;if(!i){if(i=_r(r),i===null)throw Error(n(188));return i!==r?null:r}for(var u=r,c=i;;){var m=u.return;if(m===null)break;var T=m.alternate;if(T===null){if(c=m.return,c!==null){u=c;continue}break}if(m.child===T.child){for(T=m.child;T;){if(T===u)return Pd(m),r;if(T===c)return Pd(m),i;T=T.sibling}throw Error(n(188))}if(u.return!==c.return)u=m,c=T;else{for(var k=!1,I=m.child;I;){if(I===u){k=!0,u=m,c=T;break}if(I===c){k=!0,c=m,u=T;break}I=I.sibling}if(!k){for(I=T.child;I;){if(I===u){k=!0,u=T,c=m;break}if(I===c){k=!0,c=T,u=m;break}I=I.sibling}if(!k)throw Error(n(189))}}if(u.alternate!==c)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?r:i}function Md(r){return r=Vg(r),r!==null?Fd(r):null}function Fd(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var i=Fd(r);if(i!==null)return i;r=r.sibling}return null}var Bd=t.unstable_scheduleCallback,Ud=t.unstable_cancelCallback,qg=t.unstable_shouldYield,Qg=t.unstable_requestPaint,rt=t.unstable_now,Gg=t.unstable_getCurrentPriorityLevel,oo=t.unstable_ImmediatePriority,jd=t.unstable_UserBlockingPriority,pa=t.unstable_NormalPriority,Kg=t.unstable_LowPriority,Hd=t.unstable_IdlePriority,ma=null,kn=null;function Xg(r){if(kn&&typeof kn.onCommitFiberRoot=="function")try{kn.onCommitFiberRoot(ma,r,void 0,(r.current.flags&128)===128)}catch{}}var un=Math.clz32?Math.clz32:eE,Jg=Math.log,Zg=Math.LN2;function eE(r){return r>>>=0,r===0?32:31-(Jg(r)/Zg|0)|0}var ga=64,Ea=4194304;function Yi(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 Ta(r,i){var u=r.pendingLanes;if(u===0)return 0;var c=0,m=r.suspendedLanes,T=r.pingedLanes,k=u&268435455;if(k!==0){var I=k&~m;I!==0?c=Yi(I):(T&=k,T!==0&&(c=Yi(T)))}else k=u&~m,k!==0?c=Yi(k):T!==0&&(c=Yi(T));if(c===0)return 0;if(i!==0&&i!==c&&(i&m)===0&&(m=c&-c,T=i&-i,m>=T||m===16&&(T&4194240)!==0))return i;if((c&4)!==0&&(c|=u&16),i=r.entangledLanes,i!==0)for(r=r.entanglements,i&=c;0<i;)u=31-un(i),m=1<<u,c|=r[u],i&=~m;return c}function tE(r,i){switch(r){case 1:case 2:case 4:return i+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 i+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 nE(r,i){for(var u=r.suspendedLanes,c=r.pingedLanes,m=r.expirationTimes,T=r.pendingLanes;0<T;){var k=31-un(T),I=1<<k,P=m[k];P===-1?((I&u)===0||(I&c)!==0)&&(m[k]=tE(I,i)):P<=i&&(r.expiredLanes|=I),T&=~I}}function lo(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function zd(){var r=ga;return ga<<=1,(ga&4194240)===0&&(ga=64),r}function co(r){for(var i=[],u=0;31>u;u++)i.push(r);return i}function Vi(r,i,u){r.pendingLanes|=i,i!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,i=31-un(i),r[i]=u}function rE(r,i){var u=r.pendingLanes&~i;r.pendingLanes=i,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=i,r.mutableReadLanes&=i,r.entangledLanes&=i,i=r.entanglements;var c=r.eventTimes;for(r=r.expirationTimes;0<u;){var m=31-un(u),T=1<<m;i[m]=0,c[m]=-1,r[m]=-1,u&=~T}}function fo(r,i){var u=r.entangledLanes|=i;for(r=r.entanglements;u;){var c=31-un(u),m=1<<c;m&i|r[c]&i&&(r[c]|=i),u&=~m}}var We=0;function $d(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var Wd,ho,Yd,Vd,qd,po=!1,ya=[],Qn=null,Gn=null,Kn=null,qi=new Map,Qi=new Map,Xn=[],iE="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 Qd(r,i){switch(r){case"focusin":case"focusout":Qn=null;break;case"dragenter":case"dragleave":Gn=null;break;case"mouseover":case"mouseout":Kn=null;break;case"pointerover":case"pointerout":qi.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qi.delete(i.pointerId)}}function Gi(r,i,u,c,m,T){return r===null||r.nativeEvent!==T?(r={blockedOn:i,domEventName:u,eventSystemFlags:c,nativeEvent:T,targetContainers:[m]},i!==null&&(i=ls(i),i!==null&&ho(i)),r):(r.eventSystemFlags|=c,i=r.targetContainers,m!==null&&i.indexOf(m)===-1&&i.push(m),r)}function sE(r,i,u,c,m){switch(i){case"focusin":return Qn=Gi(Qn,r,i,u,c,m),!0;case"dragenter":return Gn=Gi(Gn,r,i,u,c,m),!0;case"mouseover":return Kn=Gi(Kn,r,i,u,c,m),!0;case"pointerover":var T=m.pointerId;return qi.set(T,Gi(qi.get(T)||null,r,i,u,c,m)),!0;case"gotpointercapture":return T=m.pointerId,Qi.set(T,Gi(Qi.get(T)||null,r,i,u,c,m)),!0}return!1}function Gd(r){var i=Cr(r.target);if(i!==null){var u=_r(i);if(u!==null){if(i=u.tag,i===13){if(i=Dd(u),i!==null){r.blockedOn=i,qd(r.priority,function(){Yd(u)});return}}else if(i===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function xa(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var u=go(r.domEventName,r.eventSystemFlags,i[0],r.nativeEvent);if(u===null){u=r.nativeEvent;var c=new u.constructor(u.type,u);zt=c,u.target.dispatchEvent(c),zt=null}else return i=ls(u),i!==null&&ho(i),r.blockedOn=u,!1;i.shift()}return!0}function Kd(r,i,u){xa(r)&&u.delete(i)}function aE(){po=!1,Qn!==null&&xa(Qn)&&(Qn=null),Gn!==null&&xa(Gn)&&(Gn=null),Kn!==null&&xa(Kn)&&(Kn=null),qi.forEach(Kd),Qi.forEach(Kd)}function Ki(r,i){r.blockedOn===i&&(r.blockedOn=null,po||(po=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,aE)))}function Xi(r){function i(m){return Ki(m,r)}if(0<ya.length){Ki(ya[0],r);for(var u=1;u<ya.length;u++){var c=ya[u];c.blockedOn===r&&(c.blockedOn=null)}}for(Qn!==null&&Ki(Qn,r),Gn!==null&&Ki(Gn,r),Kn!==null&&Ki(Kn,r),qi.forEach(i),Qi.forEach(i),u=0;u<Xn.length;u++)c=Xn[u],c.blockedOn===r&&(c.blockedOn=null);for(;0<Xn.length&&(u=Xn[0],u.blockedOn===null);)Gd(u),u.blockedOn===null&&Xn.shift()}var ri=J.ReactCurrentBatchConfig,ba=!0;function uE(r,i,u,c){var m=We,T=ri.transition;ri.transition=null;try{We=1,mo(r,i,u,c)}finally{We=m,ri.transition=T}}function oE(r,i,u,c){var m=We,T=ri.transition;ri.transition=null;try{We=4,mo(r,i,u,c)}finally{We=m,ri.transition=T}}function mo(r,i,u,c){if(ba){var m=go(r,i,u,c);if(m===null)Oo(r,i,c,ka,u),Qd(r,c);else if(sE(m,r,i,u,c))c.stopPropagation();else if(Qd(r,c),i&4&&-1<iE.indexOf(r)){for(;m!==null;){var T=ls(m);if(T!==null&&Wd(T),T=go(r,i,u,c),T===null&&Oo(r,i,c,ka,u),T===m)break;m=T}m!==null&&c.stopPropagation()}else Oo(r,i,c,null,u)}}var ka=null;function go(r,i,u,c){if(ka=null,r=ro(c),r=Cr(r),r!==null)if(i=_r(r),i===null)r=null;else if(u=i.tag,u===13){if(r=Dd(i),r!==null)return r;r=null}else if(u===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null);return ka=r,null}function Xd(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(Gg()){case oo:return 1;case jd:return 4;case pa:case Kg:return 16;case Hd:return 536870912;default:return 16}default:return 16}}var Jn=null,Eo=null,Sa=null;function Jd(){if(Sa)return Sa;var r,i=Eo,u=i.length,c,m="value"in Jn?Jn.value:Jn.textContent,T=m.length;for(r=0;r<u&&i[r]===m[r];r++);var k=u-r;for(c=1;c<=k&&i[u-c]===m[T-c];c++);return Sa=m.slice(r,1<c?1-c:void 0)}function _a(r){var i=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&i===13&&(r=13)):r=i,r===10&&(r=13),32<=r||r===13?r:0}function Ca(){return!0}function Zd(){return!1}function $t(r){function i(u,c,m,T,k){this._reactName=u,this._targetInst=m,this.type=c,this.nativeEvent=T,this.target=k,this.currentTarget=null;for(var I in r)r.hasOwnProperty(I)&&(u=r[I],this[I]=u?u(T):T[I]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?Ca:Zd,this.isPropagationStopped=Zd,this}return S(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Ca)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Ca)},persist:function(){},isPersistent:Ca}),i}var ii={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},To=$t(ii),Ji=S({},ii,{view:0,detail:0}),lE=$t(Ji),yo,xo,Zi,Na=S({},Ji,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ko,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!==Zi&&(Zi&&r.type==="mousemove"?(yo=r.screenX-Zi.screenX,xo=r.screenY-Zi.screenY):xo=yo=0,Zi=r),yo)},movementY:function(r){return"movementY"in r?r.movementY:xo}}),ef=$t(Na),cE=S({},Na,{dataTransfer:0}),dE=$t(cE),fE=S({},Ji,{relatedTarget:0}),bo=$t(fE),hE=S({},ii,{animationName:0,elapsedTime:0,pseudoElement:0}),pE=$t(hE),mE=S({},ii,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),gE=$t(mE),EE=S({},ii,{data:0}),tf=$t(EE),TE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yE={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"},xE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bE(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=xE[r])?!!i[r]:!1}function ko(){return bE}var kE=S({},Ji,{key:function(r){if(r.key){var i=TE[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=_a(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?yE[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ko,charCode:function(r){return r.type==="keypress"?_a(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?_a(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),SE=$t(kE),_E=S({},Na,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nf=$t(_E),CE=S({},Ji,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ko}),NE=$t(CE),AE=S({},ii,{propertyName:0,elapsedTime:0,pseudoElement:0}),vE=$t(AE),wE=S({},Na,{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}),IE=$t(wE),LE=[9,13,27,32],So=d&&"CompositionEvent"in window,es=null;d&&"documentMode"in document&&(es=document.documentMode);var RE=d&&"TextEvent"in window&&!es,rf=d&&(!So||es&&8<es&&11>=es),sf=" ",af=!1;function uf(r,i){switch(r){case"keyup":return LE.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function of(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var si=!1;function OE(r,i){switch(r){case"compositionend":return of(i);case"keypress":return i.which!==32?null:(af=!0,sf);case"textInput":return r=i.data,r===sf&&af?null:r;default:return null}}function DE(r,i){if(si)return r==="compositionend"||!So&&uf(r,i)?(r=Jd(),Sa=Eo=Jn=null,si=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return rf&&i.locale!=="ko"?null:i.data;default:return null}}var PE={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function lf(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!PE[r.type]:i==="textarea"}function cf(r,i,u,c){wd(c),i=La(i,"onChange"),0<i.length&&(u=new To("onChange","change",null,u,c),r.push({event:u,listeners:i}))}var ts=null,ns=null;function ME(r){vf(r,0)}function Aa(r){var i=ci(r);if(ua(i))return r}function FE(r,i){if(r==="change")return i}var df=!1;if(d){var _o;if(d){var Co="oninput"in document;if(!Co){var ff=document.createElement("div");ff.setAttribute("oninput","return;"),Co=typeof ff.oninput=="function"}_o=Co}else _o=!1;df=_o&&(!document.documentMode||9<document.documentMode)}function hf(){ts&&(ts.detachEvent("onpropertychange",pf),ns=ts=null)}function pf(r){if(r.propertyName==="value"&&Aa(ns)){var i=[];cf(i,ns,r,ro(r)),Od(ME,i)}}function BE(r,i,u){r==="focusin"?(hf(),ts=i,ns=u,ts.attachEvent("onpropertychange",pf)):r==="focusout"&&hf()}function UE(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Aa(ns)}function jE(r,i){if(r==="click")return Aa(i)}function HE(r,i){if(r==="input"||r==="change")return Aa(i)}function zE(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var on=typeof Object.is=="function"?Object.is:zE;function rs(r,i){if(on(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var u=Object.keys(r),c=Object.keys(i);if(u.length!==c.length)return!1;for(c=0;c<u.length;c++){var m=u[c];if(!f.call(i,m)||!on(r[m],i[m]))return!1}return!0}function mf(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function gf(r,i){var u=mf(r);r=0;for(var c;u;){if(u.nodeType===3){if(c=r+u.textContent.length,r<=i&&c>=i)return{node:u,offset:i-r};r=c}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=mf(u)}}function Ef(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?Ef(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function Tf(){for(var r=window,i=Jr();i instanceof r.HTMLIFrameElement;){try{var u=typeof i.contentWindow.location.href=="string"}catch{u=!1}if(u)r=i.contentWindow;else break;i=Jr(r.document)}return i}function No(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}function $E(r){var i=Tf(),u=r.focusedElem,c=r.selectionRange;if(i!==u&&u&&u.ownerDocument&&Ef(u.ownerDocument.documentElement,u)){if(c!==null&&No(u)){if(i=c.start,r=c.end,r===void 0&&(r=i),"selectionStart"in u)u.selectionStart=i,u.selectionEnd=Math.min(r,u.value.length);else if(r=(i=u.ownerDocument||document)&&i.defaultView||window,r.getSelection){r=r.getSelection();var m=u.textContent.length,T=Math.min(c.start,m);c=c.end===void 0?T:Math.min(c.end,m),!r.extend&&T>c&&(m=c,c=T,T=m),m=gf(u,T);var k=gf(u,c);m&&k&&(r.rangeCount!==1||r.anchorNode!==m.node||r.anchorOffset!==m.offset||r.focusNode!==k.node||r.focusOffset!==k.offset)&&(i=i.createRange(),i.setStart(m.node,m.offset),r.removeAllRanges(),T>c?(r.addRange(i),r.extend(k.node,k.offset)):(i.setEnd(k.node,k.offset),r.addRange(i)))}}for(i=[],r=u;r=r.parentNode;)r.nodeType===1&&i.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<i.length;u++)r=i[u],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var WE=d&&"documentMode"in document&&11>=document.documentMode,ai=null,Ao=null,is=null,vo=!1;function yf(r,i,u){var c=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;vo||ai==null||ai!==Jr(c)||(c=ai,"selectionStart"in c&&No(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),is&&rs(is,c)||(is=c,c=La(Ao,"onSelect"),0<c.length&&(i=new To("onSelect","select",null,i,u),r.push({event:i,listeners:c}),i.target=ai)))}function va(r,i){var u={};return u[r.toLowerCase()]=i.toLowerCase(),u["Webkit"+r]="webkit"+i,u["Moz"+r]="moz"+i,u}var ui={animationend:va("Animation","AnimationEnd"),animationiteration:va("Animation","AnimationIteration"),animationstart:va("Animation","AnimationStart"),transitionend:va("Transition","TransitionEnd")},wo={},xf={};d&&(xf=document.createElement("div").style,"AnimationEvent"in window||(delete ui.animationend.animation,delete ui.animationiteration.animation,delete ui.animationstart.animation),"TransitionEvent"in window||delete ui.transitionend.transition);function wa(r){if(wo[r])return wo[r];if(!ui[r])return r;var i=ui[r],u;for(u in i)if(i.hasOwnProperty(u)&&u in xf)return wo[r]=i[u];return r}var bf=wa("animationend"),kf=wa("animationiteration"),Sf=wa("animationstart"),_f=wa("transitionend"),Cf=new Map,Nf="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 Zn(r,i){Cf.set(r,i),o(i,[r])}for(var Io=0;Io<Nf.length;Io++){var Lo=Nf[Io],YE=Lo.toLowerCase(),VE=Lo[0].toUpperCase()+Lo.slice(1);Zn(YE,"on"+VE)}Zn(bf,"onAnimationEnd"),Zn(kf,"onAnimationIteration"),Zn(Sf,"onAnimationStart"),Zn("dblclick","onDoubleClick"),Zn("focusin","onFocus"),Zn("focusout","onBlur"),Zn(_f,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ss="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(" "),qE=new Set("cancel close invalid load scroll toggle".split(" ").concat(ss));function Af(r,i,u){var c=r.type||"unknown-event";r.currentTarget=u,Yg(c,i,void 0,r),r.currentTarget=null}function vf(r,i){i=(i&4)!==0;for(var u=0;u<r.length;u++){var c=r[u],m=c.event;c=c.listeners;e:{var T=void 0;if(i)for(var k=c.length-1;0<=k;k--){var I=c[k],P=I.instance,W=I.currentTarget;if(I=I.listener,P!==T&&m.isPropagationStopped())break e;Af(m,I,W),T=P}else for(k=0;k<c.length;k++){if(I=c[k],P=I.instance,W=I.currentTarget,I=I.listener,P!==T&&m.isPropagationStopped())break e;Af(m,I,W),T=P}}}if(ha)throw r=uo,ha=!1,uo=null,r}function Qe(r,i){var u=i[Uo];u===void 0&&(u=i[Uo]=new Set);var c=r+"__bubble";u.has(c)||(wf(i,r,2,!1),u.add(c))}function Ro(r,i,u){var c=0;i&&(c|=4),wf(u,r,c,i)}var Ia="_reactListening"+Math.random().toString(36).slice(2);function as(r){if(!r[Ia]){r[Ia]=!0,s.forEach(function(u){u!=="selectionchange"&&(qE.has(u)||Ro(u,!1,r),Ro(u,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[Ia]||(i[Ia]=!0,Ro("selectionchange",!1,i))}}function wf(r,i,u,c){switch(Xd(i)){case 1:var m=uE;break;case 4:m=oE;break;default:m=mo}u=m.bind(null,i,u,r),m=void 0,!ao||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(m=!0),c?m!==void 0?r.addEventListener(i,u,{capture:!0,passive:m}):r.addEventListener(i,u,!0):m!==void 0?r.addEventListener(i,u,{passive:m}):r.addEventListener(i,u,!1)}function Oo(r,i,u,c,m){var T=c;if((i&1)===0&&(i&2)===0&&c!==null)e:for(;;){if(c===null)return;var k=c.tag;if(k===3||k===4){var I=c.stateNode.containerInfo;if(I===m||I.nodeType===8&&I.parentNode===m)break;if(k===4)for(k=c.return;k!==null;){var P=k.tag;if((P===3||P===4)&&(P=k.stateNode.containerInfo,P===m||P.nodeType===8&&P.parentNode===m))return;k=k.return}for(;I!==null;){if(k=Cr(I),k===null)return;if(P=k.tag,P===5||P===6){c=T=k;continue e}I=I.parentNode}}c=c.return}Od(function(){var W=T,X=ro(u),ee=[];e:{var G=Cf.get(r);if(G!==void 0){var fe=To,me=r;switch(r){case"keypress":if(_a(u)===0)break e;case"keydown":case"keyup":fe=SE;break;case"focusin":me="focus",fe=bo;break;case"focusout":me="blur",fe=bo;break;case"beforeblur":case"afterblur":fe=bo;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=ef;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=dE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=NE;break;case bf:case kf:case Sf:fe=pE;break;case _f:fe=vE;break;case"scroll":fe=lE;break;case"wheel":fe=IE;break;case"copy":case"cut":case"paste":fe=gE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=nf}var ge=(i&4)!==0,it=!ge&&r==="scroll",j=ge?G!==null?G+"Capture":null:G;ge=[];for(var B=W,$;B!==null;){$=B;var ae=$.stateNode;if($.tag===5&&ae!==null&&($=ae,j!==null&&(ae=zi(B,j),ae!=null&&ge.push(us(B,ae,$)))),it)break;B=B.return}0<ge.length&&(G=new fe(G,me,null,u,X),ee.push({event:G,listeners:ge}))}}if((i&7)===0){e:{if(G=r==="mouseover"||r==="pointerover",fe=r==="mouseout"||r==="pointerout",G&&u!==zt&&(me=u.relatedTarget||u.fromElement)&&(Cr(me)||me[Dn]))break e;if((fe||G)&&(G=X.window===X?X:(G=X.ownerDocument)?G.defaultView||G.parentWindow:window,fe?(me=u.relatedTarget||u.toElement,fe=W,me=me?Cr(me):null,me!==null&&(it=_r(me),me!==it||me.tag!==5&&me.tag!==6)&&(me=null)):(fe=null,me=W),fe!==me)){if(ge=ef,ae="onMouseLeave",j="onMouseEnter",B="mouse",(r==="pointerout"||r==="pointerover")&&(ge=nf,ae="onPointerLeave",j="onPointerEnter",B="pointer"),it=fe==null?G:ci(fe),$=me==null?G:ci(me),G=new ge(ae,B+"leave",fe,u,X),G.target=it,G.relatedTarget=$,ae=null,Cr(X)===W&&(ge=new ge(j,B+"enter",me,u,X),ge.target=$,ge.relatedTarget=it,ae=ge),it=ae,fe&&me)t:{for(ge=fe,j=me,B=0,$=ge;$;$=oi($))B++;for($=0,ae=j;ae;ae=oi(ae))$++;for(;0<B-$;)ge=oi(ge),B--;for(;0<$-B;)j=oi(j),$--;for(;B--;){if(ge===j||j!==null&&ge===j.alternate)break t;ge=oi(ge),j=oi(j)}ge=null}else ge=null;fe!==null&&If(ee,G,fe,ge,!1),me!==null&&it!==null&&If(ee,it,me,ge,!0)}}e:{if(G=W?ci(W):window,fe=G.nodeName&&G.nodeName.toLowerCase(),fe==="select"||fe==="input"&&G.type==="file")var Te=FE;else if(lf(G))if(df)Te=HE;else{Te=UE;var Se=BE}else(fe=G.nodeName)&&fe.toLowerCase()==="input"&&(G.type==="checkbox"||G.type==="radio")&&(Te=jE);if(Te&&(Te=Te(r,W))){cf(ee,Te,u,X);break e}Se&&Se(r,G,W),r==="focusout"&&(Se=G._wrapperState)&&Se.controlled&&G.type==="number"&&ei(G,"number",G.value)}switch(Se=W?ci(W):window,r){case"focusin":(lf(Se)||Se.contentEditable==="true")&&(ai=Se,Ao=W,is=null);break;case"focusout":is=Ao=ai=null;break;case"mousedown":vo=!0;break;case"contextmenu":case"mouseup":case"dragend":vo=!1,yf(ee,u,X);break;case"selectionchange":if(WE)break;case"keydown":case"keyup":yf(ee,u,X)}var _e;if(So)e:{switch(r){case"compositionstart":var Ae="onCompositionStart";break e;case"compositionend":Ae="onCompositionEnd";break e;case"compositionupdate":Ae="onCompositionUpdate";break e}Ae=void 0}else si?uf(r,u)&&(Ae="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(Ae="onCompositionStart");Ae&&(rf&&u.locale!=="ko"&&(si||Ae!=="onCompositionStart"?Ae==="onCompositionEnd"&&si&&(_e=Jd()):(Jn=X,Eo="value"in Jn?Jn.value:Jn.textContent,si=!0)),Se=La(W,Ae),0<Se.length&&(Ae=new tf(Ae,r,null,u,X),ee.push({event:Ae,listeners:Se}),_e?Ae.data=_e:(_e=of(u),_e!==null&&(Ae.data=_e)))),(_e=RE?OE(r,u):DE(r,u))&&(W=La(W,"onBeforeInput"),0<W.length&&(X=new tf("onBeforeInput","beforeinput",null,u,X),ee.push({event:X,listeners:W}),X.data=_e))}vf(ee,i)})}function us(r,i,u){return{instance:r,listener:i,currentTarget:u}}function La(r,i){for(var u=i+"Capture",c=[];r!==null;){var m=r,T=m.stateNode;m.tag===5&&T!==null&&(m=T,T=zi(r,u),T!=null&&c.unshift(us(r,T,m)),T=zi(r,i),T!=null&&c.push(us(r,T,m))),r=r.return}return c}function oi(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function If(r,i,u,c,m){for(var T=i._reactName,k=[];u!==null&&u!==c;){var I=u,P=I.alternate,W=I.stateNode;if(P!==null&&P===c)break;I.tag===5&&W!==null&&(I=W,m?(P=zi(u,T),P!=null&&k.unshift(us(u,P,I))):m||(P=zi(u,T),P!=null&&k.push(us(u,P,I)))),u=u.return}k.length!==0&&r.push({event:i,listeners:k})}var QE=/\r\n?/g,GE=/\u0000|\uFFFD/g;function Lf(r){return(typeof r=="string"?r:""+r).replace(QE,`
|
|
39
|
+
`).replace(GE,"")}function Ra(r,i,u){if(i=Lf(i),Lf(r)!==i&&u)throw Error(n(425))}function Oa(){}var Do=null,Po=null;function Mo(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Fo=typeof setTimeout=="function"?setTimeout:void 0,KE=typeof clearTimeout=="function"?clearTimeout:void 0,Rf=typeof Promise=="function"?Promise:void 0,XE=typeof queueMicrotask=="function"?queueMicrotask:typeof Rf<"u"?function(r){return Rf.resolve(null).then(r).catch(JE)}:Fo;function JE(r){setTimeout(function(){throw r})}function Bo(r,i){var u=i,c=0;do{var m=u.nextSibling;if(r.removeChild(u),m&&m.nodeType===8)if(u=m.data,u==="/$"){if(c===0){r.removeChild(m),Xi(i);return}c--}else u!=="$"&&u!=="$?"&&u!=="$!"||c++;u=m}while(u);Xi(i)}function er(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?")break;if(i==="/$")return null}}return r}function Of(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"){if(i===0)return r;i--}else u==="/$"&&i++}r=r.previousSibling}return null}var li=Math.random().toString(36).slice(2),Sn="__reactFiber$"+li,os="__reactProps$"+li,Dn="__reactContainer$"+li,Uo="__reactEvents$"+li,ZE="__reactListeners$"+li,eT="__reactHandles$"+li;function Cr(r){var i=r[Sn];if(i)return i;for(var u=r.parentNode;u;){if(i=u[Dn]||u[Sn]){if(u=i.alternate,i.child!==null||u!==null&&u.child!==null)for(r=Of(r);r!==null;){if(u=r[Sn])return u;r=Of(r)}return i}r=u,u=r.parentNode}return null}function ls(r){return r=r[Sn]||r[Dn],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function ci(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function Da(r){return r[os]||null}var jo=[],di=-1;function tr(r){return{current:r}}function Ge(r){0>di||(r.current=jo[di],jo[di]=null,di--)}function qe(r,i){di++,jo[di]=r.current,r.current=i}var nr={},St=tr(nr),Ot=tr(!1),Nr=nr;function fi(r,i){var u=r.type.contextTypes;if(!u)return nr;var c=r.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===i)return c.__reactInternalMemoizedMaskedChildContext;var m={},T;for(T in u)m[T]=i[T];return c&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=i,r.__reactInternalMemoizedMaskedChildContext=m),m}function Dt(r){return r=r.childContextTypes,r!=null}function Pa(){Ge(Ot),Ge(St)}function Df(r,i,u){if(St.current!==nr)throw Error(n(168));qe(St,i),qe(Ot,u)}function Pf(r,i,u){var c=r.stateNode;if(i=i.childContextTypes,typeof c.getChildContext!="function")return u;c=c.getChildContext();for(var m in c)if(!(m in i))throw Error(n(108,Be(r)||"Unknown",m));return S({},u,c)}function Ma(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||nr,Nr=St.current,qe(St,r),qe(Ot,Ot.current),!0}function Mf(r,i,u){var c=r.stateNode;if(!c)throw Error(n(169));u?(r=Pf(r,i,Nr),c.__reactInternalMemoizedMergedChildContext=r,Ge(Ot),Ge(St),qe(St,r)):Ge(Ot),qe(Ot,u)}var Pn=null,Fa=!1,Ho=!1;function Ff(r){Pn===null?Pn=[r]:Pn.push(r)}function tT(r){Fa=!0,Ff(r)}function rr(){if(!Ho&&Pn!==null){Ho=!0;var r=0,i=We;try{var u=Pn;for(We=1;r<u.length;r++){var c=u[r];do c=c(!0);while(c!==null)}Pn=null,Fa=!1}catch(m){throw Pn!==null&&(Pn=Pn.slice(r+1)),Bd(oo,rr),m}finally{We=i,Ho=!1}}return null}var hi=[],pi=0,Ba=null,Ua=0,Xt=[],Jt=0,Ar=null,Mn=1,Fn="";function vr(r,i){hi[pi++]=Ua,hi[pi++]=Ba,Ba=r,Ua=i}function Bf(r,i,u){Xt[Jt++]=Mn,Xt[Jt++]=Fn,Xt[Jt++]=Ar,Ar=r;var c=Mn;r=Fn;var m=32-un(c)-1;c&=~(1<<m),u+=1;var T=32-un(i)+m;if(30<T){var k=m-m%5;T=(c&(1<<k)-1).toString(32),c>>=k,m-=k,Mn=1<<32-un(i)+m|u<<m|c,Fn=T+r}else Mn=1<<T|u<<m|c,Fn=r}function zo(r){r.return!==null&&(vr(r,1),Bf(r,1,0))}function $o(r){for(;r===Ba;)Ba=hi[--pi],hi[pi]=null,Ua=hi[--pi],hi[pi]=null;for(;r===Ar;)Ar=Xt[--Jt],Xt[Jt]=null,Fn=Xt[--Jt],Xt[Jt]=null,Mn=Xt[--Jt],Xt[Jt]=null}var Wt=null,Yt=null,Xe=!1,ln=null;function Uf(r,i){var u=nn(5,null,null,0);u.elementType="DELETED",u.stateNode=i,u.return=r,i=r.deletions,i===null?(r.deletions=[u],r.flags|=16):i.push(u)}function jf(r,i){switch(r.tag){case 5:var u=r.type;return i=i.nodeType!==1||u.toLowerCase()!==i.nodeName.toLowerCase()?null:i,i!==null?(r.stateNode=i,Wt=r,Yt=er(i.firstChild),!0):!1;case 6:return i=r.pendingProps===""||i.nodeType!==3?null:i,i!==null?(r.stateNode=i,Wt=r,Yt=null,!0):!1;case 13:return i=i.nodeType!==8?null:i,i!==null?(u=Ar!==null?{id:Mn,overflow:Fn}:null,r.memoizedState={dehydrated:i,treeContext:u,retryLane:1073741824},u=nn(18,null,null,0),u.stateNode=i,u.return=r,r.child=u,Wt=r,Yt=null,!0):!1;default:return!1}}function Wo(r){return(r.mode&1)!==0&&(r.flags&128)===0}function Yo(r){if(Xe){var i=Yt;if(i){var u=i;if(!jf(r,i)){if(Wo(r))throw Error(n(418));i=er(u.nextSibling);var c=Wt;i&&jf(r,i)?Uf(c,u):(r.flags=r.flags&-4097|2,Xe=!1,Wt=r)}}else{if(Wo(r))throw Error(n(418));r.flags=r.flags&-4097|2,Xe=!1,Wt=r}}}function Hf(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;Wt=r}function ja(r){if(r!==Wt)return!1;if(!Xe)return Hf(r),Xe=!0,!1;var i;if((i=r.tag!==3)&&!(i=r.tag!==5)&&(i=r.type,i=i!=="head"&&i!=="body"&&!Mo(r.type,r.memoizedProps)),i&&(i=Yt)){if(Wo(r))throw zf(),Error(n(418));for(;i;)Uf(r,i),i=er(i.nextSibling)}if(Hf(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,i=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"){if(i===0){Yt=er(r.nextSibling);break e}i--}else u!=="$"&&u!=="$!"&&u!=="$?"||i++}r=r.nextSibling}Yt=null}}else Yt=Wt?er(r.stateNode.nextSibling):null;return!0}function zf(){for(var r=Yt;r;)r=er(r.nextSibling)}function mi(){Yt=Wt=null,Xe=!1}function Vo(r){ln===null?ln=[r]:ln.push(r)}var nT=J.ReactCurrentBatchConfig;function cs(r,i,u){if(r=u.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(n(309));var c=u.stateNode}if(!c)throw Error(n(147,r));var m=c,T=""+r;return i!==null&&i.ref!==null&&typeof i.ref=="function"&&i.ref._stringRef===T?i.ref:(i=function(k){var I=m.refs;k===null?delete I[T]:I[T]=k},i._stringRef=T,i)}if(typeof r!="string")throw Error(n(284));if(!u._owner)throw Error(n(290,r))}return r}function Ha(r,i){throw r=Object.prototype.toString.call(i),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r))}function $f(r){var i=r._init;return i(r._payload)}function Wf(r){function i(j,B){if(r){var $=j.deletions;$===null?(j.deletions=[B],j.flags|=16):$.push(B)}}function u(j,B){if(!r)return null;for(;B!==null;)i(j,B),B=B.sibling;return null}function c(j,B){for(j=new Map;B!==null;)B.key!==null?j.set(B.key,B):j.set(B.index,B),B=B.sibling;return j}function m(j,B){return j=dr(j,B),j.index=0,j.sibling=null,j}function T(j,B,$){return j.index=$,r?($=j.alternate,$!==null?($=$.index,$<B?(j.flags|=2,B):$):(j.flags|=2,B)):(j.flags|=1048576,B)}function k(j){return r&&j.alternate===null&&(j.flags|=2),j}function I(j,B,$,ae){return B===null||B.tag!==6?(B=Fl($,j.mode,ae),B.return=j,B):(B=m(B,$),B.return=j,B)}function P(j,B,$,ae){var Te=$.type;return Te===Q?X(j,B,$.props.children,ae,$.key):B!==null&&(B.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===ve&&$f(Te)===B.type)?(ae=m(B,$.props),ae.ref=cs(j,B,$),ae.return=j,ae):(ae=du($.type,$.key,$.props,null,j.mode,ae),ae.ref=cs(j,B,$),ae.return=j,ae)}function W(j,B,$,ae){return B===null||B.tag!==4||B.stateNode.containerInfo!==$.containerInfo||B.stateNode.implementation!==$.implementation?(B=Bl($,j.mode,ae),B.return=j,B):(B=m(B,$.children||[]),B.return=j,B)}function X(j,B,$,ae,Te){return B===null||B.tag!==7?(B=Mr($,j.mode,ae,Te),B.return=j,B):(B=m(B,$),B.return=j,B)}function ee(j,B,$){if(typeof B=="string"&&B!==""||typeof B=="number")return B=Fl(""+B,j.mode,$),B.return=j,B;if(typeof B=="object"&&B!==null){switch(B.$$typeof){case ne:return $=du(B.type,B.key,B.props,null,j.mode,$),$.ref=cs(j,null,B),$.return=j,$;case D:return B=Bl(B,j.mode,$),B.return=j,B;case ve:var ae=B._init;return ee(j,ae(B._payload),$)}if(Yn(B)||Ee(B))return B=Mr(B,j.mode,$,null),B.return=j,B;Ha(j,B)}return null}function G(j,B,$,ae){var Te=B!==null?B.key:null;if(typeof $=="string"&&$!==""||typeof $=="number")return Te!==null?null:I(j,B,""+$,ae);if(typeof $=="object"&&$!==null){switch($.$$typeof){case ne:return $.key===Te?P(j,B,$,ae):null;case D:return $.key===Te?W(j,B,$,ae):null;case ve:return Te=$._init,G(j,B,Te($._payload),ae)}if(Yn($)||Ee($))return Te!==null?null:X(j,B,$,ae,null);Ha(j,$)}return null}function fe(j,B,$,ae,Te){if(typeof ae=="string"&&ae!==""||typeof ae=="number")return j=j.get($)||null,I(B,j,""+ae,Te);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case ne:return j=j.get(ae.key===null?$:ae.key)||null,P(B,j,ae,Te);case D:return j=j.get(ae.key===null?$:ae.key)||null,W(B,j,ae,Te);case ve:var Se=ae._init;return fe(j,B,$,Se(ae._payload),Te)}if(Yn(ae)||Ee(ae))return j=j.get($)||null,X(B,j,ae,Te,null);Ha(B,ae)}return null}function me(j,B,$,ae){for(var Te=null,Se=null,_e=B,Ae=B=0,pt=null;_e!==null&&Ae<$.length;Ae++){_e.index>Ae?(pt=_e,_e=null):pt=_e.sibling;var He=G(j,_e,$[Ae],ae);if(He===null){_e===null&&(_e=pt);break}r&&_e&&He.alternate===null&&i(j,_e),B=T(He,B,Ae),Se===null?Te=He:Se.sibling=He,Se=He,_e=pt}if(Ae===$.length)return u(j,_e),Xe&&vr(j,Ae),Te;if(_e===null){for(;Ae<$.length;Ae++)_e=ee(j,$[Ae],ae),_e!==null&&(B=T(_e,B,Ae),Se===null?Te=_e:Se.sibling=_e,Se=_e);return Xe&&vr(j,Ae),Te}for(_e=c(j,_e);Ae<$.length;Ae++)pt=fe(_e,j,Ae,$[Ae],ae),pt!==null&&(r&&pt.alternate!==null&&_e.delete(pt.key===null?Ae:pt.key),B=T(pt,B,Ae),Se===null?Te=pt:Se.sibling=pt,Se=pt);return r&&_e.forEach(function(fr){return i(j,fr)}),Xe&&vr(j,Ae),Te}function ge(j,B,$,ae){var Te=Ee($);if(typeof Te!="function")throw Error(n(150));if($=Te.call($),$==null)throw Error(n(151));for(var Se=Te=null,_e=B,Ae=B=0,pt=null,He=$.next();_e!==null&&!He.done;Ae++,He=$.next()){_e.index>Ae?(pt=_e,_e=null):pt=_e.sibling;var fr=G(j,_e,He.value,ae);if(fr===null){_e===null&&(_e=pt);break}r&&_e&&fr.alternate===null&&i(j,_e),B=T(fr,B,Ae),Se===null?Te=fr:Se.sibling=fr,Se=fr,_e=pt}if(He.done)return u(j,_e),Xe&&vr(j,Ae),Te;if(_e===null){for(;!He.done;Ae++,He=$.next())He=ee(j,He.value,ae),He!==null&&(B=T(He,B,Ae),Se===null?Te=He:Se.sibling=He,Se=He);return Xe&&vr(j,Ae),Te}for(_e=c(j,_e);!He.done;Ae++,He=$.next())He=fe(_e,j,Ae,He.value,ae),He!==null&&(r&&He.alternate!==null&&_e.delete(He.key===null?Ae:He.key),B=T(He,B,Ae),Se===null?Te=He:Se.sibling=He,Se=He);return r&&_e.forEach(function(PT){return i(j,PT)}),Xe&&vr(j,Ae),Te}function it(j,B,$,ae){if(typeof $=="object"&&$!==null&&$.type===Q&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case ne:e:{for(var Te=$.key,Se=B;Se!==null;){if(Se.key===Te){if(Te=$.type,Te===Q){if(Se.tag===7){u(j,Se.sibling),B=m(Se,$.props.children),B.return=j,j=B;break e}}else if(Se.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===ve&&$f(Te)===Se.type){u(j,Se.sibling),B=m(Se,$.props),B.ref=cs(j,Se,$),B.return=j,j=B;break e}u(j,Se);break}else i(j,Se);Se=Se.sibling}$.type===Q?(B=Mr($.props.children,j.mode,ae,$.key),B.return=j,j=B):(ae=du($.type,$.key,$.props,null,j.mode,ae),ae.ref=cs(j,B,$),ae.return=j,j=ae)}return k(j);case D:e:{for(Se=$.key;B!==null;){if(B.key===Se)if(B.tag===4&&B.stateNode.containerInfo===$.containerInfo&&B.stateNode.implementation===$.implementation){u(j,B.sibling),B=m(B,$.children||[]),B.return=j,j=B;break e}else{u(j,B);break}else i(j,B);B=B.sibling}B=Bl($,j.mode,ae),B.return=j,j=B}return k(j);case ve:return Se=$._init,it(j,B,Se($._payload),ae)}if(Yn($))return me(j,B,$,ae);if(Ee($))return ge(j,B,$,ae);Ha(j,$)}return typeof $=="string"&&$!==""||typeof $=="number"?($=""+$,B!==null&&B.tag===6?(u(j,B.sibling),B=m(B,$),B.return=j,j=B):(u(j,B),B=Fl($,j.mode,ae),B.return=j,j=B),k(j)):u(j,B)}return it}var gi=Wf(!0),Yf=Wf(!1),za=tr(null),$a=null,Ei=null,qo=null;function Qo(){qo=Ei=$a=null}function Go(r){var i=za.current;Ge(za),r._currentValue=i}function Ko(r,i,u){for(;r!==null;){var c=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),r===u)break;r=r.return}}function Ti(r,i){$a=r,qo=Ei=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&i)!==0&&(Pt=!0),r.firstContext=null)}function Zt(r){var i=r._currentValue;if(qo!==r)if(r={context:r,memoizedValue:i,next:null},Ei===null){if($a===null)throw Error(n(308));Ei=r,$a.dependencies={lanes:0,firstContext:r}}else Ei=Ei.next=r;return i}var wr=null;function Xo(r){wr===null?wr=[r]:wr.push(r)}function Vf(r,i,u,c){var m=i.interleaved;return m===null?(u.next=u,Xo(i)):(u.next=m.next,m.next=u),i.interleaved=u,Bn(r,c)}function Bn(r,i){r.lanes|=i;var u=r.alternate;for(u!==null&&(u.lanes|=i),u=r,r=r.return;r!==null;)r.childLanes|=i,u=r.alternate,u!==null&&(u.childLanes|=i),u=r,r=r.return;return u.tag===3?u.stateNode:null}var ir=!1;function Jo(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function qf(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Un(r,i){return{eventTime:r,lane:i,tag:0,payload:null,callback:null,next:null}}function sr(r,i,u){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(je&2)!==0){var m=c.pending;return m===null?i.next=i:(i.next=m.next,m.next=i),c.pending=i,Bn(r,u)}return m=c.interleaved,m===null?(i.next=i,Xo(c)):(i.next=m.next,m.next=i),c.interleaved=i,Bn(r,u)}function Wa(r,i,u){if(i=i.updateQueue,i!==null&&(i=i.shared,(u&4194240)!==0)){var c=i.lanes;c&=r.pendingLanes,u|=c,i.lanes=u,fo(r,u)}}function Qf(r,i){var u=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,u===c)){var m=null,T=null;if(u=u.firstBaseUpdate,u!==null){do{var k={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};T===null?m=T=k:T=T.next=k,u=u.next}while(u!==null);T===null?m=T=i:T=T.next=i}else m=T=i;u={baseState:c.baseState,firstBaseUpdate:m,lastBaseUpdate:T,shared:c.shared,effects:c.effects},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=i:r.next=i,u.lastBaseUpdate=i}function Ya(r,i,u,c){var m=r.updateQueue;ir=!1;var T=m.firstBaseUpdate,k=m.lastBaseUpdate,I=m.shared.pending;if(I!==null){m.shared.pending=null;var P=I,W=P.next;P.next=null,k===null?T=W:k.next=W,k=P;var X=r.alternate;X!==null&&(X=X.updateQueue,I=X.lastBaseUpdate,I!==k&&(I===null?X.firstBaseUpdate=W:I.next=W,X.lastBaseUpdate=P))}if(T!==null){var ee=m.baseState;k=0,X=W=P=null,I=T;do{var G=I.lane,fe=I.eventTime;if((c&G)===G){X!==null&&(X=X.next={eventTime:fe,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var me=r,ge=I;switch(G=i,fe=u,ge.tag){case 1:if(me=ge.payload,typeof me=="function"){ee=me.call(fe,ee,G);break e}ee=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=ge.payload,G=typeof me=="function"?me.call(fe,ee,G):me,G==null)break e;ee=S({},ee,G);break e;case 2:ir=!0}}I.callback!==null&&I.lane!==0&&(r.flags|=64,G=m.effects,G===null?m.effects=[I]:G.push(I))}else fe={eventTime:fe,lane:G,tag:I.tag,payload:I.payload,callback:I.callback,next:null},X===null?(W=X=fe,P=ee):X=X.next=fe,k|=G;if(I=I.next,I===null){if(I=m.shared.pending,I===null)break;G=I,I=G.next,G.next=null,m.lastBaseUpdate=G,m.shared.pending=null}}while(!0);if(X===null&&(P=ee),m.baseState=P,m.firstBaseUpdate=W,m.lastBaseUpdate=X,i=m.shared.interleaved,i!==null){m=i;do k|=m.lane,m=m.next;while(m!==i)}else T===null&&(m.shared.lanes=0);Rr|=k,r.lanes=k,r.memoizedState=ee}}function Gf(r,i,u){if(r=i.effects,i.effects=null,r!==null)for(i=0;i<r.length;i++){var c=r[i],m=c.callback;if(m!==null){if(c.callback=null,c=u,typeof m!="function")throw Error(n(191,m));m.call(c)}}}var ds={},_n=tr(ds),fs=tr(ds),hs=tr(ds);function Ir(r){if(r===ds)throw Error(n(174));return r}function Zo(r,i){switch(qe(hs,i),qe(fs,r),qe(_n,ds),r=i.nodeType,r){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:le(null,"");break;default:r=r===8?i.parentNode:i,i=r.namespaceURI||null,r=r.tagName,i=le(i,r)}Ge(_n),qe(_n,i)}function yi(){Ge(_n),Ge(fs),Ge(hs)}function Kf(r){Ir(hs.current);var i=Ir(_n.current),u=le(i,r.type);i!==u&&(qe(fs,r),qe(_n,u))}function el(r){fs.current===r&&(Ge(_n),Ge(fs))}var Ze=tr(0);function Va(r){for(var i=r;i!==null;){if(i.tag===13){var u=i.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var tl=[];function nl(){for(var r=0;r<tl.length;r++)tl[r]._workInProgressVersionPrimary=null;tl.length=0}var qa=J.ReactCurrentDispatcher,rl=J.ReactCurrentBatchConfig,Lr=0,et=null,lt=null,ft=null,Qa=!1,ps=!1,ms=0,rT=0;function _t(){throw Error(n(321))}function il(r,i){if(i===null)return!1;for(var u=0;u<i.length&&u<r.length;u++)if(!on(r[u],i[u]))return!1;return!0}function sl(r,i,u,c,m,T){if(Lr=T,et=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,qa.current=r===null||r.memoizedState===null?uT:oT,r=u(c,m),ps){T=0;do{if(ps=!1,ms=0,25<=T)throw Error(n(301));T+=1,ft=lt=null,i.updateQueue=null,qa.current=lT,r=u(c,m)}while(ps)}if(qa.current=Xa,i=lt!==null&<.next!==null,Lr=0,ft=lt=et=null,Qa=!1,i)throw Error(n(300));return r}function al(){var r=ms!==0;return ms=0,r}function Cn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?et.memoizedState=ft=r:ft=ft.next=r,ft}function en(){if(lt===null){var r=et.alternate;r=r!==null?r.memoizedState:null}else r=lt.next;var i=ft===null?et.memoizedState:ft.next;if(i!==null)ft=i,lt=r;else{if(r===null)throw Error(n(310));lt=r,r={memoizedState:lt.memoizedState,baseState:lt.baseState,baseQueue:lt.baseQueue,queue:lt.queue,next:null},ft===null?et.memoizedState=ft=r:ft=ft.next=r}return ft}function gs(r,i){return typeof i=="function"?i(r):i}function ul(r){var i=en(),u=i.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var c=lt,m=c.baseQueue,T=u.pending;if(T!==null){if(m!==null){var k=m.next;m.next=T.next,T.next=k}c.baseQueue=m=T,u.pending=null}if(m!==null){T=m.next,c=c.baseState;var I=k=null,P=null,W=T;do{var X=W.lane;if((Lr&X)===X)P!==null&&(P=P.next={lane:0,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null}),c=W.hasEagerState?W.eagerState:r(c,W.action);else{var ee={lane:X,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null};P===null?(I=P=ee,k=c):P=P.next=ee,et.lanes|=X,Rr|=X}W=W.next}while(W!==null&&W!==T);P===null?k=c:P.next=I,on(c,i.memoizedState)||(Pt=!0),i.memoizedState=c,i.baseState=k,i.baseQueue=P,u.lastRenderedState=c}if(r=u.interleaved,r!==null){m=r;do T=m.lane,et.lanes|=T,Rr|=T,m=m.next;while(m!==r)}else m===null&&(u.lanes=0);return[i.memoizedState,u.dispatch]}function ol(r){var i=en(),u=i.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var c=u.dispatch,m=u.pending,T=i.memoizedState;if(m!==null){u.pending=null;var k=m=m.next;do T=r(T,k.action),k=k.next;while(k!==m);on(T,i.memoizedState)||(Pt=!0),i.memoizedState=T,i.baseQueue===null&&(i.baseState=T),u.lastRenderedState=T}return[T,c]}function Xf(){}function Jf(r,i){var u=et,c=en(),m=i(),T=!on(c.memoizedState,m);if(T&&(c.memoizedState=m,Pt=!0),c=c.queue,ll(th.bind(null,u,c,r),[r]),c.getSnapshot!==i||T||ft!==null&&ft.memoizedState.tag&1){if(u.flags|=2048,Es(9,eh.bind(null,u,c,m,i),void 0,null),ht===null)throw Error(n(349));(Lr&30)!==0||Zf(u,i,m)}return m}function Zf(r,i,u){r.flags|=16384,r={getSnapshot:i,value:u},i=et.updateQueue,i===null?(i={lastEffect:null,stores:null},et.updateQueue=i,i.stores=[r]):(u=i.stores,u===null?i.stores=[r]:u.push(r))}function eh(r,i,u,c){i.value=u,i.getSnapshot=c,nh(i)&&rh(r)}function th(r,i,u){return u(function(){nh(i)&&rh(r)})}function nh(r){var i=r.getSnapshot;r=r.value;try{var u=i();return!on(r,u)}catch{return!0}}function rh(r){var i=Bn(r,1);i!==null&&hn(i,r,1,-1)}function ih(r){var i=Cn();return typeof r=="function"&&(r=r()),i.memoizedState=i.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:gs,lastRenderedState:r},i.queue=r,r=r.dispatch=aT.bind(null,et,r),[i.memoizedState,r]}function Es(r,i,u,c){return r={tag:r,create:i,destroy:u,deps:c,next:null},i=et.updateQueue,i===null?(i={lastEffect:null,stores:null},et.updateQueue=i,i.lastEffect=r.next=r):(u=i.lastEffect,u===null?i.lastEffect=r.next=r:(c=u.next,u.next=r,r.next=c,i.lastEffect=r)),r}function sh(){return en().memoizedState}function Ga(r,i,u,c){var m=Cn();et.flags|=r,m.memoizedState=Es(1|i,u,void 0,c===void 0?null:c)}function Ka(r,i,u,c){var m=en();c=c===void 0?null:c;var T=void 0;if(lt!==null){var k=lt.memoizedState;if(T=k.destroy,c!==null&&il(c,k.deps)){m.memoizedState=Es(i,u,T,c);return}}et.flags|=r,m.memoizedState=Es(1|i,u,T,c)}function ah(r,i){return Ga(8390656,8,r,i)}function ll(r,i){return Ka(2048,8,r,i)}function uh(r,i){return Ka(4,2,r,i)}function oh(r,i){return Ka(4,4,r,i)}function lh(r,i){if(typeof i=="function")return r=r(),i(r),function(){i(null)};if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function ch(r,i,u){return u=u!=null?u.concat([r]):null,Ka(4,4,lh.bind(null,i,r),u)}function cl(){}function dh(r,i){var u=en();i=i===void 0?null:i;var c=u.memoizedState;return c!==null&&i!==null&&il(i,c[1])?c[0]:(u.memoizedState=[r,i],r)}function fh(r,i){var u=en();i=i===void 0?null:i;var c=u.memoizedState;return c!==null&&i!==null&&il(i,c[1])?c[0]:(r=r(),u.memoizedState=[r,i],r)}function hh(r,i,u){return(Lr&21)===0?(r.baseState&&(r.baseState=!1,Pt=!0),r.memoizedState=u):(on(u,i)||(u=zd(),et.lanes|=u,Rr|=u,r.baseState=!0),i)}function iT(r,i){var u=We;We=u!==0&&4>u?u:4,r(!0);var c=rl.transition;rl.transition={};try{r(!1),i()}finally{We=u,rl.transition=c}}function ph(){return en().memoizedState}function sT(r,i,u){var c=lr(r);if(u={lane:c,action:u,hasEagerState:!1,eagerState:null,next:null},mh(r))gh(i,u);else if(u=Vf(r,i,u,c),u!==null){var m=Lt();hn(u,r,c,m),Eh(u,i,c)}}function aT(r,i,u){var c=lr(r),m={lane:c,action:u,hasEagerState:!1,eagerState:null,next:null};if(mh(r))gh(i,m);else{var T=r.alternate;if(r.lanes===0&&(T===null||T.lanes===0)&&(T=i.lastRenderedReducer,T!==null))try{var k=i.lastRenderedState,I=T(k,u);if(m.hasEagerState=!0,m.eagerState=I,on(I,k)){var P=i.interleaved;P===null?(m.next=m,Xo(i)):(m.next=P.next,P.next=m),i.interleaved=m;return}}catch{}finally{}u=Vf(r,i,m,c),u!==null&&(m=Lt(),hn(u,r,c,m),Eh(u,i,c))}}function mh(r){var i=r.alternate;return r===et||i!==null&&i===et}function gh(r,i){ps=Qa=!0;var u=r.pending;u===null?i.next=i:(i.next=u.next,u.next=i),r.pending=i}function Eh(r,i,u){if((u&4194240)!==0){var c=i.lanes;c&=r.pendingLanes,u|=c,i.lanes=u,fo(r,u)}}var Xa={readContext:Zt,useCallback:_t,useContext:_t,useEffect:_t,useImperativeHandle:_t,useInsertionEffect:_t,useLayoutEffect:_t,useMemo:_t,useReducer:_t,useRef:_t,useState:_t,useDebugValue:_t,useDeferredValue:_t,useTransition:_t,useMutableSource:_t,useSyncExternalStore:_t,useId:_t,unstable_isNewReconciler:!1},uT={readContext:Zt,useCallback:function(r,i){return Cn().memoizedState=[r,i===void 0?null:i],r},useContext:Zt,useEffect:ah,useImperativeHandle:function(r,i,u){return u=u!=null?u.concat([r]):null,Ga(4194308,4,lh.bind(null,i,r),u)},useLayoutEffect:function(r,i){return Ga(4194308,4,r,i)},useInsertionEffect:function(r,i){return Ga(4,2,r,i)},useMemo:function(r,i){var u=Cn();return i=i===void 0?null:i,r=r(),u.memoizedState=[r,i],r},useReducer:function(r,i,u){var c=Cn();return i=u!==void 0?u(i):i,c.memoizedState=c.baseState=i,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:i},c.queue=r,r=r.dispatch=sT.bind(null,et,r),[c.memoizedState,r]},useRef:function(r){var i=Cn();return r={current:r},i.memoizedState=r},useState:ih,useDebugValue:cl,useDeferredValue:function(r){return Cn().memoizedState=r},useTransition:function(){var r=ih(!1),i=r[0];return r=iT.bind(null,r[1]),Cn().memoizedState=r,[i,r]},useMutableSource:function(){},useSyncExternalStore:function(r,i,u){var c=et,m=Cn();if(Xe){if(u===void 0)throw Error(n(407));u=u()}else{if(u=i(),ht===null)throw Error(n(349));(Lr&30)!==0||Zf(c,i,u)}m.memoizedState=u;var T={value:u,getSnapshot:i};return m.queue=T,ah(th.bind(null,c,T,r),[r]),c.flags|=2048,Es(9,eh.bind(null,c,T,u,i),void 0,null),u},useId:function(){var r=Cn(),i=ht.identifierPrefix;if(Xe){var u=Fn,c=Mn;u=(c&~(1<<32-un(c)-1)).toString(32)+u,i=":"+i+"R"+u,u=ms++,0<u&&(i+="H"+u.toString(32)),i+=":"}else u=rT++,i=":"+i+"r"+u.toString(32)+":";return r.memoizedState=i},unstable_isNewReconciler:!1},oT={readContext:Zt,useCallback:dh,useContext:Zt,useEffect:ll,useImperativeHandle:ch,useInsertionEffect:uh,useLayoutEffect:oh,useMemo:fh,useReducer:ul,useRef:sh,useState:function(){return ul(gs)},useDebugValue:cl,useDeferredValue:function(r){var i=en();return hh(i,lt.memoizedState,r)},useTransition:function(){var r=ul(gs)[0],i=en().memoizedState;return[r,i]},useMutableSource:Xf,useSyncExternalStore:Jf,useId:ph,unstable_isNewReconciler:!1},lT={readContext:Zt,useCallback:dh,useContext:Zt,useEffect:ll,useImperativeHandle:ch,useInsertionEffect:uh,useLayoutEffect:oh,useMemo:fh,useReducer:ol,useRef:sh,useState:function(){return ol(gs)},useDebugValue:cl,useDeferredValue:function(r){var i=en();return lt===null?i.memoizedState=r:hh(i,lt.memoizedState,r)},useTransition:function(){var r=ol(gs)[0],i=en().memoizedState;return[r,i]},useMutableSource:Xf,useSyncExternalStore:Jf,useId:ph,unstable_isNewReconciler:!1};function cn(r,i){if(r&&r.defaultProps){i=S({},i),r=r.defaultProps;for(var u in r)i[u]===void 0&&(i[u]=r[u]);return i}return i}function dl(r,i,u,c){i=r.memoizedState,u=u(c,i),u=u==null?i:S({},i,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var Ja={isMounted:function(r){return(r=r._reactInternals)?_r(r)===r:!1},enqueueSetState:function(r,i,u){r=r._reactInternals;var c=Lt(),m=lr(r),T=Un(c,m);T.payload=i,u!=null&&(T.callback=u),i=sr(r,T,m),i!==null&&(hn(i,r,m,c),Wa(i,r,m))},enqueueReplaceState:function(r,i,u){r=r._reactInternals;var c=Lt(),m=lr(r),T=Un(c,m);T.tag=1,T.payload=i,u!=null&&(T.callback=u),i=sr(r,T,m),i!==null&&(hn(i,r,m,c),Wa(i,r,m))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var u=Lt(),c=lr(r),m=Un(u,c);m.tag=2,i!=null&&(m.callback=i),i=sr(r,m,c),i!==null&&(hn(i,r,c,u),Wa(i,r,c))}};function Th(r,i,u,c,m,T,k){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(c,T,k):i.prototype&&i.prototype.isPureReactComponent?!rs(u,c)||!rs(m,T):!0}function yh(r,i,u){var c=!1,m=nr,T=i.contextType;return typeof T=="object"&&T!==null?T=Zt(T):(m=Dt(i)?Nr:St.current,c=i.contextTypes,T=(c=c!=null)?fi(r,m):nr),i=new i(u,T),r.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Ja,r.stateNode=i,i._reactInternals=r,c&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=m,r.__reactInternalMemoizedMaskedChildContext=T),i}function xh(r,i,u,c){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(u,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(u,c),i.state!==r&&Ja.enqueueReplaceState(i,i.state,null)}function fl(r,i,u,c){var m=r.stateNode;m.props=u,m.state=r.memoizedState,m.refs={},Jo(r);var T=i.contextType;typeof T=="object"&&T!==null?m.context=Zt(T):(T=Dt(i)?Nr:St.current,m.context=fi(r,T)),m.state=r.memoizedState,T=i.getDerivedStateFromProps,typeof T=="function"&&(dl(r,i,T,u),m.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(i=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),i!==m.state&&Ja.enqueueReplaceState(m,m.state,null),Ya(r,u,m,c),m.state=r.memoizedState),typeof m.componentDidMount=="function"&&(r.flags|=4194308)}function xi(r,i){try{var u="",c=i;do u+=Ce(c),c=c.return;while(c);var m=u}catch(T){m=`
|
|
40
|
+
Error generating stack: `+T.message+`
|
|
41
|
+
`+T.stack}return{value:r,source:i,stack:m,digest:null}}function hl(r,i,u){return{value:r,source:null,stack:u??null,digest:i??null}}function pl(r,i){try{console.error(i.value)}catch(u){setTimeout(function(){throw u})}}var cT=typeof WeakMap=="function"?WeakMap:Map;function bh(r,i,u){u=Un(-1,u),u.tag=3,u.payload={element:null};var c=i.value;return u.callback=function(){su||(su=!0,wl=c),pl(r,i)},u}function kh(r,i,u){u=Un(-1,u),u.tag=3;var c=r.type.getDerivedStateFromError;if(typeof c=="function"){var m=i.value;u.payload=function(){return c(m)},u.callback=function(){pl(r,i)}}var T=r.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(u.callback=function(){pl(r,i),typeof c!="function"&&(ur===null?ur=new Set([this]):ur.add(this));var k=i.stack;this.componentDidCatch(i.value,{componentStack:k!==null?k:""})}),u}function Sh(r,i,u){var c=r.pingCache;if(c===null){c=r.pingCache=new cT;var m=new Set;c.set(i,m)}else m=c.get(i),m===void 0&&(m=new Set,c.set(i,m));m.has(u)||(m.add(u),r=_T.bind(null,r,i,u),i.then(r,r))}function _h(r){do{var i;if((i=r.tag===13)&&(i=r.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return r;r=r.return}while(r!==null);return null}function Ch(r,i,u,c,m){return(r.mode&1)===0?(r===i?r.flags|=65536:(r.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(i=Un(-1,1),i.tag=2,sr(u,i,1))),u.lanes|=1),r):(r.flags|=65536,r.lanes=m,r)}var dT=J.ReactCurrentOwner,Pt=!1;function It(r,i,u,c){i.child=r===null?Yf(i,null,u,c):gi(i,r.child,u,c)}function Nh(r,i,u,c,m){u=u.render;var T=i.ref;return Ti(i,m),c=sl(r,i,u,c,T,m),u=al(),r!==null&&!Pt?(i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~m,jn(r,i,m)):(Xe&&u&&zo(i),i.flags|=1,It(r,i,c,m),i.child)}function Ah(r,i,u,c,m){if(r===null){var T=u.type;return typeof T=="function"&&!Ml(T)&&T.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(i.tag=15,i.type=T,vh(r,i,T,c,m)):(r=du(u.type,null,c,i,i.mode,m),r.ref=i.ref,r.return=i,i.child=r)}if(T=r.child,(r.lanes&m)===0){var k=T.memoizedProps;if(u=u.compare,u=u!==null?u:rs,u(k,c)&&r.ref===i.ref)return jn(r,i,m)}return i.flags|=1,r=dr(T,c),r.ref=i.ref,r.return=i,i.child=r}function vh(r,i,u,c,m){if(r!==null){var T=r.memoizedProps;if(rs(T,c)&&r.ref===i.ref)if(Pt=!1,i.pendingProps=c=T,(r.lanes&m)!==0)(r.flags&131072)!==0&&(Pt=!0);else return i.lanes=r.lanes,jn(r,i,m)}return ml(r,i,u,c,m)}function wh(r,i,u){var c=i.pendingProps,m=c.children,T=r!==null?r.memoizedState:null;if(c.mode==="hidden")if((i.mode&1)===0)i.memoizedState={baseLanes:0,cachePool:null,transitions:null},qe(ki,Vt),Vt|=u;else{if((u&1073741824)===0)return r=T!==null?T.baseLanes|u:u,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:r,cachePool:null,transitions:null},i.updateQueue=null,qe(ki,Vt),Vt|=r,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=T!==null?T.baseLanes:u,qe(ki,Vt),Vt|=c}else T!==null?(c=T.baseLanes|u,i.memoizedState=null):c=u,qe(ki,Vt),Vt|=c;return It(r,i,m,u),i.child}function Ih(r,i){var u=i.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(i.flags|=512,i.flags|=2097152)}function ml(r,i,u,c,m){var T=Dt(u)?Nr:St.current;return T=fi(i,T),Ti(i,m),u=sl(r,i,u,c,T,m),c=al(),r!==null&&!Pt?(i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~m,jn(r,i,m)):(Xe&&c&&zo(i),i.flags|=1,It(r,i,u,m),i.child)}function Lh(r,i,u,c,m){if(Dt(u)){var T=!0;Ma(i)}else T=!1;if(Ti(i,m),i.stateNode===null)eu(r,i),yh(i,u,c),fl(i,u,c,m),c=!0;else if(r===null){var k=i.stateNode,I=i.memoizedProps;k.props=I;var P=k.context,W=u.contextType;typeof W=="object"&&W!==null?W=Zt(W):(W=Dt(u)?Nr:St.current,W=fi(i,W));var X=u.getDerivedStateFromProps,ee=typeof X=="function"||typeof k.getSnapshotBeforeUpdate=="function";ee||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(I!==c||P!==W)&&xh(i,k,c,W),ir=!1;var G=i.memoizedState;k.state=G,Ya(i,c,k,m),P=i.memoizedState,I!==c||G!==P||Ot.current||ir?(typeof X=="function"&&(dl(i,u,X,c),P=i.memoizedState),(I=ir||Th(i,u,I,c,G,P,W))?(ee||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"&&(i.flags|=4194308)):(typeof k.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=P),k.props=c,k.state=P,k.context=W,c=I):(typeof k.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{k=i.stateNode,qf(r,i),I=i.memoizedProps,W=i.type===i.elementType?I:cn(i.type,I),k.props=W,ee=i.pendingProps,G=k.context,P=u.contextType,typeof P=="object"&&P!==null?P=Zt(P):(P=Dt(u)?Nr:St.current,P=fi(i,P));var fe=u.getDerivedStateFromProps;(X=typeof fe=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(I!==ee||G!==P)&&xh(i,k,c,P),ir=!1,G=i.memoizedState,k.state=G,Ya(i,c,k,m);var me=i.memoizedState;I!==ee||G!==me||Ot.current||ir?(typeof fe=="function"&&(dl(i,u,fe,c),me=i.memoizedState),(W=ir||Th(i,u,W,c,G,me,P)||!1)?(X||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(c,me,P),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(c,me,P)),typeof k.componentDidUpdate=="function"&&(i.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof k.componentDidUpdate!="function"||I===r.memoizedProps&&G===r.memoizedState||(i.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||I===r.memoizedProps&&G===r.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=me),k.props=c,k.state=me,k.context=P,c=W):(typeof k.componentDidUpdate!="function"||I===r.memoizedProps&&G===r.memoizedState||(i.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||I===r.memoizedProps&&G===r.memoizedState||(i.flags|=1024),c=!1)}return gl(r,i,u,c,T,m)}function gl(r,i,u,c,m,T){Ih(r,i);var k=(i.flags&128)!==0;if(!c&&!k)return m&&Mf(i,u,!1),jn(r,i,T);c=i.stateNode,dT.current=i;var I=k&&typeof u.getDerivedStateFromError!="function"?null:c.render();return i.flags|=1,r!==null&&k?(i.child=gi(i,r.child,null,T),i.child=gi(i,null,I,T)):It(r,i,I,T),i.memoizedState=c.state,m&&Mf(i,u,!0),i.child}function Rh(r){var i=r.stateNode;i.pendingContext?Df(r,i.pendingContext,i.pendingContext!==i.context):i.context&&Df(r,i.context,!1),Zo(r,i.containerInfo)}function Oh(r,i,u,c,m){return mi(),Vo(m),i.flags|=256,It(r,i,u,c),i.child}var El={dehydrated:null,treeContext:null,retryLane:0};function Tl(r){return{baseLanes:r,cachePool:null,transitions:null}}function Dh(r,i,u){var c=i.pendingProps,m=Ze.current,T=!1,k=(i.flags&128)!==0,I;if((I=k)||(I=r!==null&&r.memoizedState===null?!1:(m&2)!==0),I?(T=!0,i.flags&=-129):(r===null||r.memoizedState!==null)&&(m|=1),qe(Ze,m&1),r===null)return Yo(i),r=i.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((i.mode&1)===0?i.lanes=1:r.data==="$!"?i.lanes=8:i.lanes=1073741824,null):(k=c.children,r=c.fallback,T?(c=i.mode,T=i.child,k={mode:"hidden",children:k},(c&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=k):T=fu(k,c,0,null),r=Mr(r,c,u,null),T.return=i,r.return=i,T.sibling=r,i.child=T,i.child.memoizedState=Tl(u),i.memoizedState=El,r):yl(i,k));if(m=r.memoizedState,m!==null&&(I=m.dehydrated,I!==null))return fT(r,i,k,c,I,m,u);if(T){T=c.fallback,k=i.mode,m=r.child,I=m.sibling;var P={mode:"hidden",children:c.children};return(k&1)===0&&i.child!==m?(c=i.child,c.childLanes=0,c.pendingProps=P,i.deletions=null):(c=dr(m,P),c.subtreeFlags=m.subtreeFlags&14680064),I!==null?T=dr(I,T):(T=Mr(T,k,u,null),T.flags|=2),T.return=i,c.return=i,c.sibling=T,i.child=c,c=T,T=i.child,k=r.child.memoizedState,k=k===null?Tl(u):{baseLanes:k.baseLanes|u,cachePool:null,transitions:k.transitions},T.memoizedState=k,T.childLanes=r.childLanes&~u,i.memoizedState=El,c}return T=r.child,r=T.sibling,c=dr(T,{mode:"visible",children:c.children}),(i.mode&1)===0&&(c.lanes=u),c.return=i,c.sibling=null,r!==null&&(u=i.deletions,u===null?(i.deletions=[r],i.flags|=16):u.push(r)),i.child=c,i.memoizedState=null,c}function yl(r,i){return i=fu({mode:"visible",children:i},r.mode,0,null),i.return=r,r.child=i}function Za(r,i,u,c){return c!==null&&Vo(c),gi(i,r.child,null,u),r=yl(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function fT(r,i,u,c,m,T,k){if(u)return i.flags&256?(i.flags&=-257,c=hl(Error(n(422))),Za(r,i,k,c)):i.memoizedState!==null?(i.child=r.child,i.flags|=128,null):(T=c.fallback,m=i.mode,c=fu({mode:"visible",children:c.children},m,0,null),T=Mr(T,m,k,null),T.flags|=2,c.return=i,T.return=i,c.sibling=T,i.child=c,(i.mode&1)!==0&&gi(i,r.child,null,k),i.child.memoizedState=Tl(k),i.memoizedState=El,T);if((i.mode&1)===0)return Za(r,i,k,null);if(m.data==="$!"){if(c=m.nextSibling&&m.nextSibling.dataset,c)var I=c.dgst;return c=I,T=Error(n(419)),c=hl(T,c,void 0),Za(r,i,k,c)}if(I=(k&r.childLanes)!==0,Pt||I){if(c=ht,c!==null){switch(k&-k){case 4:m=2;break;case 16:m=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:m=32;break;case 536870912:m=268435456;break;default:m=0}m=(m&(c.suspendedLanes|k))!==0?0:m,m!==0&&m!==T.retryLane&&(T.retryLane=m,Bn(r,m),hn(c,r,m,-1))}return Pl(),c=hl(Error(n(421))),Za(r,i,k,c)}return m.data==="$?"?(i.flags|=128,i.child=r.child,i=CT.bind(null,r),m._reactRetry=i,null):(r=T.treeContext,Yt=er(m.nextSibling),Wt=i,Xe=!0,ln=null,r!==null&&(Xt[Jt++]=Mn,Xt[Jt++]=Fn,Xt[Jt++]=Ar,Mn=r.id,Fn=r.overflow,Ar=i),i=yl(i,c.children),i.flags|=4096,i)}function Ph(r,i,u){r.lanes|=i;var c=r.alternate;c!==null&&(c.lanes|=i),Ko(r.return,i,u)}function xl(r,i,u,c,m){var T=r.memoizedState;T===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:u,tailMode:m}:(T.isBackwards=i,T.rendering=null,T.renderingStartTime=0,T.last=c,T.tail=u,T.tailMode=m)}function Mh(r,i,u){var c=i.pendingProps,m=c.revealOrder,T=c.tail;if(It(r,i,c.children,u),c=Ze.current,(c&2)!==0)c=c&1|2,i.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Ph(r,u,i);else if(r.tag===19)Ph(r,u,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}c&=1}if(qe(Ze,c),(i.mode&1)===0)i.memoizedState=null;else switch(m){case"forwards":for(u=i.child,m=null;u!==null;)r=u.alternate,r!==null&&Va(r)===null&&(m=u),u=u.sibling;u=m,u===null?(m=i.child,i.child=null):(m=u.sibling,u.sibling=null),xl(i,!1,m,u,T);break;case"backwards":for(u=null,m=i.child,i.child=null;m!==null;){if(r=m.alternate,r!==null&&Va(r)===null){i.child=m;break}r=m.sibling,m.sibling=u,u=m,m=r}xl(i,!0,u,null,T);break;case"together":xl(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function eu(r,i){(i.mode&1)===0&&r!==null&&(r.alternate=null,i.alternate=null,i.flags|=2)}function jn(r,i,u){if(r!==null&&(i.dependencies=r.dependencies),Rr|=i.lanes,(u&i.childLanes)===0)return null;if(r!==null&&i.child!==r.child)throw Error(n(153));if(i.child!==null){for(r=i.child,u=dr(r,r.pendingProps),i.child=u,u.return=i;r.sibling!==null;)r=r.sibling,u=u.sibling=dr(r,r.pendingProps),u.return=i;u.sibling=null}return i.child}function hT(r,i,u){switch(i.tag){case 3:Rh(i),mi();break;case 5:Kf(i);break;case 1:Dt(i.type)&&Ma(i);break;case 4:Zo(i,i.stateNode.containerInfo);break;case 10:var c=i.type._context,m=i.memoizedProps.value;qe(za,c._currentValue),c._currentValue=m;break;case 13:if(c=i.memoizedState,c!==null)return c.dehydrated!==null?(qe(Ze,Ze.current&1),i.flags|=128,null):(u&i.child.childLanes)!==0?Dh(r,i,u):(qe(Ze,Ze.current&1),r=jn(r,i,u),r!==null?r.sibling:null);qe(Ze,Ze.current&1);break;case 19:if(c=(u&i.childLanes)!==0,(r.flags&128)!==0){if(c)return Mh(r,i,u);i.flags|=128}if(m=i.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),qe(Ze,Ze.current),c)break;return null;case 22:case 23:return i.lanes=0,wh(r,i,u)}return jn(r,i,u)}var Fh,bl,Bh,Uh;Fh=function(r,i){for(var u=i.child;u!==null;){if(u.tag===5||u.tag===6)r.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===i)break;for(;u.sibling===null;){if(u.return===null||u.return===i)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},bl=function(){},Bh=function(r,i,u,c){var m=r.memoizedProps;if(m!==c){r=i.stateNode,Ir(_n.current);var T=null;switch(u){case"input":m=Bi(r,m),c=Bi(r,c),T=[];break;case"select":m=S({},m,{value:void 0}),c=S({},c,{value:void 0}),T=[];break;case"textarea":m=Hi(r,m),c=Hi(r,c),T=[];break;default:typeof m.onClick!="function"&&typeof c.onClick=="function"&&(r.onclick=Oa)}Tt(u,c);var k;u=null;for(W in m)if(!c.hasOwnProperty(W)&&m.hasOwnProperty(W)&&m[W]!=null)if(W==="style"){var I=m[W];for(k in I)I.hasOwnProperty(k)&&(u||(u={}),u[k]="")}else W!=="dangerouslySetInnerHTML"&&W!=="children"&&W!=="suppressContentEditableWarning"&&W!=="suppressHydrationWarning"&&W!=="autoFocus"&&(a.hasOwnProperty(W)?T||(T=[]):(T=T||[]).push(W,null));for(W in c){var P=c[W];if(I=m!=null?m[W]:void 0,c.hasOwnProperty(W)&&P!==I&&(P!=null||I!=null))if(W==="style")if(I){for(k in I)!I.hasOwnProperty(k)||P&&P.hasOwnProperty(k)||(u||(u={}),u[k]="");for(k in P)P.hasOwnProperty(k)&&I[k]!==P[k]&&(u||(u={}),u[k]=P[k])}else u||(T||(T=[]),T.push(W,u)),u=P;else W==="dangerouslySetInnerHTML"?(P=P?P.__html:void 0,I=I?I.__html:void 0,P!=null&&I!==P&&(T=T||[]).push(W,P)):W==="children"?typeof P!="string"&&typeof P!="number"||(T=T||[]).push(W,""+P):W!=="suppressContentEditableWarning"&&W!=="suppressHydrationWarning"&&(a.hasOwnProperty(W)?(P!=null&&W==="onScroll"&&Qe("scroll",r),T||I===P||(T=[])):(T=T||[]).push(W,P))}u&&(T=T||[]).push("style",u);var W=T;(i.updateQueue=W)&&(i.flags|=4)}},Uh=function(r,i,u,c){u!==c&&(i.flags|=4)};function Ts(r,i){if(!Xe)switch(r.tailMode){case"hidden":i=r.tail;for(var u=null;i!==null;)i.alternate!==null&&(u=i),i=i.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var c=null;u!==null;)u.alternate!==null&&(c=u),u=u.sibling;c===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:c.sibling=null}}function Ct(r){var i=r.alternate!==null&&r.alternate.child===r.child,u=0,c=0;if(i)for(var m=r.child;m!==null;)u|=m.lanes|m.childLanes,c|=m.subtreeFlags&14680064,c|=m.flags&14680064,m.return=r,m=m.sibling;else for(m=r.child;m!==null;)u|=m.lanes|m.childLanes,c|=m.subtreeFlags,c|=m.flags,m.return=r,m=m.sibling;return r.subtreeFlags|=c,r.childLanes=u,i}function pT(r,i,u){var c=i.pendingProps;switch($o(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ct(i),null;case 1:return Dt(i.type)&&Pa(),Ct(i),null;case 3:return c=i.stateNode,yi(),Ge(Ot),Ge(St),nl(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(r===null||r.child===null)&&(ja(i)?i.flags|=4:r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,ln!==null&&(Rl(ln),ln=null))),bl(r,i),Ct(i),null;case 5:el(i);var m=Ir(hs.current);if(u=i.type,r!==null&&i.stateNode!=null)Bh(r,i,u,c,m),r.ref!==i.ref&&(i.flags|=512,i.flags|=2097152);else{if(!c){if(i.stateNode===null)throw Error(n(166));return Ct(i),null}if(r=Ir(_n.current),ja(i)){c=i.stateNode,u=i.type;var T=i.memoizedProps;switch(c[Sn]=i,c[os]=T,r=(i.mode&1)!==0,u){case"dialog":Qe("cancel",c),Qe("close",c);break;case"iframe":case"object":case"embed":Qe("load",c);break;case"video":case"audio":for(m=0;m<ss.length;m++)Qe(ss[m],c);break;case"source":Qe("error",c);break;case"img":case"image":case"link":Qe("error",c),Qe("load",c);break;case"details":Qe("toggle",c);break;case"input":Ui(c,T),Qe("invalid",c);break;case"select":c._wrapperState={wasMultiple:!!T.multiple},Qe("invalid",c);break;case"textarea":la(c,T),Qe("invalid",c)}Tt(u,T),m=null;for(var k in T)if(T.hasOwnProperty(k)){var I=T[k];k==="children"?typeof I=="string"?c.textContent!==I&&(T.suppressHydrationWarning!==!0&&Ra(c.textContent,I,r),m=["children",I]):typeof I=="number"&&c.textContent!==""+I&&(T.suppressHydrationWarning!==!0&&Ra(c.textContent,I,r),m=["children",""+I]):a.hasOwnProperty(k)&&I!=null&&k==="onScroll"&&Qe("scroll",c)}switch(u){case"input":Rn(c),oa(c,T,!0);break;case"textarea":Rn(c),da(c);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(c.onclick=Oa)}c=m,i.updateQueue=c,c!==null&&(i.flags|=4)}else{k=m.nodeType===9?m:m.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=q(u)),r==="http://www.w3.org/1999/xhtml"?u==="script"?(r=k.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof c.is=="string"?r=k.createElement(u,{is:c.is}):(r=k.createElement(u),u==="select"&&(k=r,c.multiple?k.multiple=!0:c.size&&(k.size=c.size))):r=k.createElementNS(r,u),r[Sn]=i,r[os]=c,Fh(r,i,!1,!1),i.stateNode=r;e:{switch(k=bn(u,c),u){case"dialog":Qe("cancel",r),Qe("close",r),m=c;break;case"iframe":case"object":case"embed":Qe("load",r),m=c;break;case"video":case"audio":for(m=0;m<ss.length;m++)Qe(ss[m],r);m=c;break;case"source":Qe("error",r),m=c;break;case"img":case"image":case"link":Qe("error",r),Qe("load",r),m=c;break;case"details":Qe("toggle",r),m=c;break;case"input":Ui(r,c),m=Bi(r,c),Qe("invalid",r);break;case"option":m=c;break;case"select":r._wrapperState={wasMultiple:!!c.multiple},m=S({},c,{value:void 0}),Qe("invalid",r);break;case"textarea":la(r,c),m=Hi(r,c),Qe("invalid",r);break;default:m=c}Tt(u,m),I=m;for(T in I)if(I.hasOwnProperty(T)){var P=I[T];T==="style"?qn(r,P):T==="dangerouslySetInnerHTML"?(P=P?P.__html:void 0,P!=null&&Oe(r,P)):T==="children"?typeof P=="string"?(u!=="textarea"||P!=="")&&Ue(r,P):typeof P=="number"&&Ue(r,""+P):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(a.hasOwnProperty(T)?P!=null&&T==="onScroll"&&Qe("scroll",r):P!=null&&z(r,T,P,k))}switch(u){case"input":Rn(r),oa(r,c,!1);break;case"textarea":Rn(r),da(r);break;case"option":c.value!=null&&r.setAttribute("value",""+Re(c.value));break;case"select":r.multiple=!!c.multiple,T=c.value,T!=null?Vn(r,!!c.multiple,T,!1):c.defaultValue!=null&&Vn(r,!!c.multiple,c.defaultValue,!0);break;default:typeof m.onClick=="function"&&(r.onclick=Oa)}switch(u){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}}c&&(i.flags|=4)}i.ref!==null&&(i.flags|=512,i.flags|=2097152)}return Ct(i),null;case 6:if(r&&i.stateNode!=null)Uh(r,i,r.memoizedProps,c);else{if(typeof c!="string"&&i.stateNode===null)throw Error(n(166));if(u=Ir(hs.current),Ir(_n.current),ja(i)){if(c=i.stateNode,u=i.memoizedProps,c[Sn]=i,(T=c.nodeValue!==u)&&(r=Wt,r!==null))switch(r.tag){case 3:Ra(c.nodeValue,u,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&Ra(c.nodeValue,u,(r.mode&1)!==0)}T&&(i.flags|=4)}else c=(u.nodeType===9?u:u.ownerDocument).createTextNode(c),c[Sn]=i,i.stateNode=c}return Ct(i),null;case 13:if(Ge(Ze),c=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(Xe&&Yt!==null&&(i.mode&1)!==0&&(i.flags&128)===0)zf(),mi(),i.flags|=98560,T=!1;else if(T=ja(i),c!==null&&c.dehydrated!==null){if(r===null){if(!T)throw Error(n(318));if(T=i.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(n(317));T[Sn]=i}else mi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Ct(i),T=!1}else ln!==null&&(Rl(ln),ln=null),T=!0;if(!T)return i.flags&65536?i:null}return(i.flags&128)!==0?(i.lanes=u,i):(c=c!==null,c!==(r!==null&&r.memoizedState!==null)&&c&&(i.child.flags|=8192,(i.mode&1)!==0&&(r===null||(Ze.current&1)!==0?ct===0&&(ct=3):Pl())),i.updateQueue!==null&&(i.flags|=4),Ct(i),null);case 4:return yi(),bl(r,i),r===null&&as(i.stateNode.containerInfo),Ct(i),null;case 10:return Go(i.type._context),Ct(i),null;case 17:return Dt(i.type)&&Pa(),Ct(i),null;case 19:if(Ge(Ze),T=i.memoizedState,T===null)return Ct(i),null;if(c=(i.flags&128)!==0,k=T.rendering,k===null)if(c)Ts(T,!1);else{if(ct!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(k=Va(r),k!==null){for(i.flags|=128,Ts(T,!1),c=k.updateQueue,c!==null&&(i.updateQueue=c,i.flags|=4),i.subtreeFlags=0,c=u,u=i.child;u!==null;)T=u,r=c,T.flags&=14680066,k=T.alternate,k===null?(T.childLanes=0,T.lanes=r,T.child=null,T.subtreeFlags=0,T.memoizedProps=null,T.memoizedState=null,T.updateQueue=null,T.dependencies=null,T.stateNode=null):(T.childLanes=k.childLanes,T.lanes=k.lanes,T.child=k.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=k.memoizedProps,T.memoizedState=k.memoizedState,T.updateQueue=k.updateQueue,T.type=k.type,r=k.dependencies,T.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),u=u.sibling;return qe(Ze,Ze.current&1|2),i.child}r=r.sibling}T.tail!==null&&rt()>Si&&(i.flags|=128,c=!0,Ts(T,!1),i.lanes=4194304)}else{if(!c)if(r=Va(k),r!==null){if(i.flags|=128,c=!0,u=r.updateQueue,u!==null&&(i.updateQueue=u,i.flags|=4),Ts(T,!0),T.tail===null&&T.tailMode==="hidden"&&!k.alternate&&!Xe)return Ct(i),null}else 2*rt()-T.renderingStartTime>Si&&u!==1073741824&&(i.flags|=128,c=!0,Ts(T,!1),i.lanes=4194304);T.isBackwards?(k.sibling=i.child,i.child=k):(u=T.last,u!==null?u.sibling=k:i.child=k,T.last=k)}return T.tail!==null?(i=T.tail,T.rendering=i,T.tail=i.sibling,T.renderingStartTime=rt(),i.sibling=null,u=Ze.current,qe(Ze,c?u&1|2:u&1),i):(Ct(i),null);case 22:case 23:return Dl(),c=i.memoizedState!==null,r!==null&&r.memoizedState!==null!==c&&(i.flags|=8192),c&&(i.mode&1)!==0?(Vt&1073741824)!==0&&(Ct(i),i.subtreeFlags&6&&(i.flags|=8192)):Ct(i),null;case 24:return null;case 25:return null}throw Error(n(156,i.tag))}function mT(r,i){switch($o(i),i.tag){case 1:return Dt(i.type)&&Pa(),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return yi(),Ge(Ot),Ge(St),nl(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 5:return el(i),null;case 13:if(Ge(Ze),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(n(340));mi()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return Ge(Ze),null;case 4:return yi(),null;case 10:return Go(i.type._context),null;case 22:case 23:return Dl(),null;case 24:return null;default:return null}}var tu=!1,Nt=!1,gT=typeof WeakSet=="function"?WeakSet:Set,pe=null;function bi(r,i){var u=r.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(c){tt(r,i,c)}else u.current=null}function kl(r,i,u){try{u()}catch(c){tt(r,i,c)}}var jh=!1;function ET(r,i){if(Do=ba,r=Tf(),No(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var c=u.getSelection&&u.getSelection();if(c&&c.rangeCount!==0){u=c.anchorNode;var m=c.anchorOffset,T=c.focusNode;c=c.focusOffset;try{u.nodeType,T.nodeType}catch{u=null;break e}var k=0,I=-1,P=-1,W=0,X=0,ee=r,G=null;t:for(;;){for(var fe;ee!==u||m!==0&&ee.nodeType!==3||(I=k+m),ee!==T||c!==0&&ee.nodeType!==3||(P=k+c),ee.nodeType===3&&(k+=ee.nodeValue.length),(fe=ee.firstChild)!==null;)G=ee,ee=fe;for(;;){if(ee===r)break t;if(G===u&&++W===m&&(I=k),G===T&&++X===c&&(P=k),(fe=ee.nextSibling)!==null)break;ee=G,G=ee.parentNode}ee=fe}u=I===-1||P===-1?null:{start:I,end:P}}else u=null}u=u||{start:0,end:0}}else u=null;for(Po={focusedElem:r,selectionRange:u},ba=!1,pe=i;pe!==null;)if(i=pe,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,pe=r;else for(;pe!==null;){i=pe;try{var me=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(me!==null){var ge=me.memoizedProps,it=me.memoizedState,j=i.stateNode,B=j.getSnapshotBeforeUpdate(i.elementType===i.type?ge:cn(i.type,ge),it);j.__reactInternalSnapshotBeforeUpdate=B}break;case 3:var $=i.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(ae){tt(i,i.return,ae)}if(r=i.sibling,r!==null){r.return=i.return,pe=r;break}pe=i.return}return me=jh,jh=!1,me}function ys(r,i,u){var c=i.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var m=c=c.next;do{if((m.tag&r)===r){var T=m.destroy;m.destroy=void 0,T!==void 0&&kl(i,u,T)}m=m.next}while(m!==c)}}function nu(r,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var u=i=i.next;do{if((u.tag&r)===r){var c=u.create;u.destroy=c()}u=u.next}while(u!==i)}}function Sl(r){var i=r.ref;if(i!==null){var u=r.stateNode;switch(r.tag){case 5:r=u;break;default:r=u}typeof i=="function"?i(r):i.current=r}}function Hh(r){var i=r.alternate;i!==null&&(r.alternate=null,Hh(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&(delete i[Sn],delete i[os],delete i[Uo],delete i[ZE],delete i[eT])),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 zh(r){return r.tag===5||r.tag===3||r.tag===4}function $h(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||zh(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 _l(r,i,u){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?u.nodeType===8?u.parentNode.insertBefore(r,i):u.insertBefore(r,i):(u.nodeType===8?(i=u.parentNode,i.insertBefore(r,u)):(i=u,i.appendChild(r)),u=u._reactRootContainer,u!=null||i.onclick!==null||(i.onclick=Oa));else if(c!==4&&(r=r.child,r!==null))for(_l(r,i,u),r=r.sibling;r!==null;)_l(r,i,u),r=r.sibling}function Cl(r,i,u){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?u.insertBefore(r,i):u.appendChild(r);else if(c!==4&&(r=r.child,r!==null))for(Cl(r,i,u),r=r.sibling;r!==null;)Cl(r,i,u),r=r.sibling}var yt=null,dn=!1;function ar(r,i,u){for(u=u.child;u!==null;)Wh(r,i,u),u=u.sibling}function Wh(r,i,u){if(kn&&typeof kn.onCommitFiberUnmount=="function")try{kn.onCommitFiberUnmount(ma,u)}catch{}switch(u.tag){case 5:Nt||bi(u,i);case 6:var c=yt,m=dn;yt=null,ar(r,i,u),yt=c,dn=m,yt!==null&&(dn?(r=yt,u=u.stateNode,r.nodeType===8?r.parentNode.removeChild(u):r.removeChild(u)):yt.removeChild(u.stateNode));break;case 18:yt!==null&&(dn?(r=yt,u=u.stateNode,r.nodeType===8?Bo(r.parentNode,u):r.nodeType===1&&Bo(r,u),Xi(r)):Bo(yt,u.stateNode));break;case 4:c=yt,m=dn,yt=u.stateNode.containerInfo,dn=!0,ar(r,i,u),yt=c,dn=m;break;case 0:case 11:case 14:case 15:if(!Nt&&(c=u.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){m=c=c.next;do{var T=m,k=T.destroy;T=T.tag,k!==void 0&&((T&2)!==0||(T&4)!==0)&&kl(u,i,k),m=m.next}while(m!==c)}ar(r,i,u);break;case 1:if(!Nt&&(bi(u,i),c=u.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=u.memoizedProps,c.state=u.memoizedState,c.componentWillUnmount()}catch(I){tt(u,i,I)}ar(r,i,u);break;case 21:ar(r,i,u);break;case 22:u.mode&1?(Nt=(c=Nt)||u.memoizedState!==null,ar(r,i,u),Nt=c):ar(r,i,u);break;default:ar(r,i,u)}}function Yh(r){var i=r.updateQueue;if(i!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new gT),i.forEach(function(c){var m=NT.bind(null,r,c);u.has(c)||(u.add(c),c.then(m,m))})}}function fn(r,i){var u=i.deletions;if(u!==null)for(var c=0;c<u.length;c++){var m=u[c];try{var T=r,k=i,I=k;e:for(;I!==null;){switch(I.tag){case 5:yt=I.stateNode,dn=!1;break e;case 3:yt=I.stateNode.containerInfo,dn=!0;break e;case 4:yt=I.stateNode.containerInfo,dn=!0;break e}I=I.return}if(yt===null)throw Error(n(160));Wh(T,k,m),yt=null,dn=!1;var P=m.alternate;P!==null&&(P.return=null),m.return=null}catch(W){tt(m,i,W)}}if(i.subtreeFlags&12854)for(i=i.child;i!==null;)Vh(i,r),i=i.sibling}function Vh(r,i){var u=r.alternate,c=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(fn(i,r),Nn(r),c&4){try{ys(3,r,r.return),nu(3,r)}catch(ge){tt(r,r.return,ge)}try{ys(5,r,r.return)}catch(ge){tt(r,r.return,ge)}}break;case 1:fn(i,r),Nn(r),c&512&&u!==null&&bi(u,u.return);break;case 5:if(fn(i,r),Nn(r),c&512&&u!==null&&bi(u,u.return),r.flags&32){var m=r.stateNode;try{Ue(m,"")}catch(ge){tt(r,r.return,ge)}}if(c&4&&(m=r.stateNode,m!=null)){var T=r.memoizedProps,k=u!==null?u.memoizedProps:T,I=r.type,P=r.updateQueue;if(r.updateQueue=null,P!==null)try{I==="input"&&T.type==="radio"&&T.name!=null&&ji(m,T),bn(I,k);var W=bn(I,T);for(k=0;k<P.length;k+=2){var X=P[k],ee=P[k+1];X==="style"?qn(m,ee):X==="dangerouslySetInnerHTML"?Oe(m,ee):X==="children"?Ue(m,ee):z(m,X,ee,W)}switch(I){case"input":Zr(m,T);break;case"textarea":ca(m,T);break;case"select":var G=m._wrapperState.wasMultiple;m._wrapperState.wasMultiple=!!T.multiple;var fe=T.value;fe!=null?Vn(m,!!T.multiple,fe,!1):G!==!!T.multiple&&(T.defaultValue!=null?Vn(m,!!T.multiple,T.defaultValue,!0):Vn(m,!!T.multiple,T.multiple?[]:"",!1))}m[os]=T}catch(ge){tt(r,r.return,ge)}}break;case 6:if(fn(i,r),Nn(r),c&4){if(r.stateNode===null)throw Error(n(162));m=r.stateNode,T=r.memoizedProps;try{m.nodeValue=T}catch(ge){tt(r,r.return,ge)}}break;case 3:if(fn(i,r),Nn(r),c&4&&u!==null&&u.memoizedState.isDehydrated)try{Xi(i.containerInfo)}catch(ge){tt(r,r.return,ge)}break;case 4:fn(i,r),Nn(r);break;case 13:fn(i,r),Nn(r),m=r.child,m.flags&8192&&(T=m.memoizedState!==null,m.stateNode.isHidden=T,!T||m.alternate!==null&&m.alternate.memoizedState!==null||(vl=rt())),c&4&&Yh(r);break;case 22:if(X=u!==null&&u.memoizedState!==null,r.mode&1?(Nt=(W=Nt)||X,fn(i,r),Nt=W):fn(i,r),Nn(r),c&8192){if(W=r.memoizedState!==null,(r.stateNode.isHidden=W)&&!X&&(r.mode&1)!==0)for(pe=r,X=r.child;X!==null;){for(ee=pe=X;pe!==null;){switch(G=pe,fe=G.child,G.tag){case 0:case 11:case 14:case 15:ys(4,G,G.return);break;case 1:bi(G,G.return);var me=G.stateNode;if(typeof me.componentWillUnmount=="function"){c=G,u=G.return;try{i=c,me.props=i.memoizedProps,me.state=i.memoizedState,me.componentWillUnmount()}catch(ge){tt(c,u,ge)}}break;case 5:bi(G,G.return);break;case 22:if(G.memoizedState!==null){Gh(ee);continue}}fe!==null?(fe.return=G,pe=fe):Gh(ee)}X=X.sibling}e:for(X=null,ee=r;;){if(ee.tag===5){if(X===null){X=ee;try{m=ee.stateNode,W?(T=m.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(I=ee.stateNode,P=ee.memoizedProps.style,k=P!=null&&P.hasOwnProperty("display")?P.display:null,I.style.display=Kt("display",k))}catch(ge){tt(r,r.return,ge)}}}else if(ee.tag===6){if(X===null)try{ee.stateNode.nodeValue=W?"":ee.memoizedProps}catch(ge){tt(r,r.return,ge)}}else if((ee.tag!==22&&ee.tag!==23||ee.memoizedState===null||ee===r)&&ee.child!==null){ee.child.return=ee,ee=ee.child;continue}if(ee===r)break e;for(;ee.sibling===null;){if(ee.return===null||ee.return===r)break e;X===ee&&(X=null),ee=ee.return}X===ee&&(X=null),ee.sibling.return=ee.return,ee=ee.sibling}}break;case 19:fn(i,r),Nn(r),c&4&&Yh(r);break;case 21:break;default:fn(i,r),Nn(r)}}function Nn(r){var i=r.flags;if(i&2){try{e:{for(var u=r.return;u!==null;){if(zh(u)){var c=u;break e}u=u.return}throw Error(n(160))}switch(c.tag){case 5:var m=c.stateNode;c.flags&32&&(Ue(m,""),c.flags&=-33);var T=$h(r);Cl(r,T,m);break;case 3:case 4:var k=c.stateNode.containerInfo,I=$h(r);_l(r,I,k);break;default:throw Error(n(161))}}catch(P){tt(r,r.return,P)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function TT(r,i,u){pe=r,qh(r)}function qh(r,i,u){for(var c=(r.mode&1)!==0;pe!==null;){var m=pe,T=m.child;if(m.tag===22&&c){var k=m.memoizedState!==null||tu;if(!k){var I=m.alternate,P=I!==null&&I.memoizedState!==null||Nt;I=tu;var W=Nt;if(tu=k,(Nt=P)&&!W)for(pe=m;pe!==null;)k=pe,P=k.child,k.tag===22&&k.memoizedState!==null?Kh(m):P!==null?(P.return=k,pe=P):Kh(m);for(;T!==null;)pe=T,qh(T),T=T.sibling;pe=m,tu=I,Nt=W}Qh(r)}else(m.subtreeFlags&8772)!==0&&T!==null?(T.return=m,pe=T):Qh(r)}}function Qh(r){for(;pe!==null;){var i=pe;if((i.flags&8772)!==0){var u=i.alternate;try{if((i.flags&8772)!==0)switch(i.tag){case 0:case 11:case 15:Nt||nu(5,i);break;case 1:var c=i.stateNode;if(i.flags&4&&!Nt)if(u===null)c.componentDidMount();else{var m=i.elementType===i.type?u.memoizedProps:cn(i.type,u.memoizedProps);c.componentDidUpdate(m,u.memoizedState,c.__reactInternalSnapshotBeforeUpdate)}var T=i.updateQueue;T!==null&&Gf(i,T,c);break;case 3:var k=i.updateQueue;if(k!==null){if(u=null,i.child!==null)switch(i.child.tag){case 5:u=i.child.stateNode;break;case 1:u=i.child.stateNode}Gf(i,k,u)}break;case 5:var I=i.stateNode;if(u===null&&i.flags&4){u=I;var P=i.memoizedProps;switch(i.type){case"button":case"input":case"select":case"textarea":P.autoFocus&&u.focus();break;case"img":P.src&&(u.src=P.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(i.memoizedState===null){var W=i.alternate;if(W!==null){var X=W.memoizedState;if(X!==null){var ee=X.dehydrated;ee!==null&&Xi(ee)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Nt||i.flags&512&&Sl(i)}catch(G){tt(i,i.return,G)}}if(i===r){pe=null;break}if(u=i.sibling,u!==null){u.return=i.return,pe=u;break}pe=i.return}}function Gh(r){for(;pe!==null;){var i=pe;if(i===r){pe=null;break}var u=i.sibling;if(u!==null){u.return=i.return,pe=u;break}pe=i.return}}function Kh(r){for(;pe!==null;){var i=pe;try{switch(i.tag){case 0:case 11:case 15:var u=i.return;try{nu(4,i)}catch(P){tt(i,u,P)}break;case 1:var c=i.stateNode;if(typeof c.componentDidMount=="function"){var m=i.return;try{c.componentDidMount()}catch(P){tt(i,m,P)}}var T=i.return;try{Sl(i)}catch(P){tt(i,T,P)}break;case 5:var k=i.return;try{Sl(i)}catch(P){tt(i,k,P)}}}catch(P){tt(i,i.return,P)}if(i===r){pe=null;break}var I=i.sibling;if(I!==null){I.return=i.return,pe=I;break}pe=i.return}}var yT=Math.ceil,ru=J.ReactCurrentDispatcher,Nl=J.ReactCurrentOwner,tn=J.ReactCurrentBatchConfig,je=0,ht=null,ut=null,xt=0,Vt=0,ki=tr(0),ct=0,xs=null,Rr=0,iu=0,Al=0,bs=null,Mt=null,vl=0,Si=1/0,Hn=null,su=!1,wl=null,ur=null,au=!1,or=null,uu=0,ks=0,Il=null,ou=-1,lu=0;function Lt(){return(je&6)!==0?rt():ou!==-1?ou:ou=rt()}function lr(r){return(r.mode&1)===0?1:(je&2)!==0&&xt!==0?xt&-xt:nT.transition!==null?(lu===0&&(lu=zd()),lu):(r=We,r!==0||(r=window.event,r=r===void 0?16:Xd(r.type)),r)}function hn(r,i,u,c){if(50<ks)throw ks=0,Il=null,Error(n(185));Vi(r,u,c),((je&2)===0||r!==ht)&&(r===ht&&((je&2)===0&&(iu|=u),ct===4&&cr(r,xt)),Ft(r,c),u===1&&je===0&&(i.mode&1)===0&&(Si=rt()+500,Fa&&rr()))}function Ft(r,i){var u=r.callbackNode;nE(r,i);var c=Ta(r,r===ht?xt:0);if(c===0)u!==null&&Ud(u),r.callbackNode=null,r.callbackPriority=0;else if(i=c&-c,r.callbackPriority!==i){if(u!=null&&Ud(u),i===1)r.tag===0?tT(Jh.bind(null,r)):Ff(Jh.bind(null,r)),XE(function(){(je&6)===0&&rr()}),u=null;else{switch($d(c)){case 1:u=oo;break;case 4:u=jd;break;case 16:u=pa;break;case 536870912:u=Hd;break;default:u=pa}u=ap(u,Xh.bind(null,r))}r.callbackPriority=i,r.callbackNode=u}}function Xh(r,i){if(ou=-1,lu=0,(je&6)!==0)throw Error(n(327));var u=r.callbackNode;if(_i()&&r.callbackNode!==u)return null;var c=Ta(r,r===ht?xt:0);if(c===0)return null;if((c&30)!==0||(c&r.expiredLanes)!==0||i)i=cu(r,c);else{i=c;var m=je;je|=2;var T=ep();(ht!==r||xt!==i)&&(Hn=null,Si=rt()+500,Dr(r,i));do try{kT();break}catch(I){Zh(r,I)}while(!0);Qo(),ru.current=T,je=m,ut!==null?i=0:(ht=null,xt=0,i=ct)}if(i!==0){if(i===2&&(m=lo(r),m!==0&&(c=m,i=Ll(r,m))),i===1)throw u=xs,Dr(r,0),cr(r,c),Ft(r,rt()),u;if(i===6)cr(r,c);else{if(m=r.current.alternate,(c&30)===0&&!xT(m)&&(i=cu(r,c),i===2&&(T=lo(r),T!==0&&(c=T,i=Ll(r,T))),i===1))throw u=xs,Dr(r,0),cr(r,c),Ft(r,rt()),u;switch(r.finishedWork=m,r.finishedLanes=c,i){case 0:case 1:throw Error(n(345));case 2:Pr(r,Mt,Hn);break;case 3:if(cr(r,c),(c&130023424)===c&&(i=vl+500-rt(),10<i)){if(Ta(r,0)!==0)break;if(m=r.suspendedLanes,(m&c)!==c){Lt(),r.pingedLanes|=r.suspendedLanes&m;break}r.timeoutHandle=Fo(Pr.bind(null,r,Mt,Hn),i);break}Pr(r,Mt,Hn);break;case 4:if(cr(r,c),(c&4194240)===c)break;for(i=r.eventTimes,m=-1;0<c;){var k=31-un(c);T=1<<k,k=i[k],k>m&&(m=k),c&=~T}if(c=m,c=rt()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*yT(c/1960))-c,10<c){r.timeoutHandle=Fo(Pr.bind(null,r,Mt,Hn),c);break}Pr(r,Mt,Hn);break;case 5:Pr(r,Mt,Hn);break;default:throw Error(n(329))}}}return Ft(r,rt()),r.callbackNode===u?Xh.bind(null,r):null}function Ll(r,i){var u=bs;return r.current.memoizedState.isDehydrated&&(Dr(r,i).flags|=256),r=cu(r,i),r!==2&&(i=Mt,Mt=u,i!==null&&Rl(i)),r}function Rl(r){Mt===null?Mt=r:Mt.push.apply(Mt,r)}function xT(r){for(var i=r;;){if(i.flags&16384){var u=i.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var c=0;c<u.length;c++){var m=u[c],T=m.getSnapshot;m=m.value;try{if(!on(T(),m))return!1}catch{return!1}}}if(u=i.child,i.subtreeFlags&16384&&u!==null)u.return=i,i=u;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function cr(r,i){for(i&=~Al,i&=~iu,r.suspendedLanes|=i,r.pingedLanes&=~i,r=r.expirationTimes;0<i;){var u=31-un(i),c=1<<u;r[u]=-1,i&=~c}}function Jh(r){if((je&6)!==0)throw Error(n(327));_i();var i=Ta(r,0);if((i&1)===0)return Ft(r,rt()),null;var u=cu(r,i);if(r.tag!==0&&u===2){var c=lo(r);c!==0&&(i=c,u=Ll(r,c))}if(u===1)throw u=xs,Dr(r,0),cr(r,i),Ft(r,rt()),u;if(u===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=i,Pr(r,Mt,Hn),Ft(r,rt()),null}function Ol(r,i){var u=je;je|=1;try{return r(i)}finally{je=u,je===0&&(Si=rt()+500,Fa&&rr())}}function Or(r){or!==null&&or.tag===0&&(je&6)===0&&_i();var i=je;je|=1;var u=tn.transition,c=We;try{if(tn.transition=null,We=1,r)return r()}finally{We=c,tn.transition=u,je=i,(je&6)===0&&rr()}}function Dl(){Vt=ki.current,Ge(ki)}function Dr(r,i){r.finishedWork=null,r.finishedLanes=0;var u=r.timeoutHandle;if(u!==-1&&(r.timeoutHandle=-1,KE(u)),ut!==null)for(u=ut.return;u!==null;){var c=u;switch($o(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&Pa();break;case 3:yi(),Ge(Ot),Ge(St),nl();break;case 5:el(c);break;case 4:yi();break;case 13:Ge(Ze);break;case 19:Ge(Ze);break;case 10:Go(c.type._context);break;case 22:case 23:Dl()}u=u.return}if(ht=r,ut=r=dr(r.current,null),xt=Vt=i,ct=0,xs=null,Al=iu=Rr=0,Mt=bs=null,wr!==null){for(i=0;i<wr.length;i++)if(u=wr[i],c=u.interleaved,c!==null){u.interleaved=null;var m=c.next,T=u.pending;if(T!==null){var k=T.next;T.next=m,c.next=k}u.pending=c}wr=null}return r}function Zh(r,i){do{var u=ut;try{if(Qo(),qa.current=Xa,Qa){for(var c=et.memoizedState;c!==null;){var m=c.queue;m!==null&&(m.pending=null),c=c.next}Qa=!1}if(Lr=0,ft=lt=et=null,ps=!1,ms=0,Nl.current=null,u===null||u.return===null){ct=1,xs=i,ut=null;break}e:{var T=r,k=u.return,I=u,P=i;if(i=xt,I.flags|=32768,P!==null&&typeof P=="object"&&typeof P.then=="function"){var W=P,X=I,ee=X.tag;if((X.mode&1)===0&&(ee===0||ee===11||ee===15)){var G=X.alternate;G?(X.updateQueue=G.updateQueue,X.memoizedState=G.memoizedState,X.lanes=G.lanes):(X.updateQueue=null,X.memoizedState=null)}var fe=_h(k);if(fe!==null){fe.flags&=-257,Ch(fe,k,I,T,i),fe.mode&1&&Sh(T,W,i),i=fe,P=W;var me=i.updateQueue;if(me===null){var ge=new Set;ge.add(P),i.updateQueue=ge}else me.add(P);break e}else{if((i&1)===0){Sh(T,W,i),Pl();break e}P=Error(n(426))}}else if(Xe&&I.mode&1){var it=_h(k);if(it!==null){(it.flags&65536)===0&&(it.flags|=256),Ch(it,k,I,T,i),Vo(xi(P,I));break e}}T=P=xi(P,I),ct!==4&&(ct=2),bs===null?bs=[T]:bs.push(T),T=k;do{switch(T.tag){case 3:T.flags|=65536,i&=-i,T.lanes|=i;var j=bh(T,P,i);Qf(T,j);break e;case 1:I=P;var B=T.type,$=T.stateNode;if((T.flags&128)===0&&(typeof B.getDerivedStateFromError=="function"||$!==null&&typeof $.componentDidCatch=="function"&&(ur===null||!ur.has($)))){T.flags|=65536,i&=-i,T.lanes|=i;var ae=kh(T,I,i);Qf(T,ae);break e}}T=T.return}while(T!==null)}np(u)}catch(Te){i=Te,ut===u&&u!==null&&(ut=u=u.return);continue}break}while(!0)}function ep(){var r=ru.current;return ru.current=Xa,r===null?Xa:r}function Pl(){(ct===0||ct===3||ct===2)&&(ct=4),ht===null||(Rr&268435455)===0&&(iu&268435455)===0||cr(ht,xt)}function cu(r,i){var u=je;je|=2;var c=ep();(ht!==r||xt!==i)&&(Hn=null,Dr(r,i));do try{bT();break}catch(m){Zh(r,m)}while(!0);if(Qo(),je=u,ru.current=c,ut!==null)throw Error(n(261));return ht=null,xt=0,ct}function bT(){for(;ut!==null;)tp(ut)}function kT(){for(;ut!==null&&!qg();)tp(ut)}function tp(r){var i=sp(r.alternate,r,Vt);r.memoizedProps=r.pendingProps,i===null?np(r):ut=i,Nl.current=null}function np(r){var i=r;do{var u=i.alternate;if(r=i.return,(i.flags&32768)===0){if(u=pT(u,i,Vt),u!==null){ut=u;return}}else{if(u=mT(u,i),u!==null){u.flags&=32767,ut=u;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{ct=6,ut=null;return}}if(i=i.sibling,i!==null){ut=i;return}ut=i=r}while(i!==null);ct===0&&(ct=5)}function Pr(r,i,u){var c=We,m=tn.transition;try{tn.transition=null,We=1,ST(r,i,u,c)}finally{tn.transition=m,We=c}return null}function ST(r,i,u,c){do _i();while(or!==null);if((je&6)!==0)throw Error(n(327));u=r.finishedWork;var m=r.finishedLanes;if(u===null)return null;if(r.finishedWork=null,r.finishedLanes=0,u===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var T=u.lanes|u.childLanes;if(rE(r,T),r===ht&&(ut=ht=null,xt=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||au||(au=!0,ap(pa,function(){return _i(),null})),T=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||T){T=tn.transition,tn.transition=null;var k=We;We=1;var I=je;je|=4,Nl.current=null,ET(r,u),Vh(u,r),$E(Po),ba=!!Do,Po=Do=null,r.current=u,TT(u),Qg(),je=I,We=k,tn.transition=T}else r.current=u;if(au&&(au=!1,or=r,uu=m),T=r.pendingLanes,T===0&&(ur=null),Xg(u.stateNode),Ft(r,rt()),i!==null)for(c=r.onRecoverableError,u=0;u<i.length;u++)m=i[u],c(m.value,{componentStack:m.stack,digest:m.digest});if(su)throw su=!1,r=wl,wl=null,r;return(uu&1)!==0&&r.tag!==0&&_i(),T=r.pendingLanes,(T&1)!==0?r===Il?ks++:(ks=0,Il=r):ks=0,rr(),null}function _i(){if(or!==null){var r=$d(uu),i=tn.transition,u=We;try{if(tn.transition=null,We=16>r?16:r,or===null)var c=!1;else{if(r=or,or=null,uu=0,(je&6)!==0)throw Error(n(331));var m=je;for(je|=4,pe=r.current;pe!==null;){var T=pe,k=T.child;if((pe.flags&16)!==0){var I=T.deletions;if(I!==null){for(var P=0;P<I.length;P++){var W=I[P];for(pe=W;pe!==null;){var X=pe;switch(X.tag){case 0:case 11:case 15:ys(8,X,T)}var ee=X.child;if(ee!==null)ee.return=X,pe=ee;else for(;pe!==null;){X=pe;var G=X.sibling,fe=X.return;if(Hh(X),X===W){pe=null;break}if(G!==null){G.return=fe,pe=G;break}pe=fe}}}var me=T.alternate;if(me!==null){var ge=me.child;if(ge!==null){me.child=null;do{var it=ge.sibling;ge.sibling=null,ge=it}while(ge!==null)}}pe=T}}if((T.subtreeFlags&2064)!==0&&k!==null)k.return=T,pe=k;else e:for(;pe!==null;){if(T=pe,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:ys(9,T,T.return)}var j=T.sibling;if(j!==null){j.return=T.return,pe=j;break e}pe=T.return}}var B=r.current;for(pe=B;pe!==null;){k=pe;var $=k.child;if((k.subtreeFlags&2064)!==0&&$!==null)$.return=k,pe=$;else e:for(k=B;pe!==null;){if(I=pe,(I.flags&2048)!==0)try{switch(I.tag){case 0:case 11:case 15:nu(9,I)}}catch(Te){tt(I,I.return,Te)}if(I===k){pe=null;break e}var ae=I.sibling;if(ae!==null){ae.return=I.return,pe=ae;break e}pe=I.return}}if(je=m,rr(),kn&&typeof kn.onPostCommitFiberRoot=="function")try{kn.onPostCommitFiberRoot(ma,r)}catch{}c=!0}return c}finally{We=u,tn.transition=i}}return!1}function rp(r,i,u){i=xi(u,i),i=bh(r,i,1),r=sr(r,i,1),i=Lt(),r!==null&&(Vi(r,1,i),Ft(r,i))}function tt(r,i,u){if(r.tag===3)rp(r,r,u);else for(;i!==null;){if(i.tag===3){rp(i,r,u);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(ur===null||!ur.has(c))){r=xi(u,r),r=kh(i,r,1),i=sr(i,r,1),r=Lt(),i!==null&&(Vi(i,1,r),Ft(i,r));break}}i=i.return}}function _T(r,i,u){var c=r.pingCache;c!==null&&c.delete(i),i=Lt(),r.pingedLanes|=r.suspendedLanes&u,ht===r&&(xt&u)===u&&(ct===4||ct===3&&(xt&130023424)===xt&&500>rt()-vl?Dr(r,0):Al|=u),Ft(r,i)}function ip(r,i){i===0&&((r.mode&1)===0?i=1:(i=Ea,Ea<<=1,(Ea&130023424)===0&&(Ea=4194304)));var u=Lt();r=Bn(r,i),r!==null&&(Vi(r,i,u),Ft(r,u))}function CT(r){var i=r.memoizedState,u=0;i!==null&&(u=i.retryLane),ip(r,u)}function NT(r,i){var u=0;switch(r.tag){case 13:var c=r.stateNode,m=r.memoizedState;m!==null&&(u=m.retryLane);break;case 19:c=r.stateNode;break;default:throw Error(n(314))}c!==null&&c.delete(i),ip(r,u)}var sp;sp=function(r,i,u){if(r!==null)if(r.memoizedProps!==i.pendingProps||Ot.current)Pt=!0;else{if((r.lanes&u)===0&&(i.flags&128)===0)return Pt=!1,hT(r,i,u);Pt=(r.flags&131072)!==0}else Pt=!1,Xe&&(i.flags&1048576)!==0&&Bf(i,Ua,i.index);switch(i.lanes=0,i.tag){case 2:var c=i.type;eu(r,i),r=i.pendingProps;var m=fi(i,St.current);Ti(i,u),m=sl(null,i,c,r,m,u);var T=al();return i.flags|=1,typeof m=="object"&&m!==null&&typeof m.render=="function"&&m.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,Dt(c)?(T=!0,Ma(i)):T=!1,i.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,Jo(i),m.updater=Ja,i.stateNode=m,m._reactInternals=i,fl(i,c,r,u),i=gl(null,i,c,!0,T,u)):(i.tag=0,Xe&&T&&zo(i),It(null,i,m,u),i=i.child),i;case 16:c=i.elementType;e:{switch(eu(r,i),r=i.pendingProps,m=c._init,c=m(c._payload),i.type=c,m=i.tag=vT(c),r=cn(c,r),m){case 0:i=ml(null,i,c,r,u);break e;case 1:i=Lh(null,i,c,r,u);break e;case 11:i=Nh(null,i,c,r,u);break e;case 14:i=Ah(null,i,c,cn(c.type,r),u);break e}throw Error(n(306,c,""))}return i;case 0:return c=i.type,m=i.pendingProps,m=i.elementType===c?m:cn(c,m),ml(r,i,c,m,u);case 1:return c=i.type,m=i.pendingProps,m=i.elementType===c?m:cn(c,m),Lh(r,i,c,m,u);case 3:e:{if(Rh(i),r===null)throw Error(n(387));c=i.pendingProps,T=i.memoizedState,m=T.element,qf(r,i),Ya(i,c,null,u);var k=i.memoizedState;if(c=k.element,T.isDehydrated)if(T={element:c,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},i.updateQueue.baseState=T,i.memoizedState=T,i.flags&256){m=xi(Error(n(423)),i),i=Oh(r,i,c,u,m);break e}else if(c!==m){m=xi(Error(n(424)),i),i=Oh(r,i,c,u,m);break e}else for(Yt=er(i.stateNode.containerInfo.firstChild),Wt=i,Xe=!0,ln=null,u=Yf(i,null,c,u),i.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(mi(),c===m){i=jn(r,i,u);break e}It(r,i,c,u)}i=i.child}return i;case 5:return Kf(i),r===null&&Yo(i),c=i.type,m=i.pendingProps,T=r!==null?r.memoizedProps:null,k=m.children,Mo(c,m)?k=null:T!==null&&Mo(c,T)&&(i.flags|=32),Ih(r,i),It(r,i,k,u),i.child;case 6:return r===null&&Yo(i),null;case 13:return Dh(r,i,u);case 4:return Zo(i,i.stateNode.containerInfo),c=i.pendingProps,r===null?i.child=gi(i,null,c,u):It(r,i,c,u),i.child;case 11:return c=i.type,m=i.pendingProps,m=i.elementType===c?m:cn(c,m),Nh(r,i,c,m,u);case 7:return It(r,i,i.pendingProps,u),i.child;case 8:return It(r,i,i.pendingProps.children,u),i.child;case 12:return It(r,i,i.pendingProps.children,u),i.child;case 10:e:{if(c=i.type._context,m=i.pendingProps,T=i.memoizedProps,k=m.value,qe(za,c._currentValue),c._currentValue=k,T!==null)if(on(T.value,k)){if(T.children===m.children&&!Ot.current){i=jn(r,i,u);break e}}else for(T=i.child,T!==null&&(T.return=i);T!==null;){var I=T.dependencies;if(I!==null){k=T.child;for(var P=I.firstContext;P!==null;){if(P.context===c){if(T.tag===1){P=Un(-1,u&-u),P.tag=2;var W=T.updateQueue;if(W!==null){W=W.shared;var X=W.pending;X===null?P.next=P:(P.next=X.next,X.next=P),W.pending=P}}T.lanes|=u,P=T.alternate,P!==null&&(P.lanes|=u),Ko(T.return,u,i),I.lanes|=u;break}P=P.next}}else if(T.tag===10)k=T.type===i.type?null:T.child;else if(T.tag===18){if(k=T.return,k===null)throw Error(n(341));k.lanes|=u,I=k.alternate,I!==null&&(I.lanes|=u),Ko(k,u,i),k=T.sibling}else k=T.child;if(k!==null)k.return=T;else for(k=T;k!==null;){if(k===i){k=null;break}if(T=k.sibling,T!==null){T.return=k.return,k=T;break}k=k.return}T=k}It(r,i,m.children,u),i=i.child}return i;case 9:return m=i.type,c=i.pendingProps.children,Ti(i,u),m=Zt(m),c=c(m),i.flags|=1,It(r,i,c,u),i.child;case 14:return c=i.type,m=cn(c,i.pendingProps),m=cn(c.type,m),Ah(r,i,c,m,u);case 15:return vh(r,i,i.type,i.pendingProps,u);case 17:return c=i.type,m=i.pendingProps,m=i.elementType===c?m:cn(c,m),eu(r,i),i.tag=1,Dt(c)?(r=!0,Ma(i)):r=!1,Ti(i,u),yh(i,c,m),fl(i,c,m,u),gl(null,i,c,!0,r,u);case 19:return Mh(r,i,u);case 22:return wh(r,i,u)}throw Error(n(156,i.tag))};function ap(r,i){return Bd(r,i)}function AT(r,i,u,c){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nn(r,i,u,c){return new AT(r,i,u,c)}function Ml(r){return r=r.prototype,!(!r||!r.isReactComponent)}function vT(r){if(typeof r=="function")return Ml(r)?1:0;if(r!=null){if(r=r.$$typeof,r===re)return 11;if(r===ie)return 14}return 2}function dr(r,i){var u=r.alternate;return u===null?(u=nn(r.tag,i,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=i,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&14680064,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,i=r.dependencies,u.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u}function du(r,i,u,c,m,T){var k=2;if(c=r,typeof r=="function")Ml(r)&&(k=1);else if(typeof r=="string")k=5;else e:switch(r){case Q:return Mr(u.children,m,T,i);case oe:k=8,m|=8;break;case ce:return r=nn(12,u,i,m|2),r.elementType=ce,r.lanes=T,r;case ke:return r=nn(13,u,i,m),r.elementType=ke,r.lanes=T,r;case de:return r=nn(19,u,i,m),r.elementType=de,r.lanes=T,r;case Ie:return fu(u,m,T,i);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case U:k=10;break e;case Z:k=9;break e;case re:k=11;break e;case ie:k=14;break e;case ve:k=16,c=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return i=nn(k,u,i,m),i.elementType=r,i.type=c,i.lanes=T,i}function Mr(r,i,u,c){return r=nn(7,r,c,i),r.lanes=u,r}function fu(r,i,u,c){return r=nn(22,r,c,i),r.elementType=Ie,r.lanes=u,r.stateNode={isHidden:!1},r}function Fl(r,i,u){return r=nn(6,r,null,i),r.lanes=u,r}function Bl(r,i,u){return i=nn(4,r.children!==null?r.children:[],r.key,i),i.lanes=u,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}function wT(r,i,u,c,m){this.tag=i,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=co(0),this.expirationTimes=co(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=co(0),this.identifierPrefix=c,this.onRecoverableError=m,this.mutableSourceEagerHydrationData=null}function Ul(r,i,u,c,m,T,k,I,P){return r=new wT(r,i,u,I,P),i===1?(i=1,T===!0&&(i|=8)):i=0,T=nn(3,null,null,i),r.current=T,T.stateNode=r,T.memoizedState={element:c,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jo(T),r}function IT(r,i,u){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:c==null?null:""+c,children:r,containerInfo:i,implementation:u}}function up(r){if(!r)return nr;r=r._reactInternals;e:{if(_r(r)!==r||r.tag!==1)throw Error(n(170));var i=r;do{switch(i.tag){case 3:i=i.stateNode.context;break e;case 1:if(Dt(i.type)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}}i=i.return}while(i!==null);throw Error(n(171))}if(r.tag===1){var u=r.type;if(Dt(u))return Pf(r,u,i)}return i}function op(r,i,u,c,m,T,k,I,P){return r=Ul(u,c,!0,r,m,T,k,I,P),r.context=up(null),u=r.current,c=Lt(),m=lr(u),T=Un(c,m),T.callback=i??null,sr(u,T,m),r.current.lanes=m,Vi(r,m,c),Ft(r,c),r}function hu(r,i,u,c){var m=i.current,T=Lt(),k=lr(m);return u=up(u),i.context===null?i.context=u:i.pendingContext=u,i=Un(T,k),i.payload={element:r},c=c===void 0?null:c,c!==null&&(i.callback=c),r=sr(m,i,k),r!==null&&(hn(r,m,k,T),Wa(r,m,k)),k}function pu(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 lp(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<i?u:i}}function jl(r,i){lp(r,i),(r=r.alternate)&&lp(r,i)}function LT(){return null}var cp=typeof reportError=="function"?reportError:function(r){console.error(r)};function Hl(r){this._internalRoot=r}mu.prototype.render=Hl.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(n(409));hu(r,i,null,null)},mu.prototype.unmount=Hl.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;Or(function(){hu(null,r,null,null)}),i[Dn]=null}};function mu(r){this._internalRoot=r}mu.prototype.unstable_scheduleHydration=function(r){if(r){var i=Vd();r={blockedOn:null,target:r,priority:i};for(var u=0;u<Xn.length&&i!==0&&i<Xn[u].priority;u++);Xn.splice(u,0,r),u===0&&Gd(r)}};function zl(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function gu(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function dp(){}function RT(r,i,u,c,m){if(m){if(typeof c=="function"){var T=c;c=function(){var W=pu(k);T.call(W)}}var k=op(i,c,r,0,null,!1,!1,"",dp);return r._reactRootContainer=k,r[Dn]=k.current,as(r.nodeType===8?r.parentNode:r),Or(),k}for(;m=r.lastChild;)r.removeChild(m);if(typeof c=="function"){var I=c;c=function(){var W=pu(P);I.call(W)}}var P=Ul(r,0,!1,null,null,!1,!1,"",dp);return r._reactRootContainer=P,r[Dn]=P.current,as(r.nodeType===8?r.parentNode:r),Or(function(){hu(i,P,u,c)}),P}function Eu(r,i,u,c,m){var T=u._reactRootContainer;if(T){var k=T;if(typeof m=="function"){var I=m;m=function(){var P=pu(k);I.call(P)}}hu(i,k,r,m)}else k=RT(u,i,r,m,c);return pu(k)}Wd=function(r){switch(r.tag){case 3:var i=r.stateNode;if(i.current.memoizedState.isDehydrated){var u=Yi(i.pendingLanes);u!==0&&(fo(i,u|1),Ft(i,rt()),(je&6)===0&&(Si=rt()+500,rr()))}break;case 13:Or(function(){var c=Bn(r,1);if(c!==null){var m=Lt();hn(c,r,1,m)}}),jl(r,1)}},ho=function(r){if(r.tag===13){var i=Bn(r,134217728);if(i!==null){var u=Lt();hn(i,r,134217728,u)}jl(r,134217728)}},Yd=function(r){if(r.tag===13){var i=lr(r),u=Bn(r,i);if(u!==null){var c=Lt();hn(u,r,i,c)}jl(r,i)}},Vd=function(){return We},qd=function(r,i){var u=We;try{return We=r,i()}finally{We=u}},io=function(r,i,u){switch(i){case"input":if(Zr(r,u),i=u.name,u.type==="radio"&&i!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),i=0;i<u.length;i++){var c=u[i];if(c!==r&&c.form===r.form){var m=Da(c);if(!m)throw Error(n(90));ua(c),Zr(c,m)}}}break;case"textarea":ca(r,u);break;case"select":i=u.value,i!=null&&Vn(r,!!u.multiple,i,!1)}},Ld=Ol,Rd=Or;var OT={usingClientEntryPoint:!1,Events:[ls,ci,Da,wd,Id,Ol]},Ss={findFiberByHostInstance:Cr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},DT={bundleType:Ss.bundleType,version:Ss.version,rendererPackageName:Ss.rendererPackageName,rendererConfig:Ss.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:J.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=Md(r),r===null?null:r.stateNode},findFiberByHostInstance:Ss.findFiberByHostInstance||LT,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 Tu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tu.isDisabled&&Tu.supportsFiber)try{ma=Tu.inject(DT),kn=Tu}catch{}}return Bt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=OT,Bt.createPortal=function(r,i){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!zl(i))throw Error(n(200));return IT(r,i,null,u)},Bt.createRoot=function(r,i){if(!zl(r))throw Error(n(299));var u=!1,c="",m=cp;return i!=null&&(i.unstable_strictMode===!0&&(u=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onRecoverableError!==void 0&&(m=i.onRecoverableError)),i=Ul(r,1,!1,null,null,u,!1,c,m),r[Dn]=i.current,as(r.nodeType===8?r.parentNode:r),new Hl(i)},Bt.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=Md(i),r=r===null?null:r.stateNode,r},Bt.flushSync=function(r){return Or(r)},Bt.hydrate=function(r,i,u){if(!gu(i))throw Error(n(200));return Eu(null,r,i,!0,u)},Bt.hydrateRoot=function(r,i,u){if(!zl(r))throw Error(n(405));var c=u!=null&&u.hydratedSources||null,m=!1,T="",k=cp;if(u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(T=u.identifierPrefix),u.onRecoverableError!==void 0&&(k=u.onRecoverableError)),i=op(i,null,r,1,u??null,m,!1,T,k),r[Dn]=i.current,as(r),c)for(r=0;r<c.length;r++)u=c[r],m=u._getVersion,m=m(u._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[u,m]:i.mutableSourceEagerHydrationData.push(u,m);return new mu(i)},Bt.render=function(r,i,u){if(!gu(i))throw Error(n(200));return Eu(null,r,i,!1,u)},Bt.unmountComponentAtNode=function(r){if(!gu(r))throw Error(n(40));return r._reactRootContainer?(Or(function(){Eu(null,null,r,!1,function(){r._reactRootContainer=null,r[Dn]=null})}),!0):!1},Bt.unstable_batchedUpdates=Ol,Bt.unstable_renderSubtreeIntoContainer=function(r,i,u,c){if(!gu(u))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return Eu(r,i,u,!1,c)},Bt.version="18.3.1-next-f1338f8080-20240426",Bt}var yp;function l0(){if(yp)return Yl.exports;yp=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(),Yl.exports=$T(),Yl.exports}var xp;function WT(){if(xp)return yu;xp=1;var e=l0();return yu.createRoot=e.createRoot,yu.hydrateRoot=e.hydrateRoot,yu}var YT=WT();/**
|
|
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 Vc=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,c0=/^[\\/]{2}/;function VT(e,t){return t+e.replace(/\\/g,"/")}var bp="popstate";function kp(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function qT(e={}){function t(s,a){var h;let o=(h=a.state)==null?void 0:h.masked,{pathname:l,search:d,hash:f}=o||s.location;return kc("",{pathname:l,search:d,hash:f},a.state&&a.state.usr||null,a.state&&a.state.key||"default",o?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function n(s,a){return typeof a=="string"?a:Ws(a)}return GT(t,n,null,e)}function Ke(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Tn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function QT(){return Math.random().toString(36).substring(2,10)}function Sp(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 kc(e,t,n=null,s,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Li(t):t,state:n,key:t&&t.key||s||QT(),mask:a}}function Ws({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 Li(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let s=e.indexOf("?");s>=0&&(t.search=e.substring(s),e=e.substring(0,s)),e&&(t.pathname=e)}return t}function GT(e,t,n,s={}){let{window:a=document.defaultView,v5Compat:o=!1}=s,l=a.history,d="POP",f=null,h=E();h==null&&(h=0,l.replaceState({...l.state,idx:h},""));function E(){return(l.state||{idx:null}).idx}function g(){d="POP";let O=E(),v=O==null?null:O-h;h=O,f&&f({action:d,location:L.location,delta:v})}function x(O,v){d="PUSH";let M=kp(O)?O:kc(L.location,O,v);h=E()+1;let z=Sp(M,h),J=L.createHref(M.mask||M);try{l.pushState(z,"",J)}catch(ne){if(ne instanceof DOMException&&ne.name==="DataCloneError")throw ne;a.location.assign(J)}o&&f&&f({action:d,location:L.location,delta:1})}function b(O,v){d="REPLACE";let M=kp(O)?O:kc(L.location,O,v);h=E();let z=Sp(M,h),J=L.createHref(M.mask||M);l.replaceState(z,"",J),o&&f&&f({action:d,location:L.location,delta:0})}function A(O){return KT(a,O)}let L={get action(){return d},get location(){return e(a,l)},listen(O){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(bp,g),f=O,()=>{a.removeEventListener(bp,g),f=null}},createHref(O){return t(a,O)},createURL:A,encodeLocation(O){let v=A(O);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:x,replace:b,go(O){return l.go(O)}};return L}function KT(e,t,n=!1){let s="http://localhost";e&&(s=e.location.origin!=="null"?e.location.origin:e.location.href),Ke(s,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:Ws(t);return a=a.replace(/ $/,"%20"),!n&&c0.test(a)&&(a=s+a),new URL(a,s)}function d0(e,t,n="/"){return XT(e,t,n,!1)}function XT(e,t,n,s,a){let o=typeof t=="string"?Li(t):t,l=$n(o.pathname||"/",n);if(l==null)return null;let d=JT(e),f=null,h=g0(l);for(let E=0;f==null&&E<d.length;++E)f=oy(d[E],h,s);return f}function JT(e){let t=f0(e);return ZT(t),t}function f0(e,t=[],n=[],s="",a=!1){let o=(l,d,f=a,h)=>{let E={relativePath:h===void 0?l.path||"":h,caseSensitive:l.caseSensitive===!0,childrenIndex:d,route:l};if(E.relativePath.startsWith("/")){if(!E.relativePath.startsWith(s)&&f)return;Ke(E.relativePath.startsWith(s),`Absolute route path "${E.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),E.relativePath=E.relativePath.slice(s.length)}let g=mn([s,E.relativePath]),x=n.concat(E);l.children&&l.children.length>0&&(Ke(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),f0(l.children,t,x,g,f)),!(l.path==null&&!l.index)&&t.push({path:g,score:ay(g,l.index),routesMeta:x.map((b,A)=>{let[L,O]=m0(b.relativePath,b.caseSensitive,A===x.length-1);return{...b,matcher:L,compiledParams:O}})})};return e.forEach((l,d)=>{var f;if(l.path===""||!((f=l.path)!=null&&f.includes("?")))o(l,d);else for(let h of h0(l.path))o(l,d,!0,h)}),t}function h0(e){let t=e.split("/");if(t.length===0)return[];let[n,...s]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(s.length===0)return a?[o,""]:[o];let l=h0(s.join("/")),d=[];return d.push(...l.map(f=>f===""?o:[o,f].join("/"))),a&&d.push(...l),d.map(f=>e.startsWith("/")&&f===""?"/":f)}function ZT(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:uy(t.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}var ey=/^:[\w-]+$/,ty=3,ny=2,ry=1,iy=10,sy=-2,_p=e=>e==="*";function ay(e,t){let n=e.split("/"),s=n.length;return n.some(_p)&&(s+=sy),t&&(s+=ny),n.filter(a=>!_p(a)).reduce((a,o)=>a+(ey.test(o)?ty:o===""?ry:iy),s)}function uy(e,t){return e.length===t.length&&e.slice(0,-1).every((s,a)=>s===t[a])?e[e.length-1]-t[t.length-1]:0}function oy(e,t,n=!1){let{routesMeta:s}=e,a={},o="/",l=[];for(let d=0;d<s.length;++d){let f=s[d],h=d===s.length-1,E=o==="/"?t:t.slice(o.length)||"/",g={path:f.relativePath,caseSensitive:f.caseSensitive,end:h},x=f.matcher&&f.compiledParams?p0(g,E,f.matcher,f.compiledParams):Ys(g,E),b=f.route;if(!x&&h&&n&&!s[s.length-1].route.index&&(x=Ys({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},E)),!x)return null;Object.assign(a,x.params),l.push({params:a,pathname:mn([o,x.pathname]),pathnameBase:dy(mn([o,x.pathnameBase])),route:b}),x.pathnameBase!=="/"&&(o=mn([o,x.pathnameBase]))}return l}function Ys(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,s]=m0(e.path,e.caseSensitive,e.end);return p0(e,t,n,s)}function p0(e,t,n,s){let a=t.match(n);if(!a)return null;let o=a[0],l=o.replace(/(.)\/+$/,"$1"),d=a.slice(1);return{params:s.reduce((h,{paramName:E,isOptional:g},x)=>{if(E==="*"){let A=d[x]||"";l=o.slice(0,o.length-A.length).replace(/(.)\/+$/,"$1")}const b=d[x];return g&&!b?h[E]=void 0:h[E]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:o,pathnameBase:l,pattern:e}}function m0(e,t=!1,n=!0){Tn(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 s=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,d,f,h,E)=>{if(s.push({paramName:d,isOptional:f!=null}),f){let g=E.charAt(h+l.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(s.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),s]}function g0(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Tn(!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 $n(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,s=e.charAt(n);return s&&s!=="/"?null:e.slice(n)||"/"}function ly(e,t="/"){let{pathname:n,search:s="",hash:a=""}=typeof e=="string"?Li(e):e,o;return n?(n=E0(n),n.startsWith("/")?o=Cp(n.substring(1),"/"):o=Cp(n,t)):o=t,{pathname:o,search:fy(s),hash:hy(a)}}function Cp(e,t){let n=Ru(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Ql(e,t,n,s){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(s)}]. 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 cy(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function qc(e){let t=cy(e);return t.map((n,s)=>s===t.length-1?n.pathname:n.pathnameBase)}function Hu(e,t,n,s=!1){let a;typeof e=="string"?a=Li(e):(a={...e},Ke(!a.pathname||!a.pathname.includes("?"),Ql("?","pathname","search",a)),Ke(!a.pathname||!a.pathname.includes("#"),Ql("#","pathname","hash",a)),Ke(!a.search||!a.search.includes("#"),Ql("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,d;if(l==null)d=n;else{let g=t.length-1;if(!s&&l.startsWith("..")){let x=l.split("/");for(;x[0]==="..";)x.shift(),g-=1;a.pathname=x.join("/")}d=g>=0?t[g]:"/"}let f=ly(a,d),h=l&&l!=="/"&&l.endsWith("/"),E=(o||l===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(h||E)&&(f.pathname+="/"),f}var E0=e=>e.replace(/[\\/]{2,}/g,"/"),mn=e=>E0(e.join("/")),Ru=e=>e.replace(/\/+$/,""),dy=e=>Ru(e).replace(/^\/*/,"/"),fy=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,hy=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,py=class{constructor(e,t,n,s=!1){this.status=e,this.statusText=t||"",this.internal=s,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function my(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function gy(e){let t=e.map(n=>n.route.path).filter(Boolean);return mn(t)||"/"}var T0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function y0(e,t){let n=e;if(typeof n!="string"||!Vc.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let s=n,a=!1;if(T0)try{let o=new URL(window.location.href),l=c0.test(n)?new URL(VT(n,o.protocol)):new URL(n),d=$n(l.pathname,t);l.origin===o.origin&&d!=null?n=d+l.search+l.hash:a=!0}catch{Tn(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var x0=["POST","PUT","PATCH","DELETE"];new Set(x0);var Ey=["GET",...x0];new Set(Ey);var Ty=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function yy(e){try{return Ty.includes(new URL(e).protocol)}catch{return!1}}var Ri=w.createContext(null);Ri.displayName="DataRouter";var zu=w.createContext(null);zu.displayName="DataRouterState";var b0=w.createContext(!1);function xy(){return w.useContext(b0)}var k0=w.createContext({isTransitioning:!1});k0.displayName="ViewTransition";var by=w.createContext(new Map);by.displayName="Fetchers";var ky=w.createContext(null);ky.displayName="Await";var Gt=w.createContext(null);Gt.displayName="Navigation";var Xs=w.createContext(null);Xs.displayName="Location";var wn=w.createContext({outlet:null,matches:[],isDataRoute:!1});wn.displayName="Route";var Qc=w.createContext(null);Qc.displayName="RouteError";var S0="REACT_ROUTER_ERROR",Sy="REDIRECT",_y="ROUTE_ERROR_RESPONSE";function Cy(e){if(e.startsWith(`${S0}:${Sy}:{`))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 Ny(e){if(e.startsWith(`${S0}:${_y}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new py(t.status,t.statusText,t.data)}catch{}}function Ay(e,{relative:t}={}){Ke(qr(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:s}=w.useContext(Gt),{hash:a,pathname:o,search:l}=Js(e,{relative:t}),d=o;return n!=="/"&&(d=o==="/"?n:mn([n,o])),s.createHref({pathname:d,search:l,hash:a})}function qr(){return w.useContext(Xs)!=null}function yn(){return Ke(qr(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(Xs).location}function vy(e){Ke(qr(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=yn();return w.useMemo(()=>Ys(e,g0(t)),[t,e])}var _0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function C0(e){w.useContext(Gt).static||w.useLayoutEffect(e)}function Gc(){let{isDataRoute:e}=w.useContext(wn);return e?Hy():wy()}function wy(){Ke(qr(),"useNavigate() may be used only in the context of a <Router> component.");let e=w.useContext(Ri),{basename:t,navigator:n}=w.useContext(Gt),{matches:s}=w.useContext(wn),{pathname:a}=yn(),o=JSON.stringify(qc(s)),l=w.useRef(!1);return C0(()=>{l.current=!0}),w.useCallback((f,h={})=>{if(Tn(l.current,_0),!l.current)return;if(typeof f=="number"){n.go(f);return}let E=Hu(f,JSON.parse(o),a,h.relative==="path");e==null&&t!=="/"&&(E.pathname=E.pathname==="/"?t:mn([t,E.pathname])),(h.replace?n.replace:n.push)(E,h.state,h)},[t,n,o,a,e])}w.createContext(null);function Js(e,{relative:t}={}){let{matches:n}=w.useContext(wn),{pathname:s}=yn(),a=JSON.stringify(qc(n));return w.useMemo(()=>Hu(e,JSON.parse(a),s,t==="path"),[e,a,s,t])}function Iy(e,t){return N0(e,t)}function N0(e,t,n){var O;Ke(qr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=w.useContext(Gt),{matches:a}=w.useContext(wn),o=a[a.length-1],l=o?o.params:{},d=o?o.pathname:"/",f=o?o.pathnameBase:"/",h=o&&o.route;{let v=h&&h.path||"";v0(d,!h||v.endsWith("*")||v.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${v}">) 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="${v}"> to <Route path="${v==="/"?"*":`${v}/*`}">.`)}let E=yn(),g;if(t){let v=typeof t=="string"?Li(t):t;Ke(f==="/"||((O=v.pathname)==null?void 0:O.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 "${v.pathname}" was given in the \`location\` prop.`),g=v}else g=E;let x=g.pathname||"/",b=x;if(f!=="/"){let v=f.replace(/^\//,"").split("/");b="/"+x.replace(/^\//,"").split("/").slice(v.length).join("/")}let A=n&&n.state.matches.length?n.state.matches.map(v=>Object.assign(v,{route:n.manifest[v.route.id]||v.route})):d0(e,{pathname:b});Tn(h||A!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Tn(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let L=Py(A&&A.map(v=>Object.assign({},v,{params:Object.assign({},l,v.params),pathname:mn([f,s.encodeLocation?s.encodeLocation(v.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?f:mn([f,s.encodeLocation?s.encodeLocation(v.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:v.pathnameBase])})),a,n);return t&&L?w.createElement(Xs.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...g},navigationType:"POP"}},L):L}function Ly(){let e=jy(),t=my(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:s},o={padding:"2px 4px",backgroundColor:s},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:o},"ErrorBoundary")," or"," ",w.createElement("code",{style:o},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),n?w.createElement("pre",{style:a},n):null,l)}var Ry=w.createElement(Ly,null),A0=class extends w.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=Ny(e.digest);n&&(e=n)}let t=e!==void 0?w.createElement(wn.Provider,{value:this.props.routeContext},w.createElement(Qc.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?w.createElement(Oy,{error:e},t):t}};A0.contextType=b0;var Gl=new WeakMap;function Oy({children:e,error:t}){let{basename:n}=w.useContext(Gt);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let s=Cy(t.digest);if(s){let a=Gl.get(t);if(a)throw a;let o=y0(s.location,n),l=o.absoluteURL||o.to;if(yy(l))throw new Error("Invalid redirect location");if(T0&&!Gl.get(t))if(o.isExternal||s.reloadDocument)window.location.href=l;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:s.replace}));throw Gl.set(t,d),d}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l}`})}}return e}function Dy({routeContext:e,match:t,children:n}){let s=w.useContext(Ri);return s&&s.static&&s.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=t.route.id),w.createElement(wn.Provider,{value:e},n)}function Py(e,t=[],n){let s=n==null?void 0:n.state;if(e==null){if(!s)return null;if(s.errors)e=s.matches;else if(t.length===0&&!s.initialized&&s.matches.length>0)e=s.matches;else return null}let a=e,o=s==null?void 0:s.errors;if(o!=null){let E=a.findIndex(g=>g.route.id&&(o==null?void 0:o[g.route.id])!==void 0);Ke(E>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,E+1))}let l=!1,d=-1;if(n&&s){l=s.renderFallback;for(let E=0;E<a.length;E++){let g=a[E];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(d=E),g.route.id){let{loaderData:x,errors:b}=s,A=g.route.loader&&!x.hasOwnProperty(g.route.id)&&(!b||b[g.route.id]===void 0);if(g.route.lazy||A){n.isStatic&&(l=!0),d>=0?a=a.slice(0,d+1):a=[a[0]];break}}}}let f=n==null?void 0:n.onError,h=s&&f?(E,g)=>{var x,b;f(E,{location:s.location,params:((b=(x=s.matches)==null?void 0:x[0])==null?void 0:b.params)??{},pattern:gy(s.matches),errorInfo:g})}:void 0;return a.reduceRight((E,g,x)=>{let b,A=!1,L=null,O=null;s&&(b=o&&g.route.id?o[g.route.id]:void 0,L=g.route.errorElement||Ry,l&&(d<0&&x===0?(v0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),A=!0,O=null):d===x&&(A=!0,O=g.route.hydrateFallbackElement||null)));let v=t.concat(a.slice(0,x+1)),M=()=>{let z;return b?z=L:A?z=O:g.route.Component?z=w.createElement(g.route.Component,null):g.route.element?z=g.route.element:z=E,w.createElement(Dy,{match:g,routeContext:{outlet:E,matches:v,isDataRoute:s!=null},children:z})};return s&&(g.route.ErrorBoundary||g.route.errorElement||x===0)?w.createElement(A0,{location:s.location,revalidation:s.revalidation,component:L,error:b,children:M(),routeContext:{outlet:null,matches:v,isDataRoute:!0},onError:h}):M()},null)}function Kc(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function My(e){let t=w.useContext(Ri);return Ke(t,Kc(e)),t}function Fy(e){let t=w.useContext(zu);return Ke(t,Kc(e)),t}function By(e){let t=w.useContext(wn);return Ke(t,Kc(e)),t}function Xc(e){let t=By(e),n=t.matches[t.matches.length-1];return Ke(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Uy(){return Xc("useRouteId")}function jy(){var s;let e=w.useContext(Qc),t=Fy("useRouteError"),n=Xc("useRouteError");return e!==void 0?e:(s=t.errors)==null?void 0:s[n]}function Hy(){let{router:e}=My("useNavigate"),t=Xc("useNavigate"),n=w.useRef(!1);return C0(()=>{n.current=!0}),w.useCallback(async(a,o={})=>{Tn(n.current,_0),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var Np={};function v0(e,t,n){!t&&!Np[e]&&(Np[e]=!0,Tn(!1,n))}w.memo(zy);function zy({routes:e,manifest:t,future:n,state:s,isStatic:a,onError:o}){return N0(e,void 0,{manifest:t,state:s,isStatic:a,onError:o})}function $y({to:e,replace:t,state:n,relative:s}){Ke(qr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=w.useContext(Gt);Tn(!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:o}=w.useContext(wn),{pathname:l}=yn(),d=Gc(),f=Hu(e,qc(o),l,s==="path"),h=JSON.stringify(f);return w.useEffect(()=>{d(JSON.parse(h),{replace:t,state:n,relative:s})},[d,h,s,t,n]),null}function Ds(e){Ke(!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 Wy({basename:e="/",children:t=null,location:n,navigationType:s="POP",navigator:a,static:o=!1,useTransitions:l}){Ke(!qr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),f=w.useMemo(()=>({basename:d,navigator:a,static:o,useTransitions:l,future:{}}),[d,a,o,l]);typeof n=="string"&&(n=Li(n));let{pathname:h="/",search:E="",hash:g="",state:x=null,key:b="default",mask:A}=n,L=w.useMemo(()=>{let O=$n(h,d);return O==null?null:{location:{pathname:O,search:E,hash:g,state:x,key:b,mask:A},navigationType:s}},[d,h,E,g,x,b,s,A]);return Tn(L!=null,`<Router basename="${d}"> is not able to match the URL "${h}${E}${g}" because it does not start with the basename, so the <Router> won't render anything.`),L==null?null:w.createElement(Gt.Provider,{value:f},w.createElement(Xs.Provider,{children:t,value:L}))}function Yy({children:e,location:t}){return Iy(Sc(e),t)}function Sc(e,t=[]){let n=[];return w.Children.forEach(e,(s,a)=>{if(!w.isValidElement(s))return;let o=[...t,a];if(s.type===w.Fragment){n.push.apply(n,Sc(s.props.children,o));return}Ke(s.type===Ds,`[${typeof s.type=="string"?s.type:s.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ke(!s.props.index||!s.props.children,"An index route cannot have child routes.");let l={id:s.props.id||o.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,middleware:s.props.middleware,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(l.children=Sc(s.props.children,o)),n.push(l)}),n}var Nu="get",Au="application/x-www-form-urlencoded";function $u(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Vy(e){return $u(e)&&e.tagName.toLowerCase()==="button"}function qy(e){return $u(e)&&e.tagName.toLowerCase()==="form"}function Qy(e){return $u(e)&&e.tagName.toLowerCase()==="input"}function Gy(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ky(e,t){return e.button===0&&(!t||t==="_self")&&!Gy(e)}var xu=null;function Xy(){if(xu===null)try{new FormData(document.createElement("form"),0),xu=!1}catch{xu=!0}return xu}var Jy=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Kl(e){return e!=null&&!Jy.has(e)?(Tn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Au}"`),null):e}function Zy(e,t){let n,s,a,o,l;if(qy(e)){let d=e.getAttribute("action");s=d?$n(d,t):null,n=e.getAttribute("method")||Nu,a=Kl(e.getAttribute("enctype"))||Au,o=new FormData(e)}else if(Vy(e)||Qy(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||d.getAttribute("action");if(s=f?$n(f,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||Nu,a=Kl(e.getAttribute("formenctype"))||Kl(d.getAttribute("enctype"))||Au,o=new FormData(d,e),!Xy()){let{name:h,type:E,value:g}=e;if(E==="image"){let x=h?`${h}.`:"";o.append(`${x}x`,"0"),o.append(`${x}y`,"0")}else h&&o.append(h,g)}}else{if($u(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Nu,s=null,a=Au,l=e}return o&&a==="text/plain"&&(l=o,o=void 0),{action:s,method:n.toLowerCase(),encType:a,formData:o,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Jc(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function w0(e,t,n,s){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}_.${s}`:a.pathname=`${a.pathname}.${s}`:a.pathname==="/"?a.pathname=`_root.${s}`:t&&$n(a.pathname,t)==="/"?a.pathname=`${Ru(t)}/_root.${s}`:a.pathname=`${Ru(a.pathname)}.${s}`,a}async function e2(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 t2(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 n2(e,t,n){let s=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let l=await e2(o,n);return l.links?l.links():[]}return[]}));return a2(s.flat(1).filter(t2).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function Ap(e,t,n,s,a,o){let l=(f,h)=>n[h]?f.route.id!==n[h].route.id:!0,d=(f,h)=>{var E;return n[h].pathname!==f.pathname||((E=n[h].route.path)==null?void 0:E.endsWith("*"))&&n[h].params["*"]!==f.params["*"]};return o==="assets"?t.filter((f,h)=>l(f,h)||d(f,h)):o==="data"?t.filter((f,h)=>{var g;let E=s.routes[f.route.id];if(!E||!E.hasLoader)return!1;if(l(f,h)||d(f,h))return!0;if(f.route.shouldRevalidate){let x=f.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((g=n[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function r2(e,t,{includeHydrateFallback:n}={}){return i2(e.map(s=>{let a=t.routes[s.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function i2(e){return[...new Set(e)]}function s2(e){let t={},n=Object.keys(e).sort();for(let s of n)t[s]=e[s];return t}function a2(e,t){let n=new Set;return new Set(t),e.reduce((s,a)=>{let o=JSON.stringify(s2(a));return n.has(o)||(n.add(o),s.push({key:o,link:a})),s},[])}function Zc(){let e=w.useContext(Ri);return Jc(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function u2(){let e=w.useContext(zu);return Jc(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ed=w.createContext(void 0);ed.displayName="FrameworkContext";function Wu(){let e=w.useContext(ed);return Jc(e,"You must render this element inside a <HydratedRouter> element"),e}function o2(e,t){let n=w.useContext(ed),[s,a]=w.useState(!1),[o,l]=w.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:h,onMouseLeave:E,onTouchStart:g}=t,x=w.useRef(null);w.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let L=v=>{v.forEach(M=>{l(M.isIntersecting)})},O=new IntersectionObserver(L,{threshold:.5});return x.current&&O.observe(x.current),()=>{O.disconnect()}}},[e]),w.useEffect(()=>{if(s){let L=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(L)}}},[s]);let b=()=>{a(!0)},A=()=>{a(!1),l(!1)};return n?e!=="intent"?[o,x,{}]:[o,x,{onFocus:Cs(d,b),onBlur:Cs(f,A),onMouseEnter:Cs(h,b),onMouseLeave:Cs(E,A),onTouchStart:Cs(g,b)}]:[!1,x,{}]}function Cs(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function l2({page:e,...t}){let n=xy(),{nonce:s}=Wu(),{router:a}=Zc(),o=w.useMemo(()=>d0(a.routes,e,a.basename),[a.routes,e,a.basename]);return o?(t.nonce==null&&s&&(t={...t,nonce:s}),n?w.createElement(d2,{page:e,matches:o,...t}):w.createElement(f2,{page:e,matches:o,...t})):null}function c2(e){let{manifest:t,routeModules:n}=Wu(),[s,a]=w.useState([]);return w.useEffect(()=>{let o=!1;return n2(e,t,n).then(l=>{o||a(l)}),()=>{o=!0}},[e,t,n]),s}function d2({page:e,matches:t,...n}){let s=yn(),{future:a}=Wu(),{basename:o}=Zc(),l=w.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let d=w0(e,o,a.v8_trailingSlashAwareDataRequests,"rsc"),f=!1,h=[];for(let E of t)typeof E.route.shouldRevalidate=="function"?f=!0:h.push(E.route.id);return f&&h.length>0&&d.searchParams.set("_routes",h.join(",")),[d.pathname+d.search]},[o,a.v8_trailingSlashAwareDataRequests,e,s,t]);return w.createElement(w.Fragment,null,l.map(d=>w.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...n})))}function f2({page:e,matches:t,...n}){let s=yn(),{future:a,manifest:o,routeModules:l}=Wu(),{basename:d}=Zc(),{loaderData:f,matches:h}=u2(),E=w.useMemo(()=>Ap(e,t,h,o,s,"data"),[e,t,h,o,s]),g=w.useMemo(()=>Ap(e,t,h,o,s,"assets"),[e,t,h,o,s]),x=w.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let L=new Set,O=!1;if(t.forEach(M=>{var J;let z=o.routes[M.route.id];!z||!z.hasLoader||(!E.some(ne=>ne.route.id===M.route.id)&&M.route.id in f&&((J=l[M.route.id])!=null&&J.shouldRevalidate)||z.hasClientLoader?O=!0:L.add(M.route.id))}),L.size===0)return[];let v=w0(e,d,a.v8_trailingSlashAwareDataRequests,"data");return O&&L.size>0&&v.searchParams.set("_routes",t.filter(M=>L.has(M.route.id)).map(M=>M.route.id).join(",")),[v.pathname+v.search]},[d,a.v8_trailingSlashAwareDataRequests,f,s,o,E,t,e,l]),b=w.useMemo(()=>r2(g,o),[g,o]),A=c2(g);return w.createElement(w.Fragment,null,x.map(L=>w.createElement("link",{key:L,rel:"prefetch",as:"fetch",href:L,...n})),b.map(L=>w.createElement("link",{key:L,rel:"modulepreload",href:L,...n})),A.map(({key:L,link:O})=>w.createElement("link",{key:L,nonce:n.nonce,...O,crossOrigin:O.crossOrigin??n.crossOrigin})))}function h2(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var p2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{p2&&(window.__reactRouterVersion="7.18.2")}catch{}function m2({basename:e,children:t,useTransitions:n,window:s}){let a=w.useRef();a.current==null&&(a.current=qT({window:s,v5Compat:!0}));let o=a.current,[l,d]=w.useState({action:o.action,location:o.location}),f=w.useCallback(h=>{n===!1?d(h):w.startTransition(()=>d(h))},[n]);return w.useLayoutEffect(()=>o.listen(f),[o,f]),w.createElement(Wy,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,useTransitions:n})}var td=w.forwardRef(function({onClick:t,discover:n="render",prefetch:s="none",relative:a,reloadDocument:o,replace:l,mask:d,state:f,target:h,to:E,preventScrollReset:g,viewTransition:x,defaultShouldRevalidate:b,...A},L){let{basename:O,navigator:v,useTransitions:M}=w.useContext(Gt),z=typeof E=="string"&&Vc.test(E),J=y0(E,O);E=J.to;let ne=Ay(E,{relative:a}),D=yn(),Q=null;if(d){let ie=Hu(d,[],D.mask?D.mask.pathname:"/",!0);O!=="/"&&(ie.pathname=ie.pathname==="/"?O:mn([O,ie.pathname])),Q=v.createHref(ie)}let[oe,ce,U]=o2(s,A),Z=y2(E,{replace:l,mask:d,state:f,target:h,preventScrollReset:g,relative:a,viewTransition:x,defaultShouldRevalidate:b,useTransitions:M});function re(ie){t&&t(ie),ie.defaultPrevented||Z(ie)}let ke=!(J.isExternal||o),de=w.createElement("a",{...A,...U,href:(ke?Q:void 0)||J.absoluteURL||ne,onClick:ke?re:t,ref:h2(L,ce),target:h,"data-discover":!z&&n==="render"?"true":void 0});return oe&&!z?w.createElement(w.Fragment,null,de,w.createElement(l2,{page:ne})):de});td.displayName="Link";var g2=w.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:s="",end:a=!1,style:o,to:l,viewTransition:d,children:f,...h},E){let g=Js(l,{relative:h.relative}),x=yn(),b=w.useContext(zu),{navigator:A,basename:L}=w.useContext(Gt),O=b!=null&&_2(g)&&d===!0,v=A.encodeLocation?A.encodeLocation(g).pathname:g.pathname,M=x.pathname,z=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(M=M.toLowerCase(),z=z?z.toLowerCase():null,v=v.toLowerCase()),z&&L&&(z=$n(z,L)||z);const J=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let ne=M===v||!a&&M.startsWith(v)&&M.charAt(J)==="/",D=z!=null&&(z===v||!a&&z.startsWith(v)&&z.charAt(v.length)==="/"),Q={isActive:ne,isPending:D,isTransitioning:O},oe=ne?t:void 0,ce;typeof s=="function"?ce=s(Q):ce=[s,ne?"active":null,D?"pending":null,O?"transitioning":null].filter(Boolean).join(" ");let U=typeof o=="function"?o(Q):o;return w.createElement(td,{...h,"aria-current":oe,className:ce,ref:E,style:U,to:l,viewTransition:d},typeof f=="function"?f(Q):f)});g2.displayName="NavLink";var E2=w.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:s,replace:a,state:o,method:l=Nu,action:d,onSubmit:f,relative:h,preventScrollReset:E,viewTransition:g,defaultShouldRevalidate:x,...b},A)=>{let{useTransitions:L}=w.useContext(Gt),O=k2(),v=S2(d,{relative:h}),M=l.toLowerCase()==="get"?"get":"post",z=typeof d=="string"&&Vc.test(d),J=ne=>{if(f&&f(ne),ne.defaultPrevented)return;ne.preventDefault();let D=ne.nativeEvent.submitter,Q=(D==null?void 0:D.getAttribute("formmethod"))||l,oe=()=>O(D||ne.currentTarget,{fetcherKey:t,method:Q,navigate:n,replace:a,state:o,relative:h,preventScrollReset:E,viewTransition:g,defaultShouldRevalidate:x});L&&n!==!1?w.startTransition(()=>oe()):oe()};return w.createElement("form",{ref:A,method:M,action:v,onSubmit:s?f:J,...b,"data-discover":!z&&e==="render"?"true":void 0})});E2.displayName="Form";function T2(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function I0(e){let t=w.useContext(Ri);return Ke(t,T2(e)),t}function y2(e,{target:t,replace:n,mask:s,state:a,preventScrollReset:o,relative:l,viewTransition:d,defaultShouldRevalidate:f,useTransitions:h}={}){let E=Gc(),g=yn(),x=Js(e,{relative:l});return w.useCallback(b=>{if(Ky(b,t)){b.preventDefault();let A=n!==void 0?n:Ws(g)===Ws(x),L=()=>E(e,{replace:A,mask:s,state:a,preventScrollReset:o,relative:l,viewTransition:d,defaultShouldRevalidate:f});h?w.startTransition(()=>L()):L()}},[g,E,x,n,s,a,t,e,o,l,d,f,h])}var x2=0,b2=()=>`__${String(++x2)}__`;function k2(){let{router:e}=I0("useSubmit"),{basename:t}=w.useContext(Gt),n=Uy(),s=e.fetch,a=e.navigate;return w.useCallback(async(o,l={})=>{let{action:d,method:f,encType:h,formData:E,body:g}=Zy(o,t);if(l.navigate===!1){let x=l.fetcherKey||b2();await s(x,n,l.action||d,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:E,body:g,formMethod:l.method||f,formEncType:l.encType||h,flushSync:l.flushSync})}else await a(l.action||d,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:E,body:g,formMethod:l.method||f,formEncType:l.encType||h,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[s,a,t,n])}function S2(e,{relative:t}={}){let{basename:n}=w.useContext(Gt),s=w.useContext(wn);Ke(s,"useFormAction must be used inside a RouteContext");let[a]=s.matches.slice(-1),o={...Js(e||".",{relative:t})},l=yn();if(e==null){o.search=l.search;let d=new URLSearchParams(o.search),f=d.getAll("index");if(f.some(E=>E==="")){d.delete("index"),f.filter(g=>g).forEach(g=>d.append("index",g));let E=d.toString();o.search=E?`?${E}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:mn([n,o.pathname])),Ws(o)}function _2(e,{relative:t}={}){let n=w.useContext(k0);Ke(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=I0("useViewTransitionState"),a=Js(e,{relative:t});if(!n.isTransitioning)return!1;let o=$n(n.currentLocation.pathname,s)||n.currentLocation.pathname,l=$n(n.nextLocation.pathname,s)||n.nextLocation.pathname;return Ys(a.pathname,l)!=null||Ys(a.pathname,o)!=null}const vp=e=>{let t;const n=new Set,s=(h,E)=>{const g=typeof h=="function"?h(t):h;if(!Object.is(g,t)){const x=t;t=E??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(b=>b(t,x))}},a=()=>t,d={setState:s,getState:a,getInitialState:()=>f,subscribe:h=>(n.add(h),()=>n.delete(h))},f=t=e(s,a,d);return d},C2=(e=>e?vp(e):vp),N2=e=>e;function A2(e,t=N2){const n=Os.useSyncExternalStore(e.subscribe,Os.useCallback(()=>t(e.getState()),[e,t]),Os.useCallback(()=>t(e.getInitialState()),[e,t]));return Os.useDebugValue(n),n}const wp=e=>{const t=C2(e),n=s=>A2(t,s);return Object.assign(n,t),n},v2=(e=>e?wp(e):wp),Ou="Attached files: ",w2=[".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico",".avif"];function I2(e){const t=e.split(`
|
|
53
|
+
`).find(n=>n.startsWith(Ou));return t?t.slice(Ou.length).split(", ").map(n=>n.trim()).filter(Boolean):[]}function L2(e){return I2(e).filter(t=>{const n=t.toLowerCase();return w2.some(s=>n.endsWith(s))})}function nd(e){return e.split(`
|
|
54
|
+
`).filter(t=>!t.startsWith(Ou)).join(`
|
|
55
|
+
`).trim()}function Ip(){return{turnStatus:"idle",creditsSpent:0,lastTurnCredits:0,contextUsagePercentage:0,lastTurnDurationMs:0,subagents:[],pendingStages:[],mcpServers:[],availableCommands:[],oauthPrompts:[],compacting:!1}}const Xl=60;function R2(e){const t=e.filter(o=>o.type==="text").map(o=>o.text).join(`
|
|
56
|
+
`),n=nd(t).replace(/```[\s\S]*?```/g," ").replace(/\s+/g," ").trim();if(!n)return"";if(n.length<=Xl)return n.replace(/[.,;:!?]+$/,"");const s=n.slice(0,Xl),a=s.lastIndexOf(" ");return`${(a>Xl/2?s.slice(0,a):s).replace(/[.,;:!?]+$/,"")}…`}const O2=(e,t)=>t.updatedAt.localeCompare(e.updatedAt);function L0(e,t){const n=e.find(a=>a.sessionId===t.sessionId),s=n&&n.updatedAt.localeCompare(t.updatedAt)>0?{...t,updatedAt:n.updatedAt}:t;return[...e.filter(a=>a.sessionId!==t.sessionId),s].sort(O2)}function D2(e,t,n){const s=e.find(a=>a.sessionId===t);return s?L0(e,{...s,updatedAt:n}):e}function R0(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"}}const be=v2((e,t)=>({sessions:[],models:[],agents:[],defaultAgentId:"kiro_default",activeId:null,loadingSessionId:null,modes:[],items:[],appliedSeq:0,remainingOlder:0,observability:Ip(),fsVersion:{},watchedPaths:[],streamingText:"",streamingThought:"",pending:[],sessionNotice:null,connStatus:"closed",createError:null,reloading:!1,previewPath:null,setConnStatus:n=>e({connStatus:n}),setCreateError:n=>e({createError:n}),setReloading:n=>e({reloading:n}),openFilePreview:n=>e({previewPath:n}),closeFilePreview:()=>e({previewPath:null}),markCancelling:()=>e(n=>n.observability.turnStatus==="running"?{observability:{...n.observability,turnStatus:"cancelling"}}:{}),setCurrentModel:n=>e({currentModelId:n}),setCurrentAgent:n=>e(s=>({currentModeId:n,sessions:s.activeId?s.sessions.map(a=>a.sessionId===s.activeId?{...a,agentId:n}:a):s.sessions})),setCompacting:n=>e(s=>s.observability.compacting===n?{}:{observability:{...s.observability,compacting:n}}),markPendingSending:n=>e(s=>({pending:s.pending.map(a=>a.id===n?{...a,status:"sending",error:void 0}:a)})),renameSessionRow:(n,s)=>e(a=>({sessions:a.sessions.map(o=>o.sessionId===n?{...o,title:s}:o)})),bumpFsPath:n=>e(s=>({fsVersion:{...s.fsVersion,[n]:(s.fsVersion[n]??0)+1}})),setWatchedPaths:n=>e({watchedPaths:n}),setSessions:n=>e({sessions:n}),setModels:n=>e({models:n}),setAgents:(n,s)=>e({agents:n,defaultAgentId:s}),setLoadingSession:n=>e({loadingSessionId:n}),loadDetail:(n,s)=>e(a=>({activeId:n.summary.sessionId,loadingSessionId:null,sessions:L0(a.sessions,n.summary),modes:n.modes,currentModeId:n.currentModeId,currentModelId:n.summary.modelId,observability:n.observability,items:n.transcript,appliedSeq:n.head,remainingOlder:Math.max(0,n.transcriptTotal-n.transcript.length),streamingText:"",streamingThought:"",pending:s!=null&&s.keepPending?a.pending:[],sessionNotice:null})),prependItems:n=>e(s=>({items:[...n,...s.items],remainingOlder:Math.max(0,s.remainingOlder-n.length)})),clearActive:()=>e({activeId:null,loadingSessionId:null,modes:[],items:[],appliedSeq:0,remainingOlder:0,observability:Ip(),streamingText:"",streamingThought:"",pending:[],sessionNotice:null,currentModeId:void 0,currentModelId:void 0,previewPath:null}),dismissSessionNotice:()=>e({sessionNotice:null}),setSessionNotice:n=>e({sessionNotice:n}),addPending:(n,s)=>e(a=>({pending:[...a.pending,{id:n,text:s,status:"sending"}]})),markPendingFailed:(n,s)=>e(a=>({pending:a.pending.map(o=>o.id===n?{...o,status:"failed",error:s}:o)})),applyEvent:n=>{var o,l,d,f;const s=t(),a=n.payload;if(!(n.seq<=s.appliedSeq))switch(e({appliedSeq:n.seq}),a.kind){case"turn_started":{const h=a.prompt.filter(L=>L.type==="text").map(L=>L.text).join(""),E=nd(h),g=L2(h),x=s.pending.findIndex(L=>L.status==="sending"),b=new Date(n.ts).toISOString(),A=D2(s.sessions,n.sessionId,b);e({items:[...s.items,{type:"message",message:{id:`u-${n.seq}`,role:"user",text:E,timestamp:n.ts,imagePaths:g}}],pending:x===-1?s.pending:s.pending.filter((L,O)=>O!==x),sessions:A,streamingText:"",observability:{...s.observability,turnStatus:"running"}});break}case"session_update":{const h=a.update;if(h.sessionUpdate==="agent_message_chunk"){const E=((o=h.content)==null?void 0:o.text)??"";e({streamingText:s.streamingText+E})}else if(h.sessionUpdate==="agent_thought_chunk"){const E=((l=h.content)==null?void 0:l.text)??"";e({streamingThought:s.streamingThought+E})}else if(h.sessionUpdate==="tool_call"){const E=h,g=(f=(d=E._meta)==null?void 0:d.kiro)==null?void 0:f.toolName;e({items:[...Jl(s,`s-${n.seq}`,n.ts),{type:"tool_call",tool:{id:E.toolCallId,name:g,title:E.title??E.toolCallId,kind:E.kind,status:E.status??"pending",input:E.rawInput,content:E.content??[]}}],streamingText:"",streamingThought:""})}else if(h.sessionUpdate==="tool_call_update"){const E=h;e({items:s.items.map(g=>g.type==="tool_call"&&g.tool.id===E.toolCallId?{type:"tool_call",tool:{...g.tool,status:E.status??g.tool.status,output:E.rawOutput??g.tool.output,content:E.content??g.tool.content}}:g)})}break}case"turn_ended":{e({items:Jl(s,`s-${n.seq}`,n.ts),sessionNotice:null,streamingText:"",streamingThought:"",observability:{...s.observability,turnStatus:"idle"}});break}case"turn_error":{const h=R0(a.message);e({items:[...Jl(s,`s-${n.seq}`,n.ts),{type:"turn_error",id:`err-${n.seq}`,message:a.message,timestamp:n.ts}],sessionNotice:h.sessionWide?{title:h.title,fix:h.fix,detail:a.message}:s.sessionNotice,streamingText:"",streamingThought:"",observability:{...s.observability,turnStatus:"idle"}});break}case"metadata":{const h=(a.params.meteringUsage??[]).reduce((E,g)=>E+g.value,0);e({observability:{...s.observability,contextUsagePercentage:a.params.contextUsagePercentage??s.observability.contextUsagePercentage,creditsSpent:h>0?s.observability.creditsSpent+h:s.observability.creditsSpent,lastTurnCredits:h>0?h:s.observability.lastTurnCredits,lastTurnDurationMs:a.params.turnDurationMs??s.observability.lastTurnDurationMs}});break}case"subagent_update":e({observability:{...s.observability,subagents:a.params.subagents,pendingStages:a.params.pendingStages}});break;case"mcp_health":{const h=s.observability.mcpServers.filter(E=>E.serverName!==a.params.serverName);h.push({serverName:a.params.serverName,status:a.ok?"initialized":"failed",error:a.params.error,updatedAt:n.ts}),e({observability:{...s.observability,mcpServers:h}});break}case"commands_available":e({observability:{...s.observability,availableCommands:a.params.commands}});break;case"compaction":{const h=a.params.status.type!=="started",E=a.params.summary??"";e({observability:{...s.observability,compacting:!h},items:h&&E.trim()?[...s.items,{type:"compaction",id:`c-${n.seq}`,summary:E,timestamp:n.ts}]:s.items});break}case"oauth_request":e({observability:{...s.observability,oauthPrompts:[...s.observability.oauthPrompts,{serverName:a.params.serverName,url:a.params.url,createdAt:n.ts}]}});break;case"process_exited":e({observability:{...s.observability,turnStatus:"idle"}});break}}}));function Jl(e,t,n=Date.now()){const s=[...e.items];return e.streamingThought.trim()&&s.push({type:"message",message:{id:`t-${t}`,role:"thinking",text:e.streamingThought,timestamp:n}}),e.streamingText.trim()&&s.push({type:"message",message:{id:`a-${t}`,role:"assistant",text:e.streamingText,timestamp:n}}),s}async function bt(e,t,n){const s={};n!==void 0&&(s["content-type"]="application/json");const a=await fetch(t,{method:e,headers:s,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 d="";try{d=JSON.parse(l).error??""}catch{}throw new Error(d||`${e} ${t} failed (${a.status}): ${l}`)}const o=await a.text();return o?JSON.parse(o):{}}function P2(e){return bt("POST","/api/login",{token:e})}function M2(){return bt("POST","/api/logout")}const dt={devices:()=>bt("GET","/api/devices"),revokeDevice:e=>bt("DELETE",`/api/devices/${e}`),logoutAll:()=>bt("POST","/api/logout-all"),models:()=>bt("GET","/api/models"),agents:()=>bt("GET","/api/agents"),listDirs:e=>bt("GET",`/api/fs/dirs?path=${encodeURIComponent(e)}`),listSessions:()=>bt("GET","/api/sessions"),createSession:e=>bt("POST","/api/sessions",e),getSession:e=>bt("GET",`/api/sessions/${e}`),transcriptPage:(e,t,n)=>bt("GET",`/api/sessions/${e}/transcript?offset=${t}&limit=${n}`),deleteSession:e=>bt("DELETE",`/api/sessions/${e}`),renameSession:(e,t)=>bt("POST",`/api/sessions/${e}/rename`,{title:t}),setSessionCwd:(e,t)=>bt("POST",`/api/sessions/${e}/cwd`,{cwd:t}),reloadSession:e=>bt("POST",`/api/sessions/${e}/reload`),tree:(e,t="")=>bt("GET",`/api/sessions/${e}/tree?path=${encodeURIComponent(t)}`),downloadUrl:(e,t)=>`/api/sessions/${e}/download?path=${encodeURIComponent(t)}`,previewUrl:(e,t)=>`/api/sessions/${e}/preview?path=${encodeURIComponent(t)}`,attachmentUrl:(e,t)=>t.startsWith("/")?`/api/fs/image?path=${encodeURIComponent(t)}`:`/api/sessions/${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 s=await fetch(`/api/sessions/${e}/uploads`,{method:"POST",credentials:"same-origin",body:n});if(s.status===401)throw new Error("Unauthorized");if(!s.ok){const a=await s.text();throw new Error(`Upload failed (${s.status}): ${a}`)}return await s.json()}},vu={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},F2=8e3,O0=25e3,B2=1e4;function Lp(e){return e.state===void 0||e.state===vu.CLOSED||e.state===vu.CLOSING?!0:e.state===vu.CONNECTING?e.now-e.connectingSince>F2:e.now-e.lastMessageAt>O0+B2}function U2(e){return e.state===vu.OPEN&&e.now-e.lastMessageAt>O0}const j2=1008;class H2{constructor(t,n,s=0){Le(this,"ws",null);Le(this,"cursor",0);Le(this,"closedByUser",!1);Le(this,"backoff",500);Le(this,"reconnectTimer",null);Le(this,"connectingSince",0);Le(this,"lastMessageAt",0);Le(this,"watchdog",null);Le(this,"eager",()=>{this.closedByUser||Lp(this.sample())&&this.connect()});Le(this,"onVisibility",()=>{document.visibilityState==="visible"&&this.eager()});this.sessionId=t,this.handlers=n,this.cursor=s,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();Lp(t)?this.connect():U2(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 s=`${location.protocol==="https:"?"wss":"ws"}://${location.host}/ws?sessionId=${encodeURIComponent(this.sessionId)}&cursor=${this.cursor}`,a=new WebSocket(s);this.ws=a,a.onopen=()=>{this.ws===a&&(this.backoff=500,this.handlers.onStatus("replaying"))},a.onmessage=o=>{var d,f,h,E,g,x;if(this.ws!==a)return;this.lastMessageAt=Date.now();const l=JSON.parse(o.data);switch(l.type){case"event":l.event.seq>this.cursor&&(this.cursor=l.event.seq,this.handlers.onEvent(l.event));break;case"replay_complete":this.handlers.onStatus("connected");break;case"resync":this.handlers.onStatus("resyncing"),this.handlers.onResync();break;case"ack":(f=(d=this.handlers).onAck)==null||f.call(d,l.action,l.ok,l.error);break;case"error":console.warn("ws error:",l.message),(E=(h=this.handlers).onServerError)==null||E.call(h,l.message);break;case"fs_changed":(x=(g=this.handlers).onFsChanged)==null||x.call(g,l.path);break}},a.onclose=o=>{var l,d;if(this.ws===a){if(this.closedByUser){this.handlers.onStatus("closed");return}if(o.code===j2){this.closedByUser=!0,this.handlers.onStatus("closed"),(d=(l=this.handlers).onUnauthorized)==null||d.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()}}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){return this.send({type:"prompt",content:t})}cancel(){this.send({type:"cancel"})}setMode(t){this.send({type:"set_mode",modeId:t})}setModel(t){this.send({type:"set_model",modelId:t})}watchPaths(t){this.send({type:"watch_paths",paths:t})}execCommand(t,n){this.send({type:"exec_command",command:t,args:n})}close(){this.closedByUser=!0,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 rd="/sessions",z2=`${rd}/:sessionId`;function D0(e){return`${rd}/${encodeURIComponent(e)}`}const $2=`${rd}/new`,W2={prompt:"Message",cancel:"Stop",set_mode:"Agent change",set_model:"Model change",exec_command:"Command"};class Y2{constructor(t={}){Le(this,"api");Le(this,"createSocket");Le(this,"listCoalesceMs");Le(this,"turnEndedRefreshMs");Le(this,"compactTimeoutMs");Le(this,"host",null);Le(this,"socket",null);Le(this,"openTarget",null);Le(this,"handledRoute");Le(this,"isDraft",!1);Le(this,"lastSent",null);Le(this,"msgSeq",0);Le(this,"firstPrompt",null);Le(this,"lastCreateOpts",null);Le(this,"listSeq",0);Le(this,"listTimer",null);this.api=t.api??dt,this.createSocket=t.createSocket??((n,s,a)=>new H2(n,s,a)),this.listCoalesceMs=t.listCoalesceMs??150,this.turnEndedRefreshMs=t.turnEndedRefreshMs??1200,this.compactTimeoutMs=t.compactTimeoutMs??12e4}attach(t){this.host=t}get state(){return be.getState()}refreshSessions(){this.listTimer===null&&(this.listTimer=setTimeout(()=>{this.listTimer=null;const t=++this.listSeq;this.api.listSessions().then(n=>{t===this.listSeq&&this.state.setSessions(n.sessions)}).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){this.isDraft=n,this.handledRoute!==t&&(this.handledRoute=t,t?this.openSession(t):(this.openTarget=null,this.closeSocket(),this.state.clearActive(),this.refreshSessions()))}closeSocket(){var t;(t=this.socket)==null||t.close(),this.socket=null}async openSession(t,n){var a;if(this.state.activeId===t)return;this.openTarget=t,this.closeSocket(),this.state.setConnStatus("connecting"),n||this.state.setLoadingSession(t);let s;if(n)s=n;else try{s=await this.api.getSession(t)}catch(o){if(this.openTarget!==t)return;this.state.setConnStatus("closed"),this.state.setLoadingSession(null),console.error("open session failed:",o),(a=this.host)==null||a.navigate("/",{replace:!0});return}this.openTarget===t&&(this.state.loadDetail(s,{keepPending:!!n}),this.socket=this.createSocket(t,this.socketHandlers(t),s.head),this.socket.connect())}socketHandlers(t){return{onEvent:n=>{this.state.applyEvent(n),n.payload.kind==="turn_started"&&this.refreshSessions(),n.payload.kind==="turn_ended"&&setTimeout(()=>this.refreshSessions(),this.turnEndedRefreshMs)},onStatus:n=>{if(this.state.setConnStatus(n),n==="connected"&&this.firstPrompt){const s=this.firstPrompt;this.firstPrompt=null,this.deliver(s.id,s.content)}},onResync:async()=>{var s;const n=await this.api.getSession(t);this.openTarget===t&&(this.state.loadDetail(n),(s=this.socket)==null||s.reset(n.head))},onAck:(n,s,a)=>{if(s)return;const o=a??"The server rejected the request.";if(n==="prompt"){this.lastSent&&this.state.markPendingFailed(this.lastSent,o);return}console.error(`${W2[n]??n} rejected:`,o)},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 createSession(t){var n;this.closeSocket(),this.state.setConnStatus("connecting"),this.state.setCreateError(null),this.lastCreateOpts=t;try{const s=await this.api.createSession({cwd:t.cwd||void 0,agentId:t.agentId,modelId:t.modelId,freshWorkspace:!t.cwd});this.refreshSessions();const a=s.summary.sessionId;return this.handledRoute=a,this.isDraft=!1,(n=this.host)==null||n.navigate(D0(a)),this.openSession(a,s),!0}catch(s){return this.state.setConnStatus("closed"),this.state.setCreateError(s instanceof Error?s.message:"Failed to create session"),!1}}retryCreate(){this.lastCreateOpts&&this.createSession(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.setCreateError(null),(t=this.host)==null||t.navigate($2)}send(t){const n=`pending-${this.msgSeq++}`,s=nd(t.filter(o=>o.type==="text").map(o=>o.text).join(`
|
|
57
|
+
`)),a=t.some(o=>o.type==="image");if(this.state.addPending(n,s||(a?"[image]":"[attachment]")),this.isDraft){const{currentModeId:o,currentModelId:l}=this.state;this.createSession({agentId:o,modelId:l,title:R2(t)}).then(d=>{d?this.firstPrompt={id:n,content:t}:this.state.markPendingFailed(n,"Could not start the session.")});return}this.deliver(n,t)}deliver(t,n){var s;this.lastSent=t,!((s=this.socket)!=null&&s.prompt(n))&&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,n){this.state.markPendingSending(t),this.deliver(t,[{type:"text",text:n}])}retryTurn(t){this.send([{type:"text",text:t}])}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)}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 reloadSession(){var n;const t=this.state.activeId;if(!(!t||this.state.reloading)){this.state.setReloading(!0);try{const s=await this.api.reloadSession(t);if(this.state.activeId!==t)return;this.state.loadDetail(s),(n=this.socket)==null||n.reset(s.head),this.loadPickers()}catch(s){const a=s instanceof Error?s.message:"The server rejected the reload.";this.state.setSessionNotice({title:"Couldn't reload the session",fix:a,detail:a})}finally{this.state.setReloading(!1)}}}watchPaths(t){var n;(n=this.socket)==null||n.watchPaths(t)}async deleteSession(t){var n;try{await this.api.deleteSession(t)}catch{console.error("delete session failed"),this.refreshSessions();return}this.state.activeId===t?(n=this.host)==null||n.navigate("/"):this.refreshSessions()}async renameSession(t,n){this.state.renameSessionRow(t,n),await this.api.renameSession(t,n).catch(()=>{console.error("rename session failed")}),this.refreshSessions()}markLoading(t){t!==this.state.activeId&&this.state.setLoadingSession(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||be.getState().activeId!==null}}const nt=new Y2;function P0(e){const t=e.trim().slice(0,4e3);return!t||!nt.canSend?!1:(nt.send([{type:"text",text:t}]),!0)}function M0({size:e=14,className:t}){return y.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:y.jsx("polyline",{points:"6 9 12 15 18 9"})})}function V2({size:e=16,className:t}){return y.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:[y.jsx("circle",{cx:"12",cy:"5",r:"1.9"}),y.jsx("circle",{cx:"12",cy:"12",r:"1.9"}),y.jsx("circle",{cx:"12",cy:"19",r:"1.9"})]})}function q2({size:e=16,className:t}){return y.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:[y.jsx("path",{d:"M20 11a8 8 0 0 0-13.6-4.5L3 9"}),y.jsx("polyline",{points:"3 4 3 9 8 9"}),y.jsx("path",{d:"M4 13a8 8 0 0 0 13.6 4.5L21 15"}),y.jsx("polyline",{points:"21 20 21 15 16 15"})]})}function F0({size:e=16,className:t}){return y.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:[y.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),y.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function Q2({size:e=16,className:t}){return y.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:y.jsx("polyline",{points:"20 6 9 17 4 12"})})}function G2({size:e=18,className:t}){return y.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:[y.jsx("rect",{x:"4",y:"11",width:"16",height:"10",rx:"2"}),y.jsx("path",{d:"M8 11V7a4 4 0 0 1 8 0v4"})]})}function Tr({size:e=28,className:t}){return y.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:y.jsx("path",{d:"M12 3a9 9 0 1 0 9 9"})})}function K2({size:e=16,className:t}){return y.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:[y.jsx("path",{d:"M12 19V5"}),y.jsx("path",{d:"m5 12 7-7 7 7"})]})}function Rp({size:e=16,className:t}){return y.jsx("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none","aria-hidden":!0,children:y.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})})}function B0({size:e=20,className:t}){return y.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:[y.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),y.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}function U0({size:e=20,className:t}){return y.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:[y.jsx("circle",{cx:"11",cy:"11",r:"7"}),y.jsx("line",{x1:"21",y1:"21",x2:"16.5",y2:"16.5"})]})}function j0({size:e=16,className:t}){return y.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:y.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 X2({size:e=16,className:t}){return y.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:[y.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"}),y.jsx("path",{d:"M2 10l2.5 9h15l2.5-9H7.5"})]})}function J2({size:e=16,className:t}){return y.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:[y.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),y.jsx("polyline",{points:"14 2 14 8 20 8"})]})}function Op({size:e=16,className:t}){return y.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:[y.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),y.jsx("polyline",{points:"14 2 14 8 20 8"}),y.jsx("polyline",{points:"9 15 7 13 9 11"}),y.jsx("polyline",{points:"15 11 17 13 15 15"})]})}function Z2({size:e=16,className:t}){return y.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:[y.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),y.jsx("polyline",{points:"14 2 14 8 20 8"}),y.jsx("circle",{cx:"12",cy:"15",r:"2"}),y.jsx("path",{d:"M12 11v2"}),y.jsx("path",{d:"M12 17v1"})]})}function ex({size:e=16,className:t}){return y.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:[y.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),y.jsx("polyline",{points:"14 2 14 8 20 8"}),y.jsx("line",{x1:"8",y1:"13",x2:"16",y2:"13"}),y.jsx("line",{x1:"8",y1:"17",x2:"14",y2:"17"})]})}function tx({size:e=16,className:t}){return y.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:[y.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),y.jsx("polyline",{points:"14 2 14 8 20 8"}),y.jsx("circle",{cx:"10",cy:"14",r:"2"}),y.jsx("path",{d:"M20 17l-3-3-5 5"})]})}function nx({size:e=16,className:t}){return y.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:[y.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),y.jsx("polyline",{points:"14 2 14 8 20 8"}),y.jsx("path",{d:"M8 13h3v3H8z"}),y.jsx("line",{x1:"14",y1:"13",x2:"16",y2:"13"}),y.jsx("line",{x1:"14",y1:"16",x2:"16",y2:"16"})]})}function rx({size:e=16,className:t}){return y.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:[y.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),y.jsx("polyline",{points:"14 2 14 8 20 8"}),y.jsx("polyline",{points:"8 15 10 13 8 11"}),y.jsx("line",{x1:"12",y1:"16",x2:"16",y2:"16"})]})}function ix({size:e=16,className:t}){return y.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:[y.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),y.jsx("polyline",{points:"7 10 12 15 17 10"}),y.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]})}function Zl({size:e=20,className:t}){return y.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:y.jsx("path",{d:"M4 7h16M4 12h16M4 17h10"})})}function sx({size:e=16,className:t}){return y.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:[y.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"}),y.jsx("line",{x1:"9",y1:"14",x2:"15",y2:"14"}),y.jsx("line",{x1:"9",y1:"18",x2:"13",y2:"18"})]})}function ax({size:e=18,className:t}){return y.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:[y.jsx("polyline",{points:"4 14 10 14 10 20"}),y.jsx("polyline",{points:"20 10 14 10 14 4"}),y.jsx("line",{x1:"14",y1:"10",x2:"21",y2:"3"}),y.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]})}function ux({size:e=16,className:t}){return y.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:[y.jsx("path",{d:"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z"}),y.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function ox({size:e=16,className:t}){return y.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:[y.jsx("polyline",{points:"16 18 22 12 16 6"}),y.jsx("polyline",{points:"8 6 2 12 8 18"})]})}function lx({size:e=16,className:t}){return y.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:[y.jsx("polyline",{points:"15 3 21 3 21 9"}),y.jsx("polyline",{points:"9 21 3 21 3 15"}),y.jsx("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),y.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]})}function cx({size:e=16,className:t}){return y.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:[y.jsx("polyline",{points:"4 14 10 14 10 20"}),y.jsx("polyline",{points:"20 10 14 10 14 4"}),y.jsx("line",{x1:"14",y1:"10",x2:"21",y2:"3"}),y.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]})}var Zs=l0();const Ns=8,Dp=6;function dx({anchor:e,onClose:t,children:n}){const s=w.useRef(null),[a,o]=w.useState(null);return w.useLayoutEffect(()=>{const l=s.current;if(!e||!l)return;const d=e.getBoundingClientRect(),f=l.getBoundingClientRect(),h=d.bottom+Dp,g=h+f.height+Ns<=window.innerHeight?h:Math.max(Ns,d.top-Dp-f.height),x=Math.min(Math.max(Ns,d.right-f.width),Math.max(Ns,window.innerWidth-f.width-Ns));o({top:g,left:x})},[e]),w.useEffect(()=>{const l=h=>{var g;const E=h.target;(g=s.current)!=null&&g.contains(E)||e!=null&&e.contains(E)||t()},d=h=>{h.key==="Escape"&&t()};document.addEventListener("mousedown",l),document.addEventListener("keydown",d);const f={capture:!0,passive:!0};return window.addEventListener("scroll",t,f),window.addEventListener("resize",t),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("keydown",d),window.removeEventListener("scroll",t,f),window.removeEventListener("resize",t)}},[e,t]),Zs.createPortal(y.jsx("div",{ref:s,className:"menu-list menu-list-floating",role:"menu",style:a?{top:a.top,left:a.left}:{visibility:"hidden"},children:n}),document.body)}function fx(e,t){const n=e.trim().toLowerCase();if(!n)return 0;const s=t.toLowerCase();let a=0,o=0,l=-2;for(let d=0;d<n.length;d++){const f=n[d],h=s.indexOf(f,o);if(h===-1)return-1;a+=1,h===l+1&&(a+=3),(h===0||/\s|[-_/.]/.test(s[h-1]??""))&&(a+=2),l=h,o=h+1}return a}function hx({sessions:e,onOpen:t,onClose:n}){const[s,a]=w.useState(""),[o,l]=w.useState(0),d=w.useRef(null);w.useEffect(()=>{var g;(g=d.current)==null||g.focus()},[]);const f=w.useMemo(()=>s.trim()?e.map(g=>({s:g,score:fx(s,g.title)})).filter(g=>g.score>=0).sort((g,x)=>x.score-g.score).map(g=>g.s):e.slice(0,50),[e,s]);w.useEffect(()=>{l(0)},[s]);const h=g=>{t(g),n()},E=g=>{if(g.key==="Escape")n();else if(g.key==="ArrowDown")g.preventDefault(),l(x=>Math.min(x+1,f.length-1));else if(g.key==="ArrowUp")g.preventDefault(),l(x=>Math.max(x-1,0));else if(g.key==="Enter"){g.preventDefault();const x=f[o];x&&h(x.sessionId)}};return Zs.createPortal(y.jsx("div",{className:"search-backdrop",onClick:n,children:y.jsxs("div",{className:"search-modal",role:"dialog","aria-label":"Search sessions",onClick:g=>g.stopPropagation(),children:[y.jsxs("div",{className:"search-field",children:[y.jsx(U0,{size:20,className:"search-field-icon"}),y.jsx("input",{ref:d,className:"search-modal-input",value:s,placeholder:"Search sessions…",onChange:g=>a(g.target.value),onKeyDown:E}),y.jsx("kbd",{className:"search-esc",children:"esc"})]}),y.jsx("div",{className:"search-results",children:f.length===0?y.jsx("p",{className:"search-empty",children:s.trim()?`No sessions match "${s}".`:"No sessions yet."}):f.map((g,x)=>y.jsxs("button",{className:`search-result ${x===o?"is-active":""}`,onMouseEnter:()=>l(x),onClick:()=>h(g.sessionId),children:[y.jsx("span",{className:"search-result-title",children:g.title}),y.jsx("span",{className:"search-result-agent",children:g.agentId??"kiro_default"})]},g.sessionId))})]})}),document.body)}function px(e){const t=Math.round((Date.now()-Date.parse(e))/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;const n=Math.round(t/60);return n<24?`${n}h ago`:`${Math.round(n/24)}d ago`}function mx(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 gx({onClose:e,onSelfRevoked:t}){const[n,s]=w.useState(null),[a,o]=w.useState(!1),l=()=>dt.devices().then(h=>s(h.devices)).catch(()=>s([]));w.useEffect(()=>{l()},[]);const d=async h=>{o(!0);try{if(await dt.revokeDevice(h.id),h.current){t();return}await l()}finally{o(!1)}},f=async()=>{o(!0);try{await dt.logoutAll(),t()}finally{o(!1)}};return Zs.createPortal(y.jsx("div",{className:"search-backdrop",onClick:e,children:y.jsxs("div",{className:"search-modal",role:"dialog","aria-label":"Logged-in devices",onClick:h=>h.stopPropagation(),children:[y.jsxs("div",{className:"devices-head",children:[y.jsx("span",{className:"devices-title",children:"Logged-in devices"}),y.jsx("button",{className:"btn-ghost",onClick:e,children:"Close"})]}),y.jsx("div",{className:"devices-list",children:n===null?y.jsx("p",{className:"search-empty",children:"Loading…"}):n.length===0?y.jsx("p",{className:"search-empty",children:"No active devices."}):n.map(h=>y.jsxs("div",{className:"device-row",children:[y.jsxs("span",{className:"device-main",children:[y.jsxs("span",{className:"device-name",children:[mx(h.userAgent),h.current&&y.jsx("span",{className:"device-badge",children:"This device"})]}),y.jsxs("span",{className:"device-sub",children:["Active ",px(h.lastSeenAt)]})]}),y.jsx("button",{className:"btn-ghost device-revoke",disabled:a,onClick:()=>d(h),children:h.current?"Log out":"Revoke"})]},h.id))}),n&&n.length>1&&y.jsx("div",{className:"devices-foot",children:y.jsx("button",{className:"btn-ghost device-revoke",disabled:a,onClick:f,children:"Log out all devices"})})]})}),document.body)}function Ex({title:e,message:t,confirmLabel:n="Confirm",cancelLabel:s="Cancel",danger:a=!1,onConfirm:o,onCancel:l}){return w.useEffect(()=>{const d=f=>{f.key==="Escape"&&l()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[l]),Zs.createPortal(y.jsx("div",{className:"confirm-backdrop",onClick:d=>{d.target===d.currentTarget&&l()},children:y.jsxs("div",{className:"confirm-modal",role:"dialog","aria-modal":"true","aria-label":e,children:[y.jsx("h3",{className:"confirm-title",children:e}),t&&y.jsx("p",{className:"confirm-message",children:t}),y.jsxs("div",{className:"confirm-actions",children:[y.jsx("button",{className:"btn-ghost",onClick:l,children:s}),y.jsx("button",{className:a?"btn-danger":"btn-primary",onClick:o,autoFocus:!0,children:n})]})]})}),document.body)}function Tx(e){const t=Date.parse(e);if(Number.isNaN(t))return"";const n=Math.round((Date.now()-t)/6e4);if(n<1)return"now";if(n<60)return`${n}m`;const s=Math.round(n/60);return s<24?`${s}h`:`${Math.round(s/24)}d`}function yx({sessions:e,activeId:t,loadingId:n,onOpen:s,onNew:a,onDelete:o,onRename:l,onLock:d}){const[f,h]=w.useState(!1),[E,g]=w.useState(!1),[x,b]=w.useState(!1),[A,L]=w.useState(null),[O,v]=w.useState(null),[M,z]=w.useState(null),[J,ne]=w.useState(null),[D,Q]=w.useState(""),oe=w.useCallback(()=>{L(null),v(null)},[]);w.useEffect(()=>{if(!x)return;const U=()=>b(!1);return document.addEventListener("click",U),()=>document.removeEventListener("click",U)},[x]);const ce=U=>{const Z=D.trim();Z&&l(U,Z),ne(null)};return y.jsxs("aside",{className:"sidebar",children:[y.jsxs("header",{className:"sidebar-head",children:[y.jsxs("span",{className:"brand",children:[y.jsx("img",{className:"brand-logo",src:"/logo.svg",alt:""}),y.jsx("span",{className:"wordmark",children:"Casper"})]}),y.jsxs("div",{className:"sidebar-actions",children:[y.jsxs("div",{className:"account-menu",children:[y.jsx("button",{className:"iconbtn iconbtn-lg","aria-label":"Account",title:"Account",onClick:U=>{U.stopPropagation(),b(Z=>!Z)},children:y.jsx(G2,{size:18})}),x&&y.jsxs("div",{className:"menu-list",onClick:U=>U.stopPropagation(),children:[y.jsx("button",{className:"menu-item",onClick:()=>{b(!1),g(!0)},children:"Devices"}),y.jsx("button",{className:"menu-item",onClick:()=>{b(!1),d()},children:"Lock app"})]})]}),y.jsx("button",{className:"iconbtn iconbtn-lg","aria-label":"Search sessions",onClick:()=>h(!0),children:y.jsx(U0,{size:20})}),y.jsx("button",{className:"iconbtn iconbtn-lg","aria-label":"New session",title:"New session",onClick:a,children:y.jsx(B0,{size:20})})]})]}),y.jsx("div",{className:"sidebar-list",children:e.length===0?y.jsx("p",{className:"sidebar-empty",children:"No sessions yet. Start one and it keeps running while you're away."}):e.map(U=>y.jsxs("div",{className:`srow ${U.sessionId===t?"is-active":""}`,children:[J===U.sessionId?y.jsx("input",{className:"srow-rename",autoFocus:!0,onFocus:Z=>Z.currentTarget.select(),value:D,onChange:Z=>Q(Z.target.value),onBlur:()=>ce(U.sessionId),onKeyDown:Z=>{Z.key==="Enter"&&ce(U.sessionId),Z.key==="Escape"&&ne(null)},onClick:Z=>Z.stopPropagation()}):y.jsx(td,{className:"srow-open",to:D0(U.sessionId),onClick:Z=>{Z.metaKey||Z.ctrlKey||Z.shiftKey||Z.altKey||s(U.sessionId)},children:y.jsxs("span",{className:"srow-main",children:[y.jsx("span",{className:"srow-title",title:U.title,children:U.title}),y.jsxs("span",{className:"srow-sub",children:[y.jsx("span",{className:"srow-agent",children:U.agentId??"kiro_default"}),y.jsx("span",{className:"srow-dot",children:"·"}),n===U.sessionId&&y.jsx(Tr,{size:11,className:"srow-spinner"}),y.jsx("span",{className:"srow-when",children:Tx(U.updatedAt)})]})]})}),y.jsxs("div",{className:"srow-menu",children:[y.jsx("button",{className:"iconbtn srow-menu-btn","aria-label":"Session actions","aria-haspopup":"menu","aria-expanded":A===U.sessionId,onClick:Z=>{Z.stopPropagation();const re=A===U.sessionId;v(re?null:Z.currentTarget),L(re?null:U.sessionId)},children:y.jsx(V2,{size:16})}),A===U.sessionId&&y.jsxs(dx,{anchor:O,onClose:oe,children:[y.jsx("button",{className:"menu-item",onClick:()=>{Q(U.title),ne(U.sessionId),oe()},children:"Rename"}),y.jsx("button",{className:"menu-item menu-item-danger",onClick:()=>{oe(),z(U.sessionId)},children:"Delete"})]})]})]},U.sessionId))}),f&&y.jsx(hx,{sessions:e,onOpen:s,onClose:()=>h(!1)}),E&&y.jsx(gx,{onClose:()=>g(!1),onSelfRevoked:()=>{g(!1),d()}}),M&&y.jsx(Ex,{title:"Delete session?",message:"This session and its history will be permanently deleted. This can't be undone.",confirmLabel:"Delete",danger:!0,onConfirm:()=>{const U=M;z(null),o(U)},onCancel:()=>z(null)})]})}const xx="modulepreload",bx=function(e){return"/"+e},Pp={},_c=function(t,n,s){let a=Promise.resolve();if(n&&n.length>0){let l=function(h){return Promise.all(h.map(E=>Promise.resolve(E).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),f=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));a=l(n.map(h=>{if(h=bx(h),h in Pp)return;Pp[h]=!0;const E=h.endsWith(".css"),g=E?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const x=document.createElement("link");if(x.rel=E?"stylesheet":xx,E||(x.as="script"),x.crossOrigin="",x.href=h,f&&x.setAttribute("nonce",f),document.head.appendChild(x),E)return new Promise((b,A)=>{x.addEventListener("load",b),x.addEventListener("error",()=>A(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(l){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=l,window.dispatchEvent(d),!d.defaultPrevented)throw l}return a.then(l=>{for(const d of l||[])d.status==="rejected"&&o(d.reason);return t().catch(o)})};function Mp(e){const t=[],n=String(e||"");let s=n.indexOf(","),a=0,o=!1;for(;!o;){s===-1&&(s=n.length,o=!0);const l=n.slice(a,s).trim();(l||!o)&&t.push(l),a=s+1,s=n.indexOf(",",a)}return t}function H0(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const kx=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Sx=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_x={};function Fp(e,t){return(_x.jsx?Sx:kx).test(e)}const Cx=/[ \t\n\f\r]/g;function Nx(e){return typeof e=="object"?e.type==="text"?Bp(e.value):!1:Bp(e)}function Bp(e){return e.replace(Cx,"")===""}class ea{constructor(t,n,s){this.normal=n,this.property=t,s&&(this.space=s)}}ea.prototype.normal={};ea.prototype.property={};ea.prototype.space=void 0;function z0(e,t){const n={},s={};for(const a of e)Object.assign(n,a.property),Object.assign(s,a.normal);return new ea(n,s,t)}function Vs(e){return e.toLowerCase()}class Ht{constructor(t,n){this.attribute=n,this.property=t}}Ht.prototype.attribute="";Ht.prototype.booleanish=!1;Ht.prototype.boolean=!1;Ht.prototype.commaOrSpaceSeparated=!1;Ht.prototype.commaSeparated=!1;Ht.prototype.defined=!1;Ht.prototype.mustUseProperty=!1;Ht.prototype.number=!1;Ht.prototype.overloadedBoolean=!1;Ht.prototype.property="";Ht.prototype.spaceSeparated=!1;Ht.prototype.space=void 0;let Ax=0;const we=Qr(),ot=Qr(),Cc=Qr(),se=Qr(),Ye=Qr(),$r=Qr(),qt=Qr();function Qr(){return 2**++Ax}const Nc=Object.freeze(Object.defineProperty({__proto__:null,boolean:we,booleanish:ot,commaOrSpaceSeparated:qt,commaSeparated:$r,number:se,overloadedBoolean:Cc,spaceSeparated:Ye},Symbol.toStringTag,{value:"Module"})),ec=Object.keys(Nc);class id extends Ht{constructor(t,n,s,a){let o=-1;if(super(t,n),Up(this,"space",a),typeof s=="number")for(;++o<ec.length;){const l=ec[o];Up(this,ec[o],(s&Nc[l])===Nc[l])}}}id.prototype.defined=!0;function Up(e,t,n){n&&(e[t]=n)}function Oi(e){const t={},n={};for(const[s,a]of Object.entries(e.properties)){const o=new id(s,e.transform(e.attributes||{},s),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(o.mustUseProperty=!0),t[s]=o,n[Vs(s)]=s,n[Vs(o.attribute)]=s}return new ea(t,n,e.space)}const $0=Oi({properties:{ariaActiveDescendant:null,ariaAtomic:ot,ariaAutoComplete:null,ariaBusy:ot,ariaChecked:ot,ariaColCount:se,ariaColIndex:se,ariaColSpan:se,ariaControls:Ye,ariaCurrent:null,ariaDescribedBy:Ye,ariaDetails:null,ariaDisabled:ot,ariaDropEffect:Ye,ariaErrorMessage:null,ariaExpanded:ot,ariaFlowTo:Ye,ariaGrabbed:ot,ariaHasPopup:null,ariaHidden:ot,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ye,ariaLevel:se,ariaLive:null,ariaModal:ot,ariaMultiLine:ot,ariaMultiSelectable:ot,ariaOrientation:null,ariaOwns:Ye,ariaPlaceholder:null,ariaPosInSet:se,ariaPressed:ot,ariaReadOnly:ot,ariaRelevant:null,ariaRequired:ot,ariaRoleDescription:Ye,ariaRowCount:se,ariaRowIndex:se,ariaRowSpan:se,ariaSelected:ot,ariaSetSize:se,ariaSort:null,ariaValueMax:se,ariaValueMin:se,ariaValueNow:se,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function W0(e,t){return t in e?e[t]:t}function Y0(e,t){return W0(e,t.toLowerCase())}const vx=Oi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:$r,acceptCharset:Ye,accessKey:Ye,action:null,allow:null,allowFullScreen:we,allowPaymentRequest:we,allowUserMedia:we,alpha:we,alt:null,as:null,async:we,autoCapitalize:null,autoComplete:Ye,autoFocus:we,autoPlay:we,blocking:Ye,capture:null,charSet:null,checked:we,cite:null,className:Ye,closedBy:null,colorSpace:null,cols:se,colSpan:se,command:null,commandFor:null,content:null,contentEditable:ot,controls:we,controlsList:Ye,coords:se|$r,crossOrigin:null,data:null,dateTime:null,decoding:null,default:we,defer:we,dir:null,dirName:null,disabled:we,download:Cc,draggable:ot,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:we,formTarget:null,headers:Ye,height:se,hidden:Cc,high:se,href:null,hrefLang:null,htmlFor:Ye,httpEquiv:Ye,id:null,imageSizes:null,imageSrcSet:null,inert:we,inputMode:null,integrity:null,is:null,isMap:we,itemId:null,itemProp:Ye,itemRef:Ye,itemScope:we,itemType:Ye,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:we,low:se,manifest:null,max:null,maxLength:se,media:null,method:null,min:null,minLength:se,multiple:we,muted:we,name:null,nonce:null,noModule:we,noValidate:we,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:we,optimum:se,pattern:null,ping:Ye,placeholder:null,playsInline:we,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:we,referrerPolicy:null,rel:Ye,required:we,reversed:we,rows:se,rowSpan:se,sandbox:Ye,scope:null,scoped:we,seamless:we,selected:we,shadowRootClonable:we,shadowRootCustomElementRegistry:we,shadowRootDelegatesFocus:we,shadowRootMode:null,shadowRootSerializable:we,shape:null,size:se,sizes:null,slot:null,span:se,spellCheck:ot,src:null,srcDoc:null,srcLang:null,srcSet:null,start:se,step:null,style:null,tabIndex:se,target:null,title:null,translate:null,type:null,typeMustMatch:we,useMap:null,value:ot,width:se,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ye,axis:null,background:null,bgColor:null,border:se,borderColor:null,bottomMargin:se,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:we,declare:we,event:null,face:null,frame:null,frameBorder:null,hSpace:se,leftMargin:se,link:null,longDesc:null,lowSrc:null,marginHeight:se,marginWidth:se,noResize:we,noHref:we,noShade:we,noWrap:we,object:null,profile:null,prompt:null,rev:null,rightMargin:se,rules:null,scheme:null,scrolling:ot,standby:null,summary:null,text:null,topMargin:se,valueType:null,version:null,vAlign:null,vLink:null,vSpace:se,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:we,disablePictureInPicture:we,disableRemotePlayback:we,exportParts:$r,part:Ye,prefix:null,property:null,results:se,security:null,unselectable:null},space:"html",transform:Y0}),wx=Oi({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:qt,accentHeight:se,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:se,amplitude:se,arabicForm:null,ascent:se,attributeName:null,attributeType:null,azimuth:se,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:se,by:null,calcMode:null,capHeight:se,className:Ye,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:se,diffuseConstant:se,direction:null,display:null,dur:null,divisor:se,dominantBaseline:null,download:we,dx:null,dy:null,edgeMode:null,editable:null,elevation:se,enableBackground:null,end:null,event:null,exponent:se,externalResourcesRequired:null,fill:null,fillOpacity:se,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:$r,g2:$r,glyphName:$r,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:se,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:se,horizOriginX:se,horizOriginY:se,id:null,ideographic:se,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:se,k:se,k1:se,k2:se,k3:se,k4:se,kernelMatrix:qt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:se,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:se,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:se,overlineThickness:se,paintOrder:null,panose1:null,path:null,pathLength:se,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ye,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:se,pointsAtY:se,pointsAtZ:se,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qt,rev:qt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qt,requiredFeatures:qt,requiredFonts:qt,requiredFormats:qt,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:se,specularExponent:se,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:se,strikethroughThickness:se,string:null,stroke:null,strokeDashArray:qt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:se,strokeOpacity:se,strokeWidth:null,style:null,surfaceScale:se,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qt,tabIndex:se,tableValues:null,target:null,targetX:se,targetY:se,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:se,underlineThickness:se,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:se,values:null,vAlphabetic:se,vMathematical:se,vectorEffect:null,vHanging:se,vIdeographic:se,version:null,vertAdvY:se,vertOriginX:se,vertOriginY:se,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:se,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:W0}),V0=Oi({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()}}),q0=Oi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Y0}),Q0=Oi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Ix={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"},Lx=/[A-Z]/g,jp=/-[a-z]/g,Rx=/^data[-\w.:]+$/i;function Yu(e,t){const n=Vs(t);let s=t,a=Ht;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Rx.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(jp,Dx);s="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!jp.test(o)){let l=o.replace(Lx,Ox);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}a=id}return new a(s,t)}function Ox(e){return"-"+e.toLowerCase()}function Dx(e){return e.charAt(1).toUpperCase()}const ta=z0([$0,vx,V0,q0,Q0],"html"),yr=z0([$0,wx,V0,q0,Q0],"svg");function Hp(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function G0(e){return e.join(" ").trim()}var Ci={},tc,zp;function Px(){if(zp)return tc;zp=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,d=/^\s+|\s+$/g,f=`
|
|
58
|
+
`,h="/",E="*",g="",x="comment",b="declaration";function A(O,v){if(typeof O!="string")throw new TypeError("First argument must be a string");if(!O)return[];v=v||{};var M=1,z=1;function J(de){var ie=de.match(t);ie&&(M+=ie.length);var ve=de.lastIndexOf(f);z=~ve?de.length-ve:z+de.length}function ne(){var de={line:M,column:z};return function(ie){return ie.position=new D(de),ce(),ie}}function D(de){this.start=de,this.end={line:M,column:z},this.source=v.source}D.prototype.content=O;function Q(de){var ie=new Error(v.source+":"+M+":"+z+": "+de);if(ie.reason=de,ie.filename=v.source,ie.line=M,ie.column=z,ie.source=O,!v.silent)throw ie}function oe(de){var ie=de.exec(O);if(ie){var ve=ie[0];return J(ve),O=O.slice(ve.length),ie}}function ce(){oe(n)}function U(de){var ie;for(de=de||[];ie=Z();)ie!==!1&&de.push(ie);return de}function Z(){var de=ne();if(!(h!=O.charAt(0)||E!=O.charAt(1))){for(var ie=2;g!=O.charAt(ie)&&(E!=O.charAt(ie)||h!=O.charAt(ie+1));)++ie;if(ie+=2,g===O.charAt(ie-1))return Q("End of comment missing");var ve=O.slice(2,ie-2);return z+=2,J(ve),O=O.slice(ie),z+=2,de({type:x,comment:ve})}}function re(){var de=ne(),ie=oe(s);if(ie){if(Z(),!oe(a))return Q("property missing ':'");var ve=oe(o),Ie=de({type:b,property:L(ie[0].replace(e,g)),value:ve?L(ve[0].replace(e,g)):g});return oe(l),Ie}}function ke(){var de=[];U(de);for(var ie;ie=re();)ie!==!1&&(de.push(ie),U(de));return de}return ce(),ke()}function L(O){return O?O.replace(d,g):g}return tc=A,tc}var $p;function Mx(){if($p)return Ci;$p=1;var e=Ci&&Ci.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.default=n;const t=e(Px());function n(s,a){let o=null;if(!s||typeof s!="string")return o;const l=(0,t.default)(s),d=typeof a=="function";return l.forEach(f=>{if(f.type!=="declaration")return;const{property:h,value:E}=f;d?a(h,E,f):E&&(o=o||{},o[h]=E)}),o}return Ci}var As={},Wp;function Fx(){if(Wp)return As;Wp=1,Object.defineProperty(As,"__esModule",{value:!0}),As.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,s=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(h){return!h||n.test(h)||e.test(h)},l=function(h,E){return E.toUpperCase()},d=function(h,E){return"".concat(E,"-")},f=function(h,E){return E===void 0&&(E={}),o(h)?h:(h=h.toLowerCase(),E.reactCompat?h=h.replace(a,d):h=h.replace(s,d),h.replace(t,l))};return As.camelCase=f,As}var vs,Yp;function Bx(){if(Yp)return vs;Yp=1;var e=vs&&vs.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(Mx()),n=Fx();function s(a,o){var l={};return!a||typeof a!="string"||(0,t.default)(a,function(d,f){d&&f&&(l[(0,n.camelCase)(d,o)]=f)}),l}return s.default=s,vs=s,vs}var Ux=Bx();const jx=Wc(Ux),Vu=K0("end"),In=K0("start");function K0(e){return t;function t(n){const s=n&&n.position&&n.position[e]||{};if(typeof s.line=="number"&&s.line>0&&typeof s.column=="number"&&s.column>0)return{line:s.line,column:s.column,offset:typeof s.offset=="number"&&s.offset>-1?s.offset:void 0}}}function X0(e){const t=In(e),n=Vu(e);if(t&&n)return{start:t,end:n}}function Ms(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Vp(e.position):"start"in e||"end"in e?Vp(e):"line"in e||"column"in e?Ac(e):""}function Ac(e){return qp(e&&e.line)+":"+qp(e&&e.column)}function Vp(e){return Ac(e&&e.start)+"-"+Ac(e&&e.end)}function qp(e){return e&&typeof e=="number"?e:1}class vt extends Error{constructor(t,n,s){super(),typeof n=="string"&&(s=n,n=void 0);let a="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?a=t:!o.cause&&t&&(l=!0,a=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof s=="string"){const f=s.indexOf(":");f===-1?o.ruleId=s:(o.source=s.slice(0,f),o.ruleId=s.slice(f+1))}if(!o.place&&o.ancestors&&o.ancestors){const f=o.ancestors[o.ancestors.length-1];f&&(o.place=f.position)}const d=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=d?d.line:void 0,this.name=Ms(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}vt.prototype.file="";vt.prototype.name="";vt.prototype.reason="";vt.prototype.message="";vt.prototype.stack="";vt.prototype.column=void 0;vt.prototype.line=void 0;vt.prototype.ancestors=void 0;vt.prototype.cause=void 0;vt.prototype.fatal=void 0;vt.prototype.place=void 0;vt.prototype.ruleId=void 0;vt.prototype.source=void 0;const sd={}.hasOwnProperty,Hx=new Map,zx=/[A-Z]/g,$x=new Set(["table","tbody","thead","tfoot","tr"]),Wx=new Set(["td","th"]),J0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Yx(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let s;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");s=Zx(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");s=Jx(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:s,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"?yr:ta,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Z0(a,e,void 0);return o&&typeof o!="string"?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function Z0(e,t,n){if(t.type==="element")return Vx(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return qx(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Gx(e,t,n);if(t.type==="mdxjsEsm")return Qx(e,t);if(t.type==="root")return Kx(e,t,n);if(t.type==="text")return Xx(e,t)}function Vx(e,t,n){const s=e.schema;let a=s;t.tagName.toLowerCase()==="svg"&&s.space==="html"&&(a=yr,e.schema=a),e.ancestors.push(t);const o=t1(e,t.tagName,!1),l=eb(e,t);let d=ud(e,t);return $x.has(t.tagName)&&(d=d.filter(function(f){return typeof f=="string"?!Nx(f):!0})),e1(e,l,o,t),ad(l,d),e.ancestors.pop(),e.schema=s,e.create(t,o,l,n)}function qx(e,t){if(t.data&&t.data.estree&&e.evaluater){const s=t.data.estree.body[0];return s.type,e.evaluater.evaluateExpression(s.expression)}qs(e,t.position)}function Qx(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);qs(e,t.position)}function Gx(e,t,n){const s=e.schema;let a=s;t.name==="svg"&&s.space==="html"&&(a=yr,e.schema=a),e.ancestors.push(t);const o=t.name===null?e.Fragment:t1(e,t.name,!0),l=tb(e,t),d=ud(e,t);return e1(e,l,o,t),ad(l,d),e.ancestors.pop(),e.schema=s,e.create(t,o,l,n)}function Kx(e,t,n){const s={};return ad(s,ud(e,t)),e.create(t,e.Fragment,s,n)}function Xx(e,t){return t.value}function e1(e,t,n,s){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=s)}function ad(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Jx(e,t,n){return s;function s(a,o,l,d){const h=Array.isArray(l.children)?n:t;return d?h(o,l,d):h(o,l)}}function Zx(e,t){return n;function n(s,a,o,l){const d=Array.isArray(o.children),f=In(s);return t(a,o,l,d,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function eb(e,t){const n={};let s,a;for(a in t.properties)if(a!=="children"&&sd.call(t.properties,a)){const o=nb(e,a,t.properties[a]);if(o){const[l,d]=o;e.tableCellAlignToStyle&&l==="align"&&typeof d=="string"&&Wx.has(t.tagName)?s=d:n[l]=d}}if(s){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=s}return n}function tb(e,t){const n={};for(const s of t.attributes)if(s.type==="mdxJsxExpressionAttribute")if(s.data&&s.data.estree&&e.evaluater){const o=s.data.estree.body[0];o.type;const l=o.expression;l.type;const d=l.properties[0];d.type,Object.assign(n,e.evaluater.evaluateExpression(d.argument))}else qs(e,t.position);else{const a=s.name;let o;if(s.value&&typeof s.value=="object")if(s.value.data&&s.value.data.estree&&e.evaluater){const d=s.value.data.estree.body[0];d.type,o=e.evaluater.evaluateExpression(d.expression)}else qs(e,t.position);else o=s.value===null?!0:s.value;n[a]=o}return n}function ud(e,t){const n=[];let s=-1;const a=e.passKeys?new Map:Hx;for(;++s<t.children.length;){const o=t.children[s];let l;if(e.passKeys){const f=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(f){const h=a.get(f)||0;l=f+"-"+h,a.set(f,h+1)}}const d=Z0(e,o,l);d!==void 0&&n.push(d)}return n}function nb(e,t,n){const s=Yu(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=s.commaSeparated?H0(n):G0(n)),s.property==="style"){let a=typeof n=="object"?n:rb(e,String(n));return e.stylePropertyNameCase==="css"&&(a=ib(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&s.space?Ix[s.property]||s.property:s.attribute,n]}}function rb(e,t){try{return jx(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const s=n,a=new vt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:s,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=J0+"#cannot-parse-style-attribute",a}}function t1(e,t,n){let s;if(!n)s={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let o=-1,l;for(;++o<a.length;){const d=Fp(a[o])?{type:"Identifier",name:a[o]}:{type:"Literal",value:a[o]};l=l?{type:"MemberExpression",object:l,property:d,computed:!!(o&&d.type==="Literal"),optional:!1}:d}s=l}else s=Fp(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(s.type==="Literal"){const a=s.value;return sd.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(s);qs(e)}function qs(e,t){const n=new vt("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=J0+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ib(e){const t={};let n;for(n in e)sd.call(e,n)&&(t[sb(n)]=e[n]);return t}function sb(e){let t=e.replace(zx,ab);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ab(e){return"-"+e.toLowerCase()}const nc={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"]},ub={};function od(e,t){const n=ub,s=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return n1(e,s,a)}function n1(e,t,n){if(ob(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 Qp(e.children,t,n)}return Array.isArray(e)?Qp(e,t,n):""}function Qp(e,t,n){const s=[];let a=-1;for(;++a<e.length;)s[a]=n1(e[a],t,n);return s.join("")}function ob(e){return!!(e&&typeof e=="object")}const Gp=document.createElement("i");function ld(e){const t="&"+e+";";Gp.innerHTML=t;const n=Gp.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Qt(e,t,n,s){const a=e.length;let o=0,l;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,s.length<1e4)l=Array.from(s),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<s.length;)l=s.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function rn(e,t){return e.length>0?(Qt(e,e.length,0,t),e):t}const Kp={}.hasOwnProperty;function r1(e){const t={};let n=-1;for(;++n<e.length;)lb(t,e[n]);return t}function lb(e,t){let n;for(n in t){const a=(Kp.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){Kp.call(a,l)||(a[l]=[]);const d=o[l];cb(a[l],Array.isArray(d)?d:d?[d]:[])}}}function cb(e,t){let n=-1;const s=[];for(;++n<t.length;)(t[n].add==="after"?e:s).push(t[n]);Qt(e,0,0,s)}function i1(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 gn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Rt=xr(/[A-Za-z]/),At=xr(/[\dA-Za-z]/),db=xr(/[#-'*+\--9=?A-Z^-~]/);function Du(e){return e!==null&&(e<32||e===127)}const vc=xr(/\d/),fb=xr(/[\dA-Fa-f]/),hb=xr(/[!-/:-@[-`{-~]/);function ye(e){return e!==null&&e<-2}function Ve(e){return e!==null&&(e<0||e===32)}function Fe(e){return e===-2||e===-1||e===32}const qu=xr(new RegExp("\\p{P}|\\p{S}","u")),Yr=xr(/\s/);function xr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Di(e){const t=[];let n=-1,s=0,a=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&At(e.charCodeAt(n+1))&&At(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const d=e.charCodeAt(n+1);o<56320&&d>56319&&d<57344?(l=String.fromCharCode(o,d),a=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(s,n),encodeURIComponent(l)),s=n+a+1,l=""),a&&(n+=a,a=0)}return t.join("")+e.slice(s)}function Me(e,t,n,s){const a=s?s-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(f){return Fe(f)?(e.enter(n),d(f)):t(f)}function d(f){return Fe(f)&&o++<a?(e.consume(f),d):(e.exit(n),t(f))}}const pb={tokenize:mb};function mb(e){const t=e.attempt(this.parser.constructs.contentInitial,s,a);let n;return t;function s(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Me(e,t,"linePrefix")}function a(d){return e.enter("paragraph"),o(d)}function o(d){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,l(d)}function l(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return ye(d)?(e.consume(d),e.exit("chunkText"),o):(e.consume(d),l)}}const gb={tokenize:Eb},Xp={tokenize:Tb};function Eb(e){const t=this,n=[];let s=0,a,o,l;return d;function d(z){if(s<n.length){const J=n[s];return t.containerState=J[1],e.attempt(J[0].continuation,f,h)(z)}return h(z)}function f(z){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&M();const J=t.events.length;let ne=J,D;for(;ne--;)if(t.events[ne][0]==="exit"&&t.events[ne][1].type==="chunkFlow"){D=t.events[ne][1].end;break}v(s);let Q=J;for(;Q<t.events.length;)t.events[Q][1].end={...D},Q++;return Qt(t.events,ne+1,0,t.events.slice(J)),t.events.length=Q,h(z)}return d(z)}function h(z){if(s===n.length){if(!a)return x(z);if(a.currentConstruct&&a.currentConstruct.concrete)return A(z);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Xp,E,g)(z)}function E(z){return a&&M(),v(s),x(z)}function g(z){return t.parser.lazy[t.now().line]=s!==n.length,l=t.now().offset,A(z)}function x(z){return t.containerState={},e.attempt(Xp,b,A)(z)}function b(z){return s++,n.push([t.currentConstruct,t.containerState]),x(z)}function A(z){if(z===null){a&&M(),v(0),e.consume(z);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:o}),L(z)}function L(z){if(z===null){O(e.exit("chunkFlow"),!0),v(0),e.consume(z);return}return ye(z)?(e.consume(z),O(e.exit("chunkFlow")),s=0,t.interrupt=void 0,d):(e.consume(z),L)}function O(z,J){const ne=t.sliceStream(z);if(J&&ne.push(null),z.previous=o,o&&(o.next=z),o=z,a.defineSkip(z.start),a.write(ne),t.parser.lazy[z.start.line]){let D=a.events.length;for(;D--;)if(a.events[D][1].start.offset<l&&(!a.events[D][1].end||a.events[D][1].end.offset>l))return;const Q=t.events.length;let oe=Q,ce,U;for(;oe--;)if(t.events[oe][0]==="exit"&&t.events[oe][1].type==="chunkFlow"){if(ce){U=t.events[oe][1].end;break}ce=!0}for(v(s),D=Q;D<t.events.length;)t.events[D][1].end={...U},D++;Qt(t.events,oe+1,0,t.events.slice(Q)),t.events.length=D}}function v(z){let J=n.length;for(;J-- >z;){const ne=n[J];t.containerState=ne[1],ne[0].exit.call(t,e)}n.length=z}function M(){a.write([null]),o=void 0,a=void 0,t.containerState._closeFlow=void 0}}function Tb(e,t,n){return Me(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function wi(e){if(e===null||Ve(e)||Yr(e))return 1;if(qu(e))return 2}function Qu(e,t,n){const s=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!s.includes(o)&&(t=o(t,n),s.push(o))}return t}const wc={name:"attention",resolveAll:yb,tokenize:xb};function yb(e,t){let n=-1,s,a,o,l,d,f,h,E;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(s=n;s--;)if(e[s][0]==="exit"&&e[s][1].type==="attentionSequence"&&e[s][1]._open&&t.sliceSerialize(e[s][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[s][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[s][1].end.offset-e[s][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[s][1].end.offset-e[s][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const g={...e[s][1].end},x={...e[n][1].start};Jp(g,-f),Jp(x,f),l={type:f>1?"strongSequence":"emphasisSequence",start:g,end:{...e[s][1].end}},d={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},o={type:f>1?"strongText":"emphasisText",start:{...e[s][1].end},end:{...e[n][1].start}},a={type:f>1?"strong":"emphasis",start:{...l.start},end:{...d.end}},e[s][1].end={...l.start},e[n][1].start={...d.end},h=[],e[s][1].end.offset-e[s][1].start.offset&&(h=rn(h,[["enter",e[s][1],t],["exit",e[s][1],t]])),h=rn(h,[["enter",a,t],["enter",l,t],["exit",l,t],["enter",o,t]]),h=rn(h,Qu(t.parser.constructs.insideSpan.null,e.slice(s+1,n),t)),h=rn(h,[["exit",o,t],["enter",d,t],["exit",d,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(E=2,h=rn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):E=0,Qt(e,s-1,n-s+3,h),n=s+h.length-E-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function xb(e,t){const n=this.parser.constructs.attentionMarkers.null,s=this.previous,a=wi(s);let o;return l;function l(f){return o=f,e.enter("attentionSequence"),d(f)}function d(f){if(f===o)return e.consume(f),d;const h=e.exit("attentionSequence"),E=wi(f),g=!E||E===2&&a||n.includes(f),x=!a||a===2&&E||n.includes(s);return h._open=!!(o===42?g:g&&(a||!x)),h._close=!!(o===42?x:x&&(E||!g)),t(f)}}function Jp(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const bb={name:"autolink",tokenize:kb};function kb(e,t,n){let s=0;return a;function a(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(b){return Rt(b)?(e.consume(b),l):b===64?n(b):h(b)}function l(b){return b===43||b===45||b===46||At(b)?(s=1,d(b)):h(b)}function d(b){return b===58?(e.consume(b),s=0,f):(b===43||b===45||b===46||At(b))&&s++<32?(e.consume(b),d):(s=0,h(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||Du(b)?n(b):(e.consume(b),f)}function h(b){return b===64?(e.consume(b),E):db(b)?(e.consume(b),h):n(b)}function E(b){return At(b)?g(b):n(b)}function g(b){return b===46?(e.consume(b),s=0,E):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||At(b))&&s++<63){const A=b===45?x:g;return e.consume(b),A}return n(b)}}const na={partial:!0,tokenize:Sb};function Sb(e,t,n){return s;function s(o){return Fe(o)?Me(e,a,"linePrefix")(o):a(o)}function a(o){return o===null||ye(o)?t(o):n(o)}}const s1={continuation:{tokenize:Cb},exit:Nb,name:"blockQuote",tokenize:_b};function _b(e,t,n){const s=this;return a;function a(l){if(l===62){const d=s.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return Fe(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function Cb(e,t,n){const s=this;return a;function a(l){return Fe(l)?Me(e,o,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(s1,t,n)(l)}}function Nb(e){e.exit("blockQuote")}const a1={name:"characterEscape",tokenize:Ab};function Ab(e,t,n){return s;function s(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),a}function a(o){return hb(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const u1={name:"characterReference",tokenize:vb};function vb(e,t,n){const s=this;let a=0,o,l;return d;function d(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),f}function f(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,l=At,E(g))}function h(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=fb,E):(e.enter("characterReferenceValue"),o=7,l=vc,E(g))}function E(g){if(g===59&&a){const x=e.exit("characterReferenceValue");return l===At&&!ld(s.sliceSerialize(x))?n(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(g)&&a++<o?(e.consume(g),E):n(g)}}const Zp={partial:!0,tokenize:Ib},em={concrete:!0,name:"codeFenced",tokenize:wb};function wb(e,t,n){const s=this,a={partial:!0,tokenize:ne};let o=0,l=0,d;return f;function f(D){return h(D)}function h(D){const Q=s.events[s.events.length-1];return o=Q&&Q[1].type==="linePrefix"?Q[2].sliceSerialize(Q[1],!0).length:0,d=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),E(D)}function E(D){return D===d?(l++,e.consume(D),E):l<3?n(D):(e.exit("codeFencedFenceSequence"),Fe(D)?Me(e,g,"whitespace")(D):g(D))}function g(D){return D===null||ye(D)?(e.exit("codeFencedFence"),s.interrupt?t(D):e.check(Zp,L,J)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(D))}function x(D){return D===null||ye(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(D)):Fe(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Me(e,b,"whitespace")(D)):D===96&&D===d?n(D):(e.consume(D),x)}function b(D){return D===null||ye(D)?g(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),A(D))}function A(D){return D===null||ye(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(D)):D===96&&D===d?n(D):(e.consume(D),A)}function L(D){return e.attempt(a,J,O)(D)}function O(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),v}function v(D){return o>0&&Fe(D)?Me(e,M,"linePrefix",o+1)(D):M(D)}function M(D){return D===null||ye(D)?e.check(Zp,L,J)(D):(e.enter("codeFlowValue"),z(D))}function z(D){return D===null||ye(D)?(e.exit("codeFlowValue"),M(D)):(e.consume(D),z)}function J(D){return e.exit("codeFenced"),t(D)}function ne(D,Q,oe){let ce=0;return U;function U(ie){return D.enter("lineEnding"),D.consume(ie),D.exit("lineEnding"),Z}function Z(ie){return D.enter("codeFencedFence"),Fe(ie)?Me(D,re,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ie):re(ie)}function re(ie){return ie===d?(D.enter("codeFencedFenceSequence"),ke(ie)):oe(ie)}function ke(ie){return ie===d?(ce++,D.consume(ie),ke):ce>=l?(D.exit("codeFencedFenceSequence"),Fe(ie)?Me(D,de,"whitespace")(ie):de(ie)):oe(ie)}function de(ie){return ie===null||ye(ie)?(D.exit("codeFencedFence"),Q(ie)):oe(ie)}}}function Ib(e,t,n){const s=this;return a;function a(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return s.parser.lazy[s.now().line]?n(l):t(l)}}const rc={name:"codeIndented",tokenize:Rb},Lb={partial:!0,tokenize:Ob};function Rb(e,t,n){const s=this;return a;function a(h){return e.enter("codeIndented"),Me(e,o,"linePrefix",5)(h)}function o(h){const E=s.events[s.events.length-1];return E&&E[1].type==="linePrefix"&&E[2].sliceSerialize(E[1],!0).length>=4?l(h):n(h)}function l(h){return h===null?f(h):ye(h)?e.attempt(Lb,l,f)(h):(e.enter("codeFlowValue"),d(h))}function d(h){return h===null||ye(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),d)}function f(h){return e.exit("codeIndented"),t(h)}}function Ob(e,t,n){const s=this;return a;function a(l){return s.parser.lazy[s.now().line]?n(l):ye(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):Me(e,o,"linePrefix",5)(l)}function o(l){const d=s.events[s.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(l):ye(l)?a(l):n(l)}}const Db={name:"codeText",previous:Mb,resolve:Pb,tokenize:Fb};function Pb(e){let t=e.length-4,n=3,s,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(s=n;++s<t;)if(e[s][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(s=n-1,t++;++s<=t;)a===void 0?s!==t&&e[s][1].type!=="lineEnding"&&(a=s):(s===t||e[s][1].type==="lineEnding")&&(e[a][1].type="codeTextData",s!==a+2&&(e[a][1].end=e[s-1][1].end,e.splice(a+2,s-a-2),t-=s-a-2,s=a+2),a=void 0);return e}function Mb(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Fb(e,t,n){let s=0,a,o;return l;function l(g){return e.enter("codeText"),e.enter("codeTextSequence"),d(g)}function d(g){return g===96?(e.consume(g),s++,d):(e.exit("codeTextSequence"),f(g))}function f(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),f):g===96?(o=e.enter("codeTextSequence"),a=0,E(g)):ye(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),f):(e.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||ye(g)?(e.exit("codeTextData"),f(g)):(e.consume(g),h)}function E(g){return g===96?(e.consume(g),a++,E):a===s?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(o.type="codeTextData",h(g))}}class Bb{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 s=n??Number.POSITIVE_INFINITY;return s<this.left.length?this.left.slice(t,s):t>this.left.length?this.right.slice(this.right.length-s+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-s+this.left.length).reverse())}splice(t,n,s){const a=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return s&&ws(this.left,s),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ws(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ws(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);ws(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ws(this.left,n.reverse())}}}function ws(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 o1(e){const t={};let n=-1,s,a,o,l,d,f,h;const E=new Bb(e);for(;++n<E.length;){for(;n in t;)n=t[n];if(s=E.get(n),n&&s[1].type==="chunkFlow"&&E.get(n-1)[1].type==="listItemPrefix"&&(f=s[1]._tokenizer.events,o=0,o<f.length&&f[o][1].type==="lineEndingBlank"&&(o+=2),o<f.length&&f[o][1].type==="content"))for(;++o<f.length&&f[o][1].type!=="content";)f[o][1].type==="chunkText"&&(f[o][1]._isInFirstContentOfListItem=!0,o++);if(s[0]==="enter")s[1].contentType&&(Object.assign(t,Ub(E,n)),n=t[n],h=!0);else if(s[1]._container){for(o=n,a=void 0;o--;)if(l=E.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(a&&(E.get(a)[1].type="lineEndingBlank"),l[1].type="lineEnding",a=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;a&&(s[1].end={...E.get(a)[1].start},d=E.slice(a,n),d.unshift(s),E.splice(a,n-a+1,d))}}return Qt(e,0,Number.POSITIVE_INFINITY,E.slice(0)),!h}function Ub(e,t){const n=e.get(t)[1],s=e.get(t)[2];let a=t-1;const o=[];let l=n._tokenizer;l||(l=s.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const d=l.events,f=[],h={};let E,g,x=-1,b=n,A=0,L=0;const O=[L];for(;b;){for(;e.get(++a)[1]!==b;);o.push(a),b._tokenizer||(E=s.sliceStream(b),b.next||E.push(null),g&&l.defineSkip(b.start),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(E),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),g=b,b=b.next}for(b=n;++x<d.length;)d[x][0]==="exit"&&d[x-1][0]==="enter"&&d[x][1].type===d[x-1][1].type&&d[x][1].start.line!==d[x][1].end.line&&(L=x+1,O.push(L),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(l.events=[],b?(b._tokenizer=void 0,b.previous=void 0):O.pop(),x=O.length;x--;){const v=d.slice(O[x],O[x+1]),M=o.pop();f.push([M,M+v.length-1]),e.splice(M,2,v)}for(f.reverse(),x=-1;++x<f.length;)h[A+f[x][0]]=A+f[x][1],A+=f[x][1]-f[x][0]-1;return h}const jb={resolve:zb,tokenize:$b},Hb={partial:!0,tokenize:Wb};function zb(e){return o1(e),e}function $b(e,t){let n;return s;function s(d){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(d)}function a(d){return d===null?o(d):ye(d)?e.check(Hb,l,o)(d):(e.consume(d),a)}function o(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function l(d){return e.consume(d),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function Wb(e,t,n){const s=this;return a;function a(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Me(e,o,"linePrefix")}function o(l){if(l===null||ye(l))return n(l);const d=s.events[s.events.length-1];return!s.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(l):e.interrupt(s.parser.constructs.flow,n,t)(l)}}function l1(e,t,n,s,a,o,l,d,f){const h=f||Number.POSITIVE_INFINITY;let E=0;return g;function g(v){return v===60?(e.enter(s),e.enter(a),e.enter(o),e.consume(v),e.exit(o),x):v===null||v===32||v===41||Du(v)?n(v):(e.enter(s),e.enter(l),e.enter(d),e.enter("chunkString",{contentType:"string"}),L(v))}function x(v){return v===62?(e.enter(o),e.consume(v),e.exit(o),e.exit(a),e.exit(s),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),b(v))}function b(v){return v===62?(e.exit("chunkString"),e.exit(d),x(v)):v===null||v===60||ye(v)?n(v):(e.consume(v),v===92?A:b)}function A(v){return v===60||v===62||v===92?(e.consume(v),b):b(v)}function L(v){return!E&&(v===null||v===41||Ve(v))?(e.exit("chunkString"),e.exit(d),e.exit(l),e.exit(s),t(v)):E<h&&v===40?(e.consume(v),E++,L):v===41?(e.consume(v),E--,L):v===null||v===32||v===40||Du(v)?n(v):(e.consume(v),v===92?O:L)}function O(v){return v===40||v===41||v===92?(e.consume(v),L):L(v)}}function c1(e,t,n,s,a,o){const l=this;let d=0,f;return h;function h(b){return e.enter(s),e.enter(a),e.consume(b),e.exit(a),e.enter(o),E}function E(b){return d>999||b===null||b===91||b===93&&!f||b===94&&!d&&"_hiddenFootnoteSupport"in l.parser.constructs?n(b):b===93?(e.exit(o),e.enter(a),e.consume(b),e.exit(a),e.exit(s),t):ye(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),E):(e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===null||b===91||b===93||ye(b)||d++>999?(e.exit("chunkString"),E(b)):(e.consume(b),f||(f=!Fe(b)),b===92?x:g)}function x(b){return b===91||b===92||b===93?(e.consume(b),d++,g):g(b)}}function d1(e,t,n,s,a,o){let l;return d;function d(x){return x===34||x===39||x===40?(e.enter(s),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(s),t):(e.enter(o),h(x))}function h(x){return x===l?(e.exit(o),f(l)):x===null?n(x):ye(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),Me(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),E(x))}function E(x){return x===l||x===null||ye(x)?(e.exit("chunkString"),h(x)):(e.consume(x),x===92?g:E)}function g(x){return x===l||x===92?(e.consume(x),E):E(x)}}function Fs(e,t){let n;return s;function s(a){return ye(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,s):Fe(a)?Me(e,s,n?"linePrefix":"lineSuffix")(a):t(a)}}const Yb={name:"definition",tokenize:qb},Vb={partial:!0,tokenize:Qb};function qb(e,t,n){const s=this;let a;return o;function o(b){return e.enter("definition"),l(b)}function l(b){return c1.call(s,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function d(b){return a=gn(s.sliceSerialize(s.events[s.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 Ve(b)?Fs(e,h)(b):h(b)}function h(b){return l1(e,E,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function E(b){return e.attempt(Vb,g,g)(b)}function g(b){return Fe(b)?Me(e,x,"whitespace")(b):x(b)}function x(b){return b===null||ye(b)?(e.exit("definition"),s.parser.defined.push(a),t(b)):n(b)}}function Qb(e,t,n){return s;function s(d){return Ve(d)?Fs(e,a)(d):n(d)}function a(d){return d1(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function o(d){return Fe(d)?Me(e,l,"whitespace")(d):l(d)}function l(d){return d===null||ye(d)?t(d):n(d)}}const Gb={name:"hardBreakEscape",tokenize:Kb};function Kb(e,t,n){return s;function s(o){return e.enter("hardBreakEscape"),e.consume(o),a}function a(o){return ye(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Xb={name:"headingAtx",resolve:Jb,tokenize:Zb};function Jb(e,t){let n=e.length-2,s=3,a,o;return e[s][1].type==="whitespace"&&(s+=2),n-2>s&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(s===n-1||n-4>s&&e[n-2][1].type==="whitespace")&&(n-=s+1===n?2:4),n>s&&(a={type:"atxHeadingText",start:e[s][1].start,end:e[n][1].end},o={type:"chunkText",start:e[s][1].start,end:e[n][1].end,contentType:"text"},Qt(e,s,n-s+1,[["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t]])),e}function Zb(e,t,n){let s=0;return a;function a(E){return e.enter("atxHeading"),o(E)}function o(E){return e.enter("atxHeadingSequence"),l(E)}function l(E){return E===35&&s++<6?(e.consume(E),l):E===null||Ve(E)?(e.exit("atxHeadingSequence"),d(E)):n(E)}function d(E){return E===35?(e.enter("atxHeadingSequence"),f(E)):E===null||ye(E)?(e.exit("atxHeading"),t(E)):Fe(E)?Me(e,d,"whitespace")(E):(e.enter("atxHeadingText"),h(E))}function f(E){return E===35?(e.consume(E),f):(e.exit("atxHeadingSequence"),d(E))}function h(E){return E===null||E===35||Ve(E)?(e.exit("atxHeadingText"),d(E)):(e.consume(E),h)}}const ek=["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"],tm=["pre","script","style","textarea"],tk={concrete:!0,name:"htmlFlow",resolveTo:ik,tokenize:sk},nk={partial:!0,tokenize:uk},rk={partial:!0,tokenize:ak};function ik(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 sk(e,t,n){const s=this;let a,o,l,d,f;return h;function h(N){return E(N)}function E(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),g}function g(N){return N===33?(e.consume(N),x):N===47?(e.consume(N),o=!0,L):N===63?(e.consume(N),a=3,s.interrupt?t:S):Rt(N)?(e.consume(N),l=String.fromCharCode(N),O):n(N)}function x(N){return N===45?(e.consume(N),a=2,b):N===91?(e.consume(N),a=5,d=0,A):Rt(N)?(e.consume(N),a=4,s.interrupt?t:S):n(N)}function b(N){return N===45?(e.consume(N),s.interrupt?t:S):n(N)}function A(N){const he="CDATA[";return N===he.charCodeAt(d++)?(e.consume(N),d===he.length?s.interrupt?t:re:A):n(N)}function L(N){return Rt(N)?(e.consume(N),l=String.fromCharCode(N),O):n(N)}function O(N){if(N===null||N===47||N===62||Ve(N)){const he=N===47,Ce=l.toLowerCase();return!he&&!o&&tm.includes(Ce)?(a=1,s.interrupt?t(N):re(N)):ek.includes(l.toLowerCase())?(a=6,he?(e.consume(N),v):s.interrupt?t(N):re(N)):(a=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(N):o?M(N):z(N))}return N===45||At(N)?(e.consume(N),l+=String.fromCharCode(N),O):n(N)}function v(N){return N===62?(e.consume(N),s.interrupt?t:re):n(N)}function M(N){return Fe(N)?(e.consume(N),M):U(N)}function z(N){return N===47?(e.consume(N),U):N===58||N===95||Rt(N)?(e.consume(N),J):Fe(N)?(e.consume(N),z):U(N)}function J(N){return N===45||N===46||N===58||N===95||At(N)?(e.consume(N),J):ne(N)}function ne(N){return N===61?(e.consume(N),D):Fe(N)?(e.consume(N),ne):z(N)}function D(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),f=N,Q):Fe(N)?(e.consume(N),D):oe(N)}function Q(N){return N===f?(e.consume(N),f=null,ce):N===null||ye(N)?n(N):(e.consume(N),Q)}function oe(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||Ve(N)?ne(N):(e.consume(N),oe)}function ce(N){return N===47||N===62||Fe(N)?z(N):n(N)}function U(N){return N===62?(e.consume(N),Z):n(N)}function Z(N){return N===null||ye(N)?re(N):Fe(N)?(e.consume(N),Z):n(N)}function re(N){return N===45&&a===2?(e.consume(N),ve):N===60&&a===1?(e.consume(N),Ie):N===62&&a===4?(e.consume(N),F):N===63&&a===3?(e.consume(N),S):N===93&&a===5?(e.consume(N),Ee):ye(N)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(nk,Y,ke)(N)):N===null||ye(N)?(e.exit("htmlFlowData"),ke(N)):(e.consume(N),re)}function ke(N){return e.check(rk,de,Y)(N)}function de(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),ie}function ie(N){return N===null||ye(N)?ke(N):(e.enter("htmlFlowData"),re(N))}function ve(N){return N===45?(e.consume(N),S):re(N)}function Ie(N){return N===47?(e.consume(N),l="",ue):re(N)}function ue(N){if(N===62){const he=l.toLowerCase();return tm.includes(he)?(e.consume(N),F):re(N)}return Rt(N)&&l.length<8?(e.consume(N),l+=String.fromCharCode(N),ue):re(N)}function Ee(N){return N===93?(e.consume(N),S):re(N)}function S(N){return N===62?(e.consume(N),F):N===45&&a===2?(e.consume(N),S):re(N)}function F(N){return N===null||ye(N)?(e.exit("htmlFlowData"),Y(N)):(e.consume(N),F)}function Y(N){return e.exit("htmlFlow"),t(N)}}function ak(e,t,n){const s=this;return a;function a(l){return ye(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return s.parser.lazy[s.now().line]?n(l):t(l)}}function uk(e,t,n){return s;function s(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(na,t,n)}}const ok={name:"htmlText",tokenize:lk};function lk(e,t,n){const s=this;let a,o,l;return d;function d(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),f}function f(S){return S===33?(e.consume(S),h):S===47?(e.consume(S),ne):S===63?(e.consume(S),z):Rt(S)?(e.consume(S),oe):n(S)}function h(S){return S===45?(e.consume(S),E):S===91?(e.consume(S),o=0,A):Rt(S)?(e.consume(S),M):n(S)}function E(S){return S===45?(e.consume(S),b):n(S)}function g(S){return S===null?n(S):S===45?(e.consume(S),x):ye(S)?(l=g,Ie(S)):(e.consume(S),g)}function x(S){return S===45?(e.consume(S),b):g(S)}function b(S){return S===62?ve(S):S===45?x(S):g(S)}function A(S){const F="CDATA[";return S===F.charCodeAt(o++)?(e.consume(S),o===F.length?L:A):n(S)}function L(S){return S===null?n(S):S===93?(e.consume(S),O):ye(S)?(l=L,Ie(S)):(e.consume(S),L)}function O(S){return S===93?(e.consume(S),v):L(S)}function v(S){return S===62?ve(S):S===93?(e.consume(S),v):L(S)}function M(S){return S===null||S===62?ve(S):ye(S)?(l=M,Ie(S)):(e.consume(S),M)}function z(S){return S===null?n(S):S===63?(e.consume(S),J):ye(S)?(l=z,Ie(S)):(e.consume(S),z)}function J(S){return S===62?ve(S):z(S)}function ne(S){return Rt(S)?(e.consume(S),D):n(S)}function D(S){return S===45||At(S)?(e.consume(S),D):Q(S)}function Q(S){return ye(S)?(l=Q,Ie(S)):Fe(S)?(e.consume(S),Q):ve(S)}function oe(S){return S===45||At(S)?(e.consume(S),oe):S===47||S===62||Ve(S)?ce(S):n(S)}function ce(S){return S===47?(e.consume(S),ve):S===58||S===95||Rt(S)?(e.consume(S),U):ye(S)?(l=ce,Ie(S)):Fe(S)?(e.consume(S),ce):ve(S)}function U(S){return S===45||S===46||S===58||S===95||At(S)?(e.consume(S),U):Z(S)}function Z(S){return S===61?(e.consume(S),re):ye(S)?(l=Z,Ie(S)):Fe(S)?(e.consume(S),Z):ce(S)}function re(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),a=S,ke):ye(S)?(l=re,Ie(S)):Fe(S)?(e.consume(S),re):(e.consume(S),de)}function ke(S){return S===a?(e.consume(S),a=void 0,ie):S===null?n(S):ye(S)?(l=ke,Ie(S)):(e.consume(S),ke)}function de(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||Ve(S)?ce(S):(e.consume(S),de)}function ie(S){return S===47||S===62||Ve(S)?ce(S):n(S)}function ve(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function Ie(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),ue}function ue(S){return Fe(S)?Me(e,Ee,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):Ee(S)}function Ee(S){return e.enter("htmlTextData"),l(S)}}const cd={name:"labelEnd",resolveAll:hk,resolveTo:pk,tokenize:mk},ck={tokenize:gk},dk={tokenize:Ek},fk={tokenize:Tk};function hk(e){let t=-1;const n=[];for(;++t<e.length;){const s=e[t][1];if(n.push(e[t]),s.type==="labelImage"||s.type==="labelLink"||s.type==="labelEnd"){const a=s.type==="labelImage"?4:2;s.type="data",t+=a}}return e.length!==n.length&&Qt(e,0,e.length,n),e}function pk(e,t){let n=e.length,s=0,a,o,l,d;for(;n--;)if(a=e[n][1],o){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&&(o=n,a.type!=="labelLink")){s=2;break}}else a.type==="labelEnd"&&(l=n);const f={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},E={type:"labelText",start:{...e[o+s+2][1].end},end:{...e[l-2][1].start}};return d=[["enter",f,t],["enter",h,t]],d=rn(d,e.slice(o+1,o+s+3)),d=rn(d,[["enter",E,t]]),d=rn(d,Qu(t.parser.constructs.insideSpan.null,e.slice(o+s+4,l-3),t)),d=rn(d,[["exit",E,t],e[l-2],e[l-1],["exit",h,t]]),d=rn(d,e.slice(l+1)),d=rn(d,[["exit",f,t]]),Qt(e,o,e.length,d),e}function mk(e,t,n){const s=this;let a=s.events.length,o,l;for(;a--;)if((s.events[a][1].type==="labelImage"||s.events[a][1].type==="labelLink")&&!s.events[a][1]._balanced){o=s.events[a][1];break}return d;function d(x){return o?o._inactive?g(x):(l=s.parser.defined.includes(gn(s.sliceSerialize({start:o.end,end:s.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(ck,E,l?E:g)(x):x===91?e.attempt(dk,E,l?h:g)(x):l?E(x):g(x)}function h(x){return e.attempt(fk,E,g)(x)}function E(x){return t(x)}function g(x){return o._balanced=!0,n(x)}}function gk(e,t,n){return s;function s(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),a}function a(g){return Ve(g)?Fs(e,o)(g):o(g)}function o(g){return g===41?E(g):l1(e,l,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function l(g){return Ve(g)?Fs(e,f)(g):E(g)}function d(g){return n(g)}function f(g){return g===34||g===39||g===40?d1(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):E(g)}function h(g){return Ve(g)?Fs(e,E)(g):E(g)}function E(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):n(g)}}function Ek(e,t,n){const s=this;return a;function a(d){return c1.call(s,e,o,l,"reference","referenceMarker","referenceString")(d)}function o(d){return s.parser.defined.includes(gn(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function l(d){return n(d)}}function Tk(e,t,n){return s;function s(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),a}function a(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const yk={name:"labelStartImage",resolveAll:cd.resolveAll,tokenize:xk};function xk(e,t,n){const s=this;return a;function a(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),o}function o(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),l):n(d)}function l(d){return d===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(d):t(d)}}const bk={name:"labelStartLink",resolveAll:cd.resolveAll,tokenize:kk};function kk(e,t,n){const s=this;return a;function a(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(l):t(l)}}const ic={name:"lineEnding",tokenize:Sk};function Sk(e,t){return n;function n(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Me(e,t,"linePrefix")}}const wu={name:"thematicBreak",tokenize:_k};function _k(e,t,n){let s=0,a;return o;function o(h){return e.enter("thematicBreak"),l(h)}function l(h){return a=h,d(h)}function d(h){return h===a?(e.enter("thematicBreakSequence"),f(h)):s>=3&&(h===null||ye(h))?(e.exit("thematicBreak"),t(h)):n(h)}function f(h){return h===a?(e.consume(h),s++,f):(e.exit("thematicBreakSequence"),Fe(h)?Me(e,d,"whitespace")(h):d(h))}}const jt={continuation:{tokenize:vk},exit:Ik,name:"list",tokenize:Ak},Ck={partial:!0,tokenize:Lk},Nk={partial:!0,tokenize:wk};function Ak(e,t,n){const s=this,a=s.events[s.events.length-1];let o=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,l=0;return d;function d(b){const A=s.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(A==="listUnordered"?!s.containerState.marker||b===s.containerState.marker:vc(b)){if(s.containerState.type||(s.containerState.type=A,e.enter(A,{_container:!0})),A==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(wu,n,h)(b):h(b);if(!s.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(b)}return n(b)}function f(b){return vc(b)&&++l<10?(e.consume(b),f):(!s.interrupt||l<2)&&(s.containerState.marker?b===s.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),h(b)):n(b)}function h(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||b,e.check(na,s.interrupt?n:E,e.attempt(Ck,x,g))}function E(b){return s.containerState.initialBlankLine=!0,o++,x(b)}function g(b){return Fe(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),x):n(b)}function x(b){return s.containerState.size=o+s.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function vk(e,t,n){const s=this;return s.containerState._closeFlow=void 0,e.check(na,a,o);function a(d){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,Me(e,t,"listItemIndent",s.containerState.size+1)(d)}function o(d){return s.containerState.furtherBlankLines||!Fe(d)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,l(d)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,e.attempt(Nk,t,l)(d))}function l(d){return s.containerState._closeFlow=!0,s.interrupt=void 0,Me(e,e.attempt(jt,t,n),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function wk(e,t,n){const s=this;return Me(e,a,"listItemIndent",s.containerState.size+1);function a(o){const l=s.events[s.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===s.containerState.size?t(o):n(o)}}function Ik(e){e.exit(this.containerState.type)}function Lk(e,t,n){const s=this;return Me(e,a,"listItemPrefixWhitespace",s.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(o){const l=s.events[s.events.length-1];return!Fe(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const nm={name:"setextUnderline",resolveTo:Rk,tokenize:Ok};function Rk(e,t){let n=e.length,s,a,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){s=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[s][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",o?(e.splice(a,0,["enter",l,t]),e.splice(o+1,0,["exit",e[s][1],t]),e[s][1].end={...e[o][1].end}):e[s][1]=l,e.push(["exit",l,t]),e}function Ok(e,t,n){const s=this;let a;return o;function o(h){let E=s.events.length,g;for(;E--;)if(s.events[E][1].type!=="lineEnding"&&s.events[E][1].type!=="linePrefix"&&s.events[E][1].type!=="content"){g=s.events[E][1].type==="paragraph";break}return!s.parser.lazy[s.now().line]&&(s.interrupt||g)?(e.enter("setextHeadingLine"),a=h,l(h)):n(h)}function l(h){return e.enter("setextHeadingLineSequence"),d(h)}function d(h){return h===a?(e.consume(h),d):(e.exit("setextHeadingLineSequence"),Fe(h)?Me(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||ye(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const Dk={tokenize:Pk};function Pk(e){const t=this,n=e.attempt(na,s,e.attempt(this.parser.constructs.flowInitial,a,Me(e,e.attempt(this.parser.constructs.flow,a,e.attempt(jb,a)),"linePrefix")));return n;function s(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Mk={resolveAll:h1()},Fk=f1("string"),Bk=f1("text");function f1(e){return{resolveAll:h1(e==="text"?Uk:void 0),tokenize:t};function t(n){const s=this,a=this.parser.constructs[e],o=n.attempt(a,l,d);return l;function l(E){return h(E)?o(E):d(E)}function d(E){if(E===null){n.consume(E);return}return n.enter("data"),n.consume(E),f}function f(E){return h(E)?(n.exit("data"),o(E)):(n.consume(E),f)}function h(E){if(E===null)return!0;const g=a[E];let x=-1;if(g)for(;++x<g.length;){const b=g[x];if(!b.previous||b.previous.call(s,s.previous))return!0}return!1}}}function h1(e){return t;function t(n,s){let a=-1,o;for(;++a<=n.length;)o===void 0?n[a]&&n[a][1].type==="data"&&(o=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==o+2&&(n[o][1].end=n[a-1][1].end,n.splice(o+2,a-o-2),a=o+2),o=void 0);return e?e(n,s):n}}function Uk(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 s=e[n-1][1],a=t.sliceStream(s);let o=a.length,l=-1,d=0,f;for(;o--;){const h=a[o];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)d++,l--;if(l)break;l=-1}else if(h===-2)f=!0,d++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const h={type:n===e.length||f||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:s.start._bufferIndex+l,_index:s.start._index+o,line:s.end.line,column:s.end.column-d,offset:s.end.offset-d},end:{...s.end}};s.end={...h.start},s.start.offset===s.end.offset?Object.assign(s,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const jk={42:jt,43:jt,45:jt,48:jt,49:jt,50:jt,51:jt,52:jt,53:jt,54:jt,55:jt,56:jt,57:jt,62:s1},Hk={91:Yb},zk={[-2]:rc,[-1]:rc,32:rc},$k={35:Xb,42:wu,45:[nm,wu],60:tk,61:nm,95:wu,96:em,126:em},Wk={38:u1,92:a1},Yk={[-5]:ic,[-4]:ic,[-3]:ic,33:yk,38:u1,42:wc,60:[bb,ok],91:bk,92:[Gb,a1],93:cd,95:wc,96:Db},Vk={null:[wc,Mk]},qk={null:[42,95]},Qk={null:[]},Gk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:qk,contentInitial:Hk,disable:Qk,document:jk,flow:$k,flowInitial:zk,insideSpan:Vk,string:Wk,text:Yk},Symbol.toStringTag,{value:"Module"}));function Kk(e,t,n){let s={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},o=[];let l=[],d=[];const f={attempt:Q(ne),check:Q(D),consume:M,enter:z,exit:J,interrupt:Q(D,{interrupt:!0})},h={code:null,containerState:{},defineSkip:L,events:[],now:A,parser:e,previous:null,sliceSerialize:x,sliceStream:b,write:g};let E=t.tokenize.call(h,f);return t.resolveAll&&o.push(t),h;function g(Z){return l=rn(l,Z),O(),l[l.length-1]!==null?[]:(oe(t,0),h.events=Qu(o,h.events,h),h.events)}function x(Z,re){return Jk(b(Z),re)}function b(Z){return Xk(l,Z)}function A(){const{_bufferIndex:Z,_index:re,line:ke,column:de,offset:ie}=s;return{_bufferIndex:Z,_index:re,line:ke,column:de,offset:ie}}function L(Z){a[Z.line]=Z.column,U()}function O(){let Z;for(;s._index<l.length;){const re=l[s._index];if(typeof re=="string")for(Z=s._index,s._bufferIndex<0&&(s._bufferIndex=0);s._index===Z&&s._bufferIndex<re.length;)v(re.charCodeAt(s._bufferIndex));else v(re)}}function v(Z){E=E(Z)}function M(Z){ye(Z)?(s.line++,s.column=1,s.offset+=Z===-3?2:1,U()):Z!==-1&&(s.column++,s.offset++),s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===l[s._index].length&&(s._bufferIndex=-1,s._index++)),h.previous=Z}function z(Z,re){const ke=re||{};return ke.type=Z,ke.start=A(),h.events.push(["enter",ke,h]),d.push(ke),ke}function J(Z){const re=d.pop();return re.end=A(),h.events.push(["exit",re,h]),re}function ne(Z,re){oe(Z,re.from)}function D(Z,re){re.restore()}function Q(Z,re){return ke;function ke(de,ie,ve){let Ie,ue,Ee,S;return Array.isArray(de)?Y(de):"tokenize"in de?Y([de]):F(de);function F(xe){return Be;function Be(Re){const ze=Re!==null&&xe[Re],at=Re!==null&&xe.null,Rn=[...Array.isArray(ze)?ze:ze?[ze]:[],...Array.isArray(at)?at:at?[at]:[]];return Y(Rn)(Re)}}function Y(xe){return Ie=xe,ue=0,xe.length===0?ve:N(xe[ue])}function N(xe){return Be;function Be(Re){return S=ce(),Ee=xe,xe.partial||(h.currentConstruct=xe),xe.name&&h.parser.constructs.disable.null.includes(xe.name)?Ce():xe.tokenize.call(re?Object.assign(Object.create(h),re):h,f,he,Ce)(Re)}}function he(xe){return Z(Ee,S),ie}function Ce(xe){return S.restore(),++ue<Ie.length?N(Ie[ue]):ve}}}function oe(Z,re){Z.resolveAll&&!o.includes(Z)&&o.push(Z),Z.resolve&&Qt(h.events,re,h.events.length-re,Z.resolve(h.events.slice(re),h)),Z.resolveTo&&(h.events=Z.resolveTo(h.events,h))}function ce(){const Z=A(),re=h.previous,ke=h.currentConstruct,de=h.events.length,ie=Array.from(d);return{from:de,restore:ve};function ve(){s=Z,h.previous=re,h.currentConstruct=ke,h.events.length=de,d=ie,U()}}function U(){s.line in a&&s.column<2&&(s.column=a[s.line],s.offset+=a[s.line]-1)}}function Xk(e,t){const n=t.start._index,s=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;let l;if(n===a)l=[e[n].slice(s,o)];else{if(l=e.slice(n,a),s>-1){const d=l[0];typeof d=="string"?l[0]=d.slice(s):l.shift()}o>0&&l.push(e[a].slice(0,o))}return l}function Jk(e,t){let n=-1;const s=[];let a;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){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(o)}a=o===-2,s.push(l)}return s.join("")}function Zk(e){const s={constructs:r1([Gk,...(e||{}).extensions||[]]),content:a(pb),defined:[],document:a(gb),flow:a(Dk),lazy:{},string:a(Fk),text:a(Bk)};return s;function a(o){return l;function l(d){return Kk(s,o,d)}}}function eS(e){for(;!o1(e););return e}const rm=/[\0\t\n\r]/g;function tS(){let e=1,t="",n=!0,s;return a;function a(o,l,d){const f=[];let h,E,g,x,b;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),g=0,t="",n&&(o.charCodeAt(0)===65279&&g++,n=void 0);g<o.length;){if(rm.lastIndex=g,h=rm.exec(o),x=h&&h.index!==void 0?h.index:o.length,b=o.charCodeAt(x),!h){t=o.slice(g);break}if(b===10&&g===x&&s)f.push(-3),s=void 0;else switch(s&&(f.push(-5),s=void 0),g<x&&(f.push(o.slice(g,x)),e+=x-g),b){case 0:{f.push(65533),e++;break}case 9:{for(E=Math.ceil(e/4)*4,f.push(-2);e++<E;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:s=!0,e=1}g=x+1}return d&&(s&&f.push(-5),t&&f.push(t),f.push(null)),f}}const nS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function rS(e){return e.replace(nS,iS)}function iS(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),o=a===120||a===88;return i1(n.slice(o?2:1),o?16:10)}return ld(n)||e}const p1={}.hasOwnProperty;function sS(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),aS(n)(eS(Zk(n).document().write(tS()(e,t,!0))))}function aS(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ei),autolinkProtocol:ce,autolinkEmail:ce,atxHeading:o(Ui),blockQuote:o(at),characterEscape:ce,characterReference:ce,codeFenced:o(Rn),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(Rn,l),codeText:o(ua,l),codeTextData:ce,data:ce,codeFlowValue:ce,definition:o(Jr),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Bi),hardBreakEscape:o(ji),hardBreakTrailing:o(ji),htmlFlow:o(Zr,l),htmlFlowData:ce,htmlText:o(Zr,l),htmlTextData:ce,image:o(oa),label:l,link:o(ei),listItem:o(Vn),listItemValue:x,listOrdered:o(Yn,g),listUnordered:o(Yn),paragraph:o(Hi),reference:N,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(Ui),strong:o(la),thematicBreak:o(da)},exit:{atxHeading:f(),atxHeadingSequence:ne,autolink:f(),autolinkEmail:ze,autolinkProtocol:Re,blockQuote:f(),characterEscapeValue:U,characterReferenceMarkerHexadecimal:Ce,characterReferenceMarkerNumeric:Ce,characterReferenceValue:xe,characterReference:Be,codeFenced:f(O),codeFencedFence:L,codeFencedFenceInfo:b,codeFencedFenceMeta:A,codeFlowValue:U,codeIndented:f(v),codeText:f(ie),codeTextData:U,data:U,definition:f(),definitionDestinationString:J,definitionLabelString:M,definitionTitleString:z,emphasis:f(),hardBreakEscape:f(re),hardBreakTrailing:f(re),htmlFlow:f(ke),htmlFlowData:U,htmlText:f(de),htmlTextData:U,image:f(Ie),label:Ee,labelText:ue,lineEnding:Z,link:f(ve),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:he,resourceDestinationString:S,resourceTitleString:F,resource:Y,setextHeading:f(oe),setextHeadingLineSequence:Q,setextHeadingText:D,strong:f(),thematicBreak:f()}};m1(t,(e||{}).mdastExtensions||[]);const n={};return s;function s(q){let le={type:"root",children:[]};const Ne={stack:[le],tokenStack:[],config:t,enter:d,exit:h,buffer:l,resume:E,data:n},Oe=[];let Ue=-1;for(;++Ue<q.length;)if(q[Ue][1].type==="listOrdered"||q[Ue][1].type==="listUnordered")if(q[Ue][0]==="enter")Oe.push(Ue);else{const Et=Oe.pop();Ue=a(q,Et,Ue)}for(Ue=-1;++Ue<q.length;){const Et=t[q[Ue][0]];p1.call(Et,q[Ue][1].type)&&Et[q[Ue][1].type].call(Object.assign({sliceSerialize:q[Ue][2].sliceSerialize},Ne),q[Ue][1])}if(Ne.tokenStack.length>0){const Et=Ne.tokenStack[Ne.tokenStack.length-1];(Et[1]||im).call(Ne,void 0,Et[0])}for(le.position={start:hr(q.length>0?q[0][1].start:{line:1,column:1,offset:0}),end:hr(q.length>0?q[q.length-2][1].end:{line:1,column:1,offset:0})},Ue=-1;++Ue<t.transforms.length;)le=t.transforms[Ue](le)||le;return le}function a(q,le,Ne){let Oe=le-1,Ue=-1,Et=!1,On,Kt,qn,Sr;for(;++Oe<=Ne;){const Tt=q[Oe];switch(Tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Tt[0]==="enter"?Ue++:Ue--,Sr=void 0;break}case"lineEndingBlank":{Tt[0]==="enter"&&(On&&!Sr&&!Ue&&!qn&&(qn=Oe),Sr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Sr=void 0}if(!Ue&&Tt[0]==="enter"&&Tt[1].type==="listItemPrefix"||Ue===-1&&Tt[0]==="exit"&&(Tt[1].type==="listUnordered"||Tt[1].type==="listOrdered")){if(On){let bn=Oe;for(Kt=void 0;bn--;){const zt=q[bn];if(zt[1].type==="lineEnding"||zt[1].type==="lineEndingBlank"){if(zt[0]==="exit")continue;Kt&&(q[Kt][1].type="lineEndingBlank",Et=!0),zt[1].type="lineEnding",Kt=bn}else if(!(zt[1].type==="linePrefix"||zt[1].type==="blockQuotePrefix"||zt[1].type==="blockQuotePrefixWhitespace"||zt[1].type==="blockQuoteMarker"||zt[1].type==="listItemIndent"))break}qn&&(!Kt||qn<Kt)&&(On._spread=!0),On.end=Object.assign({},Kt?q[Kt][1].start:Tt[1].end),q.splice(Kt||Oe,0,["exit",On,Tt[2]]),Oe++,Ne++}if(Tt[1].type==="listItemPrefix"){const bn={type:"listItem",_spread:!1,start:Object.assign({},Tt[1].start),end:void 0};On=bn,q.splice(Oe,0,["enter",bn,Tt[2]]),Oe++,Ne++,qn=void 0,Sr=!0}}}return q[le][1]._spread=Et,Ne}function o(q,le){return Ne;function Ne(Oe){d.call(this,q(Oe),Oe),le&&le.call(this,Oe)}}function l(){this.stack.push({type:"fragment",children:[]})}function d(q,le,Ne){this.stack[this.stack.length-1].children.push(q),this.stack.push(q),this.tokenStack.push([le,Ne||void 0]),q.position={start:hr(le.start),end:void 0}}function f(q){return le;function le(Ne){q&&q.call(this,Ne),h.call(this,Ne)}}function h(q,le){const Ne=this.stack.pop(),Oe=this.tokenStack.pop();if(Oe)Oe[0].type!==q.type&&(le?le.call(this,q,Oe[0]):(Oe[1]||im).call(this,q,Oe[0]));else throw new Error("Cannot close `"+q.type+"` ("+Ms({start:q.start,end:q.end})+"): it’s not open");Ne.position.end=hr(q.end)}function E(){return od(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function x(q){if(this.data.expectingFirstListItemValue){const le=this.stack[this.stack.length-2];le.start=Number.parseInt(this.sliceSerialize(q),10),this.data.expectingFirstListItemValue=void 0}}function b(){const q=this.resume(),le=this.stack[this.stack.length-1];le.lang=q}function A(){const q=this.resume(),le=this.stack[this.stack.length-1];le.meta=q}function L(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function O(){const q=this.resume(),le=this.stack[this.stack.length-1];le.value=q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const q=this.resume(),le=this.stack[this.stack.length-1];le.value=q.replace(/(\r?\n|\r)$/g,"")}function M(q){const le=this.resume(),Ne=this.stack[this.stack.length-1];Ne.label=le,Ne.identifier=gn(this.sliceSerialize(q)).toLowerCase()}function z(){const q=this.resume(),le=this.stack[this.stack.length-1];le.title=q}function J(){const q=this.resume(),le=this.stack[this.stack.length-1];le.url=q}function ne(q){const le=this.stack[this.stack.length-1];if(!le.depth){const Ne=this.sliceSerialize(q).length;le.depth=Ne}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function Q(q){const le=this.stack[this.stack.length-1];le.depth=this.sliceSerialize(q).codePointAt(0)===61?1:2}function oe(){this.data.setextHeadingSlurpLineEnding=void 0}function ce(q){const Ne=this.stack[this.stack.length-1].children;let Oe=Ne[Ne.length-1];(!Oe||Oe.type!=="text")&&(Oe=ca(),Oe.position={start:hr(q.start),end:void 0},Ne.push(Oe)),this.stack.push(Oe)}function U(q){const le=this.stack.pop();le.value+=this.sliceSerialize(q),le.position.end=hr(q.end)}function Z(q){const le=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ne=le.children[le.children.length-1];Ne.position.end=hr(q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(le.type)&&(ce.call(this,q),U.call(this,q))}function re(){this.data.atHardBreak=!0}function ke(){const q=this.resume(),le=this.stack[this.stack.length-1];le.value=q}function de(){const q=this.resume(),le=this.stack[this.stack.length-1];le.value=q}function ie(){const q=this.resume(),le=this.stack[this.stack.length-1];le.value=q}function ve(){const q=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=le,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function Ie(){const q=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=le,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function ue(q){const le=this.sliceSerialize(q),Ne=this.stack[this.stack.length-2];Ne.label=rS(le),Ne.identifier=gn(le).toLowerCase()}function Ee(){const q=this.stack[this.stack.length-1],le=this.resume(),Ne=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ne.type==="link"){const Oe=q.children;Ne.children=Oe}else Ne.alt=le}function S(){const q=this.resume(),le=this.stack[this.stack.length-1];le.url=q}function F(){const q=this.resume(),le=this.stack[this.stack.length-1];le.title=q}function Y(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function he(q){const le=this.resume(),Ne=this.stack[this.stack.length-1];Ne.label=le,Ne.identifier=gn(this.sliceSerialize(q)).toLowerCase(),this.data.referenceType="full"}function Ce(q){this.data.characterReferenceType=q.type}function xe(q){const le=this.sliceSerialize(q),Ne=this.data.characterReferenceType;let Oe;Ne?(Oe=i1(le,Ne==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Oe=ld(le);const Ue=this.stack[this.stack.length-1];Ue.value+=Oe}function Be(q){const le=this.stack.pop();le.position.end=hr(q.end)}function Re(q){U.call(this,q);const le=this.stack[this.stack.length-1];le.url=this.sliceSerialize(q)}function ze(q){U.call(this,q);const le=this.stack[this.stack.length-1];le.url="mailto:"+this.sliceSerialize(q)}function at(){return{type:"blockquote",children:[]}}function Rn(){return{type:"code",lang:null,meta:null,value:""}}function ua(){return{type:"inlineCode",value:""}}function Jr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Bi(){return{type:"emphasis",children:[]}}function Ui(){return{type:"heading",depth:0,children:[]}}function ji(){return{type:"break"}}function Zr(){return{type:"html",value:""}}function oa(){return{type:"image",title:null,url:"",alt:null}}function ei(){return{type:"link",title:null,url:"",children:[]}}function Yn(q){return{type:"list",ordered:q.type==="listOrdered",start:null,spread:q._spread,children:[]}}function Vn(q){return{type:"listItem",spread:q._spread,checked:null,children:[]}}function Hi(){return{type:"paragraph",children:[]}}function la(){return{type:"strong",children:[]}}function ca(){return{type:"text",value:""}}function da(){return{type:"thematicBreak"}}}function hr(e){return{line:e.line,column:e.column,offset:e.offset}}function m1(e,t){let n=-1;for(;++n<t.length;){const s=t[n];Array.isArray(s)?m1(e,s):uS(e,s)}}function uS(e,t){let n;for(n in t)if(p1.call(t,n))switch(n){case"canContainEols":{const s=t[n];s&&e[n].push(...s);break}case"transforms":{const s=t[n];s&&e[n].push(...s);break}case"enter":case"exit":{const s=t[n];s&&Object.assign(e[n],s);break}}}function im(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ms({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ms({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ms({start:t.start,end:t.end})+") is still open")}function oS(e){const t=this;t.parser=n;function n(s){return sS(s,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function lS(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 cS(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
61
|
+
`}]}function dS(e,t){const n=t.value?t.value+`
|
|
62
|
+
`:"",s={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(s.className=["language-"+a[0]]);let o={type:"element",tagName:"code",properties:s,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function fS(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hS(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pS(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",s=String(t.identifier).toUpperCase(),a=Di(s.toLowerCase()),o=e.footnoteOrder.indexOf(s);let l,d=e.footnoteCounts.get(s);d===void 0?(d=0,e.footnoteOrder.push(s),l=e.footnoteOrder.length):l=o+1,d+=1,e.footnoteCounts.set(s,d);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,f);const h={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,h),e.applyData(t,h)}function mS(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 gS(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function g1(e,t){const n=t.referenceType;let s="]";if(n==="collapsed"?s+="[]":n==="full"&&(s+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+s}];const a=e.all(t),o=a[0];o&&o.type==="text"?o.value="["+o.value:a.unshift({type:"text",value:"["});const l=a[a.length-1];return l&&l.type==="text"?l.value+=s:a.push({type:"text",value:s}),a}function ES(e,t){const n=String(t.identifier).toUpperCase(),s=e.definitionById.get(n);if(!s)return g1(e,t);const a={src:Di(s.url||""),alt:t.alt};s.title!==null&&s.title!==void 0&&(a.title=s.title);const o={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,o),e.applyData(t,o)}function TS(e,t){const n={src:Di(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 s={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,s),e.applyData(t,s)}function yS(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const s={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,s),e.applyData(t,s)}function xS(e,t){const n=String(t.identifier).toUpperCase(),s=e.definitionById.get(n);if(!s)return g1(e,t);const a={href:Di(s.url||"")};s.title!==null&&s.title!==void 0&&(a.title=s.title);const o={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function bS(e,t){const n={href:Di(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const s={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function kS(e,t,n){const s=e.all(t),a=n?SS(n):E1(t),o={},l=[];if(typeof t.checked=="boolean"){const E=s[0];let g;E&&E.type==="element"&&E.tagName==="p"?g=E:(g={type:"element",tagName:"p",properties:{},children:[]},s.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let d=-1;for(;++d<s.length;){const E=s[d];(a||d!==0||E.type!=="element"||E.tagName!=="p")&&l.push({type:"text",value:`
|
|
63
|
+
`}),E.type==="element"&&E.tagName==="p"&&!a?l.push(...E.children):l.push(E)}const f=s[s.length-1];f&&(a||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
|
|
64
|
+
`});const h={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,h),e.applyData(t,h)}function SS(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let s=-1;for(;!t&&++s<n.length;)t=E1(n[s])}return t}function E1(e){const t=e.spread;return t??e.children.length>1}function _S(e,t){const n={},s=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<s.length;){const l=s[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 o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(s,!0)};return e.patch(t,o),e.applyData(t,o)}function CS(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function NS(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function AS(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vS(e,t){const n=e.all(t),s=n.shift(),a=[];if(s){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([s],!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)},d=In(t.children[1]),f=Vu(t.children[t.children.length-1]);d&&f&&(l.position={start:d,end:f}),a.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)}function wS(e,t,n){const s=n?n.children:void 0,o=(s?s.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,d=l?l.length:t.children.length;let f=-1;const h=[];for(;++f<d;){const g=t.children[f],x={},b=l?l[f]:void 0;b&&(x.align=b);let A={type:"element",tagName:o,properties:x,children:[]};g&&(A.children=e.all(g),e.patch(g,A),A=e.applyData(g,A)),h.push(A)}const E={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,E),e.applyData(t,E)}function IS(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const sm=9,am=32;function LS(e){const t=String(e),n=/\r?\n|\r/g;let s=n.exec(t),a=0;const o=[];for(;s;)o.push(um(t.slice(a,s.index),a>0,!0),s[0]),a=s.index+s[0].length,s=n.exec(t);return o.push(um(t.slice(a),a>0,!1)),o.join("")}function um(e,t,n){let s=0,a=e.length;if(t){let o=e.codePointAt(s);for(;o===sm||o===am;)s++,o=e.codePointAt(s)}if(n){let o=e.codePointAt(a-1);for(;o===sm||o===am;)a--,o=e.codePointAt(a-1)}return a>s?e.slice(s,a):""}function RS(e,t){const n={type:"text",value:LS(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function OS(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const DS={blockquote:lS,break:cS,code:dS,delete:fS,emphasis:hS,footnoteReference:pS,heading:mS,html:gS,imageReference:ES,image:TS,inlineCode:yS,linkReference:xS,link:bS,listItem:kS,list:_S,paragraph:CS,root:NS,strong:AS,table:vS,tableCell:IS,tableRow:wS,text:RS,thematicBreak:OS,toml:bu,yaml:bu,definition:bu,footnoteDefinition:bu};function bu(){}const T1=-1,Gu=0,Bs=1,Pu=2,dd=3,fd=4,hd=5,pd=6,y1=7,x1=8,PS=typeof self=="object"?self:globalThis,om=(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 PS[e](t)},MS=(e,t)=>{const n=(a,o)=>(e.set(o,a),a),s=a=>{if(e.has(a))return e.get(a);const[o,l]=t[a];switch(o){case Gu:case T1:return n(l,a);case Bs:{const d=n([],a);for(const f of l)d.push(s(f));return d}case Pu:{const d=n({},a);for(const[f,h]of l)d[s(f)]=s(h);return d}case dd:return n(new Date(l),a);case fd:{const{source:d,flags:f}=l;return n(new RegExp(d,f),a)}case hd:{const d=n(new Map,a);for(const[f,h]of l)d.set(s(f),s(h));return d}case pd:{const d=n(new Set,a);for(const f of l)d.add(s(f));return d}case y1:{const{name:d,message:f}=l;return n(om(d,f),a)}case x1: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:d}=new Uint8Array(l);return n(new DataView(d),l)}}return n(om(o,l),a)};return s},lm=e=>MS(new Map,e)(0),Hr="",{toString:FS}={},{keys:BS}=Object,Is=e=>{const t=typeof e;if(t!=="object"||!e)return[Gu,t];const n=FS.call(e).slice(8,-1);switch(n){case"Array":return[Bs,Hr];case"Object":return[Pu,Hr];case"Date":return[dd,Hr];case"RegExp":return[fd,Hr];case"Map":return[hd,Hr];case"Set":return[pd,Hr];case"DataView":return[Bs,n]}return n.includes("Array")?[Bs,n]:n.includes("Error")?[y1,n]:[Pu,n]},ku=([e,t])=>e===Gu&&(t==="function"||t==="symbol"),US=(e,t,n,s)=>{const a=(l,d)=>{const f=s.push(l)-1;return n.set(d,f),f},o=l=>{if(n.has(l))return n.get(l);let[d,f]=Is(l);switch(d){case Gu:{let E=l;switch(f){case"bigint":d=x1,E=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);E=null;break;case"undefined":return a([T1],l)}return a([d,E],l)}case Bs:{if(f){let x=l;return f==="DataView"?x=new Uint8Array(l.buffer):f==="ArrayBuffer"&&(x=new Uint8Array(l)),a([f,[...x]],l)}const E=[],g=a([d,E],l);for(const x of l)E.push(o(x));return g}case Pu:{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 o(l.toJSON());const E=[],g=a([d,E],l);for(const x of BS(l))(e||!ku(Is(l[x])))&&E.push([o(x),o(l[x])]);return g}case dd:return a([d,isNaN(l.getTime())?Hr:l.toISOString()],l);case fd:{const{source:E,flags:g}=l;return a([d,{source:E,flags:g}],l)}case hd:{const E=[],g=a([d,E],l);for(const[x,b]of l)(e||!(ku(Is(x))||ku(Is(b))))&&E.push([o(x),o(b)]);return g}case pd:{const E=[],g=a([d,E],l);for(const x of l)(e||!ku(Is(x)))&&E.push(o(x));return g}}const{message:h}=l;return a([d,{name:f,message:h}],l)};return o},cm=(e,{json:t,lossy:n}={})=>{const s=[];return US(!(t||n),!!t,new Map,s)(e),s},Vr=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?lm(cm(e,t)):structuredClone(e):(e,t)=>lm(cm(e,t));function jS(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 HS(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function zS(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||jS,s=e.options.footnoteBackLabel||HS,a=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let f=-1;for(;++f<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[f]);if(!h)continue;const E=e.all(h),g=String(h.identifier).toUpperCase(),x=Di(g.toLowerCase());let b=0;const A=[],L=e.footnoteCounts.get(g);for(;L!==void 0&&++b<=L;){A.length>0&&A.push({type:"text",value:" "});let M=typeof n=="string"?n:n(f,b);typeof M=="string"&&(M={type:"text",value:M}),A.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof s=="string"?s:s(f,b),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const O=E[E.length-1];if(O&&O.type==="element"&&O.tagName==="p"){const M=O.children[O.children.length-1];M&&M.type==="text"?M.value+=" ":O.children.push({type:"text",value:" "}),O.children.push(...A)}else E.push(...A);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(E,!0)};e.patch(h,v),d.push(v)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Vr(l),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
|
|
65
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
|
|
66
|
+
`}]}}const Ku=(function(e){if(e==null)return VS;if(typeof e=="function")return Xu(e);if(typeof e=="object")return Array.isArray(e)?$S(e):WS(e);if(typeof e=="string")return YS(e);throw new Error("Expected function, string, or object as test")});function $S(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ku(e[n]);return Xu(s);function s(...a){let o=-1;for(;++o<t.length;)if(t[o].apply(this,a))return!0;return!1}}function WS(e){const t=e;return Xu(n);function n(s){const a=s;let o;for(o in e)if(a[o]!==t[o])return!1;return!0}}function YS(e){return Xu(t);function t(n){return n&&n.type===e}}function Xu(e){return t;function t(n,s,a){return!!(qS(n)&&e.call(this,n,typeof s=="number"?s:void 0,a||void 0))}}function VS(){return!0}function qS(e){return e!==null&&typeof e=="object"&&"type"in e}const b1=[],QS=!0,Ic=!1,GS="skip";function k1(e,t,n,s){let a;typeof t=="function"&&typeof n!="function"?(s=n,n=t):a=t;const o=Ku(a),l=s?-1:1;d(e,void 0,[])();function d(f,h,E){const g=f&&typeof f=="object"?f:{};if(typeof g.type=="string"){const b=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(f.type+(b?"<"+b+">":""))+")"})}return x;function x(){let b=b1,A,L,O;if((!t||o(f,h,E[E.length-1]||void 0))&&(b=KS(n(f,E)),b[0]===Ic))return b;if("children"in f&&f.children){const v=f;if(v.children&&b[0]!==GS)for(L=(s?v.children.length:-1)+l,O=E.concat(v);L>-1&&L<v.children.length;){const M=v.children[L];if(A=d(M,L,O)(),A[0]===Ic)return A;L=typeof A[1]=="number"?A[1]:L+l}}return b}}}function KS(e){return Array.isArray(e)?e:typeof e=="number"?[QS,e]:e==null?b1:[e]}function Ju(e,t,n,s){let a,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,a=n):(o=t,l=n,a=s),k1(e,o,d,a);function d(f,h){const E=h[h.length-1],g=E?E.children.indexOf(f):void 0;return l(f,g,E)}}const Lc={}.hasOwnProperty,XS={};function JS(e,t){const n=t||XS,s=new Map,a=new Map,o=new Map,l={...DS,...n.handlers},d={all:h,applyData:e_,definitionById:s,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:l,one:f,options:n,patch:ZS,wrap:n_};return Ju(e,function(E){if(E.type==="definition"||E.type==="footnoteDefinition"){const g=E.type==="definition"?s:a,x=String(E.identifier).toUpperCase();g.has(x)||g.set(x,E)}}),d;function f(E,g){const x=E.type,b=d.handlers[x];if(Lc.call(d.handlers,x)&&b)return b(d,E,g);if(d.options.passThrough&&d.options.passThrough.includes(x)){if("children"in E){const{children:L,...O}=E,v=Vr(O);return v.children=d.all(E),v}return Vr(E)}return(d.options.unknownHandler||t_)(d,E,g)}function h(E){const g=[];if("children"in E){const x=E.children;let b=-1;for(;++b<x.length;){const A=d.one(x[b],E);if(A){if(b&&x[b-1].type==="break"&&(!Array.isArray(A)&&A.type==="text"&&(A.value=dm(A.value)),!Array.isArray(A)&&A.type==="element")){const L=A.children[0];L&&L.type==="text"&&(L.value=dm(L.value))}Array.isArray(A)?g.push(...A):g.push(A)}}}return g}}function ZS(e,t){e.position&&(t.position=X0(e))}function e_(e,t){let n=t;if(e&&e.data){const s=e.data.hName,a=e.data.hChildren,o=e.data.hProperties;if(typeof s=="string")if(n.type==="element")n.tagName=s;else{const l="children"in n?n.children:[n];n={type:"element",tagName:s,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,Vr(o)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function t_(e,t){const n=t.data||{},s="value"in t&&!(Lc.call(n,"hProperties")||Lc.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function n_(e,t){const n=[];let s=-1;for(t&&n.push({type:"text",value:`
|
|
67
|
+
`});++s<e.length;)s&&n.push({type:"text",value:`
|
|
68
|
+
`}),n.push(e[s]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
69
|
+
`}),n}function dm(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function fm(e,t){const n=JS(e,t),s=n.one(e,void 0),a=zS(n),o=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return a&&o.children.push({type:"text",value:`
|
|
70
|
+
`},a),o}function r_(e,t){return e&&"run"in e?async function(n,s){const a=fm(n,{file:s,...t});await e.run(a,s)}:function(n,s){return fm(n,{file:s,...e||t})}}function hm(e){if(e)throw e}var sc,pm;function i_(){if(pm)return sc;pm=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},o=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var E=e.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!E&&!g)return!1;var x;for(x in h);return typeof x>"u"||e.call(h,x)},l=function(h,E){n&&E.name==="__proto__"?n(h,E.name,{enumerable:!0,configurable:!0,value:E.newValue,writable:!0}):h[E.name]=E.newValue},d=function(h,E){if(E==="__proto__")if(e.call(h,E)){if(s)return s(h,E).value}else return;return h[E]};return sc=function f(){var h,E,g,x,b,A,L=arguments[0],O=1,v=arguments.length,M=!1;for(typeof L=="boolean"&&(M=L,L=arguments[1]||{},O=2),(L==null||typeof L!="object"&&typeof L!="function")&&(L={});O<v;++O)if(h=arguments[O],h!=null)for(E in h)g=d(L,E),x=d(h,E),L!==x&&(M&&x&&(o(x)||(b=a(x)))?(b?(b=!1,A=g&&a(g)?g:[]):A=g&&o(g)?g:{},l(L,{name:E,newValue:f(M,A,x)})):typeof x<"u"&&l(L,{name:E,newValue:x}));return L},sc}var s_=i_();const ac=Wc(s_);function Rc(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 a_(){const e=[],t={run:n,use:s};return t;function n(...a){let o=-1;const l=a.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);d(null,...a);function d(f,...h){const E=e[++o];let g=-1;if(f){l(f);return}for(;++g<a.length;)(h[g]===null||h[g]===void 0)&&(h[g]=a[g]);a=h,E?u_(E,d)(...h):l(null,...h)}}function s(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function u_(e,t){let n;return s;function s(...l){const d=e.length>l.length;let f;d&&l.push(a);try{f=e.apply(this,l)}catch(h){const E=h;if(d&&n)throw E;return a(E)}d||(f&&f.then&&typeof f.then=="function"?f.then(o,a):f instanceof Error?a(f):o(f))}function a(l,...d){n||(n=!0,t(l,...d))}function o(l){a(null,l)}}const An={basename:o_,dirname:l_,extname:c_,join:d_,sep:"/"};function o_(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ra(e);let n=0,s=-1,a=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(o){n=a+1;break}}else s<0&&(o=!0,s=a+1);return s<0?"":e.slice(n,s)}if(t===e)return"";let l=-1,d=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(o){n=a+1;break}}else l<0&&(o=!0,l=a+1),d>-1&&(e.codePointAt(a)===t.codePointAt(d--)?d<0&&(s=a):(d=-1,s=l));return n===s?s=l:s<0&&(s=e.length),e.slice(n,s)}function l_(e){if(ra(e),e.length===0)return".";let t=-1,n=e.length,s;for(;--n;)if(e.codePointAt(n)===47){if(s){t=n;break}}else s||(s=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function c_(e){ra(e);let t=e.length,n=-1,s=0,a=-1,o=0,l;for(;t--;){const d=e.codePointAt(t);if(d===47){if(l){s=t+1;break}continue}n<0&&(l=!0,n=t+1),d===46?a<0?a=t:o!==1&&(o=1):a>-1&&(o=-1)}return a<0||n<0||o===0||o===1&&a===n-1&&a===s+1?"":e.slice(a,n)}function d_(...e){let t=-1,n;for(;++t<e.length;)ra(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":f_(n)}function f_(e){ra(e);const t=e.codePointAt(0)===47;let n=h_(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function h_(e,t){let n="",s=0,a=-1,o=0,l=-1,d,f;for(;++l<=e.length;){if(l<e.length)d=e.codePointAt(l);else{if(d===47)break;d=47}if(d===47){if(!(a===l-1||o===1))if(a!==l-1&&o===2){if(n.length<2||s!==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="",s=0):(n=n.slice(0,f),s=n.length-1-n.lastIndexOf("/")),a=l,o=0;continue}}else if(n.length>0){n="",s=0,a=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",s=2)}else n.length>0?n+="/"+e.slice(a+1,l):n=e.slice(a+1,l),s=l-a-1;a=l,o=0}else d===46&&o>-1?o++:o=-1}return n}function ra(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const p_={cwd:m_};function m_(){return"/"}function Oc(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function g_(e){if(typeof e=="string")e=new URL(e);else if(!Oc(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 E_(e)}function E_(e){if(e.hostname!==""){const s=new TypeError('File URL host must be "localhost" or empty on darwin');throw s.code="ERR_INVALID_FILE_URL_HOST",s}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const s=t.codePointAt(n+2);if(s===70||s===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 uc=["history","path","basename","stem","extname","dirname"];class S1{constructor(t){let n;t?Oc(t)?n={path:t}:typeof t=="string"||T_(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":p_.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<uc.length;){const o=uc[s];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let a;for(a in n)uc.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?An.basename(this.path):void 0}set basename(t){lc(t,"basename"),oc(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){mm(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(oc(t,"extname"),mm(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){Oc(t)&&(t=g_(t)),lc(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){lc(t,"stem"),oc(t,"stem"),this.path=An.join(this.dirname||"",t+(this.extname||""))}fail(t,n,s){const a=this.message(t,n,s);throw a.fatal=!0,a}info(t,n,s){const a=this.message(t,n,s);return a.fatal=void 0,a}message(t,n,s){const a=new vt(t,n,s);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 oc(e,t){if(e&&e.includes(An.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+An.sep+"`")}function lc(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function mm(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function T_(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const y_=(function(e){const s=this.constructor.prototype,a=s[e],o=function(){return a.apply(o,arguments)};return Object.setPrototypeOf(o,s),o}),x_={}.hasOwnProperty;class md extends y_{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=a_()}copy(){const t=new md;let n=-1;for(;++n<this.attachers.length;){const s=this.attachers[n];t.use(...s)}return t.data(ac(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(fc("data",this.frozen),this.namespace[t]=n,this):x_.call(this.namespace,t)&&this.namespace[t]||void 0:t?(fc("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,...s]=this.attachers[this.freezeIndex];if(s[0]===!1)continue;s[0]===!0&&(s[0]=void 0);const a=n.call(t,...s);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Su(t),s=this.parser||this.Parser;return cc("parse",s),s(String(n),n)}process(t,n){const s=this;return this.freeze(),cc("process",this.parser||this.Parser),dc("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(o,l){const d=Su(t),f=s.parse(d);s.run(f,d,function(E,g,x){if(E||!g||!x)return h(E);const b=g,A=s.stringify(b,x);S_(A)?x.value=A:x.result=A,h(E,x)});function h(E,g){E||!g?l(E):o?o(g):n(void 0,g)}}}processSync(t){let n=!1,s;return this.freeze(),cc("processSync",this.parser||this.Parser),dc("processSync",this.compiler||this.Compiler),this.process(t,a),Em("processSync","process",n),s;function a(o,l){n=!0,hm(o),s=l}}run(t,n,s){gm(t),this.freeze();const a=this.transformers;return!s&&typeof n=="function"&&(s=n,n=void 0),s?o(void 0,s):new Promise(o);function o(l,d){const f=Su(n);a.run(t,f,h);function h(E,g,x){const b=g||t;E?d(E):l?l(b):s(void 0,b,x)}}}runSync(t,n){let s=!1,a;return this.run(t,n,o),Em("runSync","run",s),a;function o(l,d){hm(l),a=d,s=!0}}stringify(t,n){this.freeze();const s=Su(n),a=this.compiler||this.Compiler;return dc("stringify",a),gm(t),a(t,s)}use(t,...n){const s=this.attachers,a=this.namespace;if(fc("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?d(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(h){if(typeof h=="function")f(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[E,...g]=h;f(E,g)}else l(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function l(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(h.plugins),h.settings&&(a.settings=ac(!0,a.settings,h.settings))}function d(h){let E=-1;if(h!=null)if(Array.isArray(h))for(;++E<h.length;){const g=h[E];o(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function f(h,E){let g=-1,x=-1;for(;++g<s.length;)if(s[g][0]===h){x=g;break}if(x===-1)s.push([h,...E]);else if(E.length>0){let[b,...A]=E;const L=s[x][1];Rc(L)&&Rc(b)&&(b=ac(!0,L,b)),s[x]=[h,b,...A]}}}}const b_=new md().freeze();function cc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function dc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function fc(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 gm(e){if(!Rc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Em(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Su(e){return k_(e)?e:new S1(e)}function k_(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function S_(e){return typeof e=="string"||__(e)}function __(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const C_="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Tm=[],ym={allowDangerousHtml:!0},N_=/^(https?|ircs?|mailto|xmpp)$/i,A_=[{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 v_(e){const t=w_(e),n=I_(e);return L_(t.runSync(t.parse(n),n),e)}function w_(e){const t=e.rehypePlugins||Tm,n=e.remarkPlugins||Tm,s=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ym}:ym;return b_().use(oS).use(n).use(r_,s).use(t)}function I_(e){const t=e.children||"",n=new S1;return typeof t=="string"&&(n.value=t),n}function L_(e,t){const n=t.allowedElements,s=t.allowElement,a=t.components,o=t.disallowedElements,l=t.skipHtml,d=t.unwrapDisallowed,f=t.urlTransform||R_;for(const E of A_)Object.hasOwn(t,E.from)&&(""+E.from+(E.to?"use `"+E.to+"` instead":"remove it")+C_+E.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Ju(e,h),Yx(e,{Fragment:y.Fragment,components:a,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function h(E,g,x){if(E.type==="raw"&&x&&typeof g=="number")return l?x.children.splice(g,1):x.children[g]={type:"text",value:E.value},g;if(E.type==="element"){let b;for(b in nc)if(Object.hasOwn(nc,b)&&Object.hasOwn(E.properties,b)){const A=E.properties[b],L=nc[b];(L===null||L.includes(E.tagName))&&(E.properties[b]=f(String(A||""),b,E))}}if(E.type==="element"){let b=n?!n.includes(E.tagName):o?o.includes(E.tagName):!1;if(!b&&s&&typeof g=="number"&&(b=!s(E,g,x)),b&&x&&typeof g=="number")return d&&E.children?x.children.splice(g,1,...E.children):x.children.splice(g,1),g}}}function R_(e){const t=e.indexOf(":"),n=e.indexOf("?"),s=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||s!==-1&&t>s||N_.test(e.slice(0,t))?e:""}function xm(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let s=0,a=n.indexOf(t);for(;a!==-1;)s++,a=n.indexOf(t,a+t.length);return s}function O_(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function D_(e,t,n){const a=Ku((n||{}).ignore||[]),o=P_(t);let l=-1;for(;++l<o.length;)k1(e,"text",d);function d(h,E){let g=-1,x;for(;++g<E.length;){const b=E[g],A=x?x.children:void 0;if(a(b,A?A.indexOf(b):void 0,x))return;x=b}if(x)return f(h,E)}function f(h,E){const g=E[E.length-1],x=o[l][0],b=o[l][1];let A=0;const O=g.children.indexOf(h);let v=!1,M=[];x.lastIndex=0;let z=x.exec(h.value);for(;z;){const J=z.index,ne={index:z.index,input:z.input,stack:[...E,h]};let D=b(...z,ne);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?x.lastIndex=J+1:(A!==J&&M.push({type:"text",value:h.value.slice(A,J)}),Array.isArray(D)?M.push(...D):D&&M.push(D),A=J+z[0].length,v=!0),!x.global)break;z=x.exec(h.value)}return v?(A<h.value.length&&M.push({type:"text",value:h.value.slice(A)}),g.children.splice(O,1,...M)):M=[h],O+M.length}}function P_(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 s=-1;for(;++s<n.length;){const a=n[s];t.push([M_(a[0]),F_(a[1])])}return t}function M_(e){return typeof e=="string"?new RegExp(O_(e),"g"):e}function F_(e){return typeof e=="function"?e:function(){return e}}const hc="phrasing",pc=["autolink","link","image","label"];function B_(){return{transforms:[Y_],enter:{literalAutolink:j_,literalAutolinkEmail:mc,literalAutolinkHttp:mc,literalAutolinkWww:mc},exit:{literalAutolink:W_,literalAutolinkEmail:$_,literalAutolinkHttp:H_,literalAutolinkWww:z_}}}function U_(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:hc,notInConstruct:pc},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:hc,notInConstruct:pc},{character:":",before:"[ps]",after:"\\/",inConstruct:hc,notInConstruct:pc}]}}function j_(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function mc(e){this.config.enter.autolinkProtocol.call(this,e)}function H_(e){this.config.exit.autolinkProtocol.call(this,e)}function z_(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 $_(e){this.config.exit.autolinkEmail.call(this,e)}function W_(e){this.exit(e)}function Y_(e){D_(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,V_],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),q_]],{ignore:["link","linkReference"]})}function V_(e,t,n,s,a){let o="";if(!_1(a)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!Q_(n)))return!1;const l=G_(n+s);if(!l[0])return!1;const d={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[d,{type:"text",value:l[1]}]:d}function q_(e,t,n,s){return!_1(s,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Q_(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 G_(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],s=n.indexOf(")");const a=xm(e,"(");let o=xm(e,")");for(;s!==-1&&a>o;)e+=n.slice(0,s+1),n=n.slice(s+1),s=n.indexOf(")"),o++;return[e,n]}function _1(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Yr(n)||qu(n))&&(!t||n!==47)}C1.peek=iC;function K_(){this.buffer()}function X_(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function J_(){this.buffer()}function Z_(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function eC(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function tC(e){this.exit(e)}function nC(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function rC(e){this.exit(e)}function iC(){return"["}function C1(e,t,n,s){const a=n.createTracker(s);let o=a.move("[^");const l=n.enter("footnoteReference"),d=n.enter("reference");return o+=a.move(n.safe(n.associationId(e),{after:"]",before:o})),d(),l(),o+=a.move("]"),o}function sC(){return{enter:{gfmFootnoteCallString:K_,gfmFootnoteCall:X_,gfmFootnoteDefinitionLabelString:J_,gfmFootnoteDefinition:Z_},exit:{gfmFootnoteCallString:eC,gfmFootnoteCall:tC,gfmFootnoteDefinitionLabelString:nC,gfmFootnoteDefinition:rC}}}function aC(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:C1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(s,a,o,l){const d=o.createTracker(l);let f=d.move("[^");const h=o.enter("footnoteDefinition"),E=o.enter("label");return f+=d.move(o.safe(o.associationId(s),{before:f,after:"]"})),E(),f+=d.move("]:"),s.children&&s.children.length>0&&(d.shift(4),f+=d.move((t?`
|
|
71
|
+
`:" ")+o.indentLines(o.containerFlow(s,d.current()),t?N1:uC))),h(),f}}function uC(e,t,n){return t===0?e:N1(e,t,n)}function N1(e,t,n){return(n?"":" ")+e}const oC=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];A1.peek=hC;function lC(){return{canContainEols:["delete"],enter:{strikethrough:dC},exit:{strikethrough:fC}}}function cC(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:oC}],handlers:{delete:A1}}}function dC(e){this.enter({type:"delete",children:[]},e)}function fC(e){this.exit(e)}function A1(e,t,n,s){const a=n.createTracker(s),o=n.enter("strikethrough");let l=a.move("~~");return l+=n.containerPhrasing(e,{...a.current(),before:l,after:"~"}),l+=a.move("~~"),o(),l}function hC(){return"~"}function pC(e){return e.length}function mC(e,t){const n=t||{},s=(n.align||[]).concat(),a=n.stringLength||pC,o=[],l=[],d=[],f=[];let h=0,E=-1;for(;++E<e.length;){const L=[],O=[];let v=-1;for(e[E].length>h&&(h=e[E].length);++v<e[E].length;){const M=gC(e[E][v]);if(n.alignDelimiters!==!1){const z=a(M);O[v]=z,(f[v]===void 0||z>f[v])&&(f[v]=z)}L.push(M)}l[E]=L,d[E]=O}let g=-1;if(typeof s=="object"&&"length"in s)for(;++g<h;)o[g]=bm(s[g]);else{const L=bm(s);for(;++g<h;)o[g]=L}g=-1;const x=[],b=[];for(;++g<h;){const L=o[g];let O="",v="";L===99?(O=":",v=":"):L===108?O=":":L===114&&(v=":");let M=n.alignDelimiters===!1?1:Math.max(1,f[g]-O.length-v.length);const z=O+"-".repeat(M)+v;n.alignDelimiters!==!1&&(M=O.length+M+v.length,M>f[g]&&(f[g]=M),b[g]=M),x[g]=z}l.splice(1,0,x),d.splice(1,0,b),E=-1;const A=[];for(;++E<l.length;){const L=l[E],O=d[E];g=-1;const v=[];for(;++g<h;){const M=L[g]||"";let z="",J="";if(n.alignDelimiters!==!1){const ne=f[g]-(O[g]||0),D=o[g];D===114?z=" ".repeat(ne):D===99?ne%2?(z=" ".repeat(ne/2+.5),J=" ".repeat(ne/2-.5)):(z=" ".repeat(ne/2),J=z):J=" ".repeat(ne)}n.delimiterStart!==!1&&!g&&v.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&M==="")&&(n.delimiterStart!==!1||g)&&v.push(" "),n.alignDelimiters!==!1&&v.push(z),v.push(M),n.alignDelimiters!==!1&&v.push(J),n.padding!==!1&&v.push(" "),(n.delimiterEnd!==!1||g!==h-1)&&v.push("|")}A.push(n.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return A.join(`
|
|
72
|
+
`)}function gC(e){return e==null?"":String(e)}function bm(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 km={}.hasOwnProperty;function v1(e,t){const n=t||{};function s(a,...o){let l=s.invalid;const d=s.handlers;if(a&&km.call(a,e)){const f=String(a[e]);l=km.call(d,f)?d[f]:s.unknown}if(l)return l.call(this,a,...o)}return s.handlers=n.handlers||{},s.invalid=n.invalid,s.unknown=n.unknown,s}function EC(e,t,n,s){const a=n.enter("blockquote"),o=n.createTracker(s);o.move("> "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),TC);return a(),l}function TC(e,t,n){return">"+(n?"":" ")+e}function yC(e,t){return Sm(e,t.inConstruct,!0)&&!Sm(e,t.notInConstruct,!1)}function Sm(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let s=-1;for(;++s<t.length;)if(e.includes(t[s]))return!0;return!1}function _m(e,t,n,s){let a=-1;for(;++a<n.unsafe.length;)if(n.unsafe[a].character===`
|
|
73
|
+
`&&yC(n.stack,n.unsafe[a]))return/[ \t]/.test(s.before)?"":" ";return`\\
|
|
74
|
+
`}function w1(e,t){const n=String(e);let s=n.indexOf(t),a=s,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;s!==-1;)s===a?++o>l&&(l=o):o=1,a=s+t.length,s=n.indexOf(t,a);return l}function xC(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 bC(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 kC(e,t,n,s){const a=bC(n),o=e.value||"",l=a==="`"?"GraveAccent":"Tilde";if(xC(e,n)){const g=n.enter("codeIndented"),x=n.indentLines(o,SC);return g(),x}const d=n.createTracker(s),f=a.repeat(Math.max(w1(o,a)+1,3)),h=n.enter("codeFenced");let E=d.move(f);if(e.lang){const g=n.enter(`codeFencedLang${l}`);E+=d.move(n.safe(e.lang,{before:E,after:" ",encode:["`"],...d.current()})),g()}if(e.lang&&e.meta){const g=n.enter(`codeFencedMeta${l}`);E+=d.move(" "),E+=d.move(n.safe(e.meta,{before:E,after:`
|
|
75
|
+
`,encode:["`"],...d.current()})),g()}return E+=d.move(`
|
|
76
|
+
`),o&&(E+=d.move(o+`
|
|
77
|
+
`)),E+=d.move(f),h(),E}function SC(e,t,n){return(n?"":" ")+e}function gd(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 _C(e,t,n,s){const a=gd(n),o=a==='"'?"Quote":"Apostrophe",l=n.enter("definition");let d=n.enter("label");const f=n.createTracker(s);let h=f.move("[");return h+=f.move(n.safe(n.associationId(e),{before:h,after:"]",...f.current()})),h+=f.move("]: "),d(),!e.url||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(d=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,{before:h,after:e.title?" ":`
|
|
78
|
+
`,...f.current()}))),d(),e.title&&(d=n.enter(`title${o}`),h+=f.move(" "+a),h+=f.move(n.safe(e.title,{before:h,after:a,...f.current()})),h+=f.move(a),d()),l(),h}function CC(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 Qs(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Mu(e,t,n){const s=wi(e),a=wi(t);return s===void 0?a===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:s===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}}I1.peek=NC;function I1(e,t,n,s){const a=CC(n),o=n.enter("emphasis"),l=n.createTracker(s),d=l.move(a);let f=l.move(n.containerPhrasing(e,{after:a,before:d,...l.current()}));const h=f.charCodeAt(0),E=Mu(s.before.charCodeAt(s.before.length-1),h,a);E.inside&&(f=Qs(h)+f.slice(1));const g=f.charCodeAt(f.length-1),x=Mu(s.after.charCodeAt(0),g,a);x.inside&&(f=f.slice(0,-1)+Qs(g));const b=l.move(a);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:E.outside},d+f+b}function NC(e,t,n){return n.options.emphasis||"*"}function AC(e,t){let n=!1;return Ju(e,function(s){if("value"in s&&/\r?\n|\r/.test(s.value)||s.type==="break")return n=!0,Ic}),!!((!e.depth||e.depth<3)&&od(e)&&(t.options.setext||n))}function vC(e,t,n,s){const a=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(s);if(AC(e,n)){const E=n.enter("headingSetext"),g=n.enter("phrasing"),x=n.containerPhrasing(e,{...o.current(),before:`
|
|
79
|
+
`,after:`
|
|
80
|
+
`});return g(),E(),x+`
|
|
81
|
+
`+(a===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
|
|
82
|
+
`))+1))}const l="#".repeat(a),d=n.enter("headingAtx"),f=n.enter("phrasing");o.move(l+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
|
|
83
|
+
`,...o.current()});return/^[\t ]/.test(h)&&(h=Qs(h.charCodeAt(0))+h.slice(1)),h=h?l+" "+h:l,n.options.closeAtx&&(h+=" "+l),f(),d(),h}L1.peek=wC;function L1(e){return e.value||""}function wC(){return"<"}R1.peek=IC;function R1(e,t,n,s){const a=gd(n),o=a==='"'?"Quote":"Apostrophe",l=n.enter("image");let d=n.enter("label");const f=n.createTracker(s);let h=f.move("![");return h+=f.move(n.safe(e.alt,{before:h,after:"]",...f.current()})),h+=f.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(d=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,{before:h,after:e.title?" ":")",...f.current()}))),d(),e.title&&(d=n.enter(`title${o}`),h+=f.move(" "+a),h+=f.move(n.safe(e.title,{before:h,after:a,...f.current()})),h+=f.move(a),d()),h+=f.move(")"),l(),h}function IC(){return"!"}O1.peek=LC;function O1(e,t,n,s){const a=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const d=n.createTracker(s);let f=d.move("![");const h=n.safe(e.alt,{before:f,after:"]",...d.current()});f+=d.move(h+"]["),l();const E=n.stack;n.stack=[],l=n.enter("reference");const g=n.safe(n.associationId(e),{before:f,after:"]",...d.current()});return l(),n.stack=E,o(),a==="full"||!h||h!==g?f+=d.move(g+"]"):a==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function LC(){return"!"}D1.peek=RC;function D1(e,t,n){let s=e.value||"",a="`",o=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(s);)a+="`";for(/[^ \r\n]/.test(s)&&(/^[ \r\n]/.test(s)&&/[ \r\n]$/.test(s)||/^`|`$/.test(s))&&(s=" "+s+" ");++o<n.unsafe.length;){const l=n.unsafe[o],d=n.compilePattern(l);let f;if(l.atBreak)for(;f=d.exec(s);){let h=f.index;s.charCodeAt(h)===10&&s.charCodeAt(h-1)===13&&h--,s=s.slice(0,h)+" "+s.slice(f.index+1)}}return a+s+a}function RC(){return"`"}function P1(e,t){const n=od(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))}M1.peek=OC;function M1(e,t,n,s){const a=gd(n),o=a==='"'?"Quote":"Apostrophe",l=n.createTracker(s);let d,f;if(P1(e,n)){const E=n.stack;n.stack=[],d=n.enter("autolink");let g=l.move("<");return g+=l.move(n.containerPhrasing(e,{before:g,after:">",...l.current()})),g+=l.move(">"),d(),n.stack=E,g}d=n.enter("link"),f=n.enter("label");let h=l.move("[");return h+=l.move(n.containerPhrasing(e,{before:h,after:"](",...l.current()})),h+=l.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),h+=l.move("<"),h+=l.move(n.safe(e.url,{before:h,after:">",...l.current()})),h+=l.move(">")):(f=n.enter("destinationRaw"),h+=l.move(n.safe(e.url,{before:h,after:e.title?" ":")",...l.current()}))),f(),e.title&&(f=n.enter(`title${o}`),h+=l.move(" "+a),h+=l.move(n.safe(e.title,{before:h,after:a,...l.current()})),h+=l.move(a),f()),h+=l.move(")"),d(),h}function OC(e,t,n){return P1(e,n)?"<":"["}F1.peek=DC;function F1(e,t,n,s){const a=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const d=n.createTracker(s);let f=d.move("[");const h=n.containerPhrasing(e,{before:f,after:"]",...d.current()});f+=d.move(h+"]["),l();const E=n.stack;n.stack=[],l=n.enter("reference");const g=n.safe(n.associationId(e),{before:f,after:"]",...d.current()});return l(),n.stack=E,o(),a==="full"||!h||h!==g?f+=d.move(g+"]"):a==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function DC(){return"["}function Ed(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 PC(e){const t=Ed(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 MC(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 B1(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 FC(e,t,n,s){const a=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?MC(n):Ed(n);const d=e.ordered?l==="."?")":".":PC(n);let f=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const E=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&E&&(!E.children||!E.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),B1(n)===l&&E){let g=-1;for(;++g<e.children.length;){const x=e.children[g];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(l=d),n.bulletCurrent=l;const h=n.containerFlow(e,s);return n.bulletLastUsed=l,n.bulletCurrent=o,a(),h}function BC(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 UC(e,t,n,s){const a=BC(n);let o=n.bulletCurrent||Ed(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const d=n.createTracker(s);d.move(o+" ".repeat(l-o.length)),d.shift(l);const f=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,d.current()),E);return f(),h;function E(g,x,b){return x?(b?"":" ".repeat(l))+g:(b?o:o+" ".repeat(l-o.length))+g}}function jC(e,t,n,s){const a=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,s);return o(),a(),l}const HC=Ku(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function zC(e,t,n,s){return(e.children.some(function(l){return HC(l)})?n.containerPhrasing:n.containerFlow).call(n,e,s)}function $C(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}U1.peek=WC;function U1(e,t,n,s){const a=$C(n),o=n.enter("strong"),l=n.createTracker(s),d=l.move(a+a);let f=l.move(n.containerPhrasing(e,{after:a,before:d,...l.current()}));const h=f.charCodeAt(0),E=Mu(s.before.charCodeAt(s.before.length-1),h,a);E.inside&&(f=Qs(h)+f.slice(1));const g=f.charCodeAt(f.length-1),x=Mu(s.after.charCodeAt(0),g,a);x.inside&&(f=f.slice(0,-1)+Qs(g));const b=l.move(a+a);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:E.outside},d+f+b}function WC(e,t,n){return n.options.strong||"*"}function YC(e,t,n,s){return n.safe(e.value,s)}function VC(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 qC(e,t,n){const s=(B1(n)+(n.options.ruleSpaces?" ":"")).repeat(VC(n));return n.options.ruleSpaces?s.slice(0,-1):s}const j1={blockquote:EC,break:_m,code:kC,definition:_C,emphasis:I1,hardBreak:_m,heading:vC,html:L1,image:R1,imageReference:O1,inlineCode:D1,link:M1,linkReference:F1,list:FC,listItem:UC,paragraph:jC,root:zC,strong:U1,text:YC,thematicBreak:qC};function QC(){return{enter:{table:GC,tableData:Cm,tableHeader:Cm,tableRow:XC},exit:{codeText:JC,table:KC,tableData:gc,tableHeader:gc,tableRow:gc}}}function GC(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 KC(e){this.exit(e),this.data.inTable=void 0}function XC(e){this.enter({type:"tableRow",children:[]},e)}function gc(e){this.exit(e)}function Cm(e){this.enter({type:"tableCell",children:[]},e)}function JC(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,ZC));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function ZC(e,t){return t==="|"?t:e}function e3(e){const t=e||{},n=t.tableCellPadding,s=t.tablePipeAlign,a=t.stringLength,o=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:d}};function l(b,A,L,O){return h(E(b,L,O),b.align)}function d(b,A,L,O){const v=g(b,L,O),M=h([v]);return M.slice(0,M.indexOf(`
|
|
85
|
+
`))}function f(b,A,L,O){const v=L.enter("tableCell"),M=L.enter("phrasing"),z=L.containerPhrasing(b,{...O,before:o,after:o});return M(),v(),z}function h(b,A){return mC(b,{align:A,alignDelimiters:s,padding:n,stringLength:a})}function E(b,A,L){const O=b.children;let v=-1;const M=[],z=A.enter("table");for(;++v<O.length;)M[v]=g(O[v],A,L);return z(),M}function g(b,A,L){const O=b.children;let v=-1;const M=[],z=A.enter("tableRow");for(;++v<O.length;)M[v]=f(O[v],b,A,L);return z(),M}function x(b,A,L){let O=j1.inlineCode(b,A,L);return L.stack.includes("tableCell")&&(O=O.replace(/\|/g,"\\$&")),O}}function t3(){return{exit:{taskListCheckValueChecked:Nm,taskListCheckValueUnchecked:Nm,paragraph:r3}}}function n3(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:i3}}}function Nm(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function r3(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 s=n.children[0];if(s&&s.type==="text"){const a=t.children;let o=-1,l;for(;++o<a.length;){const d=a[o];if(d.type==="paragraph"){l=d;break}}l===n&&(s.value=s.value.slice(1),s.value.length===0?n.children.shift():n.position&&s.position&&typeof s.position.start.offset=="number"&&(s.position.start.column++,s.position.start.offset++,n.position.start=Object.assign({},s.position.start)))}}this.exit(e)}function i3(e,t,n,s){const a=e.children[0],o=typeof e.checked=="boolean"&&a&&a.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",d=n.createTracker(s);o&&d.move(l);let f=j1.listItem(e,t,n,{...s,...d.current()});return o&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),f;function h(E){return E+l}}function s3(){return[B_(),sC(),lC(),QC(),t3()]}function a3(e){return{extensions:[U_(),aC(e),cC(),e3(e),n3()]}}const u3={tokenize:h3,partial:!0},H1={tokenize:p3,partial:!0},z1={tokenize:m3,partial:!0},$1={tokenize:g3,partial:!0},o3={tokenize:E3,partial:!0},W1={name:"wwwAutolink",tokenize:d3,previous:V1},Y1={name:"protocolAutolink",tokenize:f3,previous:q1},Wn={name:"emailAutolink",tokenize:c3,previous:Q1},Ln={};function l3(){return{text:Ln}}let Fr=48;for(;Fr<123;)Ln[Fr]=Wn,Fr++,Fr===58?Fr=65:Fr===91&&(Fr=97);Ln[43]=Wn;Ln[45]=Wn;Ln[46]=Wn;Ln[95]=Wn;Ln[72]=[Wn,Y1];Ln[104]=[Wn,Y1];Ln[87]=[Wn,W1];Ln[119]=[Wn,W1];function c3(e,t,n){const s=this;let a,o;return l;function l(g){return!Dc(g)||!Q1.call(s,s.previous)||Td(s.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),d(g))}function d(g){return Dc(g)?(e.consume(g),d):g===64?(e.consume(g),f):n(g)}function f(g){return g===46?e.check(o3,E,h)(g):g===45||g===95||At(g)?(o=!0,e.consume(g),f):E(g)}function h(g){return e.consume(g),a=!0,f}function E(g){return o&&a&&Rt(s.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function d3(e,t,n){const s=this;return a;function a(l){return l!==87&&l!==119||!V1.call(s,s.previous)||Td(s.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(u3,e.attempt(H1,e.attempt(z1,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function f3(e,t,n){const s=this;let a="",o=!1;return l;function l(g){return(g===72||g===104)&&q1.call(s,s.previous)&&!Td(s.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(g),e.consume(g),d):n(g)}function d(g){if(Rt(g)&&a.length<5)return a+=String.fromCodePoint(g),e.consume(g),d;if(g===58){const x=a.toLowerCase();if(x==="http"||x==="https")return e.consume(g),f}return n(g)}function f(g){return g===47?(e.consume(g),o?h:(o=!0,f)):n(g)}function h(g){return g===null||Du(g)||Ve(g)||Yr(g)||qu(g)?n(g):e.attempt(H1,e.attempt(z1,E),n)(g)}function E(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function h3(e,t,n){let s=0;return a;function a(l){return(l===87||l===119)&&s<3?(s++,e.consume(l),a):l===46&&s===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function p3(e,t,n){let s,a,o;return l;function l(h){return h===46||h===95?e.check($1,f,d)(h):h===null||Ve(h)||Yr(h)||h!==45&&qu(h)?f(h):(o=!0,e.consume(h),l)}function d(h){return h===95?s=!0:(a=s,s=void 0),e.consume(h),l}function f(h){return a||s||!o?n(h):t(h)}}function m3(e,t){let n=0,s=0;return a;function a(l){return l===40?(n++,e.consume(l),a):l===41&&s<n?o(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($1,t,o)(l):l===null||Ve(l)||Yr(l)?t(l):(e.consume(l),a)}function o(l){return l===41&&s++,e.consume(l),a}}function g3(e,t,n){return s;function s(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(e.consume(d),s):d===38?(e.consume(d),o):d===93?(e.consume(d),a):d===60||d===null||Ve(d)||Yr(d)?t(d):n(d)}function a(d){return d===null||d===40||d===91||Ve(d)||Yr(d)?t(d):s(d)}function o(d){return Rt(d)?l(d):n(d)}function l(d){return d===59?(e.consume(d),s):Rt(d)?(e.consume(d),l):n(d)}}function E3(e,t,n){return s;function s(o){return e.consume(o),a}function a(o){return At(o)?n(o):t(o)}}function V1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ve(e)}function q1(e){return!Rt(e)}function Q1(e){return!(e===47||Dc(e))}function Dc(e){return e===43||e===45||e===46||e===95||At(e)}function Td(e){let t=e.length,n=!1;for(;t--;){const s=e[t][1];if((s.type==="labelLink"||s.type==="labelImage")&&!s._balanced){n=!0;break}if(s._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const T3={tokenize:N3,partial:!0};function y3(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:S3,continuation:{tokenize:_3},exit:C3}},text:{91:{name:"gfmFootnoteCall",tokenize:k3},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:x3,resolveTo:b3}}}}function x3(e,t,n){const s=this;let a=s.events.length;const o=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let l;for(;a--;){const f=s.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 d;function d(f){if(!l||!l._balanced)return n(f);const h=gn(s.sliceSerialize({start:l.end,end:s.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function b3(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 s={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 o={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},d=[e[n+1],e[n+2],["enter",s,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",s,t]];return e.splice(n,e.length-n+1,...d),e}function k3(e,t,n){const s=this,a=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let o=0,l;return d;function d(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),f}function f(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(g){if(o>999||g===93&&!l||g===null||g===91||Ve(g))return n(g);if(g===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return a.includes(gn(s.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return Ve(g)||(l=!0),o++,e.consume(g),g===92?E:h}function E(g){return g===91||g===92||g===93?(e.consume(g),o++,h):h(g)}}function S3(e,t,n){const s=this,a=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let o,l=0,d;return f;function f(A){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(A),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(A){return A===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(A),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",E):n(A)}function E(A){if(l>999||A===93&&!d||A===null||A===91||Ve(A))return n(A);if(A===93){e.exit("chunkString");const L=e.exit("gfmFootnoteDefinitionLabelString");return o=gn(s.sliceSerialize(L)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(A),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return Ve(A)||(d=!0),l++,e.consume(A),A===92?g:E}function g(A){return A===91||A===92||A===93?(e.consume(A),l++,E):E(A)}function x(A){return A===58?(e.enter("definitionMarker"),e.consume(A),e.exit("definitionMarker"),a.includes(o)||a.push(o),Me(e,b,"gfmFootnoteDefinitionWhitespace")):n(A)}function b(A){return t(A)}}function _3(e,t,n){return e.check(na,t,e.attempt(T3,t,n))}function C3(e){e.exit("gfmFootnoteDefinition")}function N3(e,t,n){const s=this;return Me(e,a,"gfmFootnoteDefinitionIndent",5);function a(o){const l=s.events[s.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function A3(e){let n=(e||{}).singleTilde;const s={name:"strikethrough",tokenize:o,resolveAll:a};return n==null&&(n=!0),{text:{126:s},insideSpan:{null:[s]},attentionMarkers:{null:[126]}};function a(l,d){let f=-1;for(;++f<l.length;)if(l[f][0]==="enter"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._close){let h=f;for(;h--;)if(l[h][0]==="exit"&&l[h][1].type==="strikethroughSequenceTemporary"&&l[h][1]._open&&l[f][1].end.offset-l[f][1].start.offset===l[h][1].end.offset-l[h][1].start.offset){l[f][1].type="strikethroughSequence",l[h][1].type="strikethroughSequence";const E={type:"strikethrough",start:Object.assign({},l[h][1].start),end:Object.assign({},l[f][1].end)},g={type:"strikethroughText",start:Object.assign({},l[h][1].end),end:Object.assign({},l[f][1].start)},x=[["enter",E,d],["enter",l[h][1],d],["exit",l[h][1],d],["enter",g,d]],b=d.parser.constructs.insideSpan.null;b&&Qt(x,x.length,0,Qu(b,l.slice(h+1,f),d)),Qt(x,x.length,0,[["exit",g,d],["enter",l[f][1],d],["exit",l[f][1],d],["exit",E,d]]),Qt(l,h-1,f-h+3,x),f=h+x.length-2;break}}for(f=-1;++f<l.length;)l[f][1].type==="strikethroughSequenceTemporary"&&(l[f][1].type="data");return l}function o(l,d,f){const h=this.previous,E=this.events;let g=0;return x;function x(A){return h===126&&E[E.length-1][1].type!=="characterEscape"?f(A):(l.enter("strikethroughSequenceTemporary"),b(A))}function b(A){const L=wi(h);if(A===126)return g>1?f(A):(l.consume(A),g++,b);if(g<2&&!n)return f(A);const O=l.exit("strikethroughSequenceTemporary"),v=wi(A);return O._open=!v||v===2&&!!L,O._close=!L||L===2&&!!v,d(A)}}}class v3{constructor(){this.map=[]}add(t,n,s){w3(this,t,n,s)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const s=[];for(;n>0;)n-=1,s.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];s.push(t.slice()),t.length=0;let a=s.pop();for(;a;){for(const o of a)t.push(o);a=s.pop()}this.map.length=0}}function w3(e,t,n,s){let a=0;if(!(n===0&&s.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=n,e.map[a][2].push(...s);return}a+=1}e.map.push([t,n,s])}}function I3(e,t){let n=!1;const s=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&s.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=s.length-1;s[o]=s[o]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return s}function L3(){return{flow:{null:{name:"table",tokenize:R3,resolveAll:O3}}}}function R3(e,t,n){const s=this;let a=0,o=0,l;return d;function d(U){let Z=s.events.length-1;for(;Z>-1;){const de=s.events[Z][1].type;if(de==="lineEnding"||de==="linePrefix")Z--;else break}const re=Z>-1?s.events[Z][1].type:null,ke=re==="tableHead"||re==="tableRow"?D:f;return ke===D&&s.parser.lazy[s.now().line]?n(U):ke(U)}function f(U){return e.enter("tableHead"),e.enter("tableRow"),h(U)}function h(U){return U===124||(l=!0,o+=1),E(U)}function E(U){return U===null?n(U):ye(U)?o>1?(o=0,s.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),b):n(U):Fe(U)?Me(e,E,"whitespace")(U):(o+=1,l&&(l=!1,a+=1),U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),l=!0,E):(e.enter("data"),g(U)))}function g(U){return U===null||U===124||Ve(U)?(e.exit("data"),E(U)):(e.consume(U),U===92?x:g)}function x(U){return U===92||U===124?(e.consume(U),g):g(U)}function b(U){return s.interrupt=!1,s.parser.lazy[s.now().line]?n(U):(e.enter("tableDelimiterRow"),l=!1,Fe(U)?Me(e,A,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):A(U))}function A(U){return U===45||U===58?O(U):U===124?(l=!0,e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),L):ne(U)}function L(U){return Fe(U)?Me(e,O,"whitespace")(U):O(U)}function O(U){return U===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),v):U===45?(o+=1,v(U)):U===null||ye(U)?J(U):ne(U)}function v(U){return U===45?(e.enter("tableDelimiterFiller"),M(U)):ne(U)}function M(U){return U===45?(e.consume(U),M):U===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),z):(e.exit("tableDelimiterFiller"),z(U))}function z(U){return Fe(U)?Me(e,J,"whitespace")(U):J(U)}function J(U){return U===124?A(U):U===null||ye(U)?!l||a!==o?ne(U):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(U)):ne(U)}function ne(U){return n(U)}function D(U){return e.enter("tableRow"),Q(U)}function Q(U){return U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),Q):U===null||ye(U)?(e.exit("tableRow"),t(U)):Fe(U)?Me(e,Q,"whitespace")(U):(e.enter("data"),oe(U))}function oe(U){return U===null||U===124||Ve(U)?(e.exit("data"),Q(U)):(e.consume(U),U===92?ce:oe)}function ce(U){return U===92||U===124?(e.consume(U),oe):oe(U)}}function O3(e,t){let n=-1,s=!0,a=0,o=[0,0,0,0],l=[0,0,0,0],d=!1,f=0,h,E,g;const x=new v3;for(;++n<e.length;){const b=e[n],A=b[1];b[0]==="enter"?A.type==="tableHead"?(d=!1,f!==0&&(Am(x,t,f,h,E),E=void 0,f=0),h={type:"table",start:Object.assign({},A.start),end:Object.assign({},A.end)},x.add(n,0,[["enter",h,t]])):A.type==="tableRow"||A.type==="tableDelimiterRow"?(s=!0,g=void 0,o=[0,0,0,0],l=[0,n+1,0,0],d&&(d=!1,E={type:"tableBody",start:Object.assign({},A.start),end:Object.assign({},A.end)},x.add(n,0,[["enter",E,t]])),a=A.type==="tableDelimiterRow"?2:E?3:1):a&&(A.type==="data"||A.type==="tableDelimiterMarker"||A.type==="tableDelimiterFiller")?(s=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],g=_u(x,t,o,a,void 0,g),o=[0,0,0,0]),l[2]=n)):A.type==="tableCellDivider"&&(s?s=!1:(o[1]!==0&&(l[0]=l[1],g=_u(x,t,o,a,void 0,g)),o=l,l=[o[1],n,0,0])):A.type==="tableHead"?(d=!0,f=n):A.type==="tableRow"||A.type==="tableDelimiterRow"?(f=n,o[1]!==0?(l[0]=l[1],g=_u(x,t,o,a,n,g)):l[1]!==0&&(g=_u(x,t,l,a,n,g)),a=0):a&&(A.type==="data"||A.type==="tableDelimiterMarker"||A.type==="tableDelimiterFiller")&&(l[3]=n)}for(f!==0&&Am(x,t,f,h,E),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=I3(t.events,n))}return e}function _u(e,t,n,s,a,o){const l=s===1?"tableHeader":s===2?"tableDelimiter":"tableData",d="tableContent";n[0]!==0&&(o.end=Object.assign({},Ni(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const f=Ni(t.events,n[1]);if(o={type:l,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const h=Ni(t.events,n[2]),E=Ni(t.events,n[3]),g={type:d,start:Object.assign({},h),end:Object.assign({},E)};if(e.add(n[2],0,[["enter",g,t]]),s!==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 A=n[2]+1,L=n[3]-n[2]-1;e.add(A,L,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return a!==void 0&&(o.end=Object.assign({},Ni(t.events,a)),e.add(a,0,[["exit",o,t]]),o=void 0),o}function Am(e,t,n,s,a){const o=[],l=Ni(t.events,n);a&&(a.end=Object.assign({},l),o.push(["exit",a,t])),s.end=Object.assign({},l),o.push(["exit",s,t]),e.add(n+1,0,o)}function Ni(e,t){const n=e[t],s=n[0]==="enter"?"start":"end";return n[1][s]}const D3={name:"tasklistCheck",tokenize:M3};function P3(){return{text:{91:D3}}}function M3(e,t,n){const s=this;return a;function a(f){return s.previous!==null||!s._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),o)}function o(f){return Ve(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"),d):n(f)}function d(f){return ye(f)?t(f):Fe(f)?e.check({tokenize:F3},t,n)(f):n(f)}}function F3(e,t,n){return Me(e,s,"whitespace");function s(a){return a===null?n(a):t(a)}}function B3(e){return r1([l3(),y3(),A3(e),L3(),P3()])}const U3={};function j3(e){const t=this,n=e||U3,s=t.data(),a=s.micromarkExtensions||(s.micromarkExtensions=[]),o=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),l=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);a.push(B3(n)),o.push(s3()),l.push(a3(n))}function H3(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:o},exit:{mathFlow:a,mathFlowFence:s,mathFlowFenceMeta:n,mathFlowValue:d,mathText:l,mathTextData:d}};function e(f){const h={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[h]}},f)}function t(){this.buffer()}function n(){const f=this.resume(),h=this.stack[this.stack.length-1];h.type,h.meta=f}function s(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function a(f){const h=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),E=this.stack[this.stack.length-1];E.type,this.exit(f),E.value=h;const g=E.data.hChildren[0];g.type,g.tagName,g.children.push({type:"text",value:h}),this.data.mathFlowInside=void 0}function o(f){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},f),this.buffer()}function l(f){const h=this.resume(),E=this.stack[this.stack.length-1];E.type,this.exit(f),E.value=h,E.data.hChildren.push({type:"text",value:h})}function d(f){this.config.enter.data.call(this,f),this.config.exit.data.call(this,f)}}function z3(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),s.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:s}};function n(o,l,d,f){const h=o.value||"",E=d.createTracker(f),g="$".repeat(Math.max(w1(h,"$")+1,2)),x=d.enter("mathFlow");let b=E.move(g);if(o.meta){const A=d.enter("mathFlowMeta");b+=E.move(d.safe(o.meta,{after:`
|
|
87
|
+
`,before:b,encode:["$"],...E.current()})),A()}return b+=E.move(`
|
|
88
|
+
`),h&&(b+=E.move(h+`
|
|
89
|
+
`)),b+=E.move(g),x(),b}function s(o,l,d){let f=o.value||"",h=1;for(t||h++;new RegExp("(^|[^$])"+"\\$".repeat(h)+"([^$]|$)").test(f);)h++;const E="$".repeat(h);/[^ \r\n]/.test(f)&&(/^[ \r\n]/.test(f)&&/[ \r\n]$/.test(f)||/^\$|\$$/.test(f))&&(f=" "+f+" ");let g=-1;for(;++g<d.unsafe.length;){const x=d.unsafe[g];if(!x.atBreak)continue;const b=d.compilePattern(x);let A;for(;A=b.exec(f);){let L=A.index;f.codePointAt(L)===10&&f.codePointAt(L-1)===13&&L--,f=f.slice(0,L)+" "+f.slice(A.index+1)}}return E+f+E}function a(){return"$"}}const $3={tokenize:W3,concrete:!0,name:"mathFlow"},vm={tokenize:Y3,partial:!0};function W3(e,t,n){const s=this,a=s.events[s.events.length-1],o=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0;let l=0;return d;function d(M){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),f(M)}function f(M){return M===36?(e.consume(M),l++,f):l<2?n(M):(e.exit("mathFlowFenceSequence"),Me(e,h,"whitespace")(M))}function h(M){return M===null||ye(M)?g(M):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(M))}function E(M){return M===null||ye(M)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),g(M)):M===36?n(M):(e.consume(M),E)}function g(M){return e.exit("mathFlowFence"),s.interrupt?t(M):e.attempt(vm,x,O)(M)}function x(M){return e.attempt({tokenize:v,partial:!0},O,b)(M)}function b(M){return(o?Me(e,A,"linePrefix",o+1):A)(M)}function A(M){return M===null?O(M):ye(M)?e.attempt(vm,x,O)(M):(e.enter("mathFlowValue"),L(M))}function L(M){return M===null||ye(M)?(e.exit("mathFlowValue"),A(M)):(e.consume(M),L)}function O(M){return e.exit("mathFlow"),t(M)}function v(M,z,J){let ne=0;return Me(M,D,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function D(ce){return M.enter("mathFlowFence"),M.enter("mathFlowFenceSequence"),Q(ce)}function Q(ce){return ce===36?(ne++,M.consume(ce),Q):ne<l?J(ce):(M.exit("mathFlowFenceSequence"),Me(M,oe,"whitespace")(ce))}function oe(ce){return ce===null||ye(ce)?(M.exit("mathFlowFence"),z(ce)):J(ce)}}}function Y3(e,t,n){const s=this;return a;function a(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return s.parser.lazy[s.now().line]?n(l):t(l)}}function V3(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),{tokenize:s,resolve:q3,previous:Q3,name:"mathText"};function s(a,o,l){let d=0,f,h;return E;function E(L){return a.enter("mathText"),a.enter("mathTextSequence"),g(L)}function g(L){return L===36?(a.consume(L),d++,g):d<2&&!n?l(L):(a.exit("mathTextSequence"),x(L))}function x(L){return L===null?l(L):L===36?(h=a.enter("mathTextSequence"),f=0,A(L)):L===32?(a.enter("space"),a.consume(L),a.exit("space"),x):ye(L)?(a.enter("lineEnding"),a.consume(L),a.exit("lineEnding"),x):(a.enter("mathTextData"),b(L))}function b(L){return L===null||L===32||L===36||ye(L)?(a.exit("mathTextData"),x(L)):(a.consume(L),b)}function A(L){return L===36?(a.consume(L),f++,A):f===d?(a.exit("mathTextSequence"),a.exit("mathText"),o(L)):(h.type="mathTextData",b(L))}}}function q3(e){let t=e.length-4,n=3,s,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(s=n;++s<t;)if(e[s][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[n][1].type="mathTextPadding",n+=2,t-=2;break}}for(s=n-1,t++;++s<=t;)a===void 0?s!==t&&e[s][1].type!=="lineEnding"&&(a=s):(s===t||e[s][1].type==="lineEnding")&&(e[a][1].type="mathTextData",s!==a+2&&(e[a][1].end=e[s-1][1].end,e.splice(a+2,s-a-2),t-=s-a-2,s=a+2),a=void 0);return e}function Q3(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function G3(e){return{flow:{36:$3},text:{36:V3(e)}}}const K3={};function X3(e){const t=this,n=e||K3,s=t.data(),a=s.micromarkExtensions||(s.micromarkExtensions=[]),o=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),l=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);a.push(G3(n)),o.push(H3()),l.push(z3(n))}const J3=[j3,X3],Z3=/\\[a-zA-Z]+|[\^_]/,eN=/^\d[\d,.]*\s*(?:[kKmMbB]|bn|billion|million|thousand)?$/,tN=/^[a-zA-Z]{3,}$/,wm=/[=+\-*/<>≤≥±×÷]/,nN=/[.,;:!?]$/,rN=/\n/,iN=/\s+/,sN=/\d,\d{3}\b/;function aN(e){const t=e.trim();if(!t||rN.test(e))return!1;if(Z3.test(t))return!0;if(eN.test(t))return!1;const n=t.split(iN),s=n.filter(o=>tN.test(o.replace(nN,"")));return s.length>=2||sN.test(t)?!1:!!(n.every(o=>o.length<=4)&&(n.length===1||wm.test(t))||wm.test(t)&&s.length===0)}function uN(e,t){if(e.startsWith("```",t)||e.startsWith("~~~",t)){const n=e.slice(t,t+3),s=e.indexOf(`
|
|
90
|
+
${n}`,t+3);return s===-1?e.length:s+4}if(e[t]==="`"){let n=0;for(;e[t+n]==="`";)n++;const s=e.indexOf("`".repeat(n),t+n);return s===-1?t+n:s+n}return t}function oN(e){let t="",n=0;for(;n<e.length;){const s=uN(e,n);if(s>n){t+=e.slice(n,s),n=s;continue}if(e[n]==="$"&&e[n+1]==="$"){const a=e.indexOf("$$",n+2),o=a===-1?e.length:a+2;t+=e.slice(n,o),n=o;continue}if(e[n]==="$"&&e[n-1]!=="\\"){const a=e.indexOf("$",n+1);if(a!==-1){const o=e.slice(n+1,a);if(!aN(o)){t+=`\\$${o}`,n=a;continue}t+=e.slice(n,a+1),n=a+1;continue}}t+=e[n],n++}return t}const Im=/[#.]/g;function lN(e,t){const n=e||"",s={};let a=0,o,l;for(;a<n.length;){Im.lastIndex=a;const d=Im.exec(n),f=n.slice(a,d?d.index:n.length);f&&(o?o==="#"?s.id=f:Array.isArray(s.className)?s.className.push(f):s.className=[f]:l=f,a+=f.length),d&&(o=d[0],a++)}return{type:"element",tagName:l||t||"div",properties:s,children:[]}}function G1(e,t,n){const s=n?hN(n):void 0;function a(o,l,...d){let f;if(o==null){f={type:"root",children:[]};const h=l;d.unshift(h)}else{f=lN(o,t);const h=f.tagName.toLowerCase(),E=s?s.get(h):void 0;if(f.tagName=E||h,cN(l))d.unshift(l);else for(const[g,x]of Object.entries(l))dN(e,f.properties,g,x)}for(const h of d)Pc(f.children,h);return f.type==="element"&&f.tagName==="template"&&(f.content={type:"root",children:f.children},f.children=[]),f}return a}function cN(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 s of n){const a=t[s];if(a&&typeof a=="object"){if(!Array.isArray(a))return!0;const o=a;for(const l of o)if(typeof l!="number"&&typeof l!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function dN(e,t,n,s){const a=Yu(e,n);let o;if(s!=null){if(typeof s=="number"){if(Number.isNaN(s))return;o=s}else typeof s=="boolean"?o=s:typeof s=="string"?a.spaceSeparated?o=Hp(s):a.commaSeparated?o=Mp(s):a.commaOrSpaceSeparated?o=Hp(Mp(s).join(" ")):o=Lm(a,a.property,s):Array.isArray(s)?o=[...s]:o=a.property==="style"?fN(s):String(s);if(Array.isArray(o)){const l=[];for(const d of o)l.push(Lm(a,a.property,d));o=l}a.property==="className"&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[a.property]=o}}function Pc(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)Pc(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Pc(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Lm(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Vs(n)===Vs(t)))return!0}return n}function fN(e){const t=[];for(const[n,s]of Object.entries(e))t.push([n,s].join(": "));return t.join("; ")}function hN(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const pN=["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"],mN=G1(ta,"div"),gN=G1(yr,"g",pN);function EN(e){const t=String(e),n=[];return{toOffset:a,toPoint:s};function s(o){if(typeof o=="number"&&o>-1&&o<=t.length){let l=0;for(;;){let d=n[l];if(d===void 0){const f=Rm(t,n[l-1]);d=f===-1?t.length+1:f+1,n[l]=d}if(d>o)return{line:l+1,column:o-(l>0?n[l-1]:0)+1,offset:o};l++}}}function a(o){if(o&&typeof o.line=="number"&&typeof o.column=="number"&&!Number.isNaN(o.line)&&!Number.isNaN(o.column)){for(;n.length<o.line;){const d=n[n.length-1],f=Rm(t,d),h=f===-1?t.length+1:f+1;if(d===h)break;n.push(h)}const l=(o.line>1?n[o.line-2]:0)+o.column-1;if(l<n[o.line-1])return l}}}function Rm(e,t){const n=e.indexOf("\r",t),s=e.indexOf(`
|
|
91
|
+
`,t);return s===-1?n:n===-1||n+1===s?s:n<s?n:s}const zr={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/"},K1={}.hasOwnProperty,TN=Object.prototype;function yN(e,t){const n=t||{};return yd({file:n.file||void 0,location:!1,schema:n.space==="svg"?yr:ta,verbose:n.verbose||!1},e)}function yd(e,t){let n;switch(t.nodeName){case"#comment":{const s=t;return n={type:"comment",value:s.data},Iu(e,s,n),n}case"#document":case"#document-fragment":{const s=t,a="mode"in s?s.mode==="quirks"||s.mode==="limited-quirks":!1;if(n={type:"root",children:X1(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const o=String(e.file),l=EN(o),d=l.toPoint(0),f=l.toPoint(o.length);n.position={start:d,end:f}}return n}case"#documentType":{const s=t;return n={type:"doctype"},Iu(e,s,n),n}case"#text":{const s=t;return n={type:"text",value:s.value},Iu(e,s,n),n}default:return n=xN(e,t),n}}function X1(e,t){let n=-1;const s=[];for(;++n<t.length;){const a=yd(e,t[n]);s.push(a)}return s}function xN(e,t){const n=e.schema;e.schema=t.namespaceURI===zr.svg?yr:ta;let s=-1;const a={};for(;++s<t.attrs.length;){const d=t.attrs[s],f=(d.prefix?d.prefix+":":"")+d.name;K1.call(TN,f)||(a[f]=d.value)}const l=(e.schema.space==="svg"?gN:mN)(t.tagName,a,X1(e,t.childNodes));if(Iu(e,t,l),l.tagName==="template"){const d=t,f=d.sourceCodeLocation,h=f&&f.startTag&&Ai(f.startTag),E=f&&f.endTag&&Ai(f.endTag),g=yd(e,d.content);h&&E&&e.file&&(g.position={start:h.end,end:E.start}),l.content=g}return e.schema=n,l}function Iu(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const s=bN(e,n,t.sourceCodeLocation);s&&(e.location=!0,n.position=s)}}function bN(e,t,n){const s=Ai(n);if(t.type==="element"){const a=t.children[t.children.length-1];if(s&&!n.endTag&&a&&a.position&&a.position.end&&(s.end=Object.assign({},a.position.end)),e.verbose){const o={};let l;if(n.attrs)for(l in n.attrs)K1.call(n.attrs,l)&&(o[Yu(e.schema,l).property]=Ai(n.attrs[l]));n.startTag;const d=Ai(n.startTag),f=n.endTag?Ai(n.endTag):void 0,h={opening:d};f&&(h.closing=f),h.properties=o,t.data={position:h}}}return s}function Ai(e){const t=Om({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Om({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Om(e){return e.line&&e.column?e:void 0}const kN={},SN={}.hasOwnProperty,J1=v1("type",{handlers:{root:CN,element:IN,text:vN,comment:wN,doctype:AN}});function _N(e,t){const s=(t||kN).space;return J1(e,s==="svg"?yr:ta)}function CN(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=xd(e.children,n,t),Pi(e,n),n}function NN(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=xd(e.children,n,t),Pi(e,n),n}function AN(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Pi(e,t),t}function vN(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Pi(e,t),t}function wN(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Pi(e,t),t}function IN(e,t){const n=t;let s=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(s=yr);const a=[];let o;if(e.properties){for(o in e.properties)if(o!=="children"&&SN.call(e.properties,o)){const f=LN(s,o,e.properties[o]);f&&a.push(f)}}const l=s.space,d={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:zr[l],childNodes:[],parentNode:null};return d.childNodes=xd(e.children,d,s),Pi(e,d),e.tagName==="template"&&e.content&&(d.content=NN(e.content,s)),d}function LN(e,t,n){const s=Yu(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&s.boolean)return;Array.isArray(n)&&(n=s.commaSeparated?H0(n):G0(n));const a={name:s.attribute,value:n===!0?"":String(n)};if(s.space&&s.space!=="html"&&s.space!=="svg"){const o=a.name.indexOf(":");o<0?a.prefix="":(a.name=a.name.slice(o+1),a.prefix=s.attribute.slice(0,o)),a.namespace=zr[s.space]}return a}function xd(e,t,n){let s=-1;const a=[];if(e)for(;++s<e.length;){const o=J1(e[s],n);o.parentNode=t,a.push(o)}return a}function Pi(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 RN=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],ON=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]),Je="�";var _;(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"})(_||(_={}));const Ut={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Z1(e){return e>=55296&&e<=57343}function DN(e){return e>=56320&&e<=57343}function PN(e,t){return(e-55296)*1024+9216+t}function eg(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function tg(e){return e>=64976&&e<=65007||ON.has(e)}var V;(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"})(V||(V={}));const MN=65536;class FN{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=MN,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:s,col:a,offset:o}=this,l=a+n,d=o+n;return{code:t,startLine:s,endLine:s,startCol:l,endCol:l,startOffset:d,endOffset:d}}_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(DN(n))return this.pos++,this._addGap(),PN(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,_.EOF;return this._err(V.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 s=0;s<t.length;s++)if((this.html.charCodeAt(this.pos+s)|32)!==t.charCodeAt(s))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,_.EOF;const s=this.html.charCodeAt(n);return s===_.CARRIAGE_RETURN?_.LINE_FEED:s}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,_.EOF;let t=this.html.charCodeAt(this.pos);return t===_.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,_.LINE_FEED):t===_.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Z1(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===_.LINE_FEED||t===_.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){eg(t)?this._err(V.controlCharacterInInputStream):tg(t)&&this._err(V.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Pe;(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"})(Pe||(Pe={}));function ng(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 BN=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୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢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;怳Ādpuct;戏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ǣጓ\0y;䐎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Ā;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀ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Ā;elƀ;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\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»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ↄⅪ←ٖ↛ǰ↉\0proø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;䅓Ācrir;榿;쀀𝔬ͯ\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\0m;櫳;櫽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))),UN=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 jN(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=UN.get(e))!==null&&t!==void 0?t:e}var gt;(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"})(gt||(gt={}));const HN=32;var Er;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Er||(Er={}));function Mc(e){return e>=gt.ZERO&&e<=gt.NINE}function zN(e){return e>=gt.UPPER_A&&e<=gt.UPPER_F||e>=gt.LOWER_A&&e<=gt.LOWER_F}function $N(e){return e>=gt.UPPER_A&&e<=gt.UPPER_Z||e>=gt.LOWER_A&&e<=gt.LOWER_Z||Mc(e)}function WN(e){return e===gt.EQUALS||$N(e)}var mt;(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"})(mt||(mt={}));var zn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(zn||(zn={}));class YN{constructor(t,n,s){this.decodeTree=t,this.emitCodePoint=n,this.errors=s,this.state=mt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=zn.Strict}startEntity(t){this.decodeMode=t,this.state=mt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case mt.EntityStart:return t.charCodeAt(n)===gt.NUM?(this.state=mt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=mt.NamedEntity,this.stateNamedEntity(t,n));case mt.NumericStart:return this.stateNumericStart(t,n);case mt.NumericDecimal:return this.stateNumericDecimal(t,n);case mt.NumericHex:return this.stateNumericHex(t,n);case mt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|HN)===gt.LOWER_X?(this.state=mt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=mt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,s,a){if(n!==s){const o=s-n;this.result=this.result*Math.pow(a,o)+Number.parseInt(t.substr(n,o),a),this.consumed+=o}}stateNumericHex(t,n){const s=n;for(;n<t.length;){const a=t.charCodeAt(n);if(Mc(a)||zN(a))n+=1;else return this.addToNumericResult(t,s,n,16),this.emitNumericEntity(a,3)}return this.addToNumericResult(t,s,n,16),-1}stateNumericDecimal(t,n){const s=n;for(;n<t.length;){const a=t.charCodeAt(n);if(Mc(a))n+=1;else return this.addToNumericResult(t,s,n,10),this.emitNumericEntity(a,2)}return this.addToNumericResult(t,s,n,10),-1}emitNumericEntity(t,n){var s;if(this.consumed<=n)return(s=this.errors)===null||s===void 0||s.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===gt.SEMI)this.consumed+=1;else if(this.decodeMode===zn.Strict)return 0;return this.emitCodePoint(jN(this.result),this.consumed),this.errors&&(t!==gt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:s}=this;let a=s[this.treeIndex],o=(a&Er.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const l=t.charCodeAt(n);if(this.treeIndex=VN(s,a,this.treeIndex+Math.max(1,o),l),this.treeIndex<0)return this.result===0||this.decodeMode===zn.Attribute&&(o===0||WN(l))?0:this.emitNotTerminatedNamedEntity();if(a=s[this.treeIndex],o=(a&Er.VALUE_LENGTH)>>14,o!==0){if(l===gt.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==zn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:s}=this,a=(s[n]&Er.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,a,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,s){const{decodeTree:a}=this;return this.emitCodePoint(n===1?a[t]&~Er.VALUE_LENGTH:a[t+1],s),n===3&&this.emitCodePoint(a[t+2],s),s}end(){var t;switch(this.state){case mt.NamedEntity:return this.result!==0&&(this.decodeMode!==zn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case mt.NumericDecimal:return this.emitNumericEntity(0,2);case mt.NumericHex:return this.emitNumericEntity(0,3);case mt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case mt.EntityStart:return 0}}}function VN(e,t,n,s){const a=(t&Er.BRANCH_LENGTH)>>7,o=t&Er.JUMP_TABLE;if(a===0)return o!==0&&s===o?n:-1;if(o){const f=s-o;return f<0||f>=a?-1:e[n+f]-1}let l=n,d=l+a-1;for(;l<=d;){const f=l+d>>>1,h=e[f];if(h<s)l=f+1;else if(h>s)d=f-1;else return e[f+a]}return-1}var K;(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/"})(K||(K={}));var Wr;(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"})(Wr||(Wr={}));var sn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(sn||(sn={}));var H;(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"})(H||(H={}));var p;(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"})(p||(p={}));const qN=new Map([[H.A,p.A],[H.ADDRESS,p.ADDRESS],[H.ANNOTATION_XML,p.ANNOTATION_XML],[H.APPLET,p.APPLET],[H.AREA,p.AREA],[H.ARTICLE,p.ARTICLE],[H.ASIDE,p.ASIDE],[H.B,p.B],[H.BASE,p.BASE],[H.BASEFONT,p.BASEFONT],[H.BGSOUND,p.BGSOUND],[H.BIG,p.BIG],[H.BLOCKQUOTE,p.BLOCKQUOTE],[H.BODY,p.BODY],[H.BR,p.BR],[H.BUTTON,p.BUTTON],[H.CAPTION,p.CAPTION],[H.CENTER,p.CENTER],[H.CODE,p.CODE],[H.COL,p.COL],[H.COLGROUP,p.COLGROUP],[H.DD,p.DD],[H.DESC,p.DESC],[H.DETAILS,p.DETAILS],[H.DIALOG,p.DIALOG],[H.DIR,p.DIR],[H.DIV,p.DIV],[H.DL,p.DL],[H.DT,p.DT],[H.EM,p.EM],[H.EMBED,p.EMBED],[H.FIELDSET,p.FIELDSET],[H.FIGCAPTION,p.FIGCAPTION],[H.FIGURE,p.FIGURE],[H.FONT,p.FONT],[H.FOOTER,p.FOOTER],[H.FOREIGN_OBJECT,p.FOREIGN_OBJECT],[H.FORM,p.FORM],[H.FRAME,p.FRAME],[H.FRAMESET,p.FRAMESET],[H.H1,p.H1],[H.H2,p.H2],[H.H3,p.H3],[H.H4,p.H4],[H.H5,p.H5],[H.H6,p.H6],[H.HEAD,p.HEAD],[H.HEADER,p.HEADER],[H.HGROUP,p.HGROUP],[H.HR,p.HR],[H.HTML,p.HTML],[H.I,p.I],[H.IMG,p.IMG],[H.IMAGE,p.IMAGE],[H.INPUT,p.INPUT],[H.IFRAME,p.IFRAME],[H.KEYGEN,p.KEYGEN],[H.LABEL,p.LABEL],[H.LI,p.LI],[H.LINK,p.LINK],[H.LISTING,p.LISTING],[H.MAIN,p.MAIN],[H.MALIGNMARK,p.MALIGNMARK],[H.MARQUEE,p.MARQUEE],[H.MATH,p.MATH],[H.MENU,p.MENU],[H.META,p.META],[H.MGLYPH,p.MGLYPH],[H.MI,p.MI],[H.MO,p.MO],[H.MN,p.MN],[H.MS,p.MS],[H.MTEXT,p.MTEXT],[H.NAV,p.NAV],[H.NOBR,p.NOBR],[H.NOFRAMES,p.NOFRAMES],[H.NOEMBED,p.NOEMBED],[H.NOSCRIPT,p.NOSCRIPT],[H.OBJECT,p.OBJECT],[H.OL,p.OL],[H.OPTGROUP,p.OPTGROUP],[H.OPTION,p.OPTION],[H.P,p.P],[H.PARAM,p.PARAM],[H.PLAINTEXT,p.PLAINTEXT],[H.PRE,p.PRE],[H.RB,p.RB],[H.RP,p.RP],[H.RT,p.RT],[H.RTC,p.RTC],[H.RUBY,p.RUBY],[H.S,p.S],[H.SCRIPT,p.SCRIPT],[H.SEARCH,p.SEARCH],[H.SECTION,p.SECTION],[H.SELECT,p.SELECT],[H.SOURCE,p.SOURCE],[H.SMALL,p.SMALL],[H.SPAN,p.SPAN],[H.STRIKE,p.STRIKE],[H.STRONG,p.STRONG],[H.STYLE,p.STYLE],[H.SUB,p.SUB],[H.SUMMARY,p.SUMMARY],[H.SUP,p.SUP],[H.TABLE,p.TABLE],[H.TBODY,p.TBODY],[H.TEMPLATE,p.TEMPLATE],[H.TEXTAREA,p.TEXTAREA],[H.TFOOT,p.TFOOT],[H.TD,p.TD],[H.TH,p.TH],[H.THEAD,p.THEAD],[H.TITLE,p.TITLE],[H.TR,p.TR],[H.TRACK,p.TRACK],[H.TT,p.TT],[H.U,p.U],[H.UL,p.UL],[H.SVG,p.SVG],[H.VAR,p.VAR],[H.WBR,p.WBR],[H.XMP,p.XMP]]);function Mi(e){var t;return(t=qN.get(e))!==null&&t!==void 0?t:p.UNKNOWN}const te=p,QN={[K.HTML]:new Set([te.ADDRESS,te.APPLET,te.AREA,te.ARTICLE,te.ASIDE,te.BASE,te.BASEFONT,te.BGSOUND,te.BLOCKQUOTE,te.BODY,te.BR,te.BUTTON,te.CAPTION,te.CENTER,te.COL,te.COLGROUP,te.DD,te.DETAILS,te.DIR,te.DIV,te.DL,te.DT,te.EMBED,te.FIELDSET,te.FIGCAPTION,te.FIGURE,te.FOOTER,te.FORM,te.FRAME,te.FRAMESET,te.H1,te.H2,te.H3,te.H4,te.H5,te.H6,te.HEAD,te.HEADER,te.HGROUP,te.HR,te.HTML,te.IFRAME,te.IMG,te.INPUT,te.LI,te.LINK,te.LISTING,te.MAIN,te.MARQUEE,te.MENU,te.META,te.NAV,te.NOEMBED,te.NOFRAMES,te.NOSCRIPT,te.OBJECT,te.OL,te.P,te.PARAM,te.PLAINTEXT,te.PRE,te.SCRIPT,te.SECTION,te.SELECT,te.SOURCE,te.STYLE,te.SUMMARY,te.TABLE,te.TBODY,te.TD,te.TEMPLATE,te.TEXTAREA,te.TFOOT,te.TH,te.THEAD,te.TITLE,te.TR,te.TRACK,te.UL,te.WBR,te.XMP]),[K.MATHML]:new Set([te.MI,te.MO,te.MN,te.MS,te.MTEXT,te.ANNOTATION_XML]),[K.SVG]:new Set([te.TITLE,te.FOREIGN_OBJECT,te.DESC]),[K.XLINK]:new Set,[K.XML]:new Set,[K.XMLNS]:new Set},Fc=new Set([te.H1,te.H2,te.H3,te.H4,te.H5,te.H6]);H.STYLE,H.SCRIPT,H.XMP,H.IFRAME,H.NOEMBED,H.NOFRAMES,H.PLAINTEXT;var C;(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"})(C||(C={}));const st={DATA:C.DATA,RCDATA:C.RCDATA,RAWTEXT:C.RAWTEXT,SCRIPT_DATA:C.SCRIPT_DATA,PLAINTEXT:C.PLAINTEXT,CDATA_SECTION:C.CDATA_SECTION};function GN(e){return e>=_.DIGIT_0&&e<=_.DIGIT_9}function Ps(e){return e>=_.LATIN_CAPITAL_A&&e<=_.LATIN_CAPITAL_Z}function KN(e){return e>=_.LATIN_SMALL_A&&e<=_.LATIN_SMALL_Z}function pr(e){return KN(e)||Ps(e)}function Dm(e){return pr(e)||GN(e)}function Cu(e){return e+32}function rg(e){return e===_.SPACE||e===_.LINE_FEED||e===_.TABULATION||e===_.FORM_FEED}function Pm(e){return rg(e)||e===_.SOLIDUS||e===_.GREATER_THAN_SIGN}function XN(e){return e===_.NULL?V.nullCharacterReference:e>1114111?V.characterReferenceOutsideUnicodeRange:Z1(e)?V.surrogateCharacterReference:tg(e)?V.noncharacterCharacterReference:eg(e)||e===_.CARRIAGE_RETURN?V.controlCharacterReference:null}class JN{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=C.DATA,this.returnState=C.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new FN(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new YN(BN,(s,a)=>{this.preprocessor.pos=this.entityStartPos+a-1,this._flushCodePointConsumedAsCharacterReference(s)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(V.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:s=>{this._err(V.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+s)},validateNumericCharacterReference:s=>{const a=XN(s);a&&this._err(a,1)}}:void 0)}_err(t,n=0){var s,a;(a=(s=this.handler).onParseError)===null||a===void 0||a.call(s,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,s){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||s==null||s()}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:Pe.START_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Pe.END_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Pe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Pe.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 s=this.currentToken;if(ng(s,this.currentAttr.name)===null){if(s.attrs.push(this.currentAttr),s.location&&this.currentLocation){const a=(t=(n=s.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);a[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(V.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=Mi(t.tagName),t.type===Pe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(V.endTagWithAttributes),t.selfClosing&&this._err(V.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 Pe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Pe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Pe.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:Pe.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=rg(t)?Pe.WHITESPACE_CHARACTER:t===_.NULL?Pe.NULL_CHARACTER:Pe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Pe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=C.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?zn.Attribute:zn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===C.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===C.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===C.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case C.DATA:{this._stateData(t);break}case C.RCDATA:{this._stateRcdata(t);break}case C.RAWTEXT:{this._stateRawtext(t);break}case C.SCRIPT_DATA:{this._stateScriptData(t);break}case C.PLAINTEXT:{this._statePlaintext(t);break}case C.TAG_OPEN:{this._stateTagOpen(t);break}case C.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case C.TAG_NAME:{this._stateTagName(t);break}case C.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case C.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case C.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case C.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case C.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case C.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case C.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case C.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case C.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case C.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case C.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case C.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case C.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case C.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case C.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case C.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case C.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case C.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case C.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case C.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case C.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case C.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case C.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case C.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case C.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case C.BOGUS_COMMENT:{this._stateBogusComment(t);break}case C.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case C.COMMENT_START:{this._stateCommentStart(t);break}case C.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case C.COMMENT:{this._stateComment(t);break}case C.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case C.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case C.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case C.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case C.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case C.COMMENT_END:{this._stateCommentEnd(t);break}case C.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case C.DOCTYPE:{this._stateDoctype(t);break}case C.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case C.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case C.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case C.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case C.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case C.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case C.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case C.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case C.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case C.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case C.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case C.CDATA_SECTION:{this._stateCdataSection(t);break}case C.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case C.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case C.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case C.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case _.LESS_THAN_SIGN:{this.state=C.TAG_OPEN;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitCodePoint(t);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case _.AMPERSAND:{this._startCharacterReference();break}case _.LESS_THAN_SIGN:{this.state=C.RCDATA_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case _.LESS_THAN_SIGN:{this.state=C.RAWTEXT_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(pr(t))this._createStartTagToken(),this.state=C.TAG_NAME,this._stateTagName(t);else switch(t){case _.EXCLAMATION_MARK:{this.state=C.MARKUP_DECLARATION_OPEN;break}case _.SOLIDUS:{this.state=C.END_TAG_OPEN;break}case _.QUESTION_MARK:{this._err(V.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=C.BOGUS_COMMENT,this._stateBogusComment(t);break}case _.EOF:{this._err(V.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(V.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=C.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(pr(t))this._createEndTagToken(),this.state=C.TAG_NAME,this._stateTagName(t);else switch(t){case _.GREATER_THAN_SIGN:{this._err(V.missingEndTagName),this.state=C.DATA;break}case _.EOF:{this._err(V.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(V.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=C.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BEFORE_ATTRIBUTE_NAME;break}case _.SOLIDUS:{this.state=C.SELF_CLOSING_START_TAG;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentTagToken();break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.tagName+=Je;break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ps(t)?Cu(t):t)}}_stateRcdataLessThanSign(t){t===_.SOLIDUS?this.state=C.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=C.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){pr(t)?(this.state=C.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=C.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 _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=C.BEFORE_ATTRIBUTE_NAME,!1;case _.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=C.SELF_CLOSING_START_TAG,!1;case _.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=C.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===_.SOLIDUS?this.state=C.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=C.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){pr(t)?(this.state=C.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=C.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case _.SOLIDUS:{this.state=C.SCRIPT_DATA_END_TAG_OPEN;break}case _.EXCLAMATION_MARK:{this.state=C.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=C.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){pr(t)?(this.state=C.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===_.HYPHEN_MINUS?(this.state=C.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===_.HYPHEN_MINUS?(this.state=C.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_ESCAPED,this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case _.HYPHEN_MINUS:{this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.GREATER_THAN_SIGN:{this.state=C.SCRIPT_DATA,this._emitChars(">");break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_ESCAPED,this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===_.SOLIDUS?this.state=C.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:pr(t)?(this._emitChars("<"),this.state=C.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){pr(t)?(this.state=C.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Ut.SCRIPT,!1)&&Pm(this.preprocessor.peek(Ut.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ut.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case _.HYPHEN_MINUS:{this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.GREATER_THAN_SIGN:{this.state=C.SCRIPT_DATA,this._emitChars(">");break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===_.SOLIDUS?(this.state=C.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Ut.SCRIPT,!1)&&Pm(this.preprocessor.peek(Ut.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ut.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=C.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.SOLIDUS:case _.GREATER_THAN_SIGN:case _.EOF:{this.state=C.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case _.EQUALS_SIGN:{this._err(V.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=C.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=C.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:case _.SOLIDUS:case _.GREATER_THAN_SIGN:case _.EOF:{this._leaveAttrName(),this.state=C.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case _.EQUALS_SIGN:{this._leaveAttrName(),this.state=C.BEFORE_ATTRIBUTE_VALUE;break}case _.QUOTATION_MARK:case _.APOSTROPHE:case _.LESS_THAN_SIGN:{this._err(V.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.currentAttr.name+=Je;break}default:this.currentAttr.name+=String.fromCodePoint(Ps(t)?Cu(t):t)}}_stateAfterAttributeName(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.SOLIDUS:{this.state=C.SELF_CLOSING_START_TAG;break}case _.EQUALS_SIGN:{this.state=C.BEFORE_ATTRIBUTE_VALUE;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=C.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{this.state=C.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this.state=C.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(V.missingAttributeValue),this.state=C.DATA,this.emitCurrentTagToken();break}default:this.state=C.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case _.QUOTATION_MARK:{this.state=C.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.currentAttr.value+=Je;break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case _.APOSTROPHE:{this.state=C.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.currentAttr.value+=Je;break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this._leaveAttrValue(),this.state=C.BEFORE_ATTRIBUTE_NAME;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=C.DATA,this.emitCurrentTagToken();break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.currentAttr.value+=Je;break}case _.QUOTATION_MARK:case _.APOSTROPHE:case _.LESS_THAN_SIGN:case _.EQUALS_SIGN:case _.GRAVE_ACCENT:{this._err(V.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this._leaveAttrValue(),this.state=C.BEFORE_ATTRIBUTE_NAME;break}case _.SOLIDUS:{this._leaveAttrValue(),this.state=C.SELF_CLOSING_START_TAG;break}case _.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=C.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this._err(V.missingWhitespaceBetweenAttributes),this.state=C.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case _.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=C.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this._err(V.unexpectedSolidusInTag),this.state=C.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentComment(n);break}case _.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.data+=Je;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Ut.DASH_DASH,!0)?(this._createCommentToken(Ut.DASH_DASH.length+1),this.state=C.COMMENT_START):this._consumeSequenceIfMatch(Ut.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ut.DOCTYPE.length+1),this.state=C.DOCTYPE):this._consumeSequenceIfMatch(Ut.CDATA_START,!0)?this.inForeignNode?this.state=C.CDATA_SECTION:(this._err(V.cdataInHtmlContent),this._createCommentToken(Ut.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=C.BOGUS_COMMENT):this._ensureHibernation()||(this._err(V.incorrectlyOpenedComment),this._createCommentToken(2),this.state=C.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_START_DASH;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptClosingOfEmptyComment),this.state=C.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=C.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_END;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptClosingOfEmptyComment),this.state=C.DATA,this.emitCurrentComment(n);break}case _.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=C.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_END_DASH;break}case _.LESS_THAN_SIGN:{n.data+="<",this.state=C.COMMENT_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.data+=Je;break}case _.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case _.EXCLAMATION_MARK:{n.data+="!",this.state=C.COMMENT_LESS_THAN_SIGN_BANG;break}case _.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=C.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===_.HYPHEN_MINUS?this.state=C.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=C.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===_.HYPHEN_MINUS?this.state=C.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=C.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==_.GREATER_THAN_SIGN&&t!==_.EOF&&this._err(V.nestedComment),this.state=C.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_END;break}case _.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=C.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentComment(n);break}case _.EXCLAMATION_MARK:{this.state=C.COMMENT_END_BANG;break}case _.HYPHEN_MINUS:{n.data+="-";break}case _.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=C.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{n.data+="--!",this.state=C.COMMENT_END_DASH;break}case _.GREATER_THAN_SIGN:{this._err(V.incorrectlyClosedComment),this.state=C.DATA,this.emitCurrentComment(n);break}case _.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=C.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BEFORE_DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this.state=C.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case _.EOF:{this._err(V.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingWhitespaceBeforeDoctypeName),this.state=C.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ps(t))this._createDoctypeToken(String.fromCharCode(Cu(t))),this.state=C.DOCTYPE_NAME;else switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.NULL:{this._err(V.unexpectedNullCharacter),this._createDoctypeToken(Je),this.state=C.DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this._err(V.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.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=C.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.AFTER_DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.name+=Je;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ps(t)?Cu(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Ut.PUBLIC,!1)?this.state=C.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ut.SYSTEM,!1)?this.state=C.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(V.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.QUOTATION_MARK:{this._err(V.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(V.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(V.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(V.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case _.QUOTATION_MARK:{this.state=C.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.publicId+=Je;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.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 _.APOSTROPHE:{this.state=C.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.publicId+=Je;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.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 _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.QUOTATION_MARK:{this._err(V.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(V.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.QUOTATION_MARK:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.QUOTATION_MARK:{this._err(V.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(V.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(V.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(V.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case _.QUOTATION_MARK:{this.state=C.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.systemId+=Je;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.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 _.APOSTROPHE:{this.state=C.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.systemId+=Je;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.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 _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.NULL:{this._err(V.unexpectedNullCharacter);break}case _.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case _.RIGHT_SQUARE_BRACKET:{this.state=C.CDATA_SECTION_BRACKET;break}case _.EOF:{this._err(V.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===_.RIGHT_SQUARE_BRACKET?this.state=C.CDATA_SECTION_END:(this._emitChars("]"),this.state=C.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case _.GREATER_THAN_SIGN:{this.state=C.DATA;break}case _.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=C.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(_.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Dm(this.preprocessor.peek(1))?C.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Dm(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===_.SEMICOLON&&this._err(V.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const ig=new Set([p.DD,p.DT,p.LI,p.OPTGROUP,p.OPTION,p.P,p.RB,p.RP,p.RT,p.RTC]),Mm=new Set([...ig,p.CAPTION,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]),Fu=new Set([p.APPLET,p.CAPTION,p.HTML,p.MARQUEE,p.OBJECT,p.TABLE,p.TD,p.TEMPLATE,p.TH]),ZN=new Set([...Fu,p.OL,p.UL]),eA=new Set([...Fu,p.BUTTON]),Fm=new Set([p.ANNOTATION_XML,p.MI,p.MN,p.MO,p.MS,p.MTEXT]),Bm=new Set([p.DESC,p.FOREIGN_OBJECT,p.TITLE]),tA=new Set([p.TR,p.TEMPLATE,p.HTML]),nA=new Set([p.TBODY,p.TFOOT,p.THEAD,p.TEMPLATE,p.HTML]),rA=new Set([p.TABLE,p.TEMPLATE,p.HTML]),iA=new Set([p.TD,p.TH]);class sA{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,s){this.treeAdapter=n,this.handler=s,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=p.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===p.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===K.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 s=this._indexOf(t);this.items[s]=n,s===this.stackTop&&(this.current=n)}insertAfter(t,n,s){const a=this._indexOf(t)+1;this.items.splice(a,0,n),this.tagIDs.splice(a,0,s),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])!==K.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 s=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(s,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Fc,K.HTML)}popUntilTableCellPopped(){this.popUntilPopped(iA,K.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let s=this.stackTop;s>=0;s--)if(t.has(this.tagIDs[s])&&this.treeAdapter.getNamespaceURI(this.items[s])===n)return s;return-1}clearBackTo(t,n){const s=this._indexOfTagNames(t,n);this.shortenToLength(s+1)}clearBackToTableContext(){this.clearBackTo(rA,K.HTML)}clearBackToTableBodyContext(){this.clearBackTo(nA,K.HTML)}clearBackToTableRowContext(){this.clearBackTo(tA,K.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]===p.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]===p.HTML}hasInDynamicScope(t,n){for(let s=this.stackTop;s>=0;s--){const a=this.tagIDs[s];switch(this.treeAdapter.getNamespaceURI(this.items[s])){case K.HTML:{if(a===t)return!0;if(n.has(a))return!1;break}case K.SVG:{if(Bm.has(a))return!1;break}case K.MATHML:{if(Fm.has(a))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Fu)}hasInListItemScope(t){return this.hasInDynamicScope(t,ZN)}hasInButtonScope(t){return this.hasInDynamicScope(t,eA)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case K.HTML:{if(Fc.has(n))return!0;if(Fu.has(n))return!1;break}case K.SVG:{if(Bm.has(n))return!1;break}case K.MATHML:{if(Fm.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===K.HTML)switch(this.tagIDs[n]){case t:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===K.HTML)switch(this.tagIDs[t]){case p.TBODY:case p.THEAD:case p.TFOOT:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===K.HTML)switch(this.tagIDs[n]){case t:return!0;case p.OPTION:case p.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&ig.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Mm.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Mm.has(this.currentTagId);)this.pop()}}const Ec=3;var vn;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(vn||(vn={}));const Um={type:vn.Marker};class aA{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const s=[],a=n.length,o=this.treeAdapter.getTagName(t),l=this.treeAdapter.getNamespaceURI(t);for(let d=0;d<this.entries.length;d++){const f=this.entries[d];if(f.type===vn.Marker)break;const{element:h}=f;if(this.treeAdapter.getTagName(h)===o&&this.treeAdapter.getNamespaceURI(h)===l){const E=this.treeAdapter.getAttrList(h);E.length===a&&s.push({idx:d,attrs:E})}}return s}_ensureNoahArkCondition(t){if(this.entries.length<Ec)return;const n=this.treeAdapter.getAttrList(t),s=this._getNoahArkConditionCandidates(t,n);if(s.length<Ec)return;const a=new Map(n.map(l=>[l.name,l.value]));let o=0;for(let l=0;l<s.length;l++){const d=s[l];d.attrs.every(f=>a.get(f.name)===f.value)&&(o+=1,o>=Ec&&this.entries.splice(d.idx,1))}}insertMarker(){this.entries.unshift(Um)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:vn.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const s=this.entries.indexOf(this.bookmark);this.entries.splice(s,0,{type:vn.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(Um);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(s=>s.type===vn.Marker||this.treeAdapter.getTagName(s.element)===t);return n&&n.type===vn.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===vn.Element&&n.element===t)}}const mr={createDocument(){return{nodeName:"#document",mode:sn.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 s=e.childNodes.indexOf(n);e.childNodes.splice(s,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,s){const a=e.childNodes.find(o=>o.nodeName==="#documentType");if(a)a.name=t,a.publicId=n,a.systemId=s;else{const o={nodeName:"#documentType",name:t,publicId:n,systemId:s,parentNode:null};mr.appendChild(e,o)}},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(mr.isTextNode(n)){n.value+=t;return}}mr.appendChild(e,mr.createTextNode(t))},insertTextBefore(e,t,n){const s=e.childNodes[e.childNodes.indexOf(n)-1];s&&mr.isTextNode(s)?s.value+=t:mr.insertBefore(e,mr.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(s=>s.name));for(let s=0;s<t.length;s++)n.has(t[s].name)||e.attrs.push(t[s])},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}}},sg="html",uA="about:legacy-compat",oA="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",ag=["+//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//"],lA=[...ag,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],cA=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),ug=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],dA=[...ug,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function jm(e,t){return t.some(n=>e.startsWith(n))}function fA(e){return e.name===sg&&e.publicId===null&&(e.systemId===null||e.systemId===uA)}function hA(e){if(e.name!==sg)return sn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===oA)return sn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),cA.has(n))return sn.QUIRKS;let s=t===null?lA:ag;if(jm(n,s))return sn.QUIRKS;if(s=t===null?ug:dA,jm(n,s))return sn.LIMITED_QUIRKS}return sn.NO_QUIRKS}const Hm={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},pA="definitionurl",mA="definitionURL",gA=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])),EA=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:K.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:K.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:K.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:K.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:K.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:K.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:K.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:K.XML}],["xml:space",{prefix:"xml",name:"space",namespace:K.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:K.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:K.XMLNS}]]),TA=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])),yA=new Set([p.B,p.BIG,p.BLOCKQUOTE,p.BODY,p.BR,p.CENTER,p.CODE,p.DD,p.DIV,p.DL,p.DT,p.EM,p.EMBED,p.H1,p.H2,p.H3,p.H4,p.H5,p.H6,p.HEAD,p.HR,p.I,p.IMG,p.LI,p.LISTING,p.MENU,p.META,p.NOBR,p.OL,p.P,p.PRE,p.RUBY,p.S,p.SMALL,p.SPAN,p.STRONG,p.STRIKE,p.SUB,p.SUP,p.TABLE,p.TT,p.U,p.UL,p.VAR]);function xA(e){const t=e.tagID;return t===p.FONT&&e.attrs.some(({name:s})=>s===Wr.COLOR||s===Wr.SIZE||s===Wr.FACE)||yA.has(t)}function og(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===pA){e.attrs[t].name=mA;break}}function lg(e){for(let t=0;t<e.attrs.length;t++){const n=gA.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function bd(e){for(let t=0;t<e.attrs.length;t++){const n=EA.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 bA(e){const t=TA.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Mi(e.tagName))}function kA(e,t){return t===K.MATHML&&(e===p.MI||e===p.MO||e===p.MN||e===p.MS||e===p.MTEXT)}function SA(e,t,n){if(t===K.MATHML&&e===p.ANNOTATION_XML){for(let s=0;s<n.length;s++)if(n[s].name===Wr.ENCODING){const a=n[s].value.toLowerCase();return a===Hm.TEXT_HTML||a===Hm.APPLICATION_XML}}return t===K.SVG&&(e===p.FOREIGN_OBJECT||e===p.DESC||e===p.TITLE)}function _A(e,t,n,s){return(!s||s===K.HTML)&&SA(e,t,n)||(!s||s===K.MATHML)&&kA(e,t)}const CA="hidden",NA=8,AA=3;var R;(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"})(R||(R={}));const vA={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},cg=new Set([p.TABLE,p.TBODY,p.TFOOT,p.THEAD,p.TR]),zm={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:mr,onParseError:null};class $m{constructor(t,n,s=null,a=null){this.fragmentContext=s,this.scriptHandler=a,this.currentToken=null,this.stopped=!1,this.insertionMode=R.INITIAL,this.originalInsertionMode=R.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={...zm,...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 JN(this.options,this),this.activeFormattingElements=new aA(this.treeAdapter),this.fragmentContextID=s?Mi(this.treeAdapter.getTagName(s)):p.UNKNOWN,this._setContextModes(s??this.document,this.fragmentContextID),this.openElements=new sA(this.document,this.treeAdapter,this)}static parse(t,n){const s=new this(n);return s.tokenizer.write(t,!0),s.document}static getFragmentParser(t,n){const s={...zm,...n};t??(t=s.treeAdapter.createElement(H.TEMPLATE,K.HTML,[]));const a=s.treeAdapter.createElement("documentmock",K.HTML,[]),o=new this(s,a,t);return o.fragmentContextID===p.TEMPLATE&&o.tmplInsertionModeStack.unshift(R.IN_TEMPLATE),o._initTokenizerForFragmentParsing(),o._insertFakeRootElement(),o._resetInsertionMode(),o._findFormInFragmentContext(),o}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,s){var a;if(!this.onParseError)return;const o=(a=t.location)!==null&&a!==void 0?a:vA,l={code:n,startLine:o.startLine,startCol:o.startCol,startOffset:o.startOffset,endLine:s?o.startLine:o.endLine,endCol:s?o.startCol:o.endCol,endOffset:s?o.startOffset:o.endOffset};this.onParseError(l)}onItemPush(t,n,s){var a,o;(o=(a=this.treeAdapter).onItemPush)===null||o===void 0||o.call(a,t),s&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var s,a;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(a=(s=this.treeAdapter).onItemPop)===null||a===void 0||a.call(s,t,this.openElements.current),n){let o,l;this.openElements.stackTop===0&&this.fragmentContext?(o=this.fragmentContext,l=this.fragmentContextID):{current:o,currentTagId:l}=this.openElements,this._setContextModes(o,l)}}_setContextModes(t,n){const s=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===K.HTML;this.currentNotInHTML=!s,this.tokenizer.inForeignNode=!s&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,K.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=R.TEXT}switchToPlaintextParsing(){this.insertionMode=R.TEXT,this.originalInsertionMode=R.IN_BODY,this.tokenizer.state=st.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)===H.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==K.HTML))switch(this.fragmentContextID){case p.TITLE:case p.TEXTAREA:{this.tokenizer.state=st.RCDATA;break}case p.STYLE:case p.XMP:case p.IFRAME:case p.NOEMBED:case p.NOFRAMES:case p.NOSCRIPT:{this.tokenizer.state=st.RAWTEXT;break}case p.SCRIPT:{this.tokenizer.state=st.SCRIPT_DATA;break}case p.PLAINTEXT:{this.tokenizer.state=st.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",s=t.publicId||"",a=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,s,a),t.location){const l=this.treeAdapter.getChildNodes(this.document).find(d=>this.treeAdapter.isDocumentTypeNode(d));l&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const s=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,s)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const s=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(s??this.document,t)}}_appendElement(t,n){const s=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(s,t.location)}_insertElement(t,n){const s=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(s,t.location),this.openElements.push(s,t.tagID)}_insertFakeElement(t,n){const s=this.treeAdapter.createElement(t,K.HTML,[]);this._attachElementToTree(s,null),this.openElements.push(s,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,K.HTML,t.attrs),s=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,s),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(H.HTML,K.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,p.HTML)}_appendCommentNode(t,n){const s=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,s),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_insertCharacters(t){let n,s;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:s}=this._findFosterParentingLocation(),s?this.treeAdapter.insertTextBefore(n,t.chars,s):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),o=s?a.lastIndexOf(s):a.length,l=a[o-1];if(this.treeAdapter.getNodeSourceCodeLocation(l)){const{endLine:f,endCol:h,endOffset:E}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(l,{endLine:f,endCol:h,endOffset:E})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}_adoptNodes(t,n){for(let s=this.treeAdapter.getFirstChild(t);s;s=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(s),this.treeAdapter.appendChild(n,s)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const s=n.location,a=this.treeAdapter.getTagName(t),o=n.type===Pe.END_TAG&&a===n.tagName?{endTag:{...s},endLine:s.endLine,endCol:s.endCol,endOffset:s.endOffset}:{endLine:s.startLine,endCol:s.startCol,endOffset:s.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,o)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,s;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,s=this.fragmentContextID):{current:n,currentTagId:s}=this.openElements,t.tagID===p.SVG&&this.treeAdapter.getTagName(n)===H.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===K.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===p.MGLYPH||t.tagID===p.MALIGNMARK)&&s!==void 0&&!this._isIntegrationPoint(s,n,K.HTML)}_processToken(t){switch(t.type){case Pe.CHARACTER:{this.onCharacter(t);break}case Pe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Pe.COMMENT:{this.onComment(t);break}case Pe.DOCTYPE:{this.onDoctype(t);break}case Pe.START_TAG:{this._processStartTag(t);break}case Pe.END_TAG:{this.onEndTag(t);break}case Pe.EOF:{this.onEof(t);break}case Pe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,s){const a=this.treeAdapter.getNamespaceURI(n),o=this.treeAdapter.getAttrList(n);return _A(t,a,o,s)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(a=>a.type===vn.Marker||this.openElements.contains(a.element)),s=n===-1?t-1:n-1;for(let a=s;a>=0;a--){const o=this.activeFormattingElements.entries[a];this._insertElement(o.token,this.treeAdapter.getNamespaceURI(o.element)),o.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=R.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(p.P),this.openElements.popUntilTagNamePopped(p.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case p.TR:{this.insertionMode=R.IN_ROW;return}case p.TBODY:case p.THEAD:case p.TFOOT:{this.insertionMode=R.IN_TABLE_BODY;return}case p.CAPTION:{this.insertionMode=R.IN_CAPTION;return}case p.COLGROUP:{this.insertionMode=R.IN_COLUMN_GROUP;return}case p.TABLE:{this.insertionMode=R.IN_TABLE;return}case p.BODY:{this.insertionMode=R.IN_BODY;return}case p.FRAMESET:{this.insertionMode=R.IN_FRAMESET;return}case p.SELECT:{this._resetInsertionModeForSelect(t);return}case p.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case p.HTML:{this.insertionMode=this.headElement?R.AFTER_HEAD:R.BEFORE_HEAD;return}case p.TD:case p.TH:{if(t>0){this.insertionMode=R.IN_CELL;return}break}case p.HEAD:{if(t>0){this.insertionMode=R.IN_HEAD;return}break}}this.insertionMode=R.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const s=this.openElements.tagIDs[n];if(s===p.TEMPLATE)break;if(s===p.TABLE){this.insertionMode=R.IN_SELECT_IN_TABLE;return}}this.insertionMode=R.IN_SELECT}_isElementCausesFosterParenting(t){return cg.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 p.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===K.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case p.TABLE:{const s=this.treeAdapter.getParentNode(n);return s?{parent:s,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 s=this.treeAdapter.getNamespaceURI(t);return QN[s].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){iw(this,t);return}switch(this.insertionMode){case R.INITIAL:{Ls(this,t);break}case R.BEFORE_HTML:{Us(this,t);break}case R.BEFORE_HEAD:{js(this,t);break}case R.IN_HEAD:{Hs(this,t);break}case R.IN_HEAD_NO_SCRIPT:{zs(this,t);break}case R.AFTER_HEAD:{$s(this,t);break}case R.IN_BODY:case R.IN_CAPTION:case R.IN_CELL:case R.IN_TEMPLATE:{fg(this,t);break}case R.TEXT:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case R.IN_TABLE:case R.IN_TABLE_BODY:case R.IN_ROW:{Tc(this,t);break}case R.IN_TABLE_TEXT:{Tg(this,t);break}case R.IN_COLUMN_GROUP:{Bu(this,t);break}case R.AFTER_BODY:{Uu(this,t);break}case R.AFTER_AFTER_BODY:{Lu(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){rw(this,t);return}switch(this.insertionMode){case R.INITIAL:{Ls(this,t);break}case R.BEFORE_HTML:{Us(this,t);break}case R.BEFORE_HEAD:{js(this,t);break}case R.IN_HEAD:{Hs(this,t);break}case R.IN_HEAD_NO_SCRIPT:{zs(this,t);break}case R.AFTER_HEAD:{$s(this,t);break}case R.TEXT:{this._insertCharacters(t);break}case R.IN_TABLE:case R.IN_TABLE_BODY:case R.IN_ROW:{Tc(this,t);break}case R.IN_COLUMN_GROUP:{Bu(this,t);break}case R.AFTER_BODY:{Uu(this,t);break}case R.AFTER_AFTER_BODY:{Lu(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Bc(this,t);return}switch(this.insertionMode){case R.INITIAL:case R.BEFORE_HTML:case R.BEFORE_HEAD:case R.IN_HEAD:case R.IN_HEAD_NO_SCRIPT:case R.AFTER_HEAD:case R.IN_BODY:case R.IN_TABLE:case R.IN_CAPTION:case R.IN_COLUMN_GROUP:case R.IN_TABLE_BODY:case R.IN_ROW:case R.IN_CELL:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:case R.IN_TEMPLATE:case R.IN_FRAMESET:case R.AFTER_FRAMESET:{Bc(this,t);break}case R.IN_TABLE_TEXT:{Rs(this,t);break}case R.AFTER_BODY:{PA(this,t);break}case R.AFTER_AFTER_BODY:case R.AFTER_AFTER_FRAMESET:{MA(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case R.INITIAL:{FA(this,t);break}case R.BEFORE_HEAD:case R.IN_HEAD:case R.IN_HEAD_NO_SCRIPT:case R.AFTER_HEAD:{this._err(t,V.misplacedDoctype);break}case R.IN_TABLE_TEXT:{Rs(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,V.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?sw(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case R.INITIAL:{Ls(this,t);break}case R.BEFORE_HTML:{BA(this,t);break}case R.BEFORE_HEAD:{jA(this,t);break}case R.IN_HEAD:{xn(this,t);break}case R.IN_HEAD_NO_SCRIPT:{$A(this,t);break}case R.AFTER_HEAD:{YA(this,t);break}case R.IN_BODY:{wt(this,t);break}case R.IN_TABLE:{Ii(this,t);break}case R.IN_TABLE_TEXT:{Rs(this,t);break}case R.IN_CAPTION:{Hv(this,t);break}case R.IN_COLUMN_GROUP:{_d(this,t);break}case R.IN_TABLE_BODY:{to(this,t);break}case R.IN_ROW:{no(this,t);break}case R.IN_CELL:{Wv(this,t);break}case R.IN_SELECT:{bg(this,t);break}case R.IN_SELECT_IN_TABLE:{Vv(this,t);break}case R.IN_TEMPLATE:{Qv(this,t);break}case R.AFTER_BODY:{Kv(this,t);break}case R.IN_FRAMESET:{Xv(this,t);break}case R.AFTER_FRAMESET:{Zv(this,t);break}case R.AFTER_AFTER_BODY:{tw(this,t);break}case R.AFTER_AFTER_FRAMESET:{nw(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?aw(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case R.INITIAL:{Ls(this,t);break}case R.BEFORE_HTML:{UA(this,t);break}case R.BEFORE_HEAD:{HA(this,t);break}case R.IN_HEAD:{zA(this,t);break}case R.IN_HEAD_NO_SCRIPT:{WA(this,t);break}case R.AFTER_HEAD:{VA(this,t);break}case R.IN_BODY:{eo(this,t);break}case R.TEXT:{Lv(this,t);break}case R.IN_TABLE:{Gs(this,t);break}case R.IN_TABLE_TEXT:{Rs(this,t);break}case R.IN_CAPTION:{zv(this,t);break}case R.IN_COLUMN_GROUP:{$v(this,t);break}case R.IN_TABLE_BODY:{Uc(this,t);break}case R.IN_ROW:{xg(this,t);break}case R.IN_CELL:{Yv(this,t);break}case R.IN_SELECT:{kg(this,t);break}case R.IN_SELECT_IN_TABLE:{qv(this,t);break}case R.IN_TEMPLATE:{Gv(this,t);break}case R.AFTER_BODY:{_g(this,t);break}case R.IN_FRAMESET:{Jv(this,t);break}case R.AFTER_FRAMESET:{ew(this,t);break}case R.AFTER_AFTER_BODY:{Lu(this,t);break}}}onEof(t){switch(this.insertionMode){case R.INITIAL:{Ls(this,t);break}case R.BEFORE_HTML:{Us(this,t);break}case R.BEFORE_HEAD:{js(this,t);break}case R.IN_HEAD:{Hs(this,t);break}case R.IN_HEAD_NO_SCRIPT:{zs(this,t);break}case R.AFTER_HEAD:{$s(this,t);break}case R.IN_BODY:case R.IN_TABLE:case R.IN_CAPTION:case R.IN_COLUMN_GROUP:case R.IN_TABLE_BODY:case R.IN_ROW:case R.IN_CELL:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:{gg(this,t);break}case R.TEXT:{Rv(this,t);break}case R.IN_TABLE_TEXT:{Rs(this,t);break}case R.IN_TEMPLATE:{Sg(this,t);break}case R.AFTER_BODY:case R.IN_FRAMESET:case R.AFTER_FRAMESET:case R.AFTER_AFTER_BODY:case R.AFTER_AFTER_FRAMESET:{Sd(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===_.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 R.IN_HEAD:case R.IN_HEAD_NO_SCRIPT:case R.AFTER_HEAD:case R.TEXT:case R.IN_COLUMN_GROUP:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:case R.IN_FRAMESET:case R.AFTER_FRAMESET:{this._insertCharacters(t);break}case R.IN_BODY:case R.IN_CAPTION:case R.IN_CELL:case R.IN_TEMPLATE:case R.AFTER_BODY:case R.AFTER_AFTER_BODY:case R.AFTER_AFTER_FRAMESET:{dg(this,t);break}case R.IN_TABLE:case R.IN_TABLE_BODY:case R.IN_ROW:{Tc(this,t);break}case R.IN_TABLE_TEXT:{Eg(this,t);break}}}}function wA(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):mg(e,t),n}function IA(e,t){let n=null,s=e.openElements.stackTop;for(;s>=0;s--){const a=e.openElements.items[s];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[s])&&(n=a)}return n||(e.openElements.shortenToLength(Math.max(s,0)),e.activeFormattingElements.removeEntry(t)),n}function LA(e,t,n){let s=t,a=e.openElements.getCommonAncestor(t);for(let o=0,l=a;l!==n;o++,l=a){a=e.openElements.getCommonAncestor(l);const d=e.activeFormattingElements.getElementEntry(l),f=d&&o>=AA;!d||f?(f&&e.activeFormattingElements.removeEntry(d),e.openElements.remove(l)):(l=RA(e,d),s===t&&(e.activeFormattingElements.bookmark=d),e.treeAdapter.detachNode(s),e.treeAdapter.appendChild(l,s),s=l)}return s}function RA(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),s=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,s),t.element=s,s}function OA(e,t,n){const s=e.treeAdapter.getTagName(t),a=Mi(s);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(n);else{const o=e.treeAdapter.getNamespaceURI(t);a===p.TEMPLATE&&o===K.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function DA(e,t,n){const s=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,o=e.treeAdapter.createElement(a.tagName,s,a.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,a.tagID)}function kd(e,t){for(let n=0;n<NA;n++){const s=wA(e,t);if(!s)break;const a=IA(e,s);if(!a)break;e.activeFormattingElements.bookmark=s;const o=LA(e,a,s.element),l=e.openElements.getCommonAncestor(s.element);e.treeAdapter.detachNode(o),l&&OA(e,l,o),DA(e,a,s)}}function Bc(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function PA(e,t){e._appendCommentNode(t,e.openElements.items[0])}function MA(e,t){e._appendCommentNode(t,e.document)}function Sd(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let s=e.openElements.stackTop;s>=n;s--)e._setEndLocation(e.openElements.items[s],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const s=e.openElements.items[0],a=e.treeAdapter.getNodeSourceCodeLocation(s);if(a&&!a.endTag&&(e._setEndLocation(s,t),e.openElements.stackTop>=1)){const o=e.openElements.items[1],l=e.treeAdapter.getNodeSourceCodeLocation(o);l&&!l.endTag&&e._setEndLocation(o,t)}}}}function FA(e,t){e._setDocumentType(t);const n=t.forceQuirks?sn.QUIRKS:hA(t);fA(t)||e._err(t,V.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=R.BEFORE_HTML}function Ls(e,t){e._err(t,V.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,sn.QUIRKS),e.insertionMode=R.BEFORE_HTML,e._processToken(t)}function BA(e,t){t.tagID===p.HTML?(e._insertElement(t,K.HTML),e.insertionMode=R.BEFORE_HEAD):Us(e,t)}function UA(e,t){const n=t.tagID;(n===p.HTML||n===p.HEAD||n===p.BODY||n===p.BR)&&Us(e,t)}function Us(e,t){e._insertFakeRootElement(),e.insertionMode=R.BEFORE_HEAD,e._processToken(t)}function jA(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.HEAD:{e._insertElement(t,K.HTML),e.headElement=e.openElements.current,e.insertionMode=R.IN_HEAD;break}default:js(e,t)}}function HA(e,t){const n=t.tagID;n===p.HEAD||n===p.BODY||n===p.HTML||n===p.BR?js(e,t):e._err(t,V.endTagWithoutMatchingOpenElement)}function js(e,t){e._insertFakeElement(H.HEAD,p.HEAD),e.headElement=e.openElements.current,e.insertionMode=R.IN_HEAD,e._processToken(t)}function xn(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:{e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break}case p.TITLE:{e._switchToTextParsing(t,st.RCDATA);break}case p.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,st.RAWTEXT):(e._insertElement(t,K.HTML),e.insertionMode=R.IN_HEAD_NO_SCRIPT);break}case p.NOFRAMES:case p.STYLE:{e._switchToTextParsing(t,st.RAWTEXT);break}case p.SCRIPT:{e._switchToTextParsing(t,st.SCRIPT_DATA);break}case p.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=R.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(R.IN_TEMPLATE);break}case p.HEAD:{e._err(t,V.misplacedStartTagForHeadElement);break}default:Hs(e,t)}}function zA(e,t){switch(t.tagID){case p.HEAD:{e.openElements.pop(),e.insertionMode=R.AFTER_HEAD;break}case p.BODY:case p.BR:case p.HTML:{Hs(e,t);break}case p.TEMPLATE:{Gr(e,t);break}default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function Gr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==p.TEMPLATE&&e._err(t,V.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,V.endTagWithoutMatchingOpenElement)}function Hs(e,t){e.openElements.pop(),e.insertionMode=R.AFTER_HEAD,e._processToken(t)}function $A(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.BASEFONT:case p.BGSOUND:case p.HEAD:case p.LINK:case p.META:case p.NOFRAMES:case p.STYLE:{xn(e,t);break}case p.NOSCRIPT:{e._err(t,V.nestedNoscriptInHead);break}default:zs(e,t)}}function WA(e,t){switch(t.tagID){case p.NOSCRIPT:{e.openElements.pop(),e.insertionMode=R.IN_HEAD;break}case p.BR:{zs(e,t);break}default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function zs(e,t){const n=t.type===Pe.EOF?V.openElementsLeftAfterEof:V.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=R.IN_HEAD,e._processToken(t)}function YA(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.BODY:{e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=R.IN_BODY;break}case p.FRAMESET:{e._insertElement(t,K.HTML),e.insertionMode=R.IN_FRAMESET;break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{e._err(t,V.abandonedHeadElementChild),e.openElements.push(e.headElement,p.HEAD),xn(e,t),e.openElements.remove(e.headElement);break}case p.HEAD:{e._err(t,V.misplacedStartTagForHeadElement);break}default:$s(e,t)}}function VA(e,t){switch(t.tagID){case p.BODY:case p.HTML:case p.BR:{$s(e,t);break}case p.TEMPLATE:{Gr(e,t);break}default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function $s(e,t){e._insertFakeElement(H.BODY,p.BODY),e.insertionMode=R.IN_BODY,Zu(e,t)}function Zu(e,t){switch(t.type){case Pe.CHARACTER:{fg(e,t);break}case Pe.WHITESPACE_CHARACTER:{dg(e,t);break}case Pe.COMMENT:{Bc(e,t);break}case Pe.START_TAG:{wt(e,t);break}case Pe.END_TAG:{eo(e,t);break}case Pe.EOF:{gg(e,t);break}}}function dg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function fg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function qA(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function QA(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function GA(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,K.HTML),e.insertionMode=R.IN_FRAMESET)}function KA(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,K.HTML)}function XA(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Fc.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,K.HTML)}function JA(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function ZA(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,K.HTML),n||(e.formElement=e.openElements.current))}function ev(e,t){e.framesetOk=!1;const n=t.tagID;for(let s=e.openElements.stackTop;s>=0;s--){const a=e.openElements.tagIDs[s];if(n===p.LI&&a===p.LI||(n===p.DD||n===p.DT)&&(a===p.DD||a===p.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==p.ADDRESS&&a!==p.DIV&&a!==p.P&&e._isSpecialElement(e.openElements.items[s],a))break}e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,K.HTML)}function tv(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.tokenizer.state=st.PLAINTEXT}function nv(e,t){e.openElements.hasInScope(p.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.framesetOk=!1}function rv(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(H.A);n&&(kd(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function iv(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function sv(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(p.NOBR)&&(kd(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function av(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function uv(e,t){e.treeAdapter.getDocumentMode(e.document)!==sn.QUIRKS&&e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=R.IN_TABLE}function hg(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function pg(e){const t=ng(e,Wr.TYPE);return t!=null&&t.toLowerCase()===CA}function ov(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),pg(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function lv(e,t){e._appendElement(t,K.HTML),t.ackSelfClosing=!0}function cv(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function dv(e,t){t.tagName=H.IMG,t.tagID=p.IMG,hg(e,t)}function fv(e,t){e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.tokenizer.state=st.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=R.TEXT}function hv(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,st.RAWTEXT)}function pv(e,t){e.framesetOk=!1,e._switchToTextParsing(t,st.RAWTEXT)}function Wm(e,t){e._switchToTextParsing(t,st.RAWTEXT)}function mv(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===R.IN_TABLE||e.insertionMode===R.IN_CAPTION||e.insertionMode===R.IN_TABLE_BODY||e.insertionMode===R.IN_ROW||e.insertionMode===R.IN_CELL?R.IN_SELECT_IN_TABLE:R.IN_SELECT}function gv(e,t){e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function Ev(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,K.HTML)}function Tv(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(p.RTC),e._insertElement(t,K.HTML)}function yv(e,t){e._reconstructActiveFormattingElements(),og(t),bd(t),t.selfClosing?e._appendElement(t,K.MATHML):e._insertElement(t,K.MATHML),t.ackSelfClosing=!0}function xv(e,t){e._reconstructActiveFormattingElements(),lg(t),bd(t),t.selfClosing?e._appendElement(t,K.SVG):e._insertElement(t,K.SVG),t.ackSelfClosing=!0}function Ym(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function wt(e,t){switch(t.tagID){case p.I:case p.S:case p.B:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.SMALL:case p.STRIKE:case p.STRONG:{iv(e,t);break}case p.A:{rv(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{XA(e,t);break}case p.P:case p.DL:case p.OL:case p.UL:case p.DIV:case p.DIR:case p.NAV:case p.MAIN:case p.MENU:case p.ASIDE:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.DETAILS:case p.ADDRESS:case p.ARTICLE:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{KA(e,t);break}case p.LI:case p.DD:case p.DT:{ev(e,t);break}case p.BR:case p.IMG:case p.WBR:case p.AREA:case p.EMBED:case p.KEYGEN:{hg(e,t);break}case p.HR:{cv(e,t);break}case p.RB:case p.RTC:{Ev(e,t);break}case p.RT:case p.RP:{Tv(e,t);break}case p.PRE:case p.LISTING:{JA(e,t);break}case p.XMP:{hv(e,t);break}case p.SVG:{xv(e,t);break}case p.HTML:{qA(e,t);break}case p.BASE:case p.LINK:case p.META:case p.STYLE:case p.TITLE:case p.SCRIPT:case p.BGSOUND:case p.BASEFONT:case p.TEMPLATE:{xn(e,t);break}case p.BODY:{QA(e,t);break}case p.FORM:{ZA(e,t);break}case p.NOBR:{sv(e,t);break}case p.MATH:{yv(e,t);break}case p.TABLE:{uv(e,t);break}case p.INPUT:{ov(e,t);break}case p.PARAM:case p.TRACK:case p.SOURCE:{lv(e,t);break}case p.IMAGE:{dv(e,t);break}case p.BUTTON:{nv(e,t);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{av(e,t);break}case p.IFRAME:{pv(e,t);break}case p.SELECT:{mv(e,t);break}case p.OPTION:case p.OPTGROUP:{gv(e,t);break}case p.NOEMBED:case p.NOFRAMES:{Wm(e,t);break}case p.FRAMESET:{GA(e,t);break}case p.TEXTAREA:{fv(e,t);break}case p.NOSCRIPT:{e.options.scriptingEnabled?Wm(e,t):Ym(e,t);break}case p.PLAINTEXT:{tv(e,t);break}case p.COL:case p.TH:case p.TD:case p.TR:case p.HEAD:case p.FRAME:case p.TBODY:case p.TFOOT:case p.THEAD:case p.CAPTION:case p.COLGROUP:break;default:Ym(e,t)}}function bv(e,t){if(e.openElements.hasInScope(p.BODY)&&(e.insertionMode=R.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function kv(e,t){e.openElements.hasInScope(p.BODY)&&(e.insertionMode=R.AFTER_BODY,_g(e,t))}function Sv(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function _v(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(p.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(p.FORM):n&&e.openElements.remove(n))}function Cv(e){e.openElements.hasInButtonScope(p.P)||e._insertFakeElement(H.P,p.P),e._closePElement()}function Nv(e){e.openElements.hasInListItemScope(p.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(p.LI),e.openElements.popUntilTagNamePopped(p.LI))}function Av(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function vv(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function wv(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Iv(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(H.BR,p.BR),e.openElements.pop(),e.framesetOk=!1}function mg(e,t){const n=t.tagName,s=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const o=e.openElements.items[a],l=e.openElements.tagIDs[a];if(s===l&&(s!==p.UNKNOWN||e.treeAdapter.getTagName(o)===n)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(o,l))break}}function eo(e,t){switch(t.tagID){case p.A:case p.B:case p.I:case p.S:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.NOBR:case p.SMALL:case p.STRIKE:case p.STRONG:{kd(e,t);break}case p.P:{Cv(e);break}case p.DL:case p.UL:case p.OL:case p.DIR:case p.DIV:case p.NAV:case p.PRE:case p.MAIN:case p.MENU:case p.ASIDE:case p.BUTTON:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.ADDRESS:case p.ARTICLE:case p.DETAILS:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.LISTING:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{Sv(e,t);break}case p.LI:{Nv(e);break}case p.DD:case p.DT:{Av(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{vv(e);break}case p.BR:{Iv(e);break}case p.BODY:{bv(e,t);break}case p.HTML:{kv(e,t);break}case p.FORM:{_v(e);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{wv(e,t);break}case p.TEMPLATE:{Gr(e,t);break}default:mg(e,t)}}function gg(e,t){e.tmplInsertionModeStack.length>0?Sg(e,t):Sd(e,t)}function Lv(e,t){var n;t.tagID===p.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Rv(e,t){e._err(t,V.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Tc(e,t){if(e.openElements.currentTagId!==void 0&&cg.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=R.IN_TABLE_TEXT,t.type){case Pe.CHARACTER:{Tg(e,t);break}case Pe.WHITESPACE_CHARACTER:{Eg(e,t);break}}else ia(e,t)}function Ov(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,K.HTML),e.insertionMode=R.IN_CAPTION}function Dv(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=R.IN_COLUMN_GROUP}function Pv(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(H.COLGROUP,p.COLGROUP),e.insertionMode=R.IN_COLUMN_GROUP,_d(e,t)}function Mv(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=R.IN_TABLE_BODY}function Fv(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(H.TBODY,p.TBODY),e.insertionMode=R.IN_TABLE_BODY,to(e,t)}function Bv(e,t){e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Uv(e,t){pg(t)?e._appendElement(t,K.HTML):ia(e,t),t.ackSelfClosing=!0}function jv(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,K.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ii(e,t){switch(t.tagID){case p.TD:case p.TH:case p.TR:{Fv(e,t);break}case p.STYLE:case p.SCRIPT:case p.TEMPLATE:{xn(e,t);break}case p.COL:{Pv(e,t);break}case p.FORM:{jv(e,t);break}case p.TABLE:{Bv(e,t);break}case p.TBODY:case p.TFOOT:case p.THEAD:{Mv(e,t);break}case p.INPUT:{Uv(e,t);break}case p.CAPTION:{Ov(e,t);break}case p.COLGROUP:{Dv(e,t);break}default:ia(e,t)}}function Gs(e,t){switch(t.tagID){case p.TABLE:{e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode());break}case p.TEMPLATE:{Gr(e,t);break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:ia(e,t)}}function ia(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Zu(e,t),e.fosterParentingEnabled=n}function Eg(e,t){e.pendingCharacterTokens.push(t)}function Tg(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Rs(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ia(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const yg=new Set([p.CAPTION,p.COL,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]);function Hv(e,t){const n=t.tagID;yg.has(n)?e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=R.IN_TABLE,Ii(e,t)):wt(e,t)}function zv(e,t){const n=t.tagID;switch(n){case p.CAPTION:case p.TABLE:{e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=R.IN_TABLE,n===p.TABLE&&Gs(e,t));break}case p.BODY:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:eo(e,t)}}function _d(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.COL:{e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break}case p.TEMPLATE:{xn(e,t);break}default:Bu(e,t)}}function $v(e,t){switch(t.tagID){case p.COLGROUP:{e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=R.IN_TABLE);break}case p.TEMPLATE:{Gr(e,t);break}case p.COL:break;default:Bu(e,t)}}function Bu(e,t){e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=R.IN_TABLE,e._processToken(t))}function to(e,t){switch(t.tagID){case p.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,K.HTML),e.insertionMode=R.IN_ROW;break}case p.TH:case p.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(H.TR,p.TR),e.insertionMode=R.IN_ROW,no(e,t);break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE,Ii(e,t));break}default:Ii(e,t)}}function Uc(e,t){const n=t.tagID;switch(t.tagID){case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE);break}case p.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE,Gs(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:case p.TR:break;default:Gs(e,t)}}function no(e,t){switch(t.tagID){case p.TH:case p.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,K.HTML),e.insertionMode=R.IN_CELL,e.activeFormattingElements.insertMarker();break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE_BODY,to(e,t));break}default:Ii(e,t)}}function xg(e,t){switch(t.tagID){case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE_BODY);break}case p.TABLE:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE_BODY,Uc(e,t));break}case p.TBODY:case p.TFOOT:case p.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(p.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE_BODY,Uc(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:break;default:Gs(e,t)}}function Wv(e,t){const n=t.tagID;yg.has(n)?(e.openElements.hasInTableScope(p.TD)||e.openElements.hasInTableScope(p.TH))&&(e._closeTableCell(),no(e,t)):wt(e,t)}function Yv(e,t){const n=t.tagID;switch(n){case p.TD:case p.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=R.IN_ROW);break}case p.TABLE:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),xg(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:break;default:eo(e,t)}}function bg(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._insertElement(t,K.HTML);break}case p.OPTGROUP:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._insertElement(t,K.HTML);break}case p.HR:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break}case p.INPUT:case p.KEYGEN:case p.TEXTAREA:case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),t.tagID!==p.SELECT&&e._processStartTag(t));break}case p.SCRIPT:case p.TEMPLATE:{xn(e,t);break}}}function kg(e,t){switch(t.tagID){case p.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===p.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===p.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop();break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop();break}case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode());break}case p.TEMPLATE:{Gr(e,t);break}}}function Vv(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e._processStartTag(t)):bg(e,t)}function qv(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e.onEndTag(t)):kg(e,t)}function Qv(e,t){switch(t.tagID){case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{xn(e,t);break}case p.CAPTION:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.tmplInsertionModeStack[0]=R.IN_TABLE,e.insertionMode=R.IN_TABLE,Ii(e,t);break}case p.COL:{e.tmplInsertionModeStack[0]=R.IN_COLUMN_GROUP,e.insertionMode=R.IN_COLUMN_GROUP,_d(e,t);break}case p.TR:{e.tmplInsertionModeStack[0]=R.IN_TABLE_BODY,e.insertionMode=R.IN_TABLE_BODY,to(e,t);break}case p.TD:case p.TH:{e.tmplInsertionModeStack[0]=R.IN_ROW,e.insertionMode=R.IN_ROW,no(e,t);break}default:e.tmplInsertionModeStack[0]=R.IN_BODY,e.insertionMode=R.IN_BODY,wt(e,t)}}function Gv(e,t){t.tagID===p.TEMPLATE&&Gr(e,t)}function Sg(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Sd(e,t)}function Kv(e,t){t.tagID===p.HTML?wt(e,t):Uu(e,t)}function _g(e,t){var n;if(t.tagID===p.HTML){if(e.fragmentContext||(e.insertionMode=R.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===p.HTML){e._setEndLocation(e.openElements.items[0],t);const s=e.openElements.items[1];s&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(s))===null||n===void 0)&&n.endTag)&&e._setEndLocation(s,t)}}else Uu(e,t)}function Uu(e,t){e.insertionMode=R.IN_BODY,Zu(e,t)}function Xv(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.FRAMESET:{e._insertElement(t,K.HTML);break}case p.FRAME:{e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break}case p.NOFRAMES:{xn(e,t);break}}}function Jv(e,t){t.tagID===p.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==p.FRAMESET&&(e.insertionMode=R.AFTER_FRAMESET))}function Zv(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.NOFRAMES:{xn(e,t);break}}}function ew(e,t){t.tagID===p.HTML&&(e.insertionMode=R.AFTER_AFTER_FRAMESET)}function tw(e,t){t.tagID===p.HTML?wt(e,t):Lu(e,t)}function Lu(e,t){e.insertionMode=R.IN_BODY,Zu(e,t)}function nw(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.NOFRAMES:{xn(e,t);break}}}function rw(e,t){t.chars=Je,e._insertCharacters(t)}function iw(e,t){e._insertCharacters(t),e.framesetOk=!1}function Cg(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==K.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function sw(e,t){if(xA(t))Cg(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),s=e.treeAdapter.getNamespaceURI(n);s===K.MATHML?og(t):s===K.SVG&&(bA(t),lg(t)),bd(t),t.selfClosing?e._appendElement(t,s):e._insertElement(t,s),t.ackSelfClosing=!0}}function aw(e,t){if(t.tagID===p.P||t.tagID===p.BR){Cg(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const s=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(s)===K.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(s);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}H.AREA,H.BASE,H.BASEFONT,H.BGSOUND,H.BR,H.COL,H.EMBED,H.FRAME,H.HR,H.IMG,H.INPUT,H.KEYGEN,H.LINK,H.META,H.PARAM,H.SOURCE,H.TRACK,H.WBR;const uw=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,ow=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Vm={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Ng(e,t){const n=Tw(e),s=v1("type",{handlers:{root:lw,element:cw,text:dw,comment:vg,doctype:fw,raw:pw},unknown:mw}),a={parser:n?new $m(Vm):$m.getFragmentParser(void 0,Vm),handle(d){s(d,a)},stitches:!1,options:t||{}};s(e,a),Fi(a,In());const o=n?a.parser.document:a.parser.getFragment(),l=yN(o,{file:a.options.file});return a.stitches&&Ju(l,"comment",function(d,f,h){const E=d;if(E.value.stitch&&h&&f!==void 0){const g=h.children;return g[f]=E.value.stitch,f}}),l.type==="root"&&l.children.length===1&&l.children[0].type===e.type?l.children[0]:l}function Ag(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function lw(e,t){Ag(e.children,t)}function cw(e,t){gw(e,t),Ag(e.children,t),Ew(e,t)}function dw(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Pe.CHARACTER,chars:e.value,location:sa(e)};Fi(t,In(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function fw(e,t){const n={type:Pe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:sa(e)};Fi(t,In(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function hw(e,t){t.stitches=!0;const n=yw(e);if("children"in e&&"children"in n){const s=Ng({type:"root",children:e.children},t.options);n.children=s.children}vg({type:"comment",value:{stitch:n}},t)}function vg(e,t){const n=e.value,s={type:Pe.COMMENT,data:n,location:sa(e)};Fi(t,In(e)),t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken)}function pw(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,wg(t,In(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(uw,"<$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 mw(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))hw(n,t);else{let s="";throw ow.has(n.type)&&(s=". 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"+s)}}function Fi(e,t){wg(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=st.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 wg(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 gw(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===st.PLAINTEXT)return;Fi(t,In(e));const s=t.parser.openElements.current;let a="namespaceURI"in s?s.namespaceURI:zr.html;a===zr.html&&n==="svg"&&(a=zr.svg);const o=_N({...e,children:[]},{space:a===zr.svg?"svg":"html"}),l={type:Pe.START_TAG,tagName:n,tagID:Mi(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:sa(e)};t.parser.currentToken=l,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Ew(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&RN.includes(n)||t.parser.tokenizer.state===st.PLAINTEXT)return;Fi(t,Vu(e));const s={type:Pe.END_TAG,tagName:n,tagID:Mi(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:sa(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===st.RCDATA||t.parser.tokenizer.state===st.RAWTEXT||t.parser.tokenizer.state===st.SCRIPT_DATA)&&(t.parser.tokenizer.state=st.DATA)}function Tw(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function sa(e){const t=In(e)||{line:void 0,column:void 0,offset:void 0},n=Vu(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 yw(e){return"children"in e?Vr({...e,children:[]}):Vr(e)}function xw(e){return function(t,n){return Ng(t,{...e,file:n})}}const Br=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],jc={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Br,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Br],h2:[["className","sr-only"]],img:[...Br,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Br,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Br],table:[...Br],ul:[...Br,["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"]},gr={}.hasOwnProperty;function bw(e,t){let n={type:"root",children:[]};const s={schema:t?{...jc,...t}:jc,stack:[]},a=Ig(s,e);return a&&(Array.isArray(a)?a.length===1?n=a[0]:n.children=a:n=a),n}function Ig(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return kw(e,n);case"doctype":return Sw(e,n);case"element":return _w(e,n);case"root":return Cw(e,n);case"text":return Nw(e,n)}}}function kw(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",s=n.indexOf("-->"),o={type:"comment",value:s<0?n:n.slice(0,s)};return aa(o,t),o}}function Sw(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return aa(n,t),n}}function _w(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const s=Lg(e,t.children),a=Aw(e,t.properties);e.stack.pop();let o=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(o=!0,e.schema.ancestors&&gr.call(e.schema.ancestors,n))){const d=e.schema.ancestors[n];let f=-1;for(o=!1;++f<d.length;)e.stack.includes(d[f])&&(o=!0)}if(!o)return e.schema.strip&&!e.schema.strip.includes(n)?s:void 0;const l={type:"element",tagName:n,properties:a,children:s};return aa(l,t),l}function Cw(e,t){const s={type:"root",children:Lg(e,t.children)};return aa(s,t),s}function Nw(e,t){const s={type:"text",value:typeof t.value=="string"?t.value:""};return aa(s,t),s}function Lg(e,t){const n=[];if(Array.isArray(t)){const s=t;let a=-1;for(;++a<s.length;){const o=Ig(e,s[a]);o&&(Array.isArray(o)?n.push(...o):n.push(o))}}return n}function Aw(e,t){const n=e.stack[e.stack.length-1],s=e.schema.attributes,a=e.schema.required,o=s&&gr.call(s,n)?s[n]:void 0,l=s&&gr.call(s,"*")?s["*"]:void 0,d=t&&typeof t=="object"?t:{},f={};let h;for(h in d)if(gr.call(d,h)){const E=d[h];let g=qm(e,Qm(o,h),h,E);g==null&&(g=qm(e,Qm(l,h),h,E)),g!=null&&(f[h]=g)}if(a&&gr.call(a,n)){const E=a[n];for(h in E)gr.call(E,h)&&!gr.call(f,h)&&(f[h]=E[h])}return f}function qm(e,t,n,s){return t?Array.isArray(s)?vw(e,t,n,s):Rg(e,t,n,s):void 0}function vw(e,t,n,s){let a=-1;const o=[];for(;++a<s.length;){const l=Rg(e,t,n,s[a]);(typeof l=="number"||typeof l=="string")&&o.push(l)}return o}function Rg(e,t,n,s){if(!(typeof s!="boolean"&&typeof s!="number"&&typeof s!="string")&&ww(e,n,s)){if(typeof t=="object"&&t.length>1){let a=!1,o=0;for(;++o<t.length;){const l=t[o];if(l&&typeof l=="object"&&"flags"in l){if(l.test(String(s))){a=!0;break}}else if(l===s){a=!0;break}}if(!a)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+s:s}}function ww(e,t,n){const s=e.schema.protocols&&gr.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!s||s.length===0)return!0;const a=String(n),o=a.indexOf(":"),l=a.indexOf("?"),d=a.indexOf("#"),f=a.indexOf("/");if(o<0||f>-1&&o>f||l>-1&&o>l||d>-1&&o>d)return!0;let h=-1;for(;++h<s.length;){const E=s[h];if(o===E.length&&a.slice(0,E.length)===E)return!0}return!1}function aa(e,t){const n=X0(t);t.data&&(e.data=Vr(t.data)),n&&(e.position=n)}function Qm(e,t){let n,s=-1;if(e)for(;++s<e.length;){const a=e[s],o=typeof a=="string"?a:a[0];if(o===t)return a;o==="data*"&&(n=a)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function Iw(e){return function(t){return bw(t,e)}}const Hc=jc,Ur=(e,...t)=>{var n;return[...((n=Hc.attributes)==null?void 0:n[e])??[],...t]},Lw={...Hc,attributes:{...Hc.attributes,p:Ur("p","align"),div:Ur("div","align"),h1:Ur("h1","align"),h2:Ur("h2","align"),h3:Ur("h3","align"),img:Ur("img","width","height","align"),a:Ur("a","align")}},Rw=new Set(["code","pre","svg","math","style","script","textarea"]),Ow="fade-word";function Dw(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:[Ow]},children:[{type:"text",value:n}]})}return t}function Og(e){const t=e.children;if(!t)return;const n=[];for(const s of t){if(s.type==="text"){n.push(...Dw(s.value??""));continue}if(s.type==="element"&&Rw.has(s.tagName??"")){n.push(s);continue}Og(s),n.push(s)}e.children=n}function Pw(){return e=>Og(e)}const Mw=256*1024;let jr=null,Fw=0;const ju=new Map;function Gm(e,t){var n;(n=ju.get(e))==null||n(t),ju.delete(e)}function Bw(){if(jr)return jr;try{jr=new Worker(new URL("/assets/highlightWorker-DJp1Ce5p.js",import.meta.url),{type:"module"}),jr.addEventListener("message",e=>Gm(e.data.id,e.data.html)),jr.addEventListener("error",()=>{for(const e of[...ju.keys()])Gm(e,null);jr=null})}catch{return null}return jr}async function Cd(e,t){if(e.length>Mw)return null;const n=Bw();if(!n)return null;const s=++Fw;return new Promise(a=>{ju.set(s,a),n.postMessage({id:s,code:e,lang:t})})}function Uw({code:e,lang:t}){const[n,s]=w.useState(null);w.useEffect(()=>{let o=!1;return Cd(e,t).then(l=>{o||s(l)}).catch(()=>{o||s(null)}),()=>{o=!0}},[e,t]);const a=()=>{var o;return void((o=navigator.clipboard)==null?void 0:o.writeText(e))};return y.jsxs("div",{className:"codeblock",children:[y.jsxs("div",{className:"codeblock-bar",children:[y.jsx("span",{className:"codeblock-lang",children:t||"text"}),y.jsx("button",{className:"codeblock-copy",onClick:a,"aria-label":"Copy code",children:"copy"})]}),n?y.jsx("div",{className:"codeblock-body",dangerouslySetInnerHTML:{__html:n}}):y.jsx("pre",{className:"codeblock-body codeblock-plain",children:y.jsx("code",{children:e})})]})}let yc=null;function jw(){return yc||(yc=_c(()=>import("./mermaid.core-DQxD-Al4.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))),yc}let Hw=0;function zw({code:e}){const t=w.useRef(null),[n,s]=w.useState(!1);return w.useEffect(()=>{let a=!1;s(!1);const o=e.trim();if(o)return jw().then(async l=>{const d=await l.parse(o,{suppressErrors:!0});if(a||!d)return;const{svg:f}=await l.render(`mermaid-${Hw++}`,o);a||!t.current||(t.current.innerHTML=f,s(!0))}).catch(()=>{}),()=>{a=!0}},[e]),y.jsxs("div",{className:"mermaid-wrap",children:[y.jsx("div",{className:`mermaid-block ${n?"":"is-hidden"}`,ref:t}),!n&&y.jsxs("div",{className:"codeblock",children:[y.jsx("div",{className:"codeblock-bar",children:y.jsx("span",{className:"codeblock-lang",children:"mermaid"})}),y.jsx("pre",{className:"codeblock-body codeblock-plain",children:y.jsx("code",{children:e})})]})]})}const $w=/language-(\w+)/,Ww=/\n$/,Yw={code(e){const{className:t,children:n}=e,s=$w.exec(t??""),a=String(n).replace(Ww,"");if(!t&&!a.includes(`
|
|
92
|
+
`))return y.jsx("code",{className:"md-inline-code",children:a});const l=(s==null?void 0:s[1])??"";return l==="mermaid"?y.jsx(zw,{code:a}):y.jsx(Uw,{code:a,lang:l})},a(e){return y.jsx("a",{...e,target:"_blank",rel:"noreferrer noopener"})}};let vi=null,Km=null;function Dg(){return Km??(Km=Promise.all([_c(()=>import("./index-CTPzyuSS.js"),__vite__mapDeps([0,1])),_c(()=>Promise.resolve({}),__vite__mapDeps([2]))]).then(([e])=>{vi=e.default})),Km}let Xm=!1;function Vw(){if(Xm||vi)return;Xm=!0;const e=()=>void Dg(),t=globalThis.requestIdleCallback;t?t(e):setTimeout(e,2e3)}const qw=/(^|[^\\])\$/,Ks=w.memo(function({text:t,html:n=!1,streaming:s=!1}){const a=w.useMemo(()=>oN(t),[t]),o=qw.test(a),[l,d]=w.useState(()=>vi!==null);w.useEffect(()=>{if(vi)return;if(!o){Vw();return}let h=!0;return Dg().then(()=>{h&&d(!0)}),()=>{h=!1}},[o]);const f=w.useMemo(()=>{const h=o&&vi?[vi]:[];return n?[xw,[Iw,Lw],...h]:s?[...h,Pw]:h},[n,s,o,l]);return y.jsx("div",{className:"md",children:y.jsx(v_,{remarkPlugins:J3,rehypePlugins:f,components:Yw,children:a})})});function Qw(e,t){if(!e||!t)return null;if(!t.startsWith("/"))return Zm(t.replace(/^\.\//,""));const n=Jm(e),s=Zm(Jm(t));return s===null||s===n?null:s.startsWith(`${n}/`)?s.slice(n.length+1):null}const Jm=e=>e.replace(/\/+$/,"");function Zm(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 s=n.join("/");return t?`/${s}`:s}const Gw=4e5;function e0(e,t){const n=e.split(`
|
|
93
|
+
`),s=t.split(`
|
|
94
|
+
`),a=n.length,o=s.length;if(a*o>Gw)return[...n.map(E=>({type:"del",text:E})),...s.map(E=>({type:"add",text:E}))];const l=Array.from({length:a+1},()=>new Array(o+1).fill(0));for(let E=a-1;E>=0;E--)for(let g=o-1;g>=0;g--)l[E][g]=n[E]===s[g]?l[E+1][g+1]+1:Math.max(l[E+1][g],l[E][g+1]);const d=[];let f=0,h=0;for(;f<a&&h<o;)n[f]===s[h]?(d.push({type:"ctx",text:n[f]}),f++,h++):l[f+1][h]>=l[f][h+1]?(d.push({type:"del",text:n[f]}),f++):(d.push({type:"add",text:s[h]}),h++);for(;f<a;)d.push({type:"del",text:n[f++]});for(;h<o;)d.push({type:"add",text:s[h++]});return d}const Pg={loading:"lazy",decoding:"async",ref:e=>{e!=null&&e.complete&&(e.dataset.loaded="")},onLoad:e=>{e.currentTarget.dataset.loaded=""}},En=e=>!!e&&typeof e=="object";function Nd(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=En(e.input)?e.input:{},n=e.kind,s=typeof t.command=="string"?t.command:void 0,a=o=>Object.prototype.hasOwnProperty.call(t,o);return e.title==="todo_list"||a("tasks")||a("task_list_description")||a("completed_task_ids")||a("remove_task_ids")||s!==void 0&&["complete","add","remove","list"].includes(s)?"todo":n==="read"||Array.isArray(t.operations)||e.title==="read"?"read":e.title==="grep"||typeof t.pattern=="string"&&!a("operations")?"grep":n==="edit"||e.title==="write"||e.title==="strReplace"||(s==="create"||s==="strReplace"||s==="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 Kw={shell:"shell",write:"write",read:"read",grep:"grep",todo:"todo_list",webfetch:"web_fetch",websearch:"web_search",introspect:"introspect",generic:void 0},Xw=/^@?([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)$/,Jw=/@([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)/;function Zw(e){const t=Xw.exec(e.name??"");if(t)return`@${t[1]}/${t[2]}`;const n=Jw.exec(e.title??"");return!n||e.name&&e.name!==n[2]?null:`@${n[1]}/${n[2]}`}function eI(e){const t=Zw(e);if(t)return t;if(e.name)return e.name;const n=Kw[Nd(e)];if(n)return n;const s=e.title??"";return s&&!/\s/.test(s)?s:"tool"}function Mg(e){const t=e.trim().split("/").pop()??"",n=t.includes(".")?t.split(".").pop().toLowerCase():t.toLowerCase();return{ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",mjs:"javascript",cjs:"javascript",json:"json",jsonc:"json",css:"css",scss:"scss",less:"less",html:"html",htm:"html",xml:"xml",svg:"xml",vue:"vue",svelte:"svelte",md:"markdown",markdown:"markdown",py:"python",rb:"ruby",rs:"rust",go:"go",java:"java",kt:"kotlin",c:"c",h:"c",cpp:"cpp",cc:"cpp",hpp:"cpp",cs:"csharp",sh:"bash",bash:"bash",zsh:"bash",yml:"yaml",yaml:"yaml",toml:"toml",sql:"sql",php:"php",swift:"swift",lua:"lua",dockerfile:"docker",ini:"ini",conf:"ini",env:"ini",proto:"proto",graphql:"graphql"}[n]??"text"}function Kr(e){const t=[];for(const n of e)En(n)&&(n.type==="content"&&En(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 Xr(e){for(const t of e)if(En(t)&&t.kind==="json"&&En(t.data))return t.data;return null}function Ad(e){const t=Object.keys(e);return t.length===1&&typeof e[t[0]]=="string"?e[t[0]]:null}function tI(e){if(e==null)return[];if(typeof e=="string")return e?[{kind:"text",data:e}]:[];if(En(e)&&Array.isArray(e.items)){const t=[];for(const n of e.items)En(n)&&(typeof n.Text=="string"?t.push({kind:"text",data:n.Text}):En(n.Json)&&t.push({kind:"json",data:n.Json}));return t}return[]}function br(e){return[...Array.isArray(e.content)?e.content:[],...tI(e.output)]}function nI(e){for(const t of e)if(En(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 rI(e){let t=Xr(e);if(!t||!Array.isArray(t.tasks)){const n=Kr(e).trim();if(n.startsWith("{"))try{const s=JSON.parse(n);t=En(s)?s:null}catch{t=null}}return t&&Array.isArray(t.tasks)?t.tasks.map(n=>{const s=En(n)?n:{};return{desc:typeof s.task_description=="string"?s.task_description:"",done:s.completed===!0}}):null}const iI=["https://cdnjs.cloudflare.com","https://cdn.jsdelivr.net","https://unpkg.com","https://esm.sh"];function sI(){const e=iI.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 aI=`
|
|
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
|
+
// The only way a widget can talk to Casper: ask for a prompt to be sent. The
|
|
104
|
+
// app decides whether to honour it.
|
|
105
|
+
window.casper = {
|
|
106
|
+
sendPrompt: function (text) {
|
|
107
|
+
if (typeof text !== 'string' || !text.trim()) return;
|
|
108
|
+
post({ type: 'casper:prompt', text: text.slice(0, 4000) });
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
// Guarded, because a second pass would replace the nodes a widget's scripts are
|
|
113
|
+
// already driving with inert copies.
|
|
114
|
+
function setContent(html) {
|
|
115
|
+
if (!root) root = document.getElementById('root');
|
|
116
|
+
if (!root || html === last) return;
|
|
117
|
+
last = html;
|
|
118
|
+
root.innerHTML = html;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// innerHTML leaves scripts inert; recreating them runs them, once the content is
|
|
122
|
+
// final so a half-written script never executes. One at a time, waiting on anything
|
|
123
|
+
// with a src: a real document blocks there, and running them all at once is how you
|
|
124
|
+
// get "Chart is not defined".
|
|
125
|
+
function runScripts() {
|
|
126
|
+
if (scripted) return;
|
|
127
|
+
scripted = true;
|
|
128
|
+
var list = [].slice.call(root.querySelectorAll('script'));
|
|
129
|
+
var index = 0;
|
|
130
|
+
|
|
131
|
+
function next() {
|
|
132
|
+
if (index >= list.length) return;
|
|
133
|
+
var old = list[index++];
|
|
134
|
+
var fresh = document.createElement('script');
|
|
135
|
+
for (var a = 0; a < old.attributes.length; a++) {
|
|
136
|
+
fresh.setAttribute(old.attributes[a].name, old.attributes[a].value);
|
|
137
|
+
}
|
|
138
|
+
fresh.textContent = old.textContent;
|
|
139
|
+
var external = Boolean(old.getAttribute('src'));
|
|
140
|
+
if (external) {
|
|
141
|
+
fresh.async = false;
|
|
142
|
+
var moved = false;
|
|
143
|
+
var advance = function () {
|
|
144
|
+
if (moved) return;
|
|
145
|
+
moved = true;
|
|
146
|
+
next();
|
|
147
|
+
};
|
|
148
|
+
fresh.onload = advance;
|
|
149
|
+
fresh.onerror = advance;
|
|
150
|
+
// A CDN that never answers shouldn't strand the rest of the widget.
|
|
151
|
+
setTimeout(advance, 10000);
|
|
152
|
+
}
|
|
153
|
+
old.parentNode.replaceChild(fresh, old);
|
|
154
|
+
if (!external) next();
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
next();
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
var lastHeight = 0;
|
|
161
|
+
|
|
162
|
+
// Measured off #root, not the document: in a frame the html box is the viewport,
|
|
163
|
+
// so it reports the size the host already chose rather than the content's. The
|
|
164
|
+
// two spare pixels absorb fractional layout heights, which otherwise leave a
|
|
165
|
+
// sliver of overflow and a scrollbar.
|
|
166
|
+
function contentHeight() {
|
|
167
|
+
if (!root) root = document.getElementById('root');
|
|
168
|
+
var bottom = 0;
|
|
169
|
+
if (root) {
|
|
170
|
+
var box = root.getBoundingClientRect();
|
|
171
|
+
bottom = box.top + Math.max(root.scrollHeight, box.height);
|
|
172
|
+
}
|
|
173
|
+
var body = document.body ? document.body.scrollHeight : 0;
|
|
174
|
+
return Math.ceil(Math.max(bottom, body)) + 2;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function reportHeight() {
|
|
178
|
+
var h = contentHeight();
|
|
179
|
+
if (h !== lastHeight) { lastHeight = h; post({ type: 'casper:height', height: h }); }
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
if (window.ResizeObserver) {
|
|
183
|
+
var ro = new ResizeObserver(reportHeight);
|
|
184
|
+
ro.observe(document.documentElement);
|
|
185
|
+
// The one that actually grows with the content.
|
|
186
|
+
if (root) ro.observe(root);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// Canvases and late fonts resize without tripping the observer, so poll too -
|
|
190
|
+
// but only briefly after the content settles. A transcript full of widgets each
|
|
191
|
+
// polling forever would read layout dozens of times a second.
|
|
192
|
+
var poll = null;
|
|
193
|
+
function pollHeight(ms) {
|
|
194
|
+
if (poll) clearInterval(poll);
|
|
195
|
+
var until = Date.now() + ms;
|
|
196
|
+
poll = setInterval(function () {
|
|
197
|
+
reportHeight();
|
|
198
|
+
if (Date.now() > until) { clearInterval(poll); poll = null; }
|
|
199
|
+
}, 250);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
window.addEventListener('message', function (e) {
|
|
203
|
+
if (e.source !== parent) return;
|
|
204
|
+
var d = e.data;
|
|
205
|
+
if (!d || typeof d !== 'object') return;
|
|
206
|
+
if (d.type === 'casper:theme') {
|
|
207
|
+
document.getElementById('theme').textContent = ':root{' + d.css + '}';
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
if (d.type !== 'casper:html') return;
|
|
211
|
+
setContent(d.html);
|
|
212
|
+
reportHeight();
|
|
213
|
+
runScripts();
|
|
214
|
+
// Scripts can draw for a while after they run; watch a little longer.
|
|
215
|
+
pollHeight(4000);
|
|
216
|
+
});
|
|
217
|
+
})();
|
|
218
|
+
`,uI=`
|
|
219
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
220
|
+
html, body { margin: 0; padding: 0; background: transparent; }
|
|
221
|
+
/* The host sizes the frame to fit, so a scrollbar in here is always a measuring
|
|
222
|
+
error rather than something to scroll. */
|
|
223
|
+
html { overflow: hidden; }
|
|
224
|
+
body {
|
|
225
|
+
font-family: var(--font-body, system-ui, sans-serif);
|
|
226
|
+
font-size: 14px;
|
|
227
|
+
line-height: 1.5;
|
|
228
|
+
color: var(--color-text-primary, #f8f8f2);
|
|
229
|
+
overflow-x: hidden;
|
|
230
|
+
}
|
|
231
|
+
#root { overflow-x: hidden; }
|
|
232
|
+
a { color: var(--color-accent, #bd93f9); }
|
|
233
|
+
::-webkit-scrollbar { width: 8px; height: 8px; }
|
|
234
|
+
::-webkit-scrollbar-thumb { background: var(--color-border, #44475a); border-radius: 4px; }
|
|
235
|
+
`;function oI(){return`<!doctype html>
|
|
236
|
+
<html>
|
|
237
|
+
<head>
|
|
238
|
+
<meta charset="utf-8">
|
|
239
|
+
<meta http-equiv="Content-Security-Policy" content="${sI()}">
|
|
240
|
+
<meta name="color-scheme" content="dark">
|
|
241
|
+
<style>${uI}</style>
|
|
242
|
+
<style id="theme"></style>
|
|
243
|
+
</head>
|
|
244
|
+
<body><div id="root"></div>
|
|
245
|
+
<!-- Runtime last: it grabs #root on the way in, so the element has to exist. -->
|
|
246
|
+
<script>${aI}<\/script>
|
|
247
|
+
</body>
|
|
248
|
+
</html>`}const lI=oI(),cI=256*1024;function dI(){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 fI({code:e}){const t=w.useRef(null),[n,s]=w.useState(!1),[a,o]=w.useState(120),l=e.length>cI;w.useEffect(()=>{const f=t.current;if(!f)return;const h=E=>{if(E.source!==f.contentWindow)return;const g=E.data;(g==null?void 0:g.type)==="casper:height"&&typeof g.height=="number"?o(Math.min(Math.max(g.height,40),2e3)):(g==null?void 0:g.type)==="casper:prompt"&&typeof g.text=="string"&&P0(g.text)};return window.addEventListener("message",h),()=>window.removeEventListener("message",h)},[]),w.useEffect(()=>{var f,h;n&&((h=(f=t.current)==null?void 0:f.contentWindow)==null||h.postMessage({type:"casper:theme",css:dI()},"*"))},[n]),w.useEffect(()=>{var f,h;!n||l||(h=(f=t.current)==null?void 0:f.contentWindow)==null||h.postMessage({type:"casper:html",html:e.trimStart()},"*")},[e,n,l]);const d=()=>s(!0);return l?y.jsxs("div",{className:"widget-error",children:["Widget is ",Math.round(e.length/1024)," KB, too large to render."]}):y.jsx("div",{className:"widget-wrap",style:{height:a},children:y.jsx("iframe",{ref:t,className:"widget-frame",title:"Widget",sandbox:"allow-scripts",srcDoc:lI,onLoad:d})})}const hI="show_widget";function Fg(e){var a;if(!((a=e.name)!=null&&a.endsWith(hI)))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 pI(e){return e.replace(/_/g," ").trim()}function mI({tool:e}){const t=Fg(e);return t?e.status==="failed"?y.jsxs("div",{className:"widget-error",children:["Widget ",pI(t.title)||"call"," failed."]}):t.code?y.jsx(fI,{code:t.code}):null:null}function gI(e){var o;if(!((o=e.name)!=null&&o.endsWith("show_choice")))return null;const t=e.input??{},n=typeof t.question=="string"?t.question.trim():"",s=Array.isArray(t.options)?t.options:[],a=[];for(const l of s){const d=l??{},f=typeof d.label=="string"&&d.label.trim()?d.label:"";if(!f)continue;const h=typeof d.detail=="string"&&d.detail.trim()?d.detail:void 0,E=typeof d.prompt=="string"&&d.prompt.trim()?d.prompt:f;a.push({label:f,detail:h,prompt:E})}return!n||a.length<2?null:{question:n,options:a}}function EI(e,t){if(t===null)return{picked:null,superseded:!1};const n=e.find(s=>s.prompt.trim()===t.trim());return n?{picked:n.label,superseded:!1}:{picked:null,superseded:!0}}function TI(e){var a;const{items:t,pending:n}=be.getState(),s=t.findIndex(o=>o.type==="tool_call"&&o.tool.id===e);if(s===-1)return null;for(const o of t.slice(s+1))if(o.type==="message"&&o.message.role==="user")return o.message.text;return((a=n[0])==null?void 0:a.text)??null}function yI({data:e,toolId:t}){const n=be(E=>E.items),s=be(E=>E.pending),[a,o]=w.useState(null),l=EI(e.options,n.length||s.length?TI(t):null),d=a??l.picked,f=d!==null||l.superseded,h=E=>{f||P0(E.prompt)&&o(E.label)};return y.jsxs("div",{className:"tpl-choice",children:[y.jsx("p",{className:"tpl-choice-q",children:e.question}),y.jsx("div",{className:"tpl-choice-opts",children:e.options.map(E=>{const g=d===E.label;return y.jsxs("button",{className:`tpl-choice-opt${g?" is-picked":""}`,onClick:()=>h(E),disabled:f,"aria-pressed":g,children:[y.jsx("span",{className:"tpl-choice-label",children:E.label}),E.detail&&y.jsx("span",{className:"tpl-choice-detail",children:E.detail})]},E.label)})})]})}const xI={pending:"queued",in_progress:"running",completed:"done",failed:"failed"},kt=e=>e&&typeof e=="object"?e:null,$e=e=>typeof e=="string"?e:void 0,t0=e=>e.split("/").pop()||e;function bI(e){const t=Array.isArray(e.operations)?e.operations:[];for(const n of t){const s=kt(n);if(s&&typeof s.path=="string")return s.path;if(s&&Array.isArray(s.image_paths)&&typeof s.image_paths[0]=="string")return s.image_paths[0]}}function kI(e){const t=kt(e.input);if(!t)return null;const n=$e(t.__tool_use_purpose);if(n)return{text:n};switch(Nd(e)){case"write":{const s=$e(t.path);return s?{text:t0(s),title:s}:null}case"read":{const s=bI(t);return s?{text:t0(s),title:s}:null}case"grep":{const s=$e(t.pattern);return s?{text:s}:null}case"websearch":case"introspect":{const s=$e(t.query)??$e(t.doc_path);return s?{text:s}:null}case"webfetch":{const s=$e(t.url);if(!s)return null;let a=s;try{a=new URL(s).hostname||s}catch{}return{text:a,title:s}}default:return null}}function Bg(e){const t=kt(e);if(!t||!Array.isArray(t.operations))return[];const n=[];for(const s of t.operations){const a=kt(s);if(a&&a.mode==="Image"&&Array.isArray(a.image_paths))for(const o of a.image_paths)typeof o=="string"&&n.push(o)}return n}const n0=e=>`/api/fs/image?path=${encodeURIComponent(e)}`;function SI({tool:e,arriving:t=!1}){if(Fg(e))return y.jsx(mI,{tool:e});const n=gI(e);if(n)return y.jsx(yI,{data:n,toolId:e.id});const s=e.status,[a,o]=w.useState(s==="failed"),l=kI(e),d=Bg(e.input);return y.jsxs("div",{className:`toolcall toolcall-${s} ${t?"is-arriving":""}`,children:[y.jsxs("button",{className:"toolcall-head",onClick:()=>o(f=>!f),children:[y.jsx("span",{className:`toolcall-dot dot-${s}`}),y.jsx("span",{className:"toolcall-title",children:eI(e)}),l&&y.jsx("span",{className:"toolcall-summary",title:l.title??l.text,children:l.text}),y.jsx("span",{className:"toolcall-status",children:xI[s]??s}),y.jsx("span",{className:`toolcall-chevron ${a?"is-open":""}`,children:"▸"})]}),d.length>0&&y.jsx("div",{className:"toolcall-images",children:d.map(f=>y.jsx("a",{href:n0(f),target:"_blank",rel:"noopener noreferrer",className:"toolcall-image-link",children:y.jsx("img",{src:n0(f),alt:f.split("/").pop()??"image",className:"toolcall-image",...Pg})},f))}),y.jsx(_I,{open:a,children:y.jsx("div",{className:"toolcall-body",children:CI(e)})})]})}function _I({open:e,children:t}){const[n,s]=w.useState(e);w.useEffect(()=>{e&&s(!0)},[e]);const a=o=>{o.propertyName==="grid-template-rows"&&!e&&s(!1)};return y.jsx("div",{className:`collapse ${e?"is-open":""}`,onTransitionEnd:a,children:y.jsx("div",{className:"collapse-inner",children:n?t:null})})}function CI(e){switch(Nd(e)){case"shell":return NI(e);case"write":return AI(e);case"read":return vI(e);case"grep":return wI(e);case"todo":return II(e);case"webfetch":return RI(e);case"websearch":return DI(e);case"introspect":return LI(e);default:return kr(e)}}function NI(e){const t=kt(e.input),n=$e(t==null?void 0:t.command)??"",s=br(e),a=Xr(s),o=a?$e(a.stdout)??"":Kr(s),l=a?$e(a.stderr)??"":"",d=a?String(a.exit_status??""):"",f=d!==""&&!/\b0$/.test(d);return y.jsxs(y.Fragment,{children:[n&&y.jsx(an,{code:n,lang:"bash"}),o.trim()&&y.jsx(an,{code:o,lang:"text"}),l.trim()&&y.jsxs("div",{className:"toolcall-section",children:[y.jsx("div",{className:"toolcall-label",children:"stderr"}),y.jsx(an,{code:l,lang:"text"})]}),f&&y.jsx("div",{className:"toolcall-exit",children:d})]})}function Ug({path:e}){const t=be(l=>l.activeId),n=be(l=>{var d;return((d=l.sessions.find(f=>f.sessionId===l.activeId))==null?void 0:d.cwd)??""}),s=be(l=>l.openFilePreview),a=t?Qw(n,e):null,o=a??e;return a?y.jsx("div",{className:"toolcall-file",children:y.jsx("button",{className:"toolcall-file-name",onClick:()=>s(a),title:`Preview ${e}`,children:o})}):y.jsx("div",{className:"toolcall-file",title:e,children:y.jsx("span",{className:"toolcall-file-name is-plain",children:o})})}function AI(e){const t=kt(e.input),n=$e(t==null?void 0:t.path)??"",s=f=>n?y.jsxs(y.Fragment,{children:[y.jsx(Ug,{path:n}),f]}):f,a=$e(t==null?void 0:t.command);if(a==="create"||a==="insert"){const f=$e(t==null?void 0:t.content);if(f!==void 0)return s(y.jsx(an,{code:f,lang:Mg(n)}))}const o=$e(t==null?void 0:t.oldStr),l=$e(t==null?void 0:t.newStr);if(o!==void 0&&l!==void 0)return s(y.jsx(r0,{diff:e0(o,l)}));const d=nI(e.content);return s(d?y.jsx(r0,{diff:e0(d.oldText,d.newText)}):kr(e))}function vI(e){const t=kt(e.input),n=t&&Array.isArray(t.operations)?t.operations:[],s=Kr(br(e));if(!s.trim())return Bg(e.input).length>0?null:kr(e);const a=n.map(kt).find(d=>d&&d.mode!=="Image"),o=a&&typeof a.path=="string"?a.path:"",l=(a==null?void 0:a.mode)==="Line"?Mg(o):"text";return y.jsxs(y.Fragment,{children:[o&&y.jsx(Ug,{path:o}),y.jsx(an,{code:s,lang:l})]})}function wI(e){const t=br(e),n=Xr(t),s=n&&Array.isArray(n.results)?n.results.filter(o=>{const l=kt(o);return!!l&&(Array.isArray(l.matches)||typeof l.file=="string")}):null;if(s&&s.length>0)return y.jsx("div",{className:"grep",children:s.map((o,l)=>{const d=kt(o),f=d&&typeof d.file=="string"?d.file:"",h=d&&Array.isArray(d.matches)?d.matches.map(String):[];return y.jsxs("div",{className:"grep-file",children:[y.jsx("div",{className:"grep-fname",children:f}),y.jsx("pre",{className:"grep-matches",children:h.join(`
|
|
249
|
+
`)})]},l)})});const a=Kr(t);return a.trim()?y.jsx(an,{code:a,lang:"text"}):kr(e)}function II(e){const t=rI(br(e));return!t||t.length===0?kr(e):y.jsx("div",{className:"todo",children:t.map((n,s)=>y.jsxs("div",{className:`todo-item ${n.done?"is-done":""}`,children:[y.jsx("span",{className:"todo-check","aria-hidden":!0,children:n.done?"☑":"☐"}),y.jsx("span",{className:"todo-text",children:n.desc})]},s))})}function LI(e){const t=kt(e.input),n=$e(t==null?void 0:t.query)??$e(t==null?void 0:t.doc_path),s=br(e),a=Xr(s),o=(a?$e(a.documentation)??Ad(a):null)??Kr(s);return y.jsxs(y.Fragment,{children:[n&&y.jsxs("div",{className:"toolcall-section",children:[y.jsx("div",{className:"toolcall-label",children:"query"}),y.jsx(an,{code:n,lang:"text"})]}),o.trim()?y.jsx("div",{className:"toolcall-doc",children:y.jsx(Ks,{text:o})}):kr(e)]})}function RI(e){const t=kt(e.input),n=$e(t==null?void 0:t.url),s=$e(t==null?void 0:t.mode),a=$e(t==null?void 0:t.search_terms),o=br(e),l=Xr(o),d=l?Ad(l)??$e(l.content)??JSON.stringify(l,null,2):Kr(o);return y.jsxs(y.Fragment,{children:[n&&y.jsxs("div",{className:"toolcall-meta",children:[y.jsx("a",{className:"toolcall-link",href:n,target:"_blank",rel:"noopener noreferrer",children:n}),s&&y.jsx("span",{className:"toolcall-tag",children:s})]}),a&&y.jsxs("div",{className:"toolcall-section",children:[y.jsx("div",{className:"toolcall-label",children:"search terms"}),y.jsx(an,{code:a,lang:"text"})]}),d.trim()?y.jsx(an,{code:d,lang:"markdown"}):kr(e)]})}function OI(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 s of t){const a=kt(s);a&&n.push({title:$e(a.title)??$e(a.name),url:$e(a.url)??$e(a.link)??$e(a.href),snippet:$e(a.snippet)??$e(a.description)??$e(a.content)??$e(a.text)})}return n.length?n:null}function DI(e){var a;const t=br(e),n=OI(Xr(t));if(!n)return kr(e);const s=$e((a=kt(e.input))==null?void 0:a.query);return y.jsxs(y.Fragment,{children:[s&&y.jsxs("div",{className:"toolcall-section",children:[y.jsx("div",{className:"toolcall-label",children:"query"}),y.jsx(an,{code:s,lang:"text"})]}),y.jsx("ol",{className:"websearch",children:n.map((o,l)=>y.jsxs("li",{className:"websearch-item",children:[o.url?y.jsx("a",{className:"websearch-title",href:o.url,target:"_blank",rel:"noopener noreferrer",children:o.title??o.url}):y.jsx("span",{className:"websearch-title",children:o.title??"(untitled)"}),o.url&&y.jsx("div",{className:"websearch-url",children:o.url}),o.snippet&&y.jsx("p",{className:"websearch-snippet",children:o.snippet})]},l))})]})}function kr(e){const t=e.input;let n="";if(typeof t=="string")n=t;else if(kt(t)){const{__tool_use_purpose:f,...h}=kt(t);n=JSON.stringify(h,null,2)}const s=br(e),a=Xr(s),o=a?Ad(a):null,l=o??(a?JSON.stringify(a,null,2):Kr(s)),d=o?"text":/^\s*[[{]/.test(l)?"json":"text";return y.jsxs(y.Fragment,{children:[n&&n!=="{}"&&y.jsxs("div",{className:"toolcall-section",children:[y.jsx("div",{className:"toolcall-label",children:"input"}),y.jsx(an,{code:n,lang:kt(t)?"json":"text"})]}),l.trim()&&y.jsxs("div",{className:"toolcall-section",children:[y.jsx("div",{className:"toolcall-label",children:"output"}),y.jsx(an,{code:l,lang:d})]})]})}function an({code:e,lang:t}){const[n,s]=w.useState(null);return w.useEffect(()=>{let a=!1;return Cd(e,t).then(o=>!a&&s(o)).catch(()=>!a&&s(null)),()=>{a=!0}},[e,t]),n?y.jsx("div",{className:"toolcode",dangerouslySetInnerHTML:{__html:n}}):y.jsx("pre",{className:"toolcode toolcode-plain",children:e})}function r0({diff:e}){return y.jsx("div",{className:"diff-body",children:e.map((t,n)=>y.jsxs("div",{className:`diff-line diff-${t.type}`,children:[y.jsx("span",{className:"diff-sign","aria-hidden":!0,children:t.type==="add"?"+":t.type==="del"?"-":" "}),y.jsx("span",{className:"diff-code",children:t.text||" "})]},n))})}const PI=w.memo(SI),MI=4,FI=300,BI=240,UI=80;function jI(e,t){if(e<=0)return{offset:0,limit:0};const n=Math.max(0,e-t);return{offset:n,limit:e-n}}function HI(e,t,n,s){const a=t-e,o=Math.max(0,s-n);return a>o+MI}class zI{constructor(t){Le(this,"ports");Le(this,"frames");Le(this,"follow",!1);Le(this,"lastScrollTop",0);Le(this,"lastMaxTop",0);Le(this,"anchor",null);Le(this,"loadingOlder",!1);Le(this,"showButton",!1);Le(this,"initializedFor",null);Le(this,"prevPendingCount",0);Le(this,"raf",0);Le(this,"content",{sessionId:null,itemCount:0,pendingCount:0,remainingOlder:0});Le(this,"followTick",()=>{var a,o;this.raf=0;const t=this.ports.element();if(!t||!this.follow)return;const n=this.bottomOf(t),s=n-t.scrollTop;if(s<=1||(o=(a=this.ports).reducedMotion)!=null&&o.call(a)){t.scrollTop=n,this.lastScrollTop=t.scrollTop,this.lastMaxTop=n;return}t.scrollTop+=Math.max(10,Math.ceil(s*.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.sessionId&&t.itemCount>0){this.initializedFor=t.sessionId,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});return}t.pendingCount>this.prevPendingCount&&(this.follow=!0),this.prevPendingCount=t.pendingCount,this.follow?this.scheduleFollow():this.updateButton(n)}}onScroll(){const t=this.ports.element();if(!t)return;const n=this.bottomOf(t);HI(t.scrollTop,this.lastScrollTop,n,this.lastMaxTop)&&(this.follow=!1),this.lastScrollTop=t.scrollTop,this.lastMaxTop=n,this.updateButton(t),t.scrollTop<FI&&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.sessionId;if(!t||!n||this.loadingOlder||this.content.remainingOlder<=0)return;this.setFlags({loadingOlder:!0});const{offset:s,limit:a}=jI(this.content.remainingOlder,UI);this.anchor=t.scrollHeight-t.scrollTop,this.ports.fetchPage(n,s,a).then(o=>{if(this.content.sessionId!==n)return this.abandonPage();if(o.length===0)return this.abandonPage();this.ports.prepend(o)}).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>BI})}setFlags(t){const n=t.loadingOlder??this.loadingOlder,s=t.showScrollButton??this.showButton;n===this.loadingOlder&&s===this.showButton||(this.loadingOlder=n,this.showButton=s,this.ports.onFlags({loadingOlder:n,showScrollButton:s}))}}const $I=700,xc=typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,WI=w.memo(function({onRetry:t,onRetryTurn:n}){const s=be(D=>D.items),a=be(D=>D.streamingText),o=be(D=>D.streamingThought),l=be(D=>D.pending),d=l.some(D=>D.status==="sending"),f=be(D=>D.observability.turnStatus),h=be(D=>D.observability.compacting),E=be(D=>D.activeId),g=be(D=>D.remainingOlder),x=w.useRef({session:null,ids:new Set});x.current.session!==E&&(x.current={session:E,ids:new Set(s.filter(D=>D.type==="tool_call").map(D=>D.tool.id))});const b=D=>!x.current.ids.has(D),[A,L]=w.useState(!1);w.useEffect(()=>{if(L(!1),f!=="running")return;const D=setTimeout(()=>L(!0),$I);return()=>clearTimeout(D)},[f,a,o,s.length]);const O=w.useRef(null),[v,M]=w.useState({loadingOlder:!1,showScrollButton:!1}),z=w.useRef(null);z.current||(z.current=new zI({element:()=>O.current,fetchPage:(D,Q,oe)=>dt.transcriptPage(D,Q,oe).then(ce=>ce.items),prepend:D=>be.getState().prependItems(D),onFlags:M,reducedMotion:()=>(xc==null?void 0:xc.matches)??!1}));const J=z.current;w.useEffect(()=>(J.reset(),()=>J.dispose()),[E,J]),w.useEffect(()=>{J.onContent({sessionId:E,itemCount:s.length,pendingCount:l.length,remainingOlder:g})},[s,a,o,l,E,h,g,J]),w.useLayoutEffect(()=>{J.restoreAnchor()},[s,J]);const ne=s.length===0&&!a&&!o&&l.length===0;return y.jsxs("div",{className:"transcript-wrap",children:[v.loadingOlder&&y.jsxs("div",{className:"loading-older",role:"status",children:[y.jsx(Tr,{size:14}),y.jsx("span",{children:"Loading earlier messages…"})]}),y.jsxs("div",{className:"transcript",ref:O,onScroll:()=>J.onScroll(),children:[ne&&y.jsxs("div",{className:"transcript-empty",children:[y.jsx("p",{className:"empty-title",children:"Casper is here."}),y.jsx("p",{className:"empty-sub",children:"Hand off a task. Casper keeps working server-side and has it ready when you get back."})]}),s.map(D=>D.type==="message"?D.message.role==="thinking"?y.jsx(i0,{text:D.message.text},D.message.id):y.jsx("div",{className:`msg msg-${D.message.role}`,children:D.message.role==="assistant"?y.jsx(Ks,{text:D.message.text}):y.jsxs(y.Fragment,{children:[E&&D.message.imagePaths&&D.message.imagePaths.length>0&&y.jsx("div",{className:"msg-images",children:D.message.imagePaths.map(Q=>y.jsx("a",{href:dt.attachmentUrl(E,Q),target:"_blank",rel:"noopener noreferrer",className:"msg-image-link",children:y.jsx("img",{src:dt.attachmentUrl(E,Q),alt:Q.split("/").pop()??"image",className:"msg-image",...Pg})},Q))}),D.message.text&&y.jsx("div",{className:"msg-user-text",children:D.message.text})]})},D.message.id):D.type==="tool_call"?y.jsx(PI,{tool:D.tool,arriving:b(D.tool.id)},D.tool.id):D.type==="turn_error"?y.jsx(YI,{message:D.message,onRetry:n},D.id):y.jsx(VI,{summary:D.summary},D.id)),l.map(D=>y.jsxs("div",{className:`msg msg-user msg-pending ${D.status==="failed"?"is-failed":""}`,children:[y.jsx("div",{className:"msg-user-text",children:D.text}),D.status==="failed"&&y.jsxs("div",{className:"msg-failed",children:[y.jsx("span",{className:"msg-failed-why",children:D.error??"Failed to send."}),y.jsx("button",{className:"msg-retry",onClick:()=>t(D.id,D.text),children:"Retry"})]})]},D.id)),o&&y.jsx(i0,{text:o,live:!0}),a&&y.jsx("div",{className:"msg msg-assistant",children:y.jsx(Ks,{text:a,streaming:!0})}),(f==="running"||d)&&(A||!a&&!o)&&y.jsxs("div",{className:"thinking",children:[y.jsx("span",{className:"thinking-dot"}),y.jsx("span",{className:"thinking-dot"}),y.jsx("span",{className:"thinking-dot"})]}),h&&y.jsx("div",{className:"compaction compaction-live",children:y.jsx("div",{className:"compaction-rule",children:y.jsxs("span",{className:"compaction-head",children:[y.jsx(Tr,{size:13,className:"compaction-icon"}),y.jsx("span",{className:"compaction-label",children:"Compacting conversation…"})]})})})]}),v.showScrollButton&&y.jsx("button",{className:"scroll-to-bottom",onClick:()=>J.jumpToLatest(),"aria-label":"Scroll to latest",title:"Scroll to latest",children:y.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:y.jsx("polyline",{points:"6 9 12 15 18 9"})})})]})});function i0({text:e,live:t=!1}){const[n,s]=w.useState(!1);return y.jsxs("div",{className:`thought ${t?"is-live":""}`,children:[y.jsxs("button",{className:"thought-head",onClick:()=>s(a=>!a),children:[y.jsx("span",{className:"thought-chevron",children:n?"▾":"▸"}),y.jsx("span",{className:`thought-label ${t?"is-live":""}`,children:"Thinking"})]}),n&&y.jsx("div",{className:"thought-body",children:y.jsx("div",{className:"thought-text",children:e})})]})}function YI({message:e,onRetry:t}){const[n,s]=w.useState(!1),[a,o]=w.useState(!1),l=R0(e),d=be(h=>{for(let E=h.items.length-1;E>=0;E--){const g=h.items[E];if(g.type==="message"&&g.message.role==="user")return g.message.text}return""}),f=()=>{var h;(h=navigator.clipboard)==null||h.writeText(e).then(()=>{o(!0),setTimeout(()=>o(!1),1500)},()=>{})};return y.jsxs("div",{className:"sysnote",children:[y.jsx("div",{className:"sysnote-rule",children:y.jsxs("button",{className:"sysnote-head",onClick:()=>s(h=>!h),"aria-expanded":n,children:[y.jsx("span",{"aria-hidden":!0,children:"⚠"}),y.jsx("span",{className:"sysnote-label",children:l.title}),y.jsx("span",{className:"sysnote-toggle",children:n?"Hide details":"Show details"})]})}),n&&y.jsxs("div",{className:"sysnote-body",children:[l.fix&&y.jsx("p",{className:"sysnote-fix",children:l.fix}),y.jsx("pre",{className:"sysnote-raw",children:e}),y.jsxs("div",{className:"sysnote-actions",children:[t&&d&&y.jsx("button",{className:"btn-sm is-danger",onClick:()=>t(d),children:"Retry turn"}),y.jsx("button",{className:"btn-sm",onClick:f,children:a?"Copied":"Copy details"})]})]})]})}function VI({summary:e}){const[t,n]=w.useState(!1);return y.jsxs("div",{className:"compaction",children:[y.jsx("div",{className:"compaction-rule",children:y.jsxs("button",{className:"compaction-head",onClick:()=>n(s=>!s),"aria-expanded":t,children:[y.jsx(ax,{size:14,className:"compaction-icon"}),y.jsx("span",{className:"compaction-label",children:"Conversation compacted"}),y.jsx("span",{className:"compaction-toggle",children:t?"Hide summary":"Show summary"})]})}),t&&y.jsx("div",{className:"compaction-body",children:y.jsx(Ks,{text:e})})]})}function qI({value:e,onChange:t,label:n="Working directory",placeholder:s="leave blank for server default",hint:a="A folder that doesn't exist yet will be created.",autoFocus:o=!1}){const[l,d]=w.useState([]),[f,h]=w.useState(!1),[E,g]=w.useState(null),x=w.useRef("");w.useEffect(()=>{const O=e;x.current=O;const v=setTimeout(()=>{dt.listDirs(O).then(M=>{x.current===O&&(d(M.entries),g({path:M.target,kind:M.targetKind}))}).catch(()=>{x.current===O&&(d([]),g(null))})},150);return()=>clearTimeout(v)},[e]);const b=e.trim()!=="",A=b&&(E==null?void 0:E.kind)==="missing",L=b&&(E==null?void 0:E.kind)==="file";return y.jsxs("label",{className:"picker cwd-field",children:[y.jsx("span",{className:"picker-label",children:n}),y.jsx("input",{className:"picker-input",value:e,placeholder:s,autoComplete:"off",spellCheck:!1,autoFocus:o,onFocus:()=>h(!0),onChange:O=>{t(O.target.value),h(!0)},onBlur:()=>setTimeout(()=>h(!1),120)}),f&&l.length>0&&y.jsx("div",{className:"cwd-suggestions",children:l.map(O=>y.jsx("button",{type:"button",className:"cwd-suggestion",onMouseDown:v=>v.preventDefault(),onClick:()=>{t(O),d([])},children:O},O))}),A&&y.jsxs("span",{className:"picker-hint cwd-will-create",children:["Doesn't exist yet - this folder will be created: ",y.jsx("code",{children:E.path})]}),L&&y.jsxs("span",{className:"picker-hint cwd-is-file",children:["That path is a file, not a folder: ",y.jsx("code",{children:E.path})]}),!A&&!L&&y.jsx("span",{className:"picker-hint",children:a})]})}function QI({sessionId:e,currentCwd:t,onChanged:n,onClose:s}){const[a,o]=w.useState(t??""),[l,d]=w.useState(!1),[f,h]=w.useState(null),E=async()=>{const g=a.trim();if(!(!g||l)){d(!0),h(null);try{const x=await dt.setSessionCwd(e,g);n(x.cwd),s()}catch(x){h(x.message)}finally{d(!1)}}};return y.jsx("div",{className:"sheet-backdrop",onClick:s,children:y.jsxs("div",{className:"sheet",onClick:g=>g.stopPropagation(),children:[y.jsx("h2",{className:"sheet-title",children:"Change working directory"}),y.jsx(qI,{value:a,onChange:o,placeholder:"/path/to/folder",hint:"The session keeps its transcript. A folder that doesn't exist yet will be created.",autoFocus:!0}),f&&y.jsx("div",{className:"sheet-error",children:f}),y.jsxs("div",{className:"sheet-actions",children:[y.jsx("button",{className:"btn-ghost",onClick:s,disabled:l,children:"Cancel"}),y.jsx("button",{className:"btn-primary",onClick:E,disabled:l||!a.trim(),children:l?"Saving…":"Change folder"})]})]})})}function GI(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function KI({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 y.jsx(Op,{size:15,className:"ftree-icon-svg ftree-icon-code"});case"json":case"yaml":case"yml":case"toml":case"ini":case"env":case"lock":return y.jsx(Z2,{size:15,className:"ftree-icon-svg ftree-icon-config"});case"md":case"txt":case"rst":case"log":case"csv":return y.jsx(ex,{size:15,className:"ftree-icon-svg ftree-icon-text"});case"css":case"scss":case"less":case"sass":return y.jsx(nx,{size:15,className:"ftree-icon-svg ftree-icon-style"});case"html":case"svg":case"xml":return y.jsx(Op,{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 y.jsx(tx,{size:15,className:"ftree-icon-svg ftree-icon-image"});case"sh":case"bash":case"zsh":case"fish":case"bat":case"ps1":return y.jsx(rx,{size:15,className:"ftree-icon-svg ftree-icon-terminal"});default:return y.jsx(J2,{size:15,className:"ftree-icon-svg"})}}function jg({entry:e,sessionId:t,depth:n,onPreview:s,onExpanded:a}){const o=be(g=>g.fsVersion[e.path]??0),[l,d]=w.useState({expanded:!1,children:null,loading:!1});w.useEffect(()=>{if(e.type==="directory")return a(e.path,l.expanded),()=>a(e.path,!1)},[e.path,e.type,l.expanded,a]),w.useEffect(()=>{if(!o||!l.expanded)return;let g=!0;return dt.tree(t,e.path).then(x=>{g&&d(b=>({...b,children:x.entries}))}).catch(()=>{}),()=>{g=!1}},[o]);const f=w.useCallback(async()=>{if(e.type==="directory"&&!l.loading){if(l.expanded){d(g=>({...g,expanded:!1}));return}if(l.children===null){d(g=>({...g,loading:!0}));try{const g=await dt.tree(t,e.path);d({expanded:!0,children:g.entries,loading:!1})}catch{d(g=>({...g,loading:!1}))}}else d(g=>({...g,expanded:!0}))}},[e,t,l.expanded,l.children,l.loading]),h=w.useCallback(()=>{e.type==="file"&&s(e)},[e,s]),E=n*16;return e.type==="directory"?y.jsxs(y.Fragment,{children:[y.jsxs("button",{className:"ftree-row ftree-dir",onClick:f,style:{paddingLeft:`${E+8}px`},children:[y.jsx("span",{className:`ftree-chevron ${l.expanded?"is-open":""}`,children:l.loading?y.jsx(Tr,{size:12}):y.jsx(M0,{size:12,className:"ftree-chevron-icon"})}),y.jsx("span",{className:"ftree-icon",children:l.expanded?y.jsx(X2,{size:15,className:"ftree-icon-svg ftree-icon-folder"}):y.jsx(j0,{size:15,className:"ftree-icon-svg ftree-icon-folder"})}),y.jsx("span",{className:"ftree-name",children:e.name})]}),l.expanded&&l.children&&y.jsxs("div",{className:"ftree-children",children:[l.children.map(g=>y.jsx(jg,{entry:g,sessionId:t,depth:n+1,onPreview:s,onExpanded:a},g.path)),l.children.length===0&&y.jsx("div",{className:"ftree-empty",style:{paddingLeft:`${E+24}px`},children:"Empty"})]})]}):y.jsxs("div",{className:"ftree-row ftree-file",style:{paddingLeft:`${E+8}px`},onClick:h,children:[y.jsx("span",{className:"ftree-chevron ftree-chevron-spacer","aria-hidden":"true"}),y.jsx("span",{className:"ftree-icon",children:y.jsx(KI,{name:e.name})}),y.jsx("span",{className:"ftree-name",children:e.name}),e.size!=null&&y.jsx("span",{className:"ftree-size",children:GI(e.size)})]})}function XI({sessionId:e,onClose:t}){var D;const[n,s]=w.useState([]),[a,o]=w.useState(""),[l,d]=w.useState(!0),[f,h]=w.useState(null),[E,g]=w.useState(!1),x=be(Q=>Q.sessions),b=be(Q=>Q.setWatchedPaths),A=be(Q=>Q.fsVersion[""]??0),L=w.useRef(new Set),O=be(Q=>Q.setSessions),v=be(Q=>Q.openFilePreview),M=(D=x.find(Q=>Q.sessionId===e))==null?void 0:D.cwd,z=w.useCallback(()=>{b(["",...L.current])},[b]),J=w.useCallback((Q,oe)=>{const ce=L.current;oe!==ce.has(Q)&&(oe?ce.add(Q):ce.delete(Q),z())},[z]);w.useEffect(()=>(z(),()=>b([])),[z,b]);const ne=w.useCallback(async(Q=!1)=>{Q||d(!0),h(null);try{const oe=await dt.tree(e);s(oe.entries),o(oe.cwd)}catch(oe){h(oe.message)}finally{Q||d(!1)}},[e]);return w.useEffect(()=>{ne()},[ne]),w.useEffect(()=>{A&&ne(!0)},[A]),y.jsxs("div",{className:"ftree-panel",children:[y.jsxs("div",{className:"ftree-header",children:[y.jsx("span",{className:"ftree-title",title:a,children:"Files"}),y.jsx("button",{className:"ftree-refresh",onClick:()=>g(!0),title:"Change working directory","aria-label":"Change working directory",children:y.jsx(j0,{size:14})}),t&&y.jsx("button",{className:"ftree-close",onClick:t,title:"Close file tree","aria-label":"Close file tree",children:y.jsx(F0,{size:15})})]}),a&&y.jsx("div",{className:"ftree-cwd",title:a,children:a}),y.jsxs("div",{className:"ftree-list",children:[l&&n.length===0&&y.jsx("div",{className:"ftree-loading",children:"Loading…"}),f&&y.jsxs("div",{className:"ftree-error",children:[f,y.jsx("button",{className:"ftree-repoint",onClick:()=>g(!0),children:"Change folder…"})]}),!l&&!f&&n.length===0&&y.jsx("div",{className:"ftree-empty",children:"No files"}),!f&&n.map(Q=>y.jsx(jg,{entry:Q,sessionId:e,depth:0,onPreview:oe=>v(oe.path),onExpanded:J},Q.path))]}),E&&y.jsx(QI,{sessionId:e,currentCwd:a||M,onChanged:Q=>{O(x.map(oe=>oe.sessionId===e?{...oe,cwd:Q}:oe)),ne()},onClose:()=>g(!1)})]})}const JI=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif"]);function ZI(e){const t=e.toLowerCase(),n=t.lastIndexOf("."),s=n>0?t.slice(n+1):"";return JI.has(s)?"image":s==="pdf"?"pdf":s==="html"||s==="htm"?"html":s==="md"||s==="markdown"?"markdown":"text"}const e6={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:"css",less:"css",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:"dockerfile",sql:"sql",diff:"diff",patch:"diff"};function t6(e){const t=e.toLowerCase();if(t==="dockerfile")return"dockerfile";if(t==="makefile")return"make";const n=t.split(".").pop()??"";return e6[n]??""}const bc=e=>e.split("/").pop()||e;function n6({preview:e,sessionId:t,onClose:n}){const[s,a]=w.useState(!1),[o,l]=w.useState({}),d=()=>{window.open(dt.downloadUrl(t,e.path),"_blank")},f=b=>{b.target===b.currentTarget&&n()};w.useEffect(()=>{const b=A=>{A.key==="Escape"&&n()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[n]);const h=o[e.path]??!1,E=e.kind==="html"||e.kind==="markdown",g=E&&!h,x=e.kind!=="image"&&e.kind!=="pdf"&&!g;return y.jsx("div",{className:"fpreview-backdrop",onClick:f,children:y.jsxs("div",{className:`fpreview-modal${s?" fpreview-full":""}`,children:[y.jsxs("div",{className:"fpreview-header",children:[E&&!e.error&&y.jsxs("div",{className:"fpreview-seg",role:"group","aria-label":"Preview mode",children:[y.jsx("button",{className:`fpreview-seg-btn${h?"":" is-active"}`,onClick:()=>l(b=>({...b,[e.path]:!1})),title:"Rendered","aria-label":"Rendered","aria-pressed":!h,children:y.jsx(ux,{size:17})}),y.jsx("button",{className:`fpreview-seg-btn${h?" is-active":""}`,onClick:()=>l(b=>({...b,[e.path]:!0})),title:"Source","aria-label":"Source","aria-pressed":h,children:y.jsx(ox,{size:17})})]}),y.jsx("span",{className:"fpreview-name",title:e.path,children:e.name}),y.jsx("button",{className:"fpreview-dl",onClick:d,title:"Download file","aria-label":"Download file",children:y.jsx(ix,{size:18})}),y.jsx("button",{className:"fpreview-full-btn",onClick:()=>a(b=>!b),title:s?"Exit fullscreen":"Fullscreen","aria-label":s?"Exit fullscreen":"Fullscreen",children:s?y.jsx(cx,{size:18}):y.jsx(lx,{size:18})}),y.jsx("button",{className:"fpreview-close",onClick:n,"aria-label":"Close preview",children:y.jsx(F0,{size:18})})]}),y.jsxs("div",{className:"fpreview-body",children:[e.loading&&y.jsx("div",{className:"fpreview-loading",children:y.jsx(Tr,{size:48})}),e.error&&y.jsx("div",{className:"ftree-error",children:e.error}),!e.loading&&!e.error&&e.kind==="image"&&y.jsx("img",{src:dt.previewUrl(t,e.path),alt:e.name,className:"fpreview-image"}),!e.error&&e.kind==="pdf"&&y.jsx("iframe",{src:dt.previewUrl(t,e.path),title:e.name,className:"fpreview-pdf"}),!e.error&&e.kind==="html"&&g&&y.jsx("iframe",{src:`${dt.previewUrl(t,e.path)}&raw=1`,title:e.name,className:"fpreview-html",sandbox:"allow-scripts allow-forms"}),!e.loading&&!e.error&&e.kind==="markdown"&&g&&e.content!==null&&y.jsx("div",{className:"fpreview-md",children:y.jsx(Ks,{text:e.content,html:!0})}),!e.loading&&!e.error&&x&&e.highlightedHtml&&y.jsx("div",{className:"fpreview-highlighted",dangerouslySetInnerHTML:{__html:e.highlightedHtml}}),!e.loading&&!e.error&&x&&!e.highlightedHtml&&e.content!==null&&y.jsx("pre",{className:"fpreview-code",children:e.content})]})]})})}function r6(){const e=be(l=>l.previewPath),t=be(l=>l.activeId),n=be(l=>l.closeFilePreview),[s,a]=w.useState(null),o=w.useCallback(()=>n(),[n]);return w.useEffect(()=>{if(!e||!t){a(null);return}let l=!1;const d=ZI(bc(e)),f=d!=="image"&&d!=="pdf";if(a({path:e,name:bc(e),content:null,highlightedHtml:null,kind:d,loading:f,error:null}),!!f)return(async()=>{try{const h=await fetch(dt.previewUrl(t,e),{credentials:"same-origin"});if(!h.ok)throw new Error(await h.text()||`HTTP ${h.status}`);const E=await h.text();if(l)return;a(b=>b&&b.path===e?{...b,content:E,loading:!1}:b);const g=t6(bc(e));if(!g)return;const x=await Cd(E,g);if(l||!x)return;a(b=>b&&b.path===e?{...b,highlightedHtml:x}:b)}catch(h){if(l)return;a(E=>E&&E.path===e?{...E,loading:!1,error:h instanceof Error?h.message:"Could not read the file"}:E)}})(),()=>{l=!0}},[e,t]),!s||!t?null:Zs.createPortal(y.jsx(n6,{preview:s,sessionId:t,onClose:o}),document.body)}function Hg({ariaLabel:e,value:t,options:n,onChange:s}){const[a,o]=w.useState(!1),[l,d]=w.useState(0),f=w.useRef(null),h=n.find(x=>x.value===t);w.useEffect(()=>{if(!a)return;const x=b=>{f.current&&!f.current.contains(b.target)&&o(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[a]),w.useEffect(()=>{if(a){const x=n.findIndex(b=>b.value===t);d(x>=0?x:0)}},[a,n,t]);const E=x=>{s(x),o(!1)},g=x=>{if(!a){(x.key==="Enter"||x.key===" "||x.key==="ArrowDown")&&(x.preventDefault(),o(!0));return}if(x.key==="Escape")o(!1);else if(x.key==="ArrowDown")x.preventDefault(),d(b=>Math.min(b+1,n.length-1));else if(x.key==="ArrowUp")x.preventDefault(),d(b=>Math.max(b-1,0));else if(x.key==="Enter"){x.preventDefault();const b=n[l];b&&E(b.value)}};return y.jsxs("div",{className:"dd",ref:f,children:[y.jsxs("button",{type:"button",className:`dd-trigger ${a?"is-open":""}`,"aria-haspopup":"listbox","aria-expanded":a,onClick:()=>o(x=>!x),onKeyDown:g,"aria-label":e,children:[y.jsx("span",{className:"dd-value",children:(h==null?void 0:h.label)??t??"Select…"}),y.jsx(M0,{size:13,className:"dd-chevron"})]}),a&&y.jsx("div",{className:"dd-panel",role:"listbox",children:n.map((x,b)=>y.jsxs("button",{type:"button",role:"option","aria-selected":x.value===t,className:`dd-option ${b===l?"is-active":""} ${x.value===t?"is-selected":""}`,onMouseEnter:()=>d(b),onClick:()=>E(x.value),children:[y.jsx("span",{className:"dd-check",children:x.value===t&&y.jsx(Q2,{size:15})}),y.jsx("span",{className:"dd-option-label",children:x.label}),x.hint&&y.jsx("span",{className:"dd-option-hint",children:x.hint})]},x.value))})]})}function i6({value:e,onChange:t}){var a;const n=be(o=>o.models),s=e??((a=n.find(o=>o.isDefault))==null?void 0:a.modelId);return y.jsx(Hg,{ariaLabel:"Model",value:s,onChange:t,options:n.map(o=>({value:o.modelId,label:o.modelName,hint:`${o.rateMultiplier}x`}))})}function s6({value:e,onChange:t}){const n=be(d=>d.modes),s=be(d=>d.agents),a=be(d=>d.defaultAgentId),o=n.length>0?n:s,l=e??a;return y.jsx(Hg,{ariaLabel:"Agent",value:l,onChange:t,options:o.map(d=>({value:d.id,label:d.name}))})}const pn=18,zc=2.5,$c=(pn-zc)/2,s0=2*Math.PI*$c;function a6(e){return e>85?"var(--aurora-red)":e>60?"var(--aurora-orange)":"var(--frost)"}const a0=new Intl.NumberFormat;function u6({onCompact:e}){var L;const t=be(O=>O.observability.contextUsagePercentage),n=be(O=>O.observability.compacting),s=be(O=>O.observability.turnStatus),a=be(O=>O.activeId),o=be(O=>O.currentModelId),l=be(O=>O.models),[d,f]=w.useState(!1),h=w.useRef(null);w.useEffect(()=>{if(!d)return;const O=M=>{h.current&&!h.current.contains(M.target)&&f(!1)},v=M=>{M.key==="Escape"&&f(!1)};return document.addEventListener("mousedown",O),document.addEventListener("keydown",v),()=>{document.removeEventListener("mousedown",O),document.removeEventListener("keydown",v)}},[d]);const E=Math.max(0,Math.min(100,t)),g=a6(E),x=E/100*s0,b=(L=l.find(O=>O.modelId===o))==null?void 0:L.contextWindowTokens,A=b?Math.round(E/100*b):void 0;return a?y.jsxs("div",{className:"ctx",ref:h,children:[y.jsx("button",{type:"button",className:"ctx-btn",onClick:()=>f(O=>!O),"aria-haspopup":"dialog","aria-expanded":d,"aria-label":`Context ${E.toFixed(0)}% used`,title:`Context ${E.toFixed(0)}% used`,children:y.jsx("svg",{width:pn,height:pn,viewBox:`0 0 ${pn} ${pn}`,"aria-hidden":!0,children:y.jsxs("g",{transform:`rotate(-90 ${pn/2} ${pn/2})`,children:[y.jsx("circle",{cx:pn/2,cy:pn/2,r:$c,fill:"none",stroke:"var(--n2)",strokeWidth:zc}),y.jsx("circle",{cx:pn/2,cy:pn/2,r:$c,fill:"none",stroke:g,strokeWidth:zc,strokeLinecap:"round",strokeDasharray:`${x} ${s0-x}`})]})})}),d&&y.jsxs("div",{className:"ctx-pop",role:"dialog","aria-label":"Context usage",children:[y.jsxs("div",{className:"ctx-pop-head",children:[y.jsx("span",{className:"ctx-pop-title",children:"Context used"}),y.jsxs("span",{className:"ctx-pop-pct",style:{color:g},children:[E.toFixed(1),"%"]})]}),y.jsx("div",{className:"ctx-pop-bar",children:y.jsx("span",{className:"ctx-pop-bar-fill",style:{width:`${E}%`,background:g}})}),b?y.jsxs("dl",{className:"ctx-pop-rows",children:[y.jsxs("div",{className:"ctx-pop-row",children:[y.jsx("dt",{children:"Used"}),y.jsxs("dd",{children:[a0.format(A??0)," tokens"]})]}),y.jsxs("div",{className:"ctx-pop-row",children:[y.jsx("dt",{children:"Window"}),y.jsxs("dd",{children:[a0.format(b)," tokens"]})]})]}):y.jsx("p",{className:"ctx-pop-note",children:"Token counts need a selected model’s window size."}),y.jsx("button",{type:"button",className:"ctx-pop-compact",disabled:!a||n||s!=="idle",onClick:()=>{f(!1),e()},children:n?"Compacting…":"Compact conversation"})]})]}):null}const o6={closed:"Offline - reconnecting when possible",reconnecting:"Reconnecting…",resyncing:"Resyncing…"};function l6(e){return e.live?e.uploading?"Uploading…":e.cancelling?"Stopping…":e.compacting?"Compacting conversation…":e.running?"Casper is working…":"Ask Casper to build something…":o6[e.connStatus]??"Connecting…"}const u0=new Set(["image/png","image/jpeg","image/gif","image/webp","image/svg+xml"]);function c6({sessionId:e,onSend:t,onCancel:n,onCompact:s,onChangeModel:a,onChangeAgent:o,connStatus:l,draft:d}){const[f,h]=w.useState(""),[E,g]=w.useState([]),[x,b]=w.useState(!1),[A,L]=w.useState(null),O=be(S=>S.observability.turnStatus),v=be(S=>S.observability.compacting),M=be(S=>S.currentModeId),z=be(S=>S.currentModelId),J=O==="running",ne=O==="cancelling",D=d||l==="connected",Q=w.useRef(null),oe=w.useRef(null),ce=S=>new Promise((F,Y)=>{const N=new FileReader;N.onload=()=>F(N.result.split(",")[1]??""),N.onerror=()=>Y(new Error("Failed to read file")),N.readAsDataURL(S)}),U=w.useCallback(()=>{const S=oe.current;S&&(S.style.height="auto",S.style.height=`${Math.min(S.scrollHeight,200)}px`)},[]);w.useEffect(()=>{U()},[f,U]);const Z=w.useCallback(S=>{const F=S.map(Y=>{const N=u0.has(Y.type);return{id:`att-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,file:Y,isImage:N,previewUrl:N?URL.createObjectURL(Y):void 0}});g(Y=>[...Y,...F])},[]),re=async(S,F,Y)=>{const N=[];S.length>0&&N.push({type:"text",text:Ou+S.map(he=>he.path).join(", ")+`
|
|
250
|
+
`});for(let he=0;he<S.length;he++){const Ce=S[he],xe=F[he];if(Ce){if(Ce.kind==="image"&&xe)try{const Be=await ce(xe.file);N.push({type:"image",data:Be,mimeType:xe.file.type})}catch{}else if(Ce.kind==="text"&&xe)try{const Be=await xe.file.text();N.push({type:"text",text:`[File: ${Ce.path}]
|
|
251
|
+
\`\`\`
|
|
252
|
+
${Be}
|
|
253
|
+
\`\`\``})}catch{}}}return Y&&N.push({type:"text",text:Y}),N},ke=async()=>{const S=f.trim();if(!S&&E.length===0||J||ne||v||!D||x)return;let F=[];const Y=E;if(Y.length>0){if(!e){L("No active session to upload to.");return}b(!0),L(null);try{F=(await dt.uploadFiles(e,Y.map(Ce=>Ce.file))).files}catch(he){L(he.message),b(!1);return}b(!1)}const N=await re(F,Y,S);N.length!==0&&(t(N),h(""),Y.forEach(he=>he.previewUrl&&URL.revokeObjectURL(he.previewUrl)),g([]),requestAnimationFrame(()=>{oe.current&&(oe.current.style.height="auto")}))},de=S=>{S.key==="Enter"&&!S.shiftKey&&(S.preventDefault(),ke())},ie=w.useCallback(S=>{var N;const F=(N=S.clipboardData)==null?void 0:N.items;if(!F)return;const Y=[];for(const he of Array.from(F))if(he.kind==="file"&&u0.has(he.type)){const Ce=he.getAsFile();Ce&&Y.push(Ce)}Y.length>0&&(S.preventDefault(),Z(Y))},[Z]),ve=S=>{S.target.files&&Z(Array.from(S.target.files)),S.target.value=""},Ie=S=>{g(F=>{const Y=F.find(N=>N.id===S);return Y!=null&&Y.previewUrl&&URL.revokeObjectURL(Y.previewUrl),F.filter(N=>N.id!==S)})};w.useEffect(()=>()=>{g(S=>(S.forEach(F=>F.previewUrl&&URL.revokeObjectURL(F.previewUrl)),S))},[]);const ue=l6({live:D,connStatus:l,uploading:x,cancelling:ne,compacting:v,running:J}),Ee=(f.trim()||E.length>0)&&!J&&!ne&&!v&&!x&&D;return y.jsxs("div",{className:"composer",children:[A&&y.jsx("div",{className:"composer-error",children:A}),E.length>0&&y.jsx("div",{className:"composer-attachments",children:E.map(S=>y.jsxs("div",{className:"composer-att",children:[S.isImage&&S.previewUrl?y.jsx("img",{src:S.previewUrl,alt:S.file.name,className:"composer-att-img"}):y.jsxs("div",{className:"composer-att-file",title:S.file.name,children:[y.jsx("span",{className:"composer-att-file-icon",children:"📄"}),y.jsx("span",{className:"composer-att-file-name",children:S.file.name})]}),y.jsx("button",{className:"composer-att-remove",onClick:()=>Ie(S.id),"aria-label":`Remove ${S.file.name}`,children:"×"})]},S.id))}),y.jsxs("div",{className:"composer-box",children:[y.jsx("textarea",{ref:oe,className:"composer-input",value:f,onChange:S=>h(S.target.value),onKeyDown:de,onPaste:ie,placeholder:ue,rows:1}),y.jsxs("div",{className:"composer-actions",children:[y.jsx("button",{className:"composer-plus",onClick:()=>{var S;return(S=Q.current)==null?void 0:S.click()},disabled:d||!D||x,title:d?"Send a message first to attach files":"Add photos & files","aria-label":"Add photos and files",children:y.jsx(B0,{size:18})}),y.jsxs("div",{className:"composer-actions-right",children:[y.jsx(u6,{onCompact:s}),y.jsx(s6,{value:M,onChange:o}),y.jsx(i6,{value:z,onChange:a}),J?y.jsx("button",{className:"composer-btn composer-stop",onClick:n,title:"Stop","aria-label":"Stop",children:y.jsx(Rp,{size:15})}):ne?y.jsx("button",{className:"composer-btn composer-stop",disabled:!0,title:"Stopping…","aria-label":"Stopping",children:y.jsx(Rp,{size:15})}):y.jsx("button",{className:"composer-btn composer-send",onClick:ke,disabled:!Ee,title:x?"Uploading…":"Send","aria-label":x?"Uploading":"Send",children:x?y.jsx(Tr,{size:15}):y.jsx(K2,{size:17})})]})]})]}),y.jsx("input",{ref:Q,type:"file",multiple:!0,onChange:ve,className:"composer-file-input"})]})}const d6={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 f6({status:e}){const{cls:t,label:n}=d6[e];return y.jsxs("span",{className:`conndot conndot-${t}`,children:[y.jsx("span",{className:"conndot-blip"}),y.jsx("span",{className:"conndot-label",children:n})]})}function h6({isDraft:e,loadingSessionId:t,connStatus:n,createError:s,onRetryCreate:a,onDismissError:o,navOpen:l,onToggleNav:d,onSend:f,onRetry:h,onRetryTurn:E,onCancel:g,onChangeModel:x,onChangeAgent:b,onCompact:A,onReload:L}){const O=be(re=>{var ke;return(ke=re.sessions.find(de=>de.sessionId===re.activeId))==null?void 0:ke.title}),v=be(re=>e&&re.pending.length===0&&re.items.length===0),M=be(re=>re.activeId),z=be(re=>re.sessionNotice),J=be(re=>re.reloading),ne=be(re=>re.observability.turnStatus==="running"),D=be(re=>re.dismissSessionNotice),[Q,oe]=w.useState(!1);if(w.useEffect(()=>{oe(!1)},[M]),t)return y.jsxs("main",{className:"chatpane",children:[y.jsxs("header",{className:"chat-head",children:[y.jsx("button",{className:"navbtn",onClick:d,"aria-label":l?"Hide sessions":"Show sessions","aria-expanded":l,children:y.jsx(Zl,{size:20})}),y.jsx("span",{className:"chat-title",children:"Opening session…"})]}),y.jsx("div",{className:"chat-blank",children:y.jsx(Tr,{size:48,className:"chat-spinner"})})]});if(s)return y.jsxs("main",{className:"chatpane",children:[y.jsxs("header",{className:"chat-head",children:[y.jsx("button",{className:"navbtn",onClick:d,"aria-label":l?"Hide sessions":"Show sessions","aria-expanded":l,children:y.jsx(Zl,{size:20})}),y.jsx("span",{className:"chat-title",children:"New session"})]}),y.jsxs("div",{className:"chat-blank",children:[y.jsx("p",{className:"chat-blank-title",children:"Couldn't start the session"}),y.jsx("p",{className:"chat-blank-sub",children:s}),y.jsxs("div",{className:"chat-error-actions",children:[y.jsx("button",{className:"btn-primary",onClick:a,children:"Try again"}),y.jsx("button",{className:"btn-ghost",onClick:o,children:"Back to sessions"})]})]})]});const ce=y.jsxs("div",{className:"composer-wrap",children:[z&&y.jsxs("div",{className:"notice-banner",role:"alert",children:[y.jsx("span",{className:"notice-icon","aria-hidden":!0,children:"⚠"}),y.jsxs("div",{className:"notice-text",children:[y.jsx("p",{className:"notice-title",children:z.title}),z.fix&&y.jsx("p",{className:"notice-sub",children:z.fix})]}),y.jsx("button",{className:"notice-x",onClick:D,"aria-label":"Dismiss",children:"×"})]}),y.jsx(c6,{sessionId:M,onSend:f,onCancel:g,onCompact:A,onChangeModel:x,onChangeAgent:b,connStatus:n,draft:e})]}),U=y.jsxs("div",{className:"chat-draft",children:[y.jsxs("div",{className:"draft-hero",children:[y.jsx("img",{className:"draft-logo",src:"/logo.svg",alt:""}),y.jsx("h1",{className:"draft-title",children:"Casper"})]}),ce]}),Z=y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"chat-body",children:y.jsx(WI,{onRetry:h,onRetryTurn:E})}),ce]});return y.jsxs("main",{className:`chatpane chatpane-split ${Q?"has-tree":""}`,children:[y.jsxs("div",{className:"chat-col",children:[y.jsxs("header",{className:"chat-head",children:[y.jsx("button",{className:"navbtn",onClick:d,"aria-label":l?"Hide sessions":"Show sessions","aria-expanded":l,children:y.jsx(Zl,{size:20})}),!e&&y.jsx("span",{className:"chat-title",title:O,children:O??"Session"}),!e&&y.jsx(f6,{status:n}),!e&&y.jsx("button",{className:"chat-head-btn chat-reload",onClick:L,disabled:J||ne,title:ne?"Reload after the turn":"Reload session","aria-label":"Reload session",children:J?y.jsx(Tr,{size:18}):y.jsx(q2,{size:18})}),!e&&y.jsx("button",{className:`chat-head-btn ftree-toggle ${Q?"is-active":""}`,onClick:()=>oe(re=>!re),title:"Toggle file tree","aria-label":"Toggle file tree","aria-pressed":Q,children:y.jsx(sx,{size:18})})]}),v?U:Z]}),M&&y.jsxs("aside",{className:`ftree-aside ${Q?"is-open":""}`,children:[Q&&y.jsx(XI,{sessionId:M,onClose:()=>oe(!1)}),y.jsx(r6,{})]}),M&&Q&&y.jsx("div",{className:"ftree-backdrop",onClick:()=>oe(!1),"aria-hidden":!0})]})}function p6({onReady:e}){const[t,n]=w.useState(""),[s,a]=w.useState(null),[o,l]=w.useState(!1),d=async()=>{l(!0),a(null);try{await P2(t.trim()),e()}catch(f){a(f.message)}finally{l(!1)}};return y.jsxs("div",{className:"gate",children:[y.jsx("img",{className:"gate-logo",src:"/logo.svg",alt:""}),y.jsx("h1",{className:"gate-title",children:"Casper"}),y.jsx("p",{className:"gate-sub",children:"Enter your access token to continue."}),y.jsx("input",{className:"gate-input",type:"password",value:t,placeholder:"access token",onChange:f=>n(f.target.value),onKeyDown:f=>f.key==="Enter"&&d()}),s&&y.jsx("p",{className:"gate-error",children:s}),y.jsx("button",{className:"btn-primary gate-btn",onClick:d,disabled:o,children:o?"Checking…":"Continue"}),y.jsxs("p",{className:"gate-hint",children:["Don't have it? On the machine running Casper, run ",y.jsx("code",{children:"casper token"}),"."]})]})}const o0=768;function m6(){const[e,t]=w.useState("checking");return w.useEffect(()=>{e==="checking"&&dt.listSessions().then(n=>{be.getState().setSessions(n.sessions),t("ready")}).catch(()=>t("gate"))},[e]),e==="checking"?y.jsx("div",{className:"app-splash"}):e==="gate"?y.jsx(p6,{onReady:()=>t("ready")}):y.jsx(m2,{children:y.jsxs(Yy,{children:[y.jsxs(Ds,{element:y.jsx(g6,{onLock:()=>t("gate")}),children:[y.jsx(Ds,{index:!0,element:null}),y.jsx(Ds,{path:"sessions/:sessionId",element:null})]}),y.jsx(Ds,{path:"*",element:y.jsx($y,{to:"/",replace:!0})})]})})}function g6({onLock:e}){var O;const t=be(v=>v.sessions),n=be(v=>v.activeId),s=be(v=>v.loadingSessionId),a=be(v=>v.connStatus),o=be(v=>v.createError),l=be(v=>v.watchedPaths),d=Gc(),f=((O=vy(z2))==null?void 0:O.params.sessionId)??null,E=f==="new"||!f&&n===null,g=E?null:f;w.useEffect(()=>{nt.attach({navigate:d,onLock:e})},[d,e]),w.useEffect(()=>{nt.loadPickers(),be.getState().sessions.length===0&&nt.refreshSessions()},[]),w.useEffect(()=>{nt.syncRoute(g,E)},[g,E]),w.useEffect(()=>{a==="connected"&&nt.watchPaths(l)},[l,a]);const x=w.useCallback(()=>{M2(),nt.lock()},[]),[b,A]=w.useState(()=>window.innerWidth>o0),L=w.useCallback(()=>{window.innerWidth<=o0&&A(!1)},[]);return y.jsxs("div",{className:`layout ${b?"nav-open":""}`,children:[y.jsx(yx,{sessions:t,activeId:n,loadingId:s,onOpen:v=>{nt.markLoading(v),L()},onNew:()=>{nt.startDraft(),L()},onDelete:v=>void nt.deleteSession(v),onRename:(v,M)=>void nt.renameSession(v,M),onLock:x}),b&&y.jsx("button",{className:"nav-scrim","aria-label":"Close session panel",onClick:()=>A(!1)}),y.jsx(h6,{navOpen:b,onToggleNav:()=>A(v=>!v),isDraft:E,loadingSessionId:s,connStatus:a,createError:o,onRetryCreate:()=>nt.retryCreate(),onDismissError:()=>nt.dismissCreateError(),onSend:v=>nt.send(v),onRetry:(v,M)=>nt.retrySend(v,M),onRetryTurn:v=>nt.retryTurn(v),onCancel:()=>nt.cancel(),onChangeModel:v=>nt.changeModel(v),onChangeAgent:v=>nt.changeAgent(v),onCompact:()=>nt.compact(),onReload:()=>void nt.reloadSession()})]})}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(()=>{})}YT.createRoot(document.getElementById("root")).render(y.jsx(Os.StrictMode,{children:y.jsx(m6,{})}));export{GS as S,_c as _,Ku as c,Wc as g,mN as h,gN as s,k1 as v,zr as w};
|