project-athena 0.2.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +63 -0
- package/README.md +61 -12
- package/dist/activity-BKW7G4I5.js +77 -0
- package/dist/agents-DFSNEOP5.js +69 -0
- package/dist/ai-ASL4FFQ7.js +96 -0
- package/dist/analyze-ZY3MXBOI.js +50 -0
- package/dist/chunk-2DY4PUR4.js +465 -0
- package/dist/chunk-2R6PXY6Z.js +33 -0
- package/dist/chunk-3IS2X2Z7.js +89 -0
- package/dist/chunk-3XSDI5WF.js +179 -0
- package/dist/chunk-65TSRDQ3.js +124 -0
- package/dist/chunk-673EPYYH.js +105 -0
- package/dist/chunk-7DZK6WSQ.js +65 -0
- package/dist/chunk-AD4OZCU2.js +34 -0
- package/dist/chunk-DZDI2HRT.js +169 -0
- package/dist/chunk-ELKFRTZT.js +221 -0
- package/dist/chunk-EUPETUWA.js +14 -0
- package/dist/chunk-FQEGEVLY.js +38 -0
- package/dist/chunk-FVCDMQUQ.js +343 -0
- package/dist/chunk-GGXPG6OE.js +904 -0
- package/dist/chunk-GHFRQAYT.js +112 -0
- package/dist/chunk-GR4DL2VM.js +47 -0
- package/dist/chunk-INT3IGMQ.js +111 -0
- package/dist/chunk-IQQBAWSM.js +90 -0
- package/dist/chunk-JCGDR4UV.js +182 -0
- package/dist/chunk-KBO7XRBW.js +26 -0
- package/dist/chunk-KHMBNT66.js +399 -0
- package/dist/chunk-LEMPCNAY.js +209 -0
- package/dist/chunk-MPG3IEGB.js +2691 -0
- package/dist/chunk-OLPSEQS5.js +264 -0
- package/dist/chunk-PVCIGUIT.js +64 -0
- package/dist/chunk-QCC4VJUH.js +217 -0
- package/dist/chunk-QLW657NT.js +95 -0
- package/dist/chunk-RVTNSNGK.js +182 -0
- package/dist/chunk-RXNRMIZP.js +390 -0
- package/dist/chunk-SHKXELUX.js +295 -0
- package/dist/chunk-SJ4DQFIJ.js +379 -0
- package/dist/chunk-SVTEJYMS.js +227 -0
- package/dist/chunk-TDNZ2RYA.js +702 -0
- package/dist/chunk-UAZLPNVC.js +108 -0
- package/dist/chunk-VSYBC3VY.js +28 -0
- package/dist/chunk-WVQC2EGO.js +166 -0
- package/dist/chunk-XDCKZ5TV.js +436 -0
- package/dist/chunk-XFN7UZCS.js +35 -0
- package/dist/chunk-XW3MLHI2.js +32 -0
- package/dist/chunk-YRIS7ZS6.js +919 -0
- package/dist/chunk-Z6QWMJLK.js +124 -0
- package/dist/chunk-ZB7LC6FP.js +221 -0
- package/dist/clean-MDBYH62P.js +23 -0
- package/dist/cli.js +18 -10716
- package/dist/context-PLPCAPCO.js +161 -0
- package/dist/doctor-BX677KRE.js +69 -0
- package/dist/event-TNT6CQZR.js +101 -0
- package/dist/git-hook-YZNZGAAP.js +252 -0
- package/dist/init-WQCAOJ2R.js +38 -0
- package/dist/mcp-U7EPH43L.js +393 -0
- package/dist/memory-VSVNLEJC.js +393 -0
- package/dist/open-UJZRYF4E.js +1450 -0
- package/dist/program-CWJNGCTZ.js +165 -0
- package/dist/review-OOKXSYMP.js +117 -0
- package/dist/rules-4FXJUCXB.js +83 -0
- package/dist/security-LME3XFL3.js +177 -0
- package/dist/staged-check-X24C3YRD.js +502 -0
- package/dist/status-RR57ZNGI.js +81 -0
- package/dist/sync-KFJANRXF.js +218 -0
- package/dist/watch-CY7QHIYN.js +123 -0
- package/dist/web/assets/{Editor-DAXvniWB.js → Editor-Bnilgch0.js} +1 -1
- package/dist/web/assets/{abnfDiagram-O67JEVCF-Az7EW1BC.js → abnfDiagram-O67JEVCF-DW9LWr8f.js} +1 -1
- package/dist/web/assets/architecture-7GRP2DOG-BWDZV2yn.js +1 -0
- package/dist/web/assets/{architectureDiagram-NJMV4G6O-BxeXqSTn.js → architectureDiagram-NJMV4G6O-0eKeQRhj.js} +1 -1
- package/dist/web/assets/{blockDiagram-BEXU5L5S-aeKZl9lJ.js → blockDiagram-BEXU5L5S-D5i3-ogI.js} +1 -1
- package/dist/web/assets/{c4Diagram-YGBWAQC7-CgmntYsG.js → c4Diagram-YGBWAQC7-BAWQZrEu.js} +1 -1
- package/dist/web/assets/channel-Bkh05NKd.js +1 -0
- package/dist/web/assets/{chunk-3FUC2YCW-BpmRD2yo.js → chunk-3FUC2YCW-fKRGOZF3.js} +1 -1
- package/dist/web/assets/{chunk-5DYCD2WN-CRIFDwod.js → chunk-5DYCD2WN-C5jOlx42.js} +1 -1
- package/dist/web/assets/{chunk-742MDFTN-hRW9VeNV.js → chunk-742MDFTN-urY4RP_A.js} +1 -1
- package/dist/web/assets/{chunk-7INBJB4K-C6VEpT0Y.js → chunk-7INBJB4K-nk48sKqZ.js} +1 -1
- package/dist/web/assets/{chunk-7M6MHVWA-Dnajov2w.js → chunk-7M6MHVWA-BfBD9X0F.js} +1 -1
- package/dist/web/assets/{chunk-7PRAP22T-DSAc0_CZ.js → chunk-7PRAP22T-jYf59QlI.js} +1 -1
- package/dist/web/assets/{chunk-GTNCS2PH-CefpYUjb.js → chunk-GTNCS2PH-BOCxryKf.js} +1 -1
- package/dist/web/assets/{chunk-GWA4HPMP-MLNflMmF.js → chunk-GWA4HPMP-CFpaW0ru.js} +1 -1
- package/dist/web/assets/{chunk-MBY4JIJT-D3GmmEiU.js → chunk-MBY4JIJT-BIB8HctN.js} +1 -1
- package/dist/web/assets/{chunk-NETBCI7D-DzTj6xVk.js → chunk-NETBCI7D-CpUUK6rh.js} +1 -1
- package/dist/web/assets/{chunk-O7XYJQB3-D1d0hCko.js → chunk-O7XYJQB3-BNx_V4Oi.js} +1 -1
- package/dist/web/assets/{chunk-UA2S7LBM-C9hIFeWR.js → chunk-UA2S7LBM-D3tMiIOY.js} +1 -1
- package/dist/web/assets/{chunk-WEXAMYUT-BFGtcjsi.js → chunk-WEXAMYUT-CC-3C32l.js} +1 -1
- package/dist/web/assets/{chunk-Z7XXMR3K-BRZ8_wtE.js → chunk-Z7XXMR3K-BzhxKQUc.js} +1 -1
- package/dist/web/assets/{chunk-ZIGJFQKS-CTKOioal.js → chunk-ZIGJFQKS-D4tBHzxg.js} +1 -1
- package/dist/web/assets/{classDiagram-v2-NBCMYWYE-DJGKtWJv.js → classDiagram-v2-NBCMYWYE-BbtyanXR.js} +1 -1
- package/dist/web/assets/{cynefin-OW5HDTMX-hNq1kGmA.js → cynefin-OW5HDTMX-BIArb8W1.js} +1 -1
- package/dist/web/assets/{cynefinDiagram-VND7K2PF-sODQM_ZZ.js → cynefinDiagram-VND7K2PF-BrAcfkXL.js} +1 -1
- package/dist/web/assets/{dagre-6A5THRUB-DEzTThIf.js → dagre-6A5THRUB-BcHXRl4s.js} +1 -1
- package/dist/web/assets/{diagram-22UHCM2B-s_eellsa.js → diagram-22UHCM2B-Dx9tSCdE.js} +1 -1
- package/dist/web/assets/{diagram-3UASUU5V-B2onY_Xw.js → diagram-3UASUU5V-CLLDP9yH.js} +1 -1
- package/dist/web/assets/{diagram-ATOU4E4O-B8V6s13s.js → diagram-ATOU4E4O-B46H9iPt.js} +1 -1
- package/dist/web/assets/{diagram-CDSNMT55-CJxiE6mf.js → diagram-CDSNMT55-CYtvB6aG.js} +1 -1
- package/dist/web/assets/{diagram-MLGK6HIB-m5OHPLAp.js → diagram-MLGK6HIB-Dar7ktoX.js} +1 -1
- package/dist/web/assets/{diagram-MPIPVDR6-Buvvrk_A.js → diagram-MPIPVDR6-C-DljnYN.js} +1 -1
- package/dist/web/assets/{ebnfDiagram-ZINNZB2B-CpL7Wt3R.js → ebnfDiagram-ZINNZB2B-Dv_3jWnh.js} +1 -1
- package/dist/web/assets/{elk-276RUBZZ-CwYhbsXa.js → elk-276RUBZZ-DnHciE9k.js} +1 -1
- package/dist/web/assets/{erDiagram-OPXOYQCR-DNikci2r.js → erDiagram-OPXOYQCR-Bn46KrHz.js} +1 -1
- package/dist/web/assets/eventmodeling-NTZA5JFV-DYwoptMd.js +1 -0
- package/dist/web/assets/flowDiagram-KWPJA3E3-y4rS0gIB.js +1 -0
- package/dist/web/assets/{ganttDiagram-FUAMR5RP-d-ynDlvJ.js → ganttDiagram-FUAMR5RP-DOjjJtqz.js} +1 -1
- package/dist/web/assets/{gitGraph-4MIJSDKK-DwIeBI91.js → gitGraph-4MIJSDKK-BIoMXJRQ.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-X574FWY7-04RZccu6.js → gitGraphDiagram-X574FWY7-BsJ01R0v.js} +1 -1
- package/dist/web/assets/{index-C3-8uYXr.js → index-Cen0jOXj.js} +5 -4
- package/dist/web/assets/{index-DKE3ojTe.css → index-WwRY6n68.css} +1 -1
- package/dist/web/assets/{info-A6RAGUB7-xf4Nzgv-.js → info-A6RAGUB7-BmlXzRWj.js} +1 -1
- package/dist/web/assets/{infoDiagram-VRGFBTTK-BYjw0eiK.js → infoDiagram-VRGFBTTK-CYPJPmBP.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-OU5B5YK6-Bx9s4nPM.js → ishikawaDiagram-OU5B5YK6-YN96geky.js} +1 -1
- package/dist/web/assets/{journeyDiagram-ZHPQQLJL-DrdHs7B-.js → journeyDiagram-ZHPQQLJL-20juojKY.js} +1 -1
- package/dist/web/assets/{kanban-definition-PNTS6WVX-CVd8v2Te.js → kanban-definition-PNTS6WVX-BhCKIEbP.js} +1 -1
- package/dist/web/assets/{line-V_WrJ-6y.js → line-BERsMFG6.js} +1 -1
- package/dist/web/assets/{mermaid-parser.core-B-ilyEpO.js → mermaid-parser.core-Bis_wTB-.js} +3 -3
- package/dist/web/assets/{mermaid.core-Bnyaa0nF.js → mermaid.core-DMsM3ZX7.js} +4 -4
- package/dist/web/assets/{mindmap-definition-NLK3R4M7-B3AbvHPR.js → mindmap-definition-NLK3R4M7-BkcGdOfv.js} +1 -1
- package/dist/web/assets/{packet-AYTQ26CC-CBAIUXIc.js → packet-AYTQ26CC-Bh30-JJX.js} +1 -1
- package/dist/web/assets/{pegDiagram-GJSIUBJH-DIdeELUM.js → pegDiagram-GJSIUBJH-DxnIo9RF.js} +1 -1
- package/dist/web/assets/{pie-WAS4IAKB-a1r3tzPR.js → pie-WAS4IAKB-ChaTr-GD.js} +1 -1
- package/dist/web/assets/{pieDiagram-5QR66LMP-pQBEio0x.js → pieDiagram-5QR66LMP-CzAp78FM.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-O4NWA36T-CkJK5Y03.js → quadrantDiagram-O4NWA36T-BDSE-cfY.js} +1 -1
- package/dist/web/assets/{radar-RG4KPBEZ-BZfLYjx5.js → radar-RG4KPBEZ-DgJ-o_dq.js} +1 -1
- package/dist/web/assets/{railroad-74A4TZTK-CuIW1ZAU.js → railroad-74A4TZTK-C8MmcBKz.js} +1 -1
- package/dist/web/assets/railroad-abnf-HS5TGJTU-CTLXjcdP.js +1 -0
- package/dist/web/assets/railroad-ebnf-LZEXJU2U-ggWsTTL0.js +1 -0
- package/dist/web/assets/railroad-peg-WCYAUIDC-D1mCX705.js +1 -0
- package/dist/web/assets/{railroadDiagram-XR7U4H2S-_BpGE8aJ.js → railroadDiagram-XR7U4H2S-DfbcWRNh.js} +1 -1
- package/dist/web/assets/{requirementDiagram-PLB6GJNP-CnzF90GS.js → requirementDiagram-PLB6GJNP-DM3nksxs.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-IPEJSGJF-DYeisDj_.js → sankeyDiagram-IPEJSGJF-DthUpiiC.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-PO4LG4MO-ll9cBvca.js → sequenceDiagram-PO4LG4MO-DLA3nuvA.js} +1 -1
- package/dist/web/assets/{stateDiagram-v2-GCMORJYK-CdKcOIKQ.js → stateDiagram-v2-GCMORJYK-B0X6ihBW.js} +1 -1
- package/dist/web/assets/{swimlanes-2SLR337P-y6piTWEW.js → swimlanes-2SLR337P-B4qWe6vE.js} +1 -1
- package/dist/web/assets/swimlanesDiagram-TC7HE7FX-ClIk3e7S.js +8 -0
- package/dist/web/assets/{timeline-definition-EJHVYXUP-DuC_4xK0.js → timeline-definition-EJHVYXUP-F-cDzYrj.js} +1 -1
- package/dist/web/assets/{treeView-Q6P3EWNA-gCQFmND0.js → treeView-Q6P3EWNA-BaI30nLZ.js} +1 -1
- package/dist/web/assets/{treemap-WGGIJYW6-BQ2010OY.js → treemap-WGGIJYW6-D2jGGoMl.js} +1 -1
- package/dist/web/assets/{usecaseDiagram-POWQR4AR-CCTqzHz6.js → usecaseDiagram-POWQR4AR-B9qoAQCy.js} +1 -1
- package/dist/web/assets/{vennDiagram-UO4OBE2U-0_O7guNq.js → vennDiagram-UO4OBE2U-DGVNOaKO.js} +1 -1
- package/dist/web/assets/{wardley-WFR3VGLG-SsX7uMDs.js → wardley-WFR3VGLG-DbKqhNAh.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-VNRHLVJA-DlqH6Hox.js → wardleyDiagram-VNRHLVJA-BgZ1gprw.js} +1 -1
- package/dist/web/assets/{xychartDiagram-PMCCYNJV-nr4UYDtd.js → xychartDiagram-PMCCYNJV-D73RYid1.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +4 -2
- package/dist/web/assets/architecture-7GRP2DOG-blXBarB2.js +0 -1
- package/dist/web/assets/channel-f4QzewnN.js +0 -1
- package/dist/web/assets/eventmodeling-NTZA5JFV-CA_ZFPZ2.js +0 -1
- package/dist/web/assets/flowDiagram-KWPJA3E3-DObsBuWT.js +0 -1
- package/dist/web/assets/railroad-abnf-HS5TGJTU-6B4Ffbxn.js +0 -1
- package/dist/web/assets/railroad-ebnf-LZEXJU2U-BGL9lIQc.js +0 -1
- package/dist/web/assets/railroad-peg-WCYAUIDC-DcqxTem7.js +0 -1
- package/dist/web/assets/swimlanesDiagram-TC7HE7FX-DFS8a3jO.js +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-DMsM3ZX7.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-oBChb5qS.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/chunk-O7XYJQB3-BNx_V4Oi.js","assets/chunk-ZIGJFQKS-D4tBHzxg.js","assets/dist-B_J_HbC0.js","assets/chunk-742MDFTN-urY4RP_A.js","assets/chunk-MBY4JIJT-BIB8HctN.js","assets/chunk-DUW6YSOI-Dgx8z5s3.js","assets/chunk-7PRAP22T-jYf59QlI.js","assets/chunk-7INBJB4K-nk48sKqZ.js","assets/chunk-J5ZVWO5B-oDCd-gWO.js","assets/rough.esm-Dy-Kn_BL.js","assets/chunk-5DYCD2WN-C5jOlx42.js","assets/chunk-Z7XXMR3K-BzhxKQUc.js","assets/line-BERsMFG6.js","assets/path-fybaL0A-.js","assets/array-BifhSqXX.js","assets/chunk-UA2S7LBM-D3tMiIOY.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{i as e,n as t,t as n}from"./rolldown-runtime-Dd_uD5pT.js";var r=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function ee(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function te(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var re=/\/+/g;function ie(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function ae(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(ee,ee):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function oe(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,oe(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ie(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(re,`$&/`)+`/`),oe(o,r,i,``,function(e){return e})):o!=null&&(te(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(re,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ie(a,u),c+=oe(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ie(a,u++),c+=oe(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return oe(ae(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function O(e,t,n){if(e==null)return e;var r=[],i=0;return oe(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function se(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var ce=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function le(e){var t=w.T,n={};n.types=t===null?null:t.types,w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(ee,ce)}catch(e){ce(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}}function ue(e){var t=w.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else le(ue.bind(null,e))}var k={map:O,forEach:function(e,t,n){O(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return O(e,function(){t++}),t},toArray:function(e){return O(e,function(e){return e})||[]},only:function(e){if(!te(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=k,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.addTransitionType=ue,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=te,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:se}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=le,e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.3.0`})),i=n(((e,t)=>{t.exports=r()})),a=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,D());else{var t=n(l);t!==null&&re(x,t.startTime-e)}}}var S=!1,C=-1,ee=5,w=-1;function T(){return g?!0:!(e.unstable_now()-w<ee)}function E(){if(g=!1,S){var t=e.unstable_now();w=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&T());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&re(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?D():S=!1}}}var D;if(typeof y==`function`)D=function(){y(E)};else if(typeof MessageChannel<`u`){var te=new MessageChannel,ne=te.port2;te.port1.onmessage=E,D=function(){ne.postMessage(null)}}else D=function(){_(E,0)};function re(t,n){C=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):ee=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,re(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,D()))),r},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),o=n(((e,t)=>{t.exports=a()})),s=n((e=>{var t=i();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var a={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for(`react.portal`),s=Symbol.for(`react.recoverable`),c=Symbol.for(`react.optimistic_key`);function l(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:r===c?c:``+r,children:e,containerInfo:t,implementation:n}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.browser=function(e){return{$$typeof:s,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return l(e,t,null,r)},e.flushSync=function(e){var t=u.T,n=a.p;try{if(u.T=null,a.p=2,e)return e()}finally{u.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return u.H.useFormState(e,t,n)},e.useFormStatus=function(){return u.H.useHostTransitionStatus()},e.version=`19.3.0`})),c=n(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=s()})),l=n((e=>{var t=o(),n=i(),r=c();function a(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function u(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(l(e)!==e)throw Error(a(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return f(i),e;if(o===r)return f(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,c=i.child;c;){if(c===n){s=!0,n=i,r=o;break}if(c===r){s=!0,r=i,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,r=i;break}if(c===r){s=!0,r=o,n=i;break}c=c.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}function h(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&h(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(a(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function ee(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function w(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function T(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var E=Object.assign,D=Symbol.for(`react.element`),te=Symbol.for(`react.transitional.element`),ne=Symbol.for(`react.portal`),re=Symbol.for(`react.fragment`),ie=Symbol.for(`react.strict_mode`),ae=Symbol.for(`react.profiler`),oe=Symbol.for(`react.consumer`),O=Symbol.for(`react.context`),se=Symbol.for(`react.forward_ref`),ce=Symbol.for(`react.suspense`),le=Symbol.for(`react.suspense_list`),ue=Symbol.for(`react.memo`),k=Symbol.for(`react.lazy`),de=Symbol.for(`react.activity`),fe=Symbol.for(`react.legacy_hidden`),pe=Symbol.for(`react.memo_cache_sentinel`),me=Symbol.for(`react.view_transition`),he=Symbol.for(`react.recoverable`),ge=Symbol.iterator;function _e(e){return typeof e!=`object`||!e?null:(e=ge&&e[ge]||e[`@@iterator`],typeof e==`function`?e:null)}var ve=Symbol.for(`react.client.reference`);function ye(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ve?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case re:return`Fragment`;case ae:return`Profiler`;case ie:return`StrictMode`;case ce:return`Suspense`;case le:return`SuspenseList`;case de:return`Activity`;case me:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case ne:return`Portal`;case O:return e.displayName||`Context`;case oe:return(e._context.displayName||`Context`)+`.Consumer`;case se:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ue:return t=e.displayName||null,t===null?ye(e.type)||`Memo`:t;case k:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}var be=Array.isArray,A=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,xe={pending:!1,data:null,method:null,action:null},Se=[],Ce=-1;function we(e){return{current:e}}function Te(e){0>Ce||(e.current=Se[Ce],Se[Ce]=null,Ce--)}function M(e,t){Ce++,Se[Ce]=e.current,e.current=t}var Ee=we(null),De=we(null),Oe=we(null),ke=we(null);function Ae(e,t){switch(M(Oe,t),M(De,e),M(Ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=dp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}Te(Ee),M(Ee,e)}function je(){Te(Ee),Te(De),Te(Oe)}function Me(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,M(ke,e)),t=Ee.current;var n=dp(t,e.type);t!==n&&(M(De,e),M(Ee,n))}function Ne(e){De.current===e&&(Te(Ee),Te(De)),ke.current===e&&(Te(ke),sh._currentValue=xe)}var Pe,Fe;function Ie(e){if(Pe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Pe=t&&t[1]||``,Fe=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+Pe+e+Fe}var Le=!1;function Re(e,t){if(!e||Le)return``;Le=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
@@ -10,7 +10,7 @@ Error generating stack: `+e.message+`
|
|
|
10
10
|
`).replace(Zf,``)}function $f(e,t){return t=Qf(t),Qf(e)===t}function ep(e,t,n,r,i,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||pn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&pn(e,``+r);else return;break;case`className`:Zt(e,`class`,r);break;case`tabIndex`:Zt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Zt(e,n,r);break;case`style`:gn(e,r,o);return;case`data`:if(t!==`object`){Zt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=bn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&ep(e,t,`name`,i.name,i,null),ep(e,t,`formEncType`,i.formEncType,i,null),ep(e,t,`formMethod`,i.formMethod,i,null),ep(e,t,`formTarget`,i.formTarget,i,null)):(ep(e,t,`encType`,i.encType,i,null),ep(e,t,`method`,i.method,i,null),ep(e,t,`target`,i.target,i,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=bn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=xn);return;case`onScroll`:r!=null&&$(`scroll`,e);return;case`onScrollEnd`:r!=null&&$(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=bn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:$(`beforetoggle`,e),$(`toggle`,e),Xt(e,`popover`,r);break;case`xlinkActuate`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Xt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=vn.get(n)||n,Xt(e,n,r);else return}I=!0}function tp(e,t,n,r,i,o){switch(n){case`style`:gn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)pn(e,r);else if(typeof r==`number`||typeof r==`bigint`)pn(e,``+r);else return;break;case`onScroll`:r!=null&&$(`scroll`,e);return;case`onScrollEnd`:r!=null&&$(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=xn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Ht.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),o=n.slice(2,i?n.length-7:void 0),t=e[Et]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,i),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,i);break a}I=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Xt(e,n,r)}return}I=!0}function np(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:$(`error`,e),$(`load`,e);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:ep(e,t,o,s,n,null)}}i&&ep(e,t,`srcSet`,n.srcSet,n,null),r&&ep(e,t,`src`,n.src,n,null);return;case`input`:$(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(a(137,t));break;default:ep(e,t,r,d,n,null)}}cn(e,o,c,l,u,s,i,!1);return;case`select`:for(i in $(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:ep(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&un(e,!!r,n,!0):un(e,!!r,t,!1);return;case`textarea`:for(s in $(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:ep(e,t,s,c,n,null)}fn(e,r,i,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:ep(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<Rf.length;r++)$(Rf[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:ep(e,t,u,r,n,null)}return;default:if(_n(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&tp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&ep(e,t,c,r,n,null))}var rp={};function ip(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||ep(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(I=!0),o=m;break;case`name`:m!==f&&(I=!0),i=m;break;case`checked`:m!==f&&(I=!0),u=m;break;case`defaultChecked`:m!==f&&(I=!0),d=m;break;case`value`:m!==f&&(I=!0),s=m;break;case`defaultValue`:m!==f&&(I=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&ep(e,t,p,m,r,f)}}sn(e,s,c,l,u,d,o,i);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||ep(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:o!==l&&(I=!0),p=o;break;case`defaultValue`:o!==l&&(I=!0),c=o;break;case`multiple`:o!==l&&(I=!0),s=o;default:o!==l&&ep(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?un(e,!!n,n?[]:``,!1):un(e,!!n,t,!0)):un(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:ep(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:i!==o&&(I=!0),p=i;break;case`defaultValue`:i!==o&&(I=!0),m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&ep(e,t,s,i,r,o)}dn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:ep(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(I=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:ep(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&ep(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(a(137,t));break;default:ep(e,t,u,p,r,m)}return;default:if(_n(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&tp(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||tp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&ep(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||ep(e,t,f,p,r,m)}function ap(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function op(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&ap(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&ap(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var sp=null,cp=null;function lp(e){return e.nodeType===9?e:e.ownerDocument}function up(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function dp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function fp(e,t,n,r){return n=lp(n).createElement(e),n[Tt]=r,n[Et]=t,np(n,e,t),zt(n),n}function pp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var mp=null;function hp(){var e=window.event;return e&&e.type===`popstate`?e!==mp&&(mp=e,!0):(mp=null,!1)}var gp=typeof setTimeout==`function`?setTimeout:void 0,_p=typeof clearTimeout==`function`?clearTimeout:void 0,vp=typeof Promise==`function`?Promise:void 0,yp=typeof requestAnimationFrame==`function`?requestAnimationFrame:gp,bp=typeof queueMicrotask==`function`?queueMicrotask:vp===void 0?gp:function(e){return vp.resolve(null).then(e).catch(xp)};function xp(e){setTimeout(function(){throw e})}function Sp(e){return e===`head`}function Cp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Hh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)_m(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,_m(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Mt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&_m(e.ownerDocument.body)}n=i}while(n);Hh(t)}function wp(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Tp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Ep(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Dp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Op(e){return Dp(e.getBoundingClientRect(),getComputedStyle(e),e)}function kp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Dp(t,n,e)}function Ap(e){return e.documentElement.clientHeight}function jp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Mp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Ap(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Xm(f),u>$m){s.length=o;break}f=new Promise(jp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Np(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Np.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:E({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Np.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Np.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Pp(e){return{name:e,group:new Np(`group`,e),imagePair:new Np(`image-pair`,e),old:new Np(`old`,e),new:new Np(`new`,e)}}function Fp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Fp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Bp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Rp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),h(this._fragmentFiber.child,!1,Ip,e,s,r)}this._eventListeners=a}};function Ip(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Fp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Bp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Rp(i.optionsOrUseCapture),h(this._fragmentFiber.child,!1,Lp,e,n,i),r.splice(t,1),a!==null&&a()}};function Lp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Rp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function zp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Bp(e,t,n,r){if(e.length===0)return-1;r=zp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&zp(a.optionsOrUseCapture)===r)return i}return-1}Fp.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Rp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Rp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Fp.prototype.focus=function(e){h(this._fragmentFiber.child,!0,Vp,e,void 0,void 0)};function Vp(e,t){return e.tag!==6&&(e=b(e),pm(e,t))}Fp.prototype.focusLast=function(e){var t=[];h(this._fragmentFiber.child,!0,Hp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Vp(t[n],e);n--);};function Hp(e,t){return t.push(e),!1}Fp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=lp(e).activeElement,e!==null&&h(this._fragmentFiber.child,!1,Up,e,void 0,void 0))};function Up(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Fp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),h(this._fragmentFiber.child,!1,Wp,e,void 0,void 0)};function Wp(e,t){return e.tag!==6&&(e=b(e),t.observe(e),!1)}Fp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),h(this._fragmentFiber.child,!1,Gp,e,void 0,void 0);for(var n=t=0;n<Kp.length;n++){var r=Kp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Kp[t++]=r}Kp.length=t}};function Gp(e,t){return e.tag!==6&&(e=b(e),t.unobserve(e),!1)}var Kp=[],qp=!1;function Jp(e,t,n){Kp.push({fragmentInstance:e,observer:t,instance:n}),qp||(qp=!0,mm(function(){qp=!1;var e=Kp;Kp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Fp.prototype.getClientRects=function(){var e=[];return h(this._fragmentFiber.child,!1,Yp,e,void 0,void 0),e};function Yp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Fp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Fp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];h(this._fragmentFiber.child,!1,Hp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Xp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Xp(e,t,n,r,i){var a=Ft(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=T(n,a,w),t===null?t=!1:(h(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=T(r,a,w),t===null?t=!1:(h(t,!0,ee,a,r),a=x,S=x=null,t=a!==null)),t):!1}function Zp(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Fp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(a(566));var t=[];h(this._fragmentFiber.child,!1,Hp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),Zp(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var i=t[r];i.tag===6?(i=b(i),Zp(i,n)):b(i).scrollIntoView(e),r+=n?-1:1}};function Qp(e,t){return e=b(e),$p(e,t),!1}function $p(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function em(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Kp.length;i++){var a=Kp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Kp[r++]=a)}Kp.length=r,n.observe(e)}),$p(e,t))}function tm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Jp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function nm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:nm(n),Pt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function rm(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Mt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=lm(e.nextSibling),e===null)break}return null}function im(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=lm(e.nextSibling),e===null))return null;return e}function am(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=lm(e.nextSibling),e===null))return null;return e}function om(e){return e.data===`$?`||e.data===`$~`}function sm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function cm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function lm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var um=null;function dm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return lm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function fm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function pm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function mm(e){yp(function(){yp(function(t){return e(t)})})}function hm(e,t,n){switch(t=lp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function gm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&ep(e,t,r,null,rp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===xn&&(e.onclick=null),Pt(e)}function _m(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Pt(e)}var vm=new Map,ym=new Set;function bm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var xm=j.d;j.d={f:Sm,r:Cm,D:Em,C:Dm,L:Om,m:km,X:jm,S:Am,M:Mm};function Sm(){var e=xm.f(),t=Rd();return e||t}function Cm(e){var t=It(e);t!==null&&t.tag===5&&t.type===`form`?ic(t):xm.r(e)}var wm=typeof document>`u`?null:document;function Tm(e,t,n){var r=wm;if(r&&typeof t==`string`&&t){var i=on(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),ym.has(i)||(ym.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),np(t,`link`,e),zt(t),r.head.appendChild(t)))}}function Em(e){xm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){xm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){xm.L(e,t,n);var r=wm;if(r&&e&&t){var i=`link[rel="preload"][as="`+on(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+on(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+on(n.imageSizes)+`"]`)):i+=`[href="`+on(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(vm.has(a)||(e=E({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);np(o,`link`,e),t===`style`&&(o[Nt]=!0,o.onload=o.onerror=function(){Bt(o)}),zt(o),r.head.appendChild(o)}}}function km(e,t){xm.m(e,t);var n=wm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+on(r)+`"][href="`+on(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!vm.has(a)&&(e=E({rel:`modulepreload`,href:e},t),vm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),np(r,`link`,e),zt(r),n.head.appendChild(r)}}}function Am(e,t,n){xm.S(e,t,n);var r=wm;if(r&&e){var i=Rt(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=E({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vm.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);zt(c),np(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){xm.X(e,t);var n=wm;if(n&&e){var r=Rt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=E({src:e,async:!0},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),zt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){xm.M(e,t);var n=wm;if(n&&e){var r=Rt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=E({src:e,async:!0,type:`module`},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),zt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var i=(i=Oe.current)?bm(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Pm(n.href),t=Rt(i).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pm(n.href);var o=Rt(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Fm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=vm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vm.set(e,o)),Lm(i,e,o,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Rm(n),t=Rt(i).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Pm(e){return`href="`+on(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return E({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Nt]){r.loading=1;return}}else t=e.createElement(`link`),t[Nt]=!0,t.onload=t.onerror=Bt.bind(null,t),np(t,`link`,n),zt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+on(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+on(n.href)+`"]`);if(r)return t.instance=r,zt(r),r;var i=E({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),zt(r),np(r,`style`,i),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Pm(n.href);var o=e.querySelector(Fm(i));if(o)return t.state.loading|=4,t.instance=o,zt(o),o;r=Im(n),(i=vm.get(i))&&Hm(r,i),o=(e.ownerDocument||e).createElement(`link`),zt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),np(o,`link`,r),t.state.loading|=4,Vm(o,n.precedence,e),t.instance=o;case`script`:return o=Rm(n.src),(i=e.querySelector(zm(o)))?(t.instance=i,zt(i),i):(r=n,(i=vm.get(o))&&(r=E({},n),Um(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),zt(i),np(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vm(r,n.precedence,e));return t.instance}function Vm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Hm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Um(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Wm=null;function Gm(e,t,n){if(Wm===null){var r=new Map,i=Wm=new Map;i.set(n,r)}else i=Wm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Mt]||a[Tt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Km(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function qm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,zt(a);return}a=t.ownerDocument||t,r=Im(r),(i=vm.get(i))&&Hm(r,i),a=a.createElement(`link`),zt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),np(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&$m===0&&($m=62500*op());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=nh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var sh={$$typeof:O,Provider:null,Consumer:null,_currentValue:xe,_currentValue2:xe,_threadCount:0};function ch(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=mt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.hiddenUpdates=mt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function lh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ch(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Mi(3,null,null,t),e.current=a,a.stateNode=e,t=Ma(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},ho(a),e}function uh(e){return e?(e=Ai,e):Ai}function dh(e,t,n,r,i,a){i=uh(i),r.context===null?r.context=i:r.pendingContext=i,r=_o(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=vo(e,r,t),n!==null&&(Nd(n,e,t),yo(n,e,t))}function fh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ph(e,t){fh(e,t),(e=e.alternate)&&fh(e,t)}function mh(e){if(e.tag===13||e.tag===31){var t=Di(e,67108864);t!==null&&Nd(t,e,67108864),ph(e,67108864)}}function hh(e){if(e.tag===13||e.tag===31){var t=Ad();t=bt(t);var n=Di(e,t);n!==null&&Nd(n,e,t),ph(e,t)}}var gh=!0;function _h(e,t,n,r){var i=A.T;A.T=null;var a=j.p;try{j.p=2,yh(e,t,n,r)}finally{j.p=a,A.T=i}}function vh(e,t,n,r){var i=A.T;A.T=null;var a=j.p;try{j.p=8,yh(e,t,n,r)}finally{j.p=a,A.T=i}}function yh(e,t,n,r){if(gh){var i=bh(r);if(i===null)Gf(e,t,r,xh,n),Mh(e,r);else if(Ph(i,e,t,n,r))r.stopPropagation();else if(Mh(e,r),t&4&&-1<jh.indexOf(e)){for(;i!==null;){var a=It(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=ct(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-tt(o);s.entanglements[1]|=c,o&=~c}Ef(a),!(rd&6)&&(xd=F()+500,Df(0,!1))}}break;case 31:case 13:s=Di(a,2),s!==null&&Nd(s,a,2),Rd(),ph(a,2)}if(a=bh(r),a===null&&Gf(e,t,r,xh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Gf(e,t,r,null,n)}}function bh(e){return e=Cn(e),Sh(e)}var xh=null;function Sh(e){if(xh=null,e=Ft(e),e!==null){var t=l(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=u(t),e!==null)return e;e=null}else if(n===31){if(e=d(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return xh=e,null}function Ch(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(We()){case Ge:return 2;case Ke:return 8;case qe:case Je:return 32;case Ye:return 268435456;default:return 32}default:return 32}}var wh=!1,Th=null,Eh=null,Dh=null,Oh=new Map,kh=new Map,Ah=[],jh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Mh(e,t){switch(e){case`focusin`:case`focusout`:Th=null;break;case`dragenter`:case`dragleave`:Eh=null;break;case`mouseover`:case`mouseout`:Dh=null;break;case`pointerover`:case`pointerout`:Oh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kh.delete(t.pointerId)}}function Nh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=It(t),t!==null&&mh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ph(e,t,n,r,i){switch(t){case`focusin`:return Th=Nh(Th,e,t,n,r,i),!0;case`dragenter`:return Eh=Nh(Eh,e,t,n,r,i),!0;case`mouseover`:return Dh=Nh(Dh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Oh.set(a,Nh(Oh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kh.set(a,Nh(kh.get(a)||null,e,t,n,r,i)),!0}return!1}function Fh(e){var t=Ft(e.target);if(t!==null){var n=l(t);if(n!==null){if(t=n.tag,t===13){if(t=u(n),t!==null){e.blockedOn=t,Ct(e.priority,function(){hh(n)});return}}else if(t===31){if(t=d(n),t!==null){e.blockedOn=t,Ct(e.priority,function(){hh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ih(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Sn=r,n.target.dispatchEvent(r),Sn=null}else return t=It(n),t!==null&&mh(t),e.blockedOn=n,!1;t.shift()}return!0}function Lh(e,t,n){Ih(e)&&n.delete(t)}function Rh(){wh=!1,Th!==null&&Ih(Th)&&(Th=null),Eh!==null&&Ih(Eh)&&(Eh=null),Dh!==null&&Ih(Dh)&&(Dh=null),Oh.forEach(Lh),kh.forEach(Lh)}function zh(e,n){e.blockedOn===n&&(e.blockedOn=null,wh||(wh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rh)))}var Bh=null;function Vh(e){Bh!==e&&(Bh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bh===e&&(Bh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Sh(r||n)===null)continue;break}var a=It(n);a!==null&&(e.splice(t,3),t-=3,nc(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hh(e){function t(t){return zh(t,e)}Th!==null&&zh(Th,e),Eh!==null&&zh(Eh,e),Dh!==null&&zh(Dh,e),Oh.forEach(t),kh.forEach(t);for(var n=0;n<Ah.length;n++){var r=Ah[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ah.length&&(n=Ah[0],n.blockedOn===null);)Fh(n),n.blockedOn===null&&Ah.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Et]||null;if(typeof a==`function`)o||Vh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Et]||null)s=o.formAction;else if(Sh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vh(n)}}}function Uh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Wh(e){this._internalRoot=e}Gh.prototype.render=Wh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;dh(n,Ad(),e,t,null,null)},Gh.prototype.unmount=Wh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dh(e.current,2,null,e,null,null),Rd(),t[Dt]=null}};function Gh(e){this._internalRoot=e}Gh.prototype.unstable_scheduleHydration=function(e){if(e){var t=St();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ah.length&&t!==0&&t<Ah[n].priority;n++);Ah.splice(n,0,e),n===0&&Fh(e)}};var Kh=n.version;if(Kh!==`19.3.0`)throw Error(a(527,Kh,`19.3.0`));j.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=p(t),e=e===null?null:m(e),e=e===null?null:e.stateNode,e};var qh={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:A,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{Qe=Jh.inject(qh),$e=Jh}catch{}}e.createRoot=function(e,t){if(!s(e))throw Error(a(299));var n=!1,r=``,i=Tc,o=Ec,c=Dc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=lh(e,1,!1,null,null,n,r,null,i,o,c,Uh),e[Dt]=t.current,Uf(e),new Wh(t)}})),u=n(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=l()})),d=i(),f=u(),p=`athena.token`;function m(){let e=/[#&]token=([A-Za-z0-9_-]{20,})/.exec(window.location.hash);if(e){try{sessionStorage.setItem(p,e[1])}catch{}h=e[1],history.replaceState(null,``,window.location.pathname+window.location.search)}return g()}var h=null;function g(){if(h)return h;try{h=sessionStorage.getItem(p)}catch{h=null}return h}var _=class extends Error{status;hint;details;constructor(e,t,n,r){super(t),this.status=e,this.hint=n,this.details=r}};async function v(e,t={}){let n={Authorization:`Bearer ${g()??``}`};t.body!==void 0&&(n[`Content-Type`]=`application/json`);let r=await fetch(e,{method:t.method??`GET`,headers:n,body:t.body===void 0?void 0:JSON.stringify(t.body),signal:t.signal,cache:`no-store`}),i=await r.text(),a=i?JSON.parse(i):null;if(!r.ok){let e=a??{};throw new _(r.status,e.error??`Request failed (${r.status})`,e.hint,e.details)}return a}function y(e,t){let n=!1,r=null,i=1e3;return(async()=>{for(;!n;){r=new AbortController;try{let n=await fetch(`/api/events`,{headers:{Authorization:`Bearer ${g()??``}`},signal:r.signal,cache:`no-store`});if(!n.ok||!n.body)throw Error(`events ${n.status}`);t(!0),i=1e3;let a=n.body.pipeThrough(new TextDecoderStream).getReader(),o=``;for(;;){let{value:t,done:n}=await a.read();if(n)break;o+=t;let r;for(;(r=o.indexOf(`
|
|
11
11
|
|
|
12
12
|
`))!==-1;){let t=o.slice(0,r);o=o.slice(r+2);let n=`message`,i=``;for(let e of t.split(`
|
|
13
|
-
`))e.startsWith(`event: `)?n=e.slice(7):e.startsWith(`data: `)&&(i+=e.slice(6));if(i)try{e(n,JSON.parse(i))}catch{}}}}catch{}if(n)return;t(!1),await new Promise(e=>setTimeout(e,i)),i=Math.min(i*2,15e3)}})(),()=>{n=!0,r?.abort()}}var b=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),x=n(((e,t)=>{t.exports=b()})),S=x(),C=new Set,ee=()=>C.forEach(e=>e());window.addEventListener(`popstate`,ee);function w(e){e!==window.location.pathname&&(history.pushState(null,``,e),ee(),window.scrollTo(0,0))}function T(){return(0,d.useSyncExternalStore)(e=>(C.add(e),()=>C.delete(e)),()=>window.location.pathname)}function E({to:e,className:t,children:n,title:r}){return(0,S.jsx)(`a`,{href:e,className:t,onClick:t=>{t.metaKey||t.ctrlKey||t.shiftKey||t.button!==0||(t.preventDefault(),w(e))},title:r,children:n})}function D(e){if(!e)return`never`;let t=Date.now()-Date.parse(e);if(Number.isNaN(t))return`unknown`;let n=Math.max(0,Math.round(t/1e3));if(n<45)return`just now`;let r=Math.round(n/60);if(r<60)return`${r} min ago`;let i=Math.round(r/60);return i<36?`${i} h ago`:`${Math.round(i/24)} days ago`}var te=(0,d.createContext)(null),ne=/^(knowledge|analysis\.completed|rules|agents|sync|git|security|graph)(\.|$)/;function re(e){return ne.test(e)}var ie={state:`IDLE`,actor:`none`,task:null,reading:[],since:new Date().toISOString()};function ae({children:e}){let[t,n]=(0,d.useState)(!1),[r,i]=(0,d.useState)(ie),[a,o]=(0,d.useState)([]),[s,c]=(0,d.useState)(0),[l,u]=(0,d.useState)([]),[f,p]=(0,d.useState)([]),m=(0,d.useRef)(0),h=(0,d.useCallback)(()=>c(e=>e+1),[]),g=(0,d.useCallback)(()=>{v(`/api/docs`).then(u).catch(()=>{})},[]),_=(0,d.useCallback)((e,t=`info`)=>{let n=++m.current;p(r=>[...r,{id:n,message:e,level:t}]),setTimeout(()=>p(e=>e.filter(e=>e.id!==n)),4e3)},[]);(0,d.useEffect)(()=>(v(`/api/activity`).then(e=>{i(e.activity),o(e.events)}).catch(()=>{}),g(),y((e,t)=>{if(e===`activity`&&i(t),e===`event`){let e=t;o(t=>t.some(t=>t.id===e.id)?t:[...t,e].slice(-500)),re(e.type)&&(c(e=>e+1),g())}},n)),[g]);let b=(0,d.useMemo)(()=>({connected:t,activity:r,events:a,revision:s,docs:l,refreshDocs:g,bump:h,toast:_,toasts:f}),[t,r,a,s,l,g,h,_,f]);return(0,S.jsx)(te.Provider,{value:b,children:e})}function oe(){let e=(0,d.useContext)(te);if(!e)throw Error(`useLive outside LiveProvider`);return e}function O(e,t=[]){let[n,r]=(0,d.useState)(null),[i,a]=(0,d.useState)(null),[o,s]=(0,d.useState)(!0),[c,l]=(0,d.useState)(0);return(0,d.useEffect)(()=>{if(!e)return;let t=new AbortController;return s(!0),v(e,{signal:t.signal}).then(e=>{r(e),a(null)}).catch(e=>{e.name!==`AbortError`&&a(e)}).finally(()=>s(!1)),()=>t.abort()},[e,c,...t]),{data:n,error:i,loading:o,reload:()=>l(e=>e+1)}}function se({tone:e=`neutral`,children:t,title:n}){return(0,S.jsx)(`span`,{className:`badge badge--${e}`,title:n,children:t})}var ce={synchronized:{label:`Synchronized`,tone:`green`},"may-be-outdated":{label:`May be outdated`,tone:`yellow`},missing:{label:`Missing`,tone:`red`},"developer-owned":{label:`Developer-owned`,tone:`blue`}};function le({state:e}){return(0,S.jsx)(`span`,{className:`dot dot--${ce[e].tone}`,title:ce[e].label,"aria-label":ce[e].label})}function ue({title:e,actions:t,children:n,className:r=``}){return(0,S.jsxs)(`section`,{className:`card ${r}`,children:[(e||t)&&(0,S.jsxs)(`header`,{className:`card__header`,children:[e&&(0,S.jsx)(`h2`,{className:`card__title`,children:e}),t&&(0,S.jsx)(`div`,{className:`card__actions`,children:t})]}),n]})}function k({title:e,children:t}){return(0,S.jsxs)(`div`,{className:`empty`,children:[(0,S.jsx)(`div`,{className:`empty__title`,children:e}),t&&(0,S.jsx)(`div`,{className:`empty__body`,children:t})]})}function de({label:e=`Loading`}){return(0,S.jsx)(`span`,{className:`spinner`,role:`status`,"aria-label":e})}function fe({error:e}){return(0,S.jsxs)(`div`,{className:`note note--error`,role:`alert`,children:[(0,S.jsx)(`strong`,{children:e.message}),e.hint&&(0,S.jsx)(`div`,{className:`note__hint`,children:e.hint})]})}function pe({open:e,title:t,body:n,confirmLabel:r,danger:i,onConfirm:a,onCancel:o}){let s=(0,d.useRef)(null);return(0,d.useEffect)(()=>{let t=s.current;t&&(e&&!t.open&&t.showModal?.(),!e&&t.open&&t.close())},[e]),(0,S.jsxs)(`dialog`,{ref:s,className:`dialog`,onCancel:e=>(e.preventDefault(),o()),onClose:()=>e&&o(),children:[(0,S.jsx)(`h3`,{className:`dialog__title`,children:t}),(0,S.jsx)(`div`,{className:`dialog__body`,children:n}),(0,S.jsxs)(`div`,{className:`dialog__actions`,children:[(0,S.jsx)(`button`,{className:`btn`,onClick:o,children:`Cancel`}),(0,S.jsx)(`button`,{className:`btn ${i?`btn--danger`:`btn--primary`}`,onClick:a,autoFocus:!0,children:r})]})]})}var me=[{id:`architecture`,label:`Architecture`},{id:`database`,label:`Database`},{id:`api`,label:`API`},{id:`auth`,label:`Auth`},{id:`security`,label:`Security`},{id:`testing`,label:`Testing`},{id:`debugging`,label:`Debugging`},{id:`performance`,label:`Performance`},{id:`code-review`,label:`Code Review`},{id:`deployment`,label:`Deployment`}];function he({to:e,label:t,icon:n,trailing:r}){let i=T(),a=i===e||e!==`/`&&i.startsWith(`${e}/`);return(0,S.jsxs)(E,{to:e,className:`nav__item ${a?`nav__item--active`:``}`,children:[(0,S.jsx)(`span`,{className:`nav__icon`,"aria-hidden":`true`,children:n}),(0,S.jsx)(`span`,{className:`nav__label`,children:t}),r]})}var ge={overview:(0,S.jsx)(`svg`,{viewBox:`0 0 16 16`,children:(0,S.jsx)(`path`,{d:`M2 2h5v5H2zM9 2h5v3H9zM9 7h5v7H9zM2 9h5v5H2z`})}),doc:(0,S.jsx)(`svg`,{viewBox:`0 0 16 16`,children:(0,S.jsx)(`path`,{d:`M4 1.5h5l3 3v10H4z M9 1.5v3h3`})}),project:(0,S.jsx)(`svg`,{viewBox:`0 0 16 16`,children:(0,S.jsx)(`path`,{d:`M2 4.5h4l1.5 1.5H14v7.5H2z`})}),rules:(0,S.jsx)(`svg`,{viewBox:`0 0 16 16`,children:(0,S.jsx)(`path`,{d:`M3 3.5h10M3 8h10M3 12.5h6`})}),agents:(0,S.jsxs)(`svg`,{viewBox:`0 0 16 16`,children:[(0,S.jsx)(`rect`,{x:`3`,y:`4.5`,width:`10`,height:`8`,rx:`2.5`}),(0,S.jsx)(`path`,{d:`M8 4.5V2M6 8.5h.01M10 8.5h.01`})]}),activity:(0,S.jsx)(`svg`,{viewBox:`0 0 16 16`,children:(0,S.jsx)(`path`,{d:`M1.5 8.5h3l2-5 3 9 2-4h3`})}),context:(0,S.jsxs)(`svg`,{viewBox:`0 0 16 16`,children:[(0,S.jsx)(`circle`,{cx:`4`,cy:`4`,r:`2`}),(0,S.jsx)(`circle`,{cx:`12`,cy:`6`,r:`2`}),(0,S.jsx)(`circle`,{cx:`7`,cy:`12`,r:`2`}),(0,S.jsx)(`path`,{d:`M5.7 5.3 10.3 5M5.2 5.9 6.3 10M10.9 7.8 8.4 10.7`})]}),shield:(0,S.jsx)(`svg`,{viewBox:`0 0 16 16`,children:(0,S.jsx)(`path`,{d:`M8 1.5 13 3.5v4c0 3.2-2.1 6.1-5 7-2.9-.9-5-3.8-5-7v-4z`})}),sync:(0,S.jsx)(`svg`,{viewBox:`0 0 16 16`,children:(0,S.jsx)(`path`,{d:`M13 6.5A5 5 0 0 0 4 4.5L2.5 6M3 9.5a5 5 0 0 0 9 2l1.5-1.5M2.5 2.5V6H6M13.5 13.5V10H10`})})};function _e(){let{docs:e,revision:t}=oe(),{data:n}=O(`/api/sync`,[t]),r=n?.plan&&!n.plan.ignored?n.plan.documents.length:0,i=t=>e.find(e=>e.id===t)?.sync,a=e=>{let t=i(e);return t?(0,S.jsx)(le,{state:t}):null};return(0,S.jsxs)(`nav`,{className:`sidebar`,"aria-label":`Main`,children:[(0,S.jsxs)(`div`,{className:`nav__group`,children:[(0,S.jsx)(he,{to:`/`,label:`Overview`,icon:ge.overview}),(0,S.jsx)(he,{to:`/sync`,label:`Sync`,icon:ge.sync,trailing:r?(0,S.jsx)(`span`,{className:`count`,title:`${r} document update${r===1?``:`s`} proposed`,children:r}):void 0}),(0,S.jsx)(he,{to:`/docs/project`,label:`Project`,icon:ge.project,trailing:a(`project`)})]}),(0,S.jsx)(`div`,{className:`nav__heading`,children:`Knowledge`}),(0,S.jsxs)(`div`,{className:`nav__group`,children:[me.map(e=>(0,S.jsx)(he,{to:`/docs/${e.id}`,label:e.label,icon:ge.doc,trailing:a(e.id)},e.id)),(0,S.jsx)(he,{to:`/rules`,label:`Rules`,icon:ge.rules,trailing:a(`rules`)})]}),(0,S.jsx)(`div`,{className:`nav__heading`,children:`Tools`}),(0,S.jsxs)(`div`,{className:`nav__group`,children:[(0,S.jsx)(he,{to:`/context`,label:`Context`,icon:ge.context}),(0,S.jsx)(he,{to:`/security`,label:`Security scan`,icon:ge.shield}),(0,S.jsx)(he,{to:`/agents`,label:`AI Agents`,icon:ge.agents}),(0,S.jsx)(he,{to:`/activity`,label:`Activity`,icon:ge.activity})]}),(0,S.jsxs)(`div`,{className:`sidebar__legend`,children:[(0,S.jsxs)(`span`,{children:[(0,S.jsx)(le,{state:`synchronized`}),` in sync`]}),(0,S.jsxs)(`span`,{children:[(0,S.jsx)(le,{state:`may-be-outdated`}),` may be outdated`]})]})]})}function ve(){let[e,t]=(0,d.useState)(``),[n,r]=(0,d.useState)([]),[i,a]=(0,d.useState)(!1),[o,s]=(0,d.useState)(0),c=(0,d.useRef)(null);(0,d.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),c.current?.focus(),c.current?.select())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,d.useEffect)(()=>{if(e.trim().length<2){r([]);return}let t=new AbortController,n=setTimeout(()=>{v(`/api/search?q=${encodeURIComponent(e)}`,{signal:t.signal}).then(e=>{r(e),s(0)}).catch(()=>{})},120);return()=>{clearTimeout(n),t.abort()}},[e]);let l=e=>{a(!1),t(``),w(e.id===`rules`?`/rules`:`/docs/${e.id}`)};return(0,S.jsxs)(`div`,{className:`search`,role:`search`,children:[(0,S.jsxs)(`svg`,{className:`search__icon`,viewBox:`0 0 16 16`,"aria-hidden":`true`,children:[(0,S.jsx)(`circle`,{cx:`7`,cy:`7`,r:`4.5`}),(0,S.jsx)(`path`,{d:`m10.5 10.5 3.5 3.5`})]}),(0,S.jsx)(`input`,{ref:c,className:`search__input`,placeholder:`Search knowledge`,"aria-label":`Search knowledge`,value:e,onChange:e=>{t(e.target.value),a(!0)},onFocus:()=>a(!0),onBlur:()=>setTimeout(()=>a(!1),150),onKeyDown:e=>{e.key===`ArrowDown`?s(e=>Math.min(e+1,n.length-1)):e.key===`ArrowUp`?s(e=>Math.max(e-1,0)):e.key===`Enter`&&n[o]?l(n[o]):e.key===`Escape`&&c.current?.blur()}}),(0,S.jsx)(`kbd`,{className:`search__kbd`,children:`⌘K`}),i&&e.trim().length>=2&&(0,S.jsx)(`div`,{className:`search__results`,role:`listbox`,children:n.length===0?(0,S.jsx)(`div`,{className:`search__empty`,children:`No matches`}):n.map((e,t)=>(0,S.jsxs)(`button`,{className:`search__hit ${t===o?`search__hit--active`:``}`,onMouseDown:e=>e.preventDefault(),onClick:()=>l(e),role:`option`,"aria-selected":t===o,children:[(0,S.jsxs)(`span`,{className:`search__file`,children:[e.file,(0,S.jsxs)(`span`,{className:`search__line`,children:[`:`,e.line]})]}),(0,S.jsx)(`span`,{className:`search__text`,children:e.text})]},`${e.id}:${e.line}:${t}`))})]})}function ye({projectName:e}){let{connected:t,revision:n}=oe(),{data:r}=O(`/api/status`,[n]),i=r?.health,a=i===`healthy`?`Knowledge in sync`:i===`needs-update`?`Knowledge needs update`:i===`degraded`?`Knowledge files missing`:`Checking…`,o=i===`healthy`?`green`:i===`needs-update`?`yellow`:i===`degraded`?`red`:`neutral`;return(0,S.jsxs)(`header`,{className:`topbar`,children:[(0,S.jsxs)(E,{to:`/`,className:`brand`,children:[(0,S.jsxs)(`svg`,{className:`brand__mark`,viewBox:`0 0 32 32`,"aria-hidden":`true`,children:[(0,S.jsx)(`rect`,{width:`32`,height:`32`,rx:`8`}),(0,S.jsx)(`path`,{d:`M16 6 25 26h-4.2l-1.9-4.4h-5.8L11.2 26H7L16 6Zm0 8.6-1.9 4.3h3.8L16 14.6Z`})]}),(0,S.jsx)(`span`,{className:`brand__name`,children:`Athena`}),e&&(0,S.jsxs)(`span`,{className:`brand__project`,children:[`/ `,e]})]}),(0,S.jsx)(ve,{}),(0,S.jsxs)(`div`,{className:`topbar__right`,children:[(0,S.jsxs)(`span`,{className:`health health--${o}`,title:r?`Last analysis ${new Date(r.analyzedAt).toLocaleString()}`:void 0,children:[(0,S.jsx)(`span`,{className:`dot dot--${o}`}),` `,a]}),(0,S.jsx)(`span`,{className:`conn ${t?`conn--on`:`conn--off`}`,title:t?`Live updates connected`:`Live updates disconnected — reconnecting`,children:t?`Live`:`Offline`})]})]})}function be(){let{toasts:e}=oe();return(0,S.jsx)(`div`,{className:`toasts`,"aria-live":`polite`,children:e.map(e=>(0,S.jsx)(`div`,{className:`toast toast--${e.level}`,children:e.message},e.id))})}var A=class extends d.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidUpdate(e){e.resetKey!==this.props.resetKey&&this.state.error&&this.setState({error:null})}componentDidCatch(e,t){console.error(`Athena UI error`,e,t.componentStack)}render(){return this.state.error?(0,S.jsx)(`div`,{className:`page`,children:(0,S.jsxs)(`div`,{className:`note note--error`,role:`alert`,children:[(0,S.jsx)(`strong`,{children:`This page failed to render.`}),(0,S.jsx)(`div`,{className:`note__hint`,children:this.state.error.message}),(0,S.jsxs)(`div`,{className:`note__actions`,children:[(0,S.jsx)(`button`,{className:`btn btn--sm`,onClick:()=>this.setState({error:null}),children:`Try again`}),(0,S.jsx)(`button`,{className:`btn btn--sm`,onClick:()=>window.location.reload(),children:`Reload`})]})]})}):this.props.children}},j={IDLE:`Idle`,ANALYZING:`Analyzing`,PLANNING:`Planning`,CODING:`Coding`,TESTING:`Testing`,REVIEWING:`Reviewing`,SUCCESS:`Finished`,ERROR:`Error`};function xe({state:e,size:t=132}){let n=e.toLowerCase();return(0,S.jsx)(`div`,{className:`robot robot--${n}`,role:`img`,"aria-label":`Athena robot: ${j[e]}`,style:{width:t,height:t},children:(0,S.jsxs)(`svg`,{viewBox:`0 0 160 160`,width:t,height:t,"aria-hidden":`true`,children:[(0,S.jsxs)(`defs`,{children:[(0,S.jsxs)(`linearGradient`,{id:`rb-body`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,S.jsx)(`stop`,{offset:`0`,stopColor:`var(--robot-shell-hi)`}),(0,S.jsx)(`stop`,{offset:`1`,stopColor:`var(--robot-shell)`})]}),(0,S.jsx)(`clipPath`,{id:`rb-visor`,children:(0,S.jsx)(`rect`,{x:`46`,y:`50`,width:`68`,height:`34`,rx:`14`})})]}),(0,S.jsx)(`ellipse`,{className:`robot__shadow`,cx:`80`,cy:`148`,rx:`34`,ry:`5`}),(0,S.jsxs)(`g`,{className:`robot__float`,children:[(0,S.jsxs)(`g`,{className:`robot__antenna`,children:[(0,S.jsx)(`line`,{x1:`80`,y1:`30`,x2:`80`,y2:`16`,stroke:`var(--robot-shell-hi)`,strokeWidth:`3`,strokeLinecap:`round`}),(0,S.jsx)(`circle`,{className:`robot__bulb`,cx:`80`,cy:`13`,r:`5`})]}),(0,S.jsxs)(`g`,{className:`robot__head`,children:[(0,S.jsx)(`rect`,{x:`34`,y:`30`,width:`92`,height:`68`,rx:`22`,fill:`url(#rb-body)`,stroke:`var(--robot-edge)`,strokeWidth:`1.5`}),(0,S.jsx)(`rect`,{x:`46`,y:`50`,width:`68`,height:`34`,rx:`14`,fill:`var(--robot-visor)`}),(0,S.jsx)(`g`,{clipPath:`url(#rb-visor)`,children:(0,S.jsx)(`rect`,{className:`robot__scan`,x:`46`,y:`50`,width:`14`,height:`34`,fill:`var(--robot-accent)`,opacity:`0.18`})}),(0,S.jsxs)(`g`,{className:`robot__eyes`,children:[(0,S.jsx)(`g`,{className:`robot__eye robot__eye--l`,children:(0,S.jsx)(`rect`,{className:`robot__pupil`,x:`60`,y:`60`,width:`12`,height:`14`,rx:`6`})}),(0,S.jsx)(`g`,{className:`robot__eye robot__eye--r`,children:(0,S.jsx)(`rect`,{className:`robot__pupil`,x:`88`,y:`60`,width:`12`,height:`14`,rx:`6`})}),(0,S.jsx)(`path`,{className:`robot__happy`,d:`M59 70 q7 -9 14 0 M87 70 q7 -9 14 0`,fill:`none`,strokeWidth:`4`,strokeLinecap:`round`}),(0,S.jsx)(`path`,{className:`robot__cross`,d:`M61 61 l10 12 M71 61 l-10 12 M89 61 l10 12 M99 61 l-10 12`,fill:`none`,strokeWidth:`3.5`,strokeLinecap:`round`})]}),(0,S.jsx)(`circle`,{cx:`34`,cy:`64`,r:`5`,fill:`var(--robot-shell)`,stroke:`var(--robot-edge)`}),(0,S.jsx)(`circle`,{cx:`126`,cy:`64`,r:`5`,fill:`var(--robot-shell)`,stroke:`var(--robot-edge)`})]}),(0,S.jsxs)(`g`,{className:`robot__body`,children:[(0,S.jsx)(`rect`,{x:`50`,y:`102`,width:`60`,height:`36`,rx:`12`,fill:`url(#rb-body)`,stroke:`var(--robot-edge)`,strokeWidth:`1.5`}),(0,S.jsx)(`rect`,{x:`60`,y:`111`,width:`40`,height:`18`,rx:`5`,fill:`var(--robot-visor)`}),(0,S.jsxs)(`g`,{className:`robot__code`,children:[(0,S.jsx)(`rect`,{x:`64`,y:`115`,width:`18`,height:`2.5`,rx:`1.25`}),(0,S.jsx)(`rect`,{x:`64`,y:`119.5`,width:`26`,height:`2.5`,rx:`1.25`}),(0,S.jsx)(`rect`,{x:`64`,y:`124`,width:`12`,height:`2.5`,rx:`1.25`})]}),(0,S.jsx)(`rect`,{className:`robot__progress`,x:`64`,y:`118`,width:`32`,height:`4`,rx:`2`}),(0,S.jsxs)(`g`,{className:`robot__dots`,children:[(0,S.jsx)(`circle`,{cx:`72`,cy:`120`,r:`2`}),(0,S.jsx)(`circle`,{cx:`80`,cy:`120`,r:`2`}),(0,S.jsx)(`circle`,{cx:`88`,cy:`120`,r:`2`})]})]}),(0,S.jsx)(`g`,{className:`robot__arm robot__arm--l`,children:(0,S.jsx)(`rect`,{x:`36`,y:`106`,width:`10`,height:`24`,rx:`5`,fill:`var(--robot-shell)`,stroke:`var(--robot-edge)`})}),(0,S.jsx)(`g`,{className:`robot__arm robot__arm--r`,children:(0,S.jsx)(`rect`,{x:`114`,y:`106`,width:`10`,height:`24`,rx:`5`,fill:`var(--robot-shell)`,stroke:`var(--robot-edge)`})})]})]})})}function Se(e){return j[e]}var Ce={athena:`Athena`,"web-ui":`Web UI`,filesystem:`File system`,agent:`AI agent`};function we({compact:e=!1}){let{activity:t}=oe(),n=t.state===`IDLE`;return(0,S.jsxs)(`div`,{className:`activity-panel activity-panel--${t.state.toLowerCase()} ${e?`activity-panel--compact`:``}`,children:[(0,S.jsx)(xe,{state:t.state,size:e?108:140}),(0,S.jsxs)(`div`,{className:`activity-panel__body`,children:[(0,S.jsx)(`div`,{className:`activity-panel__kicker`,children:t.actor===`agent`?`AI agent`:`Athena`}),(0,S.jsxs)(`div`,{className:`activity-panel__state`,children:[(0,S.jsx)(`span`,{className:`pulse`,"aria-hidden":`true`}),n?`Athena is ready`:Se(t.state)]}),n?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`p`,{className:`activity-panel__task`,children:`Waiting for an AI coding agent…`}),(0,S.jsx)(`p`,{className:`activity-panel__note`,children:`Agents configured with hooks report their tool use here as it happens.`})]}):(0,S.jsxs)(S.Fragment,{children:[t.task&&(0,S.jsx)(`p`,{className:`activity-panel__task`,children:t.task}),t.reading.length>0&&(0,S.jsx)(`ul`,{className:`activity-panel__reading`,children:t.reading.map(e=>(0,S.jsx)(`li`,{children:e},e))}),(0,S.jsxs)(`p`,{className:`activity-panel__note`,children:[`Since `,D(t.since)]})]})]})]})}function Te({events:e,limit:t}){let n=[...e].reverse().slice(0,t);return n.length?(0,S.jsx)(`ol`,{className:`timeline`,children:n.map(e=>(0,S.jsxs)(`li`,{className:`timeline__item timeline__item--${e.level}`,children:[(0,S.jsx)(`time`,{className:`timeline__time`,dateTime:e.ts,title:new Date(e.ts).toLocaleString(),children:new Date(e.ts).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1})}),(0,S.jsx)(`span`,{className:`timeline__marker`,"aria-hidden":`true`}),(0,S.jsx)(`span`,{className:`timeline__message`,children:e.message}),(0,S.jsx)(`span`,{className:`timeline__source`,children:Ce[e.source]})]},e.id))}):(0,S.jsx)(`div`,{className:`events-empty`,children:`No activity yet in this session.`})}function M({label:e,value:t,sub:n,tone:r,to:i}){let a=(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`stat__label`,children:e}),(0,S.jsx)(`div`,{className:`stat__value ${r===`warn`?`stat__value--warn`:``}`,children:t}),n&&(0,S.jsx)(`div`,{className:`stat__sub`,children:n})]});return i?(0,S.jsx)(E,{to:i,className:`stat stat--link`,children:a}):(0,S.jsx)(`div`,{className:`stat`,children:a})}function Ee(){let{revision:e,events:t,activity:n,docs:r,toast:i}=oe(),{data:a,error:o}=O(`/api/overview`,[e]),{data:s}=O(`/api/status`,[e]),{data:c}=O(`/api/agents`,[e]),{data:l}=O(`/api/sync`,[e]),u=l?.plan&&!l.plan.ignored?l.plan:null,[f,p]=(0,d.useState)(!1);if(o)return(0,S.jsx)(fe,{error:o});if(!a)return(0,S.jsx)(`div`,{className:`page-loading`,children:(0,S.jsx)(de,{})});let m=a.summary,h=n.state===`ANALYZING`,g=async()=>{p(!0);try{await v(`/api/analyze`,{method:`POST`,body:{}})}catch(e){i(e instanceof _?e.message:`Could not start analysis`,`error`)}finally{p(!1)}},y=s?s.changes.added.length+s.changes.modified.length+s.changes.deleted.length:0;return(0,S.jsxs)(`div`,{className:`page`,children:[(0,S.jsxs)(`header`,{className:`page__header`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`page__kicker`,children:`Project Overview`}),(0,S.jsx)(`h1`,{className:`page__title`,children:a.project.name}),(0,S.jsx)(`p`,{className:`page__subtitle`,children:a.project.description??(0,S.jsx)(`span`,{className:`muted`,children:`No project description found in manifests.`})})]}),(0,S.jsxs)(`div`,{className:`page__meta`,children:[(0,S.jsxs)(`span`,{children:[`Analyzed `,D(a.analyzedAt)]}),a.git.branch&&(0,S.jsxs)(`span`,{className:`mono`,children:[`⎇ `,a.git.branch]}),(0,S.jsxs)(`span`,{className:`mono`,children:[`Athena `,a.athenaVersion]})]})]}),u&&(0,S.jsxs)(E,{to:`/sync`,className:`proposal proposal--link`,children:[(0,S.jsxs)(`div`,{className:`proposal__text`,children:[(0,S.jsx)(`strong`,{children:`Knowledge update proposed`}),(0,S.jsxs)(`span`,{className:`muted`,children:[` · `,u.documents.map(e=>e.file).join(`, `)]}),(0,S.jsx)(`div`,{className:`fineprint`,children:u.modelChanges[0]?`${u.modelChanges[0].label}: ${u.modelChanges[0].summary}`:u.documents[0]?.reasons[0]})]}),(0,S.jsx)(`span`,{className:`btn btn--primary btn--sm`,children:`Review changes`})]}),(0,S.jsxs)(`div`,{className:`overview-grid`,children:[(0,S.jsxs)(`div`,{className:`overview-main`,children:[m?(0,S.jsxs)(`div`,{className:`stats`,children:[(0,S.jsx)(M,{label:`Files analyzed`,value:m.filesAnalyzed.toLocaleString(),sub:m.languages.slice(0,3).map(e=>e.name).join(` · `)||void 0,to:`/docs/project`}),(0,S.jsx)(M,{label:`Frameworks`,value:new Set(m.frameworks.map(e=>e.name)).size,sub:m.monorepo.isMonorepo?`Monorepo · ${m.monorepo.packages} packages`:void 0,to:`/docs/architecture`}),(0,S.jsx)(M,{label:`API routes`,value:m.routes,sub:m.apiSpecs?`${m.apiSpecs} spec files`:void 0,to:`/docs/api`}),(0,S.jsx)(M,{label:`DB entities`,value:m.entities,sub:m.databases.slice(0,2).join(` · `)||void 0,to:`/docs/database`}),(0,S.jsx)(M,{label:`Test files`,value:m.testFiles,sub:m.testFrameworks.slice(0,2).join(` · `)||`No framework detected`,to:`/docs/testing`}),(0,S.jsx)(M,{label:`Potential secrets`,value:m.potentialSecrets,sub:m.potentialSecrets?`Review security.md`:`None matched`,tone:m.potentialSecrets?`warn`:void 0,to:`/docs/security`})]}):(0,S.jsx)(ue,{children:(0,S.jsx)(k,{title:`Analysis summary not available`,children:`model.json is missing (it is not committed to Git). Re-analyze to rebuild it.`})}),(0,S.jsx)(ue,{title:`Knowledge synchronization`,actions:(0,S.jsx)(`button`,{className:`btn btn--primary`,onClick:g,disabled:f||h,children:h?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(de,{label:`Analyzing`}),` Analyzing…`]}):`Re-analyze project`}),children:s?(0,S.jsxs)(`div`,{className:`sync`,children:[(0,S.jsx)(`div`,{className:`sync__summary`,children:u?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(se,{tone:`yellow`,children:`Update proposed`}),(0,S.jsxs)(E,{to:`/sync`,children:[`Review `,u.documents.length,` document update`,u.documents.length===1?``:`s`]})]}):s.sync===`up-to-date`?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(se,{tone:`green`,children:`Up to date`}),(0,S.jsx)(`span`,{className:`muted`,children:`No file changes since the last analysis.`})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(se,{tone:`yellow`,children:`Needs update`}),(0,S.jsxs)(`span`,{children:[y,` file`,y===1?``:`s`,` changed since the last analysis `,(0,S.jsxs)(`span`,{className:`muted`,children:[`(`,s.changes.modified.length,` modified · `,s.changes.added.length,` added · `,s.changes.deleted.length,` deleted)`]})]})]})}),s.affectedDocuments.length>0&&(0,S.jsxs)(`div`,{className:`sync__affected`,children:[(0,S.jsx)(`div`,{className:`label`,children:`Potentially affected knowledge`}),(0,S.jsx)(`ul`,{children:s.affectedDocuments.map(e=>{let t=r.find(t=>t.file===e.file);return(0,S.jsxs)(`li`,{children:[(0,S.jsx)(E,{to:t?.id===`rules`?`/rules`:`/docs/${t?.id??``}`,className:`mono`,children:e.file}),(0,S.jsxs)(`span`,{className:`muted`,children:[` — `,e.reasons.join(`, `)]})]},e.file)})})]}),(0,S.jsx)(`p`,{className:`fineprint`,children:`Re-analysis regenerates only Athena-managed sections. Your edits and Developer Notes are preserved.`})]}):(0,S.jsx)(de,{})}),m&&(0,S.jsxs)(ue,{title:`Detected stack`,children:[m.frameworks.length?(0,S.jsx)(`div`,{className:`chips`,children:m.frameworks.map(e=>(0,S.jsxs)(`span`,{className:`chip`,title:`${e.status} · ${e.confidence} confidence · ${e.root}`,children:[(0,S.jsx)(`span`,{className:`chip__conf chip__conf--${e.confidence}`}),e.name,e.root!==`.`&&(0,S.jsx)(`span`,{className:`chip__root`,children:e.root})]},`${e.name}@${e.root}`))}):(0,S.jsx)(`p`,{className:`muted`,children:`No known frameworks detected.`}),(0,S.jsxs)(`dl`,{className:`facts`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:`Databases`}),(0,S.jsx)(`dd`,{children:m.databases.join(`, `)||(0,S.jsx)(`span`,{className:`muted`,children:`Not detected`})})]}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:`Auth`}),(0,S.jsx)(`dd`,{children:m.auth.join(`, `)||(0,S.jsx)(`span`,{className:`muted`,children:`Not detected`})})]}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:`CI/CD`}),(0,S.jsx)(`dd`,{children:m.ci.join(`, `)||(0,S.jsx)(`span`,{className:`muted`,children:`Not detected`})})]}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:`Hosting`}),(0,S.jsx)(`dd`,{children:m.hosting.join(`, `)||(0,S.jsx)(`span`,{className:`muted`,children:`Not detected`})})]})]}),(0,S.jsx)(`p`,{className:`fineprint`,children:`"Not detected" means Athena found no evidence. It does not prove absence.`})]}),(0,S.jsx)(ue,{title:`Knowledge`,className:`card--flush`,children:(0,S.jsx)(`ul`,{className:`doclist`,children:r.map(e=>(0,S.jsx)(`li`,{children:(0,S.jsxs)(E,{to:e.id===`rules`?`/rules`:`/docs/${e.id}`,className:`doclist__row`,children:[(0,S.jsx)(le,{state:e.sync}),(0,S.jsx)(`span`,{className:`doclist__title`,children:e.title}),(0,S.jsx)(`span`,{className:`doclist__file mono`,children:e.file}),e.editedSections.length>0&&(0,S.jsxs)(se,{tone:`blue`,title:e.editedSections.join(`, `),children:[e.editedSections.length,` edited`]}),(0,S.jsx)(`span`,{className:`doclist__time`,children:e.id===`rules`?`developer-owned`:e.lastChangedAt?`changed ${D(e.lastChangedAt)}`:``})]})},e.id))})})]}),(0,S.jsxs)(`aside`,{className:`overview-side`,children:[(0,S.jsx)(ue,{title:`Current activity`,children:(0,S.jsx)(we,{compact:!0})}),(0,S.jsx)(ue,{title:`AI agents`,actions:(0,S.jsx)(E,{to:`/agents`,className:`btn btn--ghost btn--sm`,children:`Manage`}),children:(0,S.jsx)(`ul`,{className:`agentlist`,children:(c??[]).map(e=>(0,S.jsxs)(`li`,{children:[(0,S.jsx)(`span`,{className:`dot ${e.configured?`dot--green`:`dot--off`}`}),(0,S.jsx)(`span`,{children:e.name}),(0,S.jsx)(`span`,{className:`muted`,children:e.configured?`configured`:e.detectedInProject?`detected, not configured`:`not configured`})]},e.id))})}),(0,S.jsx)(ue,{title:`Recent activity`,actions:(0,S.jsx)(E,{to:`/activity`,className:`btn btn--ghost btn--sm`,children:`All`}),children:(0,S.jsx)(Te,{events:t,limit:6})})]})]})]})}function De(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Oe(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var ke=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ae=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,je={};function Me(e,t){return((t||je).jsx?Ae:ke).test(e)}var Ne=/[ \t\n\f\r]/g;function Pe(e){return typeof e==`object`?e.type===`text`&&Fe(e.value):Fe(e)}function Fe(e){return e.replace(Ne,``)===``}var Ie=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Ie.prototype.normal={},Ie.prototype.property={},Ie.prototype.space=void 0;function Le(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Ie(n,r,t)}function Re(e){return e.toLowerCase()}var ze=class{constructor(e,t){this.attribute=t,this.property=e}};ze.prototype.attribute=``,ze.prototype.booleanish=!1,ze.prototype.boolean=!1,ze.prototype.commaOrSpaceSeparated=!1,ze.prototype.commaSeparated=!1,ze.prototype.defined=!1,ze.prototype.mustUseProperty=!1,ze.prototype.number=!1,ze.prototype.overloadedBoolean=!1,ze.prototype.property=``,ze.prototype.spaceSeparated=!1,ze.prototype.space=void 0;var Be=t({boolean:()=>N,booleanish:()=>He,commaOrSpaceSeparated:()=>Ge,commaSeparated:()=>We,number:()=>P,overloadedBoolean:()=>Ue,spaceSeparated:()=>F}),Ve=0,N=Ke(),He=Ke(),Ue=Ke(),P=Ke(),F=Ke(),We=Ke(),Ge=Ke();function Ke(){return 2**++Ve}var qe=Object.keys(Be),Je=class extends ze{constructor(e,t,n,r){let i=-1;if(super(e,t),Ye(this,`space`,r),typeof n==`number`)for(;++i<qe.length;){let e=qe[i];Ye(this,qe[i],(n&Be[e])===Be[e])}}};Je.prototype.defined=!0;function Ye(e,t,n){n&&(e[t]=n)}function Xe(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Je(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Re(r)]=r,n[Re(a.attribute)]=r}return new Ie(t,n,e.space)}var Ze=Xe({properties:{ariaActiveDescendant:null,ariaAtomic:He,ariaAutoComplete:null,ariaBusy:He,ariaChecked:He,ariaColCount:P,ariaColIndex:P,ariaColSpan:P,ariaControls:F,ariaCurrent:null,ariaDescribedBy:F,ariaDetails:null,ariaDisabled:He,ariaDropEffect:F,ariaErrorMessage:null,ariaExpanded:He,ariaFlowTo:F,ariaGrabbed:He,ariaHasPopup:null,ariaHidden:He,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:F,ariaLevel:P,ariaLive:null,ariaModal:He,ariaMultiLine:He,ariaMultiSelectable:He,ariaOrientation:null,ariaOwns:F,ariaPlaceholder:null,ariaPosInSet:P,ariaPressed:He,ariaReadOnly:He,ariaRelevant:null,ariaRequired:He,ariaRoleDescription:F,ariaRowCount:P,ariaRowIndex:P,ariaRowSpan:P,ariaSelected:He,ariaSetSize:P,ariaSort:null,ariaValueMax:P,ariaValueMin:P,ariaValueNow:P,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Qe(e,t){return t in e?e[t]:t}function $e(e,t){return Qe(e,t.toLowerCase())}var et=Xe({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:We,acceptCharset:F,accessKey:F,action:null,allow:null,allowFullScreen:N,allowPaymentRequest:N,allowUserMedia:N,alpha:N,alt:null,as:null,async:N,autoCapitalize:null,autoComplete:F,autoFocus:N,autoPlay:N,blocking:F,capture:null,charSet:null,checked:N,cite:null,className:F,closedBy:null,colorSpace:null,cols:P,colSpan:P,command:null,commandFor:null,content:null,contentEditable:He,controls:N,controlsList:F,coords:P|We,crossOrigin:null,data:null,dateTime:null,decoding:null,default:N,defer:N,dir:null,dirName:null,disabled:N,download:Ue,draggable:He,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:N,formTarget:null,headers:F,height:P,hidden:Ue,high:P,href:null,hrefLang:null,htmlFor:F,httpEquiv:F,id:null,imageSizes:null,imageSrcSet:null,inert:N,inputMode:null,integrity:null,is:null,isMap:N,itemId:null,itemProp:F,itemRef:F,itemScope:N,itemType:F,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:N,low:P,manifest:null,max:null,maxLength:P,media:null,method:null,min:null,minLength:P,multiple:N,muted:N,name:null,nonce:null,noModule:N,noValidate:N,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:N,optimum:P,pattern:null,ping:F,placeholder:null,playsInline:N,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:N,referrerPolicy:null,rel:F,required:N,reversed:N,rows:P,rowSpan:P,sandbox:F,scope:null,scoped:N,seamless:N,selected:N,shadowRootClonable:N,shadowRootCustomElementRegistry:N,shadowRootDelegatesFocus:N,shadowRootMode:null,shadowRootSerializable:N,shape:null,size:P,sizes:null,slot:null,span:P,spellCheck:He,src:null,srcDoc:null,srcLang:null,srcSet:null,start:P,step:null,style:null,tabIndex:P,target:null,title:null,translate:null,type:null,typeMustMatch:N,useMap:null,value:He,width:P,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:F,axis:null,background:null,bgColor:null,border:P,borderColor:null,bottomMargin:P,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:N,declare:N,event:null,face:null,frame:null,frameBorder:null,hSpace:P,leftMargin:P,link:null,longDesc:null,lowSrc:null,marginHeight:P,marginWidth:P,noResize:N,noHref:N,noShade:N,noWrap:N,object:null,profile:null,prompt:null,rev:null,rightMargin:P,rules:null,scheme:null,scrolling:He,standby:null,summary:null,text:null,topMargin:P,valueType:null,version:null,vAlign:null,vLink:null,vSpace:P,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:N,disablePictureInPicture:N,disableRemotePlayback:N,exportParts:We,part:F,prefix:null,property:null,results:P,security:null,unselectable:null},space:`html`,transform:$e}),tt=Xe({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:Ge,accentHeight:P,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:P,amplitude:P,arabicForm:null,ascent:P,attributeName:null,attributeType:null,azimuth:P,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:P,by:null,calcMode:null,capHeight:P,className:F,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:P,diffuseConstant:P,direction:null,display:null,dur:null,divisor:P,dominantBaseline:null,download:N,dx:null,dy:null,edgeMode:null,editable:null,elevation:P,enableBackground:null,end:null,event:null,exponent:P,externalResourcesRequired:null,fill:null,fillOpacity:P,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:We,g2:We,glyphName:We,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:P,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:P,horizOriginX:P,horizOriginY:P,id:null,ideographic:P,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:P,k:P,k1:P,k2:P,k3:P,k4:P,kernelMatrix:Ge,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:P,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:P,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:P,overlineThickness:P,paintOrder:null,panose1:null,path:null,pathLength:P,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:F,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:P,pointsAtY:P,pointsAtZ:P,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ge,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ge,rev:Ge,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ge,requiredFeatures:Ge,requiredFonts:Ge,requiredFormats:Ge,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:P,specularExponent:P,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:P,strikethroughThickness:P,string:null,stroke:null,strokeDashArray:Ge,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:P,strokeOpacity:P,strokeWidth:null,style:null,surfaceScale:P,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ge,tabIndex:P,tableValues:null,target:null,targetX:P,targetY:P,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ge,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:P,underlineThickness:P,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:P,values:null,vAlphabetic:P,vMathematical:P,vectorEffect:null,vHanging:P,vIdeographic:P,version:null,vertAdvY:P,vertOriginX:P,vertOriginY:P,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:P,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Qe}),nt=Xe({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()}}),rt=Xe({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:$e}),it=Xe({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),at={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`},ot=/[A-Z]/g,st=/-[a-z]/g,ct=/^data[-\w.:]+$/i;function lt(e,t){let n=Re(t),r=t,i=ze;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&ct.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(st,dt);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!st.test(e)){let n=e.replace(ot,ut);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Je}return new i(r,t)}function ut(e){return`-`+e.toLowerCase()}function dt(e){return e.charAt(1).toUpperCase()}var ft=Le([Ze,et,nt,rt,it],`html`),pt=Le([Ze,tt,nt,rt,it],`svg`);function mt(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function ht(e){return e.join(` `).trim()}var gt=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
13
|
+
`))e.startsWith(`event: `)?n=e.slice(7):e.startsWith(`data: `)&&(i+=e.slice(6));if(i)try{e(n,JSON.parse(i))}catch{}}}}catch{}if(n)return;t(!1),await new Promise(e=>setTimeout(e,i)),i=Math.min(i*2,15e3)}})(),()=>{n=!0,r?.abort()}}var b=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),x=n(((e,t)=>{t.exports=b()})),S=x(),C=new Set,ee=()=>C.forEach(e=>e());window.addEventListener(`popstate`,ee);function w(e){e!==window.location.pathname&&(history.pushState(null,``,e),ee(),window.scrollTo(0,0))}function T(){return(0,d.useSyncExternalStore)(e=>(C.add(e),()=>C.delete(e)),()=>window.location.pathname)}function E({to:e,className:t,children:n,title:r}){return(0,S.jsx)(`a`,{href:e,className:t,onClick:t=>{t.metaKey||t.ctrlKey||t.shiftKey||t.button!==0||(t.preventDefault(),w(e))},title:r,children:n})}function D(e){if(!e)return`never`;let t=Date.now()-Date.parse(e);if(Number.isNaN(t))return`unknown`;let n=Math.max(0,Math.round(t/1e3));if(n<45)return`just now`;let r=Math.round(n/60);if(r<60)return`${r} min ago`;let i=Math.round(r/60);return i<36?`${i} h ago`:`${Math.round(i/24)} days ago`}var te=(0,d.createContext)(null),ne=/^(knowledge|analysis\.completed|rules|agents|sync|git|security|graph|memory)(\.|$)/;function re(e){return ne.test(e)}var ie={state:`IDLE`,actor:`none`,task:null,reading:[],since:new Date().toISOString()};function ae({children:e}){let[t,n]=(0,d.useState)(!1),[r,i]=(0,d.useState)(ie),[a,o]=(0,d.useState)([]),[s,c]=(0,d.useState)(0),[l,u]=(0,d.useState)([]),[f,p]=(0,d.useState)([]),m=(0,d.useRef)(0),h=(0,d.useCallback)(()=>c(e=>e+1),[]),g=(0,d.useCallback)(()=>{v(`/api/docs`).then(u).catch(()=>{})},[]),_=(0,d.useCallback)((e,t=`info`)=>{let n=++m.current;p(r=>[...r,{id:n,message:e,level:t}]),setTimeout(()=>p(e=>e.filter(e=>e.id!==n)),4e3)},[]);(0,d.useEffect)(()=>(v(`/api/activity`).then(e=>{i(e.activity),o(e.events)}).catch(()=>{}),g(),y((e,t)=>{if(e===`activity`&&i(t),e===`event`){let e=t;o(t=>t.some(t=>t.id===e.id)?t:[...t,e].slice(-500)),re(e.type)&&(c(e=>e+1),g())}},n)),[g]);let b=(0,d.useMemo)(()=>({connected:t,activity:r,events:a,revision:s,docs:l,refreshDocs:g,bump:h,toast:_,toasts:f}),[t,r,a,s,l,g,h,_,f]);return(0,S.jsx)(te.Provider,{value:b,children:e})}function oe(){let e=(0,d.useContext)(te);if(!e)throw Error(`useLive outside LiveProvider`);return e}function O(e,t=[]){let[n,r]=(0,d.useState)(null),[i,a]=(0,d.useState)(null),[o,s]=(0,d.useState)(!0),[c,l]=(0,d.useState)(0);return(0,d.useEffect)(()=>{if(!e)return;let t=new AbortController;return s(!0),v(e,{signal:t.signal}).then(e=>{r(e),a(null)}).catch(e=>{e.name!==`AbortError`&&a(e)}).finally(()=>s(!1)),()=>t.abort()},[e,c,...t]),{data:n,error:i,loading:o,reload:()=>l(e=>e+1)}}function se({tone:e=`neutral`,children:t,title:n}){return(0,S.jsx)(`span`,{className:`badge badge--${e}`,title:n,children:t})}var ce={synchronized:{label:`Synchronized`,tone:`green`},"may-be-outdated":{label:`May be outdated`,tone:`yellow`},missing:{label:`Missing`,tone:`red`},"developer-owned":{label:`Developer-owned`,tone:`blue`}};function le({state:e}){return(0,S.jsx)(`span`,{className:`dot dot--${ce[e].tone}`,title:ce[e].label,"aria-label":ce[e].label})}function ue({title:e,actions:t,children:n,className:r=``}){return(0,S.jsxs)(`section`,{className:`card ${r}`,children:[(e||t)&&(0,S.jsxs)(`header`,{className:`card__header`,children:[e&&(0,S.jsx)(`h2`,{className:`card__title`,children:e}),t&&(0,S.jsx)(`div`,{className:`card__actions`,children:t})]}),n]})}function k({title:e,children:t}){return(0,S.jsxs)(`div`,{className:`empty`,children:[(0,S.jsx)(`div`,{className:`empty__title`,children:e}),t&&(0,S.jsx)(`div`,{className:`empty__body`,children:t})]})}function de({label:e=`Loading`}){return(0,S.jsx)(`span`,{className:`spinner`,role:`status`,"aria-label":e})}function fe({error:e}){return(0,S.jsxs)(`div`,{className:`note note--error`,role:`alert`,children:[(0,S.jsx)(`strong`,{children:e.message}),e.hint&&(0,S.jsx)(`div`,{className:`note__hint`,children:e.hint})]})}function pe({open:e,title:t,body:n,confirmLabel:r,danger:i,onConfirm:a,onCancel:o}){let s=(0,d.useRef)(null);return(0,d.useEffect)(()=>{let t=s.current;t&&(e&&!t.open&&t.showModal?.(),!e&&t.open&&t.close())},[e]),(0,S.jsxs)(`dialog`,{ref:s,className:`dialog`,onCancel:e=>(e.preventDefault(),o()),onClose:()=>e&&o(),children:[(0,S.jsx)(`h3`,{className:`dialog__title`,children:t}),(0,S.jsx)(`div`,{className:`dialog__body`,children:n}),(0,S.jsxs)(`div`,{className:`dialog__actions`,children:[(0,S.jsx)(`button`,{className:`btn`,onClick:o,children:`Cancel`}),(0,S.jsx)(`button`,{className:`btn ${i?`btn--danger`:`btn--primary`}`,onClick:a,autoFocus:!0,children:r})]})]})}var me=[{id:`architecture`,label:`Architecture`},{id:`database`,label:`Database`},{id:`api`,label:`API`},{id:`auth`,label:`Auth`},{id:`security`,label:`Security`},{id:`testing`,label:`Testing`},{id:`debugging`,label:`Debugging`},{id:`performance`,label:`Performance`},{id:`code-review`,label:`Code Review`},{id:`deployment`,label:`Deployment`}];function he({to:e,label:t,icon:n,trailing:r}){let i=T(),a=i===e||e!==`/`&&i.startsWith(`${e}/`);return(0,S.jsxs)(E,{to:e,className:`nav__item ${a?`nav__item--active`:``}`,children:[(0,S.jsx)(`span`,{className:`nav__icon`,"aria-hidden":`true`,children:n}),(0,S.jsx)(`span`,{className:`nav__label`,children:t}),r]})}var ge={overview:(0,S.jsx)(`svg`,{viewBox:`0 0 16 16`,children:(0,S.jsx)(`path`,{d:`M2 2h5v5H2zM9 2h5v3H9zM9 7h5v7H9zM2 9h5v5H2z`})}),doc:(0,S.jsx)(`svg`,{viewBox:`0 0 16 16`,children:(0,S.jsx)(`path`,{d:`M4 1.5h5l3 3v10H4z M9 1.5v3h3`})}),project:(0,S.jsx)(`svg`,{viewBox:`0 0 16 16`,children:(0,S.jsx)(`path`,{d:`M2 4.5h4l1.5 1.5H14v7.5H2z`})}),rules:(0,S.jsx)(`svg`,{viewBox:`0 0 16 16`,children:(0,S.jsx)(`path`,{d:`M3 3.5h10M3 8h10M3 12.5h6`})}),agents:(0,S.jsxs)(`svg`,{viewBox:`0 0 16 16`,children:[(0,S.jsx)(`rect`,{x:`3`,y:`4.5`,width:`10`,height:`8`,rx:`2.5`}),(0,S.jsx)(`path`,{d:`M8 4.5V2M6 8.5h.01M10 8.5h.01`})]}),activity:(0,S.jsx)(`svg`,{viewBox:`0 0 16 16`,children:(0,S.jsx)(`path`,{d:`M1.5 8.5h3l2-5 3 9 2-4h3`})}),context:(0,S.jsxs)(`svg`,{viewBox:`0 0 16 16`,children:[(0,S.jsx)(`circle`,{cx:`4`,cy:`4`,r:`2`}),(0,S.jsx)(`circle`,{cx:`12`,cy:`6`,r:`2`}),(0,S.jsx)(`circle`,{cx:`7`,cy:`12`,r:`2`}),(0,S.jsx)(`path`,{d:`M5.7 5.3 10.3 5M5.2 5.9 6.3 10M10.9 7.8 8.4 10.7`})]}),shield:(0,S.jsx)(`svg`,{viewBox:`0 0 16 16`,children:(0,S.jsx)(`path`,{d:`M8 1.5 13 3.5v4c0 3.2-2.1 6.1-5 7-2.9-.9-5-3.8-5-7v-4z`})}),memory:(0,S.jsx)(`svg`,{viewBox:`0 0 16 16`,children:(0,S.jsx)(`path`,{d:`M5.5 2.5a2.5 2.5 0 0 0-2.5 2.5 2.5 2.5 0 0 0-.5 4.5 2.5 2.5 0 0 0 3 3.5h0a1.5 1.5 0 0 0 2.5-1V3.5a1.5 1.5 0 0 0-2.5-1zM10.5 2.5A2.5 2.5 0 0 1 13 5a2.5 2.5 0 0 1 .5 4.5 2.5 2.5 0 0 1-3 3.5h0A1.5 1.5 0 0 1 8 12`})}),sync:(0,S.jsx)(`svg`,{viewBox:`0 0 16 16`,children:(0,S.jsx)(`path`,{d:`M13 6.5A5 5 0 0 0 4 4.5L2.5 6M3 9.5a5 5 0 0 0 9 2l1.5-1.5M2.5 2.5V6H6M13.5 13.5V10H10`})})};function _e(){let{docs:e,revision:t}=oe(),{data:n}=O(`/api/sync`,[t]),r=n?.plan&&!n.plan.ignored?n.plan.documents.length:0,{data:i}=O(`/api/memory?status=unreviewed`,[t]),a=i?.counts.unreviewed??0,o=t=>e.find(e=>e.id===t)?.sync,s=e=>{let t=o(e);return t?(0,S.jsx)(le,{state:t}):null};return(0,S.jsxs)(`nav`,{className:`sidebar`,"aria-label":`Main`,children:[(0,S.jsxs)(`div`,{className:`nav__group`,children:[(0,S.jsx)(he,{to:`/`,label:`Overview`,icon:ge.overview}),(0,S.jsx)(he,{to:`/sync`,label:`Sync`,icon:ge.sync,trailing:r?(0,S.jsx)(`span`,{className:`count`,title:`${r} document update${r===1?``:`s`} proposed`,children:r}):void 0}),(0,S.jsx)(he,{to:`/docs/project`,label:`Project`,icon:ge.project,trailing:s(`project`)})]}),(0,S.jsx)(`div`,{className:`nav__heading`,children:`Knowledge`}),(0,S.jsxs)(`div`,{className:`nav__group`,children:[me.map(e=>(0,S.jsx)(he,{to:`/docs/${e.id}`,label:e.label,icon:ge.doc,trailing:s(e.id)},e.id)),(0,S.jsx)(he,{to:`/rules`,label:`Rules`,icon:ge.rules,trailing:s(`rules`)}),(0,S.jsx)(he,{to:`/memory`,label:`Memory`,icon:ge.memory,trailing:a?(0,S.jsx)(`span`,{className:`count`,title:`${a} memor${a===1?`y`:`ies`} to review`,children:a}):void 0})]}),(0,S.jsx)(`div`,{className:`nav__heading`,children:`Tools`}),(0,S.jsxs)(`div`,{className:`nav__group`,children:[(0,S.jsx)(he,{to:`/context`,label:`Context`,icon:ge.context}),(0,S.jsx)(he,{to:`/security`,label:`Security scan`,icon:ge.shield}),(0,S.jsx)(he,{to:`/agents`,label:`AI Agents`,icon:ge.agents}),(0,S.jsx)(he,{to:`/activity`,label:`Activity`,icon:ge.activity})]}),(0,S.jsxs)(`div`,{className:`sidebar__legend`,children:[(0,S.jsxs)(`span`,{children:[(0,S.jsx)(le,{state:`synchronized`}),` in sync`]}),(0,S.jsxs)(`span`,{children:[(0,S.jsx)(le,{state:`may-be-outdated`}),` may be outdated`]})]})]})}function ve(){let[e,t]=(0,d.useState)(``),[n,r]=(0,d.useState)([]),[i,a]=(0,d.useState)(!1),[o,s]=(0,d.useState)(0),c=(0,d.useRef)(null);(0,d.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),c.current?.focus(),c.current?.select())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,d.useEffect)(()=>{if(e.trim().length<2){r([]);return}let t=new AbortController,n=setTimeout(()=>{v(`/api/search?q=${encodeURIComponent(e)}`,{signal:t.signal}).then(e=>{r(e),s(0)}).catch(()=>{})},120);return()=>{clearTimeout(n),t.abort()}},[e]);let l=e=>{a(!1),t(``),w(e.id===`rules`?`/rules`:`/docs/${e.id}`)};return(0,S.jsxs)(`div`,{className:`search`,role:`search`,children:[(0,S.jsxs)(`svg`,{className:`search__icon`,viewBox:`0 0 16 16`,"aria-hidden":`true`,children:[(0,S.jsx)(`circle`,{cx:`7`,cy:`7`,r:`4.5`}),(0,S.jsx)(`path`,{d:`m10.5 10.5 3.5 3.5`})]}),(0,S.jsx)(`input`,{ref:c,className:`search__input`,placeholder:`Search knowledge`,"aria-label":`Search knowledge`,value:e,onChange:e=>{t(e.target.value),a(!0)},onFocus:()=>a(!0),onBlur:()=>setTimeout(()=>a(!1),150),onKeyDown:e=>{e.key===`ArrowDown`?s(e=>Math.min(e+1,n.length-1)):e.key===`ArrowUp`?s(e=>Math.max(e-1,0)):e.key===`Enter`&&n[o]?l(n[o]):e.key===`Escape`&&c.current?.blur()}}),(0,S.jsx)(`kbd`,{className:`search__kbd`,children:`⌘K`}),i&&e.trim().length>=2&&(0,S.jsx)(`div`,{className:`search__results`,role:`listbox`,children:n.length===0?(0,S.jsx)(`div`,{className:`search__empty`,children:`No matches`}):n.map((e,t)=>(0,S.jsxs)(`button`,{className:`search__hit ${t===o?`search__hit--active`:``}`,onMouseDown:e=>e.preventDefault(),onClick:()=>l(e),role:`option`,"aria-selected":t===o,children:[(0,S.jsxs)(`span`,{className:`search__file`,children:[e.file,(0,S.jsxs)(`span`,{className:`search__line`,children:[`:`,e.line]})]}),(0,S.jsx)(`span`,{className:`search__text`,children:e.text})]},`${e.id}:${e.line}:${t}`))})]})}function ye({projectName:e}){let{connected:t,revision:n}=oe(),{data:r}=O(`/api/status`,[n]),i=r?.health,a=i===`healthy`?`Knowledge in sync`:i===`needs-update`?`Knowledge needs update`:i===`degraded`?`Knowledge files missing`:`Checking…`,o=i===`healthy`?`green`:i===`needs-update`?`yellow`:i===`degraded`?`red`:`neutral`;return(0,S.jsxs)(`header`,{className:`topbar`,children:[(0,S.jsxs)(E,{to:`/`,className:`brand`,children:[(0,S.jsxs)(`svg`,{className:`brand__mark`,viewBox:`0 0 32 32`,"aria-hidden":`true`,children:[(0,S.jsx)(`rect`,{width:`32`,height:`32`,rx:`8`}),(0,S.jsx)(`path`,{d:`M16 6 25 26h-4.2l-1.9-4.4h-5.8L11.2 26H7L16 6Zm0 8.6-1.9 4.3h3.8L16 14.6Z`})]}),(0,S.jsx)(`span`,{className:`brand__name`,children:`Athena`}),e&&(0,S.jsxs)(`span`,{className:`brand__project`,children:[`/ `,e]})]}),(0,S.jsx)(ve,{}),(0,S.jsxs)(`div`,{className:`topbar__right`,children:[(0,S.jsxs)(`span`,{className:`health health--${o}`,title:r?`Last analysis ${new Date(r.analyzedAt).toLocaleString()}`:void 0,children:[(0,S.jsx)(`span`,{className:`dot dot--${o}`}),` `,a]}),(0,S.jsx)(`span`,{className:`conn ${t?`conn--on`:`conn--off`}`,title:t?`Live updates connected`:`Live updates disconnected — reconnecting`,children:t?`Live`:`Offline`})]})]})}function be(){let{toasts:e}=oe();return(0,S.jsx)(`div`,{className:`toasts`,"aria-live":`polite`,children:e.map(e=>(0,S.jsx)(`div`,{className:`toast toast--${e.level}`,children:e.message},e.id))})}var A=class extends d.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidUpdate(e){e.resetKey!==this.props.resetKey&&this.state.error&&this.setState({error:null})}componentDidCatch(e,t){console.error(`Athena UI error`,e,t.componentStack)}render(){return this.state.error?(0,S.jsx)(`div`,{className:`page`,children:(0,S.jsxs)(`div`,{className:`note note--error`,role:`alert`,children:[(0,S.jsx)(`strong`,{children:`This page failed to render.`}),(0,S.jsx)(`div`,{className:`note__hint`,children:this.state.error.message}),(0,S.jsxs)(`div`,{className:`note__actions`,children:[(0,S.jsx)(`button`,{className:`btn btn--sm`,onClick:()=>this.setState({error:null}),children:`Try again`}),(0,S.jsx)(`button`,{className:`btn btn--sm`,onClick:()=>window.location.reload(),children:`Reload`})]})]})}):this.props.children}},j={IDLE:`Idle`,ANALYZING:`Analyzing`,PLANNING:`Planning`,CODING:`Coding`,TESTING:`Testing`,REVIEWING:`Reviewing`,SUCCESS:`Finished`,ERROR:`Error`};function xe({state:e,size:t=132}){let n=e.toLowerCase();return(0,S.jsx)(`div`,{className:`robot robot--${n}`,role:`img`,"aria-label":`Athena robot: ${j[e]}`,style:{width:t,height:t},children:(0,S.jsxs)(`svg`,{viewBox:`0 0 160 160`,width:t,height:t,"aria-hidden":`true`,children:[(0,S.jsxs)(`defs`,{children:[(0,S.jsxs)(`linearGradient`,{id:`rb-body`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,S.jsx)(`stop`,{offset:`0`,stopColor:`var(--robot-shell-hi)`}),(0,S.jsx)(`stop`,{offset:`1`,stopColor:`var(--robot-shell)`})]}),(0,S.jsx)(`clipPath`,{id:`rb-visor`,children:(0,S.jsx)(`rect`,{x:`46`,y:`50`,width:`68`,height:`34`,rx:`14`})})]}),(0,S.jsx)(`ellipse`,{className:`robot__shadow`,cx:`80`,cy:`148`,rx:`34`,ry:`5`}),(0,S.jsxs)(`g`,{className:`robot__float`,children:[(0,S.jsxs)(`g`,{className:`robot__antenna`,children:[(0,S.jsx)(`line`,{x1:`80`,y1:`30`,x2:`80`,y2:`16`,stroke:`var(--robot-shell-hi)`,strokeWidth:`3`,strokeLinecap:`round`}),(0,S.jsx)(`circle`,{className:`robot__bulb`,cx:`80`,cy:`13`,r:`5`})]}),(0,S.jsxs)(`g`,{className:`robot__head`,children:[(0,S.jsx)(`rect`,{x:`34`,y:`30`,width:`92`,height:`68`,rx:`22`,fill:`url(#rb-body)`,stroke:`var(--robot-edge)`,strokeWidth:`1.5`}),(0,S.jsx)(`rect`,{x:`46`,y:`50`,width:`68`,height:`34`,rx:`14`,fill:`var(--robot-visor)`}),(0,S.jsx)(`g`,{clipPath:`url(#rb-visor)`,children:(0,S.jsx)(`rect`,{className:`robot__scan`,x:`46`,y:`50`,width:`14`,height:`34`,fill:`var(--robot-accent)`,opacity:`0.18`})}),(0,S.jsxs)(`g`,{className:`robot__eyes`,children:[(0,S.jsx)(`g`,{className:`robot__eye robot__eye--l`,children:(0,S.jsx)(`rect`,{className:`robot__pupil`,x:`60`,y:`60`,width:`12`,height:`14`,rx:`6`})}),(0,S.jsx)(`g`,{className:`robot__eye robot__eye--r`,children:(0,S.jsx)(`rect`,{className:`robot__pupil`,x:`88`,y:`60`,width:`12`,height:`14`,rx:`6`})}),(0,S.jsx)(`path`,{className:`robot__happy`,d:`M59 70 q7 -9 14 0 M87 70 q7 -9 14 0`,fill:`none`,strokeWidth:`4`,strokeLinecap:`round`}),(0,S.jsx)(`path`,{className:`robot__cross`,d:`M61 61 l10 12 M71 61 l-10 12 M89 61 l10 12 M99 61 l-10 12`,fill:`none`,strokeWidth:`3.5`,strokeLinecap:`round`})]}),(0,S.jsx)(`circle`,{cx:`34`,cy:`64`,r:`5`,fill:`var(--robot-shell)`,stroke:`var(--robot-edge)`}),(0,S.jsx)(`circle`,{cx:`126`,cy:`64`,r:`5`,fill:`var(--robot-shell)`,stroke:`var(--robot-edge)`})]}),(0,S.jsxs)(`g`,{className:`robot__body`,children:[(0,S.jsx)(`rect`,{x:`50`,y:`102`,width:`60`,height:`36`,rx:`12`,fill:`url(#rb-body)`,stroke:`var(--robot-edge)`,strokeWidth:`1.5`}),(0,S.jsx)(`rect`,{x:`60`,y:`111`,width:`40`,height:`18`,rx:`5`,fill:`var(--robot-visor)`}),(0,S.jsxs)(`g`,{className:`robot__code`,children:[(0,S.jsx)(`rect`,{x:`64`,y:`115`,width:`18`,height:`2.5`,rx:`1.25`}),(0,S.jsx)(`rect`,{x:`64`,y:`119.5`,width:`26`,height:`2.5`,rx:`1.25`}),(0,S.jsx)(`rect`,{x:`64`,y:`124`,width:`12`,height:`2.5`,rx:`1.25`})]}),(0,S.jsx)(`rect`,{className:`robot__progress`,x:`64`,y:`118`,width:`32`,height:`4`,rx:`2`}),(0,S.jsxs)(`g`,{className:`robot__dots`,children:[(0,S.jsx)(`circle`,{cx:`72`,cy:`120`,r:`2`}),(0,S.jsx)(`circle`,{cx:`80`,cy:`120`,r:`2`}),(0,S.jsx)(`circle`,{cx:`88`,cy:`120`,r:`2`})]})]}),(0,S.jsx)(`g`,{className:`robot__arm robot__arm--l`,children:(0,S.jsx)(`rect`,{x:`36`,y:`106`,width:`10`,height:`24`,rx:`5`,fill:`var(--robot-shell)`,stroke:`var(--robot-edge)`})}),(0,S.jsx)(`g`,{className:`robot__arm robot__arm--r`,children:(0,S.jsx)(`rect`,{x:`114`,y:`106`,width:`10`,height:`24`,rx:`5`,fill:`var(--robot-shell)`,stroke:`var(--robot-edge)`})})]})]})})}function Se(e){return j[e]}var Ce={athena:`Athena`,"web-ui":`Web UI`,filesystem:`File system`,agent:`AI agent`};function we({compact:e=!1}){let{activity:t}=oe(),n=t.state===`IDLE`;return(0,S.jsxs)(`div`,{className:`activity-panel activity-panel--${t.state.toLowerCase()} ${e?`activity-panel--compact`:``}`,children:[(0,S.jsx)(xe,{state:t.state,size:e?108:140}),(0,S.jsxs)(`div`,{className:`activity-panel__body`,children:[(0,S.jsx)(`div`,{className:`activity-panel__kicker`,children:t.actor===`agent`?`AI agent`:`Athena`}),(0,S.jsxs)(`div`,{className:`activity-panel__state`,children:[(0,S.jsx)(`span`,{className:`pulse`,"aria-hidden":`true`}),n?`Athena is ready`:Se(t.state)]}),n?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`p`,{className:`activity-panel__task`,children:`Waiting for an AI coding agent…`}),(0,S.jsx)(`p`,{className:`activity-panel__note`,children:`Agents configured with hooks report their tool use here as it happens.`})]}):(0,S.jsxs)(S.Fragment,{children:[t.task&&(0,S.jsx)(`p`,{className:`activity-panel__task`,children:t.task}),t.reading.length>0&&(0,S.jsx)(`ul`,{className:`activity-panel__reading`,children:t.reading.map(e=>(0,S.jsx)(`li`,{children:e},e))}),(0,S.jsxs)(`p`,{className:`activity-panel__note`,children:[`Since `,D(t.since)]})]})]})]})}function Te({events:e,limit:t}){let n=[...e].reverse().slice(0,t);return n.length?(0,S.jsx)(`ol`,{className:`timeline`,children:n.map(e=>(0,S.jsxs)(`li`,{className:`timeline__item timeline__item--${e.level}`,children:[(0,S.jsx)(`time`,{className:`timeline__time`,dateTime:e.ts,title:new Date(e.ts).toLocaleString(),children:new Date(e.ts).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1})}),(0,S.jsx)(`span`,{className:`timeline__marker`,"aria-hidden":`true`}),(0,S.jsx)(`span`,{className:`timeline__message`,children:e.message}),(0,S.jsx)(`span`,{className:`timeline__source`,children:Ce[e.source]})]},e.id))}):(0,S.jsx)(`div`,{className:`events-empty`,children:`No activity yet in this session.`})}function M({label:e,value:t,sub:n,tone:r,to:i}){let a=(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`stat__label`,children:e}),(0,S.jsx)(`div`,{className:`stat__value ${r===`warn`?`stat__value--warn`:``}`,children:t}),n&&(0,S.jsx)(`div`,{className:`stat__sub`,children:n})]});return i?(0,S.jsx)(E,{to:i,className:`stat stat--link`,children:a}):(0,S.jsx)(`div`,{className:`stat`,children:a})}function Ee(){let{revision:e,events:t,activity:n,docs:r,toast:i}=oe(),{data:a,error:o}=O(`/api/overview`,[e]),{data:s}=O(`/api/status`,[e]),{data:c}=O(`/api/agents`,[e]),{data:l}=O(`/api/sync`,[e]),{data:u}=O(`/api/memory?status=unreviewed`,[e]),f=l?.plan&&!l.plan.ignored?l.plan:null,p=u?.counts.unreviewed??0,[m,h]=(0,d.useState)(!1);if(o)return(0,S.jsx)(fe,{error:o});if(!a)return(0,S.jsx)(`div`,{className:`page-loading`,children:(0,S.jsx)(de,{})});let g=a.summary,y=n.state===`ANALYZING`,b=async()=>{h(!0);try{await v(`/api/analyze`,{method:`POST`,body:{}})}catch(e){i(e instanceof _?e.message:`Could not start analysis`,`error`)}finally{h(!1)}},x=s?s.changes.added.length+s.changes.modified.length+s.changes.deleted.length:0;return(0,S.jsxs)(`div`,{className:`page`,children:[(0,S.jsxs)(`header`,{className:`page__header`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`page__kicker`,children:`Project Overview`}),(0,S.jsx)(`h1`,{className:`page__title`,children:a.project.name}),(0,S.jsx)(`p`,{className:`page__subtitle`,children:a.project.description??(0,S.jsx)(`span`,{className:`muted`,children:`No project description found in manifests.`})})]}),(0,S.jsxs)(`div`,{className:`page__meta`,children:[(0,S.jsxs)(`span`,{children:[`Analyzed `,D(a.analyzedAt)]}),a.git.branch&&(0,S.jsxs)(`span`,{className:`mono`,children:[`⎇ `,a.git.branch]}),(0,S.jsxs)(`span`,{className:`mono`,children:[`Athena `,a.athenaVersion]})]})]}),f&&(0,S.jsxs)(E,{to:`/sync`,className:`proposal proposal--link`,children:[(0,S.jsxs)(`div`,{className:`proposal__text`,children:[(0,S.jsx)(`strong`,{children:`Knowledge update proposed`}),(0,S.jsxs)(`span`,{className:`muted`,children:[` · `,f.documents.map(e=>e.file).join(`, `)]}),(0,S.jsx)(`div`,{className:`fineprint`,children:f.modelChanges[0]?`${f.modelChanges[0].label}: ${f.modelChanges[0].summary}`:f.documents[0]?.reasons[0]})]}),(0,S.jsx)(`span`,{className:`btn btn--primary btn--sm`,children:`Review changes`})]}),p>0&&(0,S.jsxs)(E,{to:`/memory`,className:`proposal proposal--link proposal--memory`,children:[(0,S.jsxs)(`div`,{className:`proposal__text`,children:[(0,S.jsxs)(`strong`,{children:[p,` project memor`,p===1?`y`:`ies`,` to review`]}),(0,S.jsx)(`span`,{className:`muted`,children:` · written by AI agents; INFERRED until you confirm`})]}),(0,S.jsx)(`span`,{className:`btn btn--sm`,children:`Review memory`})]}),(0,S.jsxs)(`div`,{className:`overview-grid`,children:[(0,S.jsxs)(`div`,{className:`overview-main`,children:[g?(0,S.jsxs)(`div`,{className:`stats`,children:[(0,S.jsx)(M,{label:`Files analyzed`,value:g.filesAnalyzed.toLocaleString(),sub:g.languages.slice(0,3).map(e=>e.name).join(` · `)||void 0,to:`/docs/project`}),(0,S.jsx)(M,{label:`Frameworks`,value:new Set(g.frameworks.map(e=>e.name)).size,sub:g.monorepo.isMonorepo?`Monorepo · ${g.monorepo.packages} packages`:void 0,to:`/docs/architecture`}),(0,S.jsx)(M,{label:`API routes`,value:g.routes,sub:g.apiSpecs?`${g.apiSpecs} spec files`:void 0,to:`/docs/api`}),(0,S.jsx)(M,{label:`DB entities`,value:g.entities,sub:g.databases.slice(0,2).join(` · `)||void 0,to:`/docs/database`}),(0,S.jsx)(M,{label:`Test files`,value:g.testFiles,sub:g.testFrameworks.slice(0,2).join(` · `)||`No framework detected`,to:`/docs/testing`}),(0,S.jsx)(M,{label:`Potential secrets`,value:g.potentialSecrets,sub:g.potentialSecrets?`Review security.md`:`None matched`,tone:g.potentialSecrets?`warn`:void 0,to:`/docs/security`})]}):(0,S.jsx)(ue,{children:(0,S.jsx)(k,{title:`Analysis summary not available`,children:`model.json is missing (it is not committed to Git). Re-analyze to rebuild it.`})}),(0,S.jsx)(ue,{title:`Knowledge synchronization`,actions:(0,S.jsx)(`button`,{className:`btn btn--primary`,onClick:b,disabled:m||y,children:y?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(de,{label:`Analyzing`}),` Analyzing…`]}):`Re-analyze project`}),children:s?(0,S.jsxs)(`div`,{className:`sync`,children:[(0,S.jsx)(`div`,{className:`sync__summary`,children:f?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(se,{tone:`yellow`,children:`Update proposed`}),(0,S.jsxs)(E,{to:`/sync`,children:[`Review `,f.documents.length,` document update`,f.documents.length===1?``:`s`]})]}):s.sync===`up-to-date`?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(se,{tone:`green`,children:`Up to date`}),(0,S.jsx)(`span`,{className:`muted`,children:`No file changes since the last analysis.`})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(se,{tone:`yellow`,children:`Needs update`}),(0,S.jsxs)(`span`,{children:[x,` file`,x===1?``:`s`,` changed since the last analysis `,(0,S.jsxs)(`span`,{className:`muted`,children:[`(`,s.changes.modified.length,` modified · `,s.changes.added.length,` added · `,s.changes.deleted.length,` deleted)`]})]})]})}),s.affectedDocuments.length>0&&(0,S.jsxs)(`div`,{className:`sync__affected`,children:[(0,S.jsx)(`div`,{className:`label`,children:`Potentially affected knowledge`}),(0,S.jsx)(`ul`,{children:s.affectedDocuments.map(e=>{let t=r.find(t=>t.file===e.file);return(0,S.jsxs)(`li`,{children:[(0,S.jsx)(E,{to:t?.id===`rules`?`/rules`:`/docs/${t?.id??``}`,className:`mono`,children:e.file}),(0,S.jsxs)(`span`,{className:`muted`,children:[` — `,e.reasons.join(`, `)]})]},e.file)})})]}),(0,S.jsx)(`p`,{className:`fineprint`,children:`Re-analysis regenerates only Athena-managed sections. Your edits and Developer Notes are preserved.`})]}):(0,S.jsx)(de,{})}),g&&(0,S.jsxs)(ue,{title:`Detected stack`,children:[g.frameworks.length?(0,S.jsx)(`div`,{className:`chips`,children:g.frameworks.map(e=>(0,S.jsxs)(`span`,{className:`chip`,title:`${e.status} · ${e.confidence} confidence · ${e.root}`,children:[(0,S.jsx)(`span`,{className:`chip__conf chip__conf--${e.confidence}`}),e.name,e.root!==`.`&&(0,S.jsx)(`span`,{className:`chip__root`,children:e.root})]},`${e.name}@${e.root}`))}):(0,S.jsx)(`p`,{className:`muted`,children:`No known frameworks detected.`}),(0,S.jsxs)(`dl`,{className:`facts`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:`Databases`}),(0,S.jsx)(`dd`,{children:g.databases.join(`, `)||(0,S.jsx)(`span`,{className:`muted`,children:`Not detected`})})]}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:`Auth`}),(0,S.jsx)(`dd`,{children:g.auth.join(`, `)||(0,S.jsx)(`span`,{className:`muted`,children:`Not detected`})})]}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:`CI/CD`}),(0,S.jsx)(`dd`,{children:g.ci.join(`, `)||(0,S.jsx)(`span`,{className:`muted`,children:`Not detected`})})]}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:`Hosting`}),(0,S.jsx)(`dd`,{children:g.hosting.join(`, `)||(0,S.jsx)(`span`,{className:`muted`,children:`Not detected`})})]})]}),(0,S.jsx)(`p`,{className:`fineprint`,children:`"Not detected" means Athena found no evidence. It does not prove absence.`})]}),(0,S.jsx)(ue,{title:`Knowledge`,className:`card--flush`,children:(0,S.jsx)(`ul`,{className:`doclist`,children:r.map(e=>(0,S.jsx)(`li`,{children:(0,S.jsxs)(E,{to:e.id===`rules`?`/rules`:`/docs/${e.id}`,className:`doclist__row`,children:[(0,S.jsx)(le,{state:e.sync}),(0,S.jsx)(`span`,{className:`doclist__title`,children:e.title}),(0,S.jsx)(`span`,{className:`doclist__file mono`,children:e.file}),e.editedSections.length>0&&(0,S.jsxs)(se,{tone:`blue`,title:e.editedSections.join(`, `),children:[e.editedSections.length,` edited`]}),(0,S.jsx)(`span`,{className:`doclist__time`,children:e.id===`rules`?`developer-owned`:e.lastChangedAt?`changed ${D(e.lastChangedAt)}`:``})]})},e.id))})})]}),(0,S.jsxs)(`aside`,{className:`overview-side`,children:[(0,S.jsx)(ue,{title:`Current activity`,children:(0,S.jsx)(we,{compact:!0})}),(0,S.jsx)(ue,{title:`AI agents`,actions:(0,S.jsx)(E,{to:`/agents`,className:`btn btn--ghost btn--sm`,children:`Manage`}),children:(0,S.jsx)(`ul`,{className:`agentlist`,children:(c??[]).map(e=>(0,S.jsxs)(`li`,{children:[(0,S.jsx)(`span`,{className:`dot ${e.configured?`dot--green`:`dot--off`}`}),(0,S.jsx)(`span`,{children:e.name}),(0,S.jsx)(`span`,{className:`muted`,children:e.configured?`configured`:e.detectedInProject?`detected, not configured`:`not configured`})]},e.id))})}),(0,S.jsx)(ue,{title:`Recent activity`,actions:(0,S.jsx)(E,{to:`/activity`,className:`btn btn--ghost btn--sm`,children:`All`}),children:(0,S.jsx)(Te,{events:t,limit:6})})]})]})]})}function De(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Oe(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var ke=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ae=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,je={};function Me(e,t){return((t||je).jsx?Ae:ke).test(e)}var Ne=/[ \t\n\f\r]/g;function Pe(e){return typeof e==`object`?e.type===`text`&&Fe(e.value):Fe(e)}function Fe(e){return e.replace(Ne,``)===``}var Ie=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Ie.prototype.normal={},Ie.prototype.property={},Ie.prototype.space=void 0;function Le(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Ie(n,r,t)}function Re(e){return e.toLowerCase()}var ze=class{constructor(e,t){this.attribute=t,this.property=e}};ze.prototype.attribute=``,ze.prototype.booleanish=!1,ze.prototype.boolean=!1,ze.prototype.commaOrSpaceSeparated=!1,ze.prototype.commaSeparated=!1,ze.prototype.defined=!1,ze.prototype.mustUseProperty=!1,ze.prototype.number=!1,ze.prototype.overloadedBoolean=!1,ze.prototype.property=``,ze.prototype.spaceSeparated=!1,ze.prototype.space=void 0;var Be=t({boolean:()=>N,booleanish:()=>He,commaOrSpaceSeparated:()=>Ge,commaSeparated:()=>We,number:()=>P,overloadedBoolean:()=>Ue,spaceSeparated:()=>F}),Ve=0,N=Ke(),He=Ke(),Ue=Ke(),P=Ke(),F=Ke(),We=Ke(),Ge=Ke();function Ke(){return 2**++Ve}var qe=Object.keys(Be),Je=class extends ze{constructor(e,t,n,r){let i=-1;if(super(e,t),Ye(this,`space`,r),typeof n==`number`)for(;++i<qe.length;){let e=qe[i];Ye(this,qe[i],(n&Be[e])===Be[e])}}};Je.prototype.defined=!0;function Ye(e,t,n){n&&(e[t]=n)}function Xe(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Je(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Re(r)]=r,n[Re(a.attribute)]=r}return new Ie(t,n,e.space)}var Ze=Xe({properties:{ariaActiveDescendant:null,ariaAtomic:He,ariaAutoComplete:null,ariaBusy:He,ariaChecked:He,ariaColCount:P,ariaColIndex:P,ariaColSpan:P,ariaControls:F,ariaCurrent:null,ariaDescribedBy:F,ariaDetails:null,ariaDisabled:He,ariaDropEffect:F,ariaErrorMessage:null,ariaExpanded:He,ariaFlowTo:F,ariaGrabbed:He,ariaHasPopup:null,ariaHidden:He,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:F,ariaLevel:P,ariaLive:null,ariaModal:He,ariaMultiLine:He,ariaMultiSelectable:He,ariaOrientation:null,ariaOwns:F,ariaPlaceholder:null,ariaPosInSet:P,ariaPressed:He,ariaReadOnly:He,ariaRelevant:null,ariaRequired:He,ariaRoleDescription:F,ariaRowCount:P,ariaRowIndex:P,ariaRowSpan:P,ariaSelected:He,ariaSetSize:P,ariaSort:null,ariaValueMax:P,ariaValueMin:P,ariaValueNow:P,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Qe(e,t){return t in e?e[t]:t}function $e(e,t){return Qe(e,t.toLowerCase())}var et=Xe({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:We,acceptCharset:F,accessKey:F,action:null,allow:null,allowFullScreen:N,allowPaymentRequest:N,allowUserMedia:N,alpha:N,alt:null,as:null,async:N,autoCapitalize:null,autoComplete:F,autoFocus:N,autoPlay:N,blocking:F,capture:null,charSet:null,checked:N,cite:null,className:F,closedBy:null,colorSpace:null,cols:P,colSpan:P,command:null,commandFor:null,content:null,contentEditable:He,controls:N,controlsList:F,coords:P|We,crossOrigin:null,data:null,dateTime:null,decoding:null,default:N,defer:N,dir:null,dirName:null,disabled:N,download:Ue,draggable:He,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:N,formTarget:null,headers:F,height:P,hidden:Ue,high:P,href:null,hrefLang:null,htmlFor:F,httpEquiv:F,id:null,imageSizes:null,imageSrcSet:null,inert:N,inputMode:null,integrity:null,is:null,isMap:N,itemId:null,itemProp:F,itemRef:F,itemScope:N,itemType:F,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:N,low:P,manifest:null,max:null,maxLength:P,media:null,method:null,min:null,minLength:P,multiple:N,muted:N,name:null,nonce:null,noModule:N,noValidate:N,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:N,optimum:P,pattern:null,ping:F,placeholder:null,playsInline:N,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:N,referrerPolicy:null,rel:F,required:N,reversed:N,rows:P,rowSpan:P,sandbox:F,scope:null,scoped:N,seamless:N,selected:N,shadowRootClonable:N,shadowRootCustomElementRegistry:N,shadowRootDelegatesFocus:N,shadowRootMode:null,shadowRootSerializable:N,shape:null,size:P,sizes:null,slot:null,span:P,spellCheck:He,src:null,srcDoc:null,srcLang:null,srcSet:null,start:P,step:null,style:null,tabIndex:P,target:null,title:null,translate:null,type:null,typeMustMatch:N,useMap:null,value:He,width:P,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:F,axis:null,background:null,bgColor:null,border:P,borderColor:null,bottomMargin:P,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:N,declare:N,event:null,face:null,frame:null,frameBorder:null,hSpace:P,leftMargin:P,link:null,longDesc:null,lowSrc:null,marginHeight:P,marginWidth:P,noResize:N,noHref:N,noShade:N,noWrap:N,object:null,profile:null,prompt:null,rev:null,rightMargin:P,rules:null,scheme:null,scrolling:He,standby:null,summary:null,text:null,topMargin:P,valueType:null,version:null,vAlign:null,vLink:null,vSpace:P,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:N,disablePictureInPicture:N,disableRemotePlayback:N,exportParts:We,part:F,prefix:null,property:null,results:P,security:null,unselectable:null},space:`html`,transform:$e}),tt=Xe({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:Ge,accentHeight:P,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:P,amplitude:P,arabicForm:null,ascent:P,attributeName:null,attributeType:null,azimuth:P,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:P,by:null,calcMode:null,capHeight:P,className:F,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:P,diffuseConstant:P,direction:null,display:null,dur:null,divisor:P,dominantBaseline:null,download:N,dx:null,dy:null,edgeMode:null,editable:null,elevation:P,enableBackground:null,end:null,event:null,exponent:P,externalResourcesRequired:null,fill:null,fillOpacity:P,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:We,g2:We,glyphName:We,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:P,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:P,horizOriginX:P,horizOriginY:P,id:null,ideographic:P,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:P,k:P,k1:P,k2:P,k3:P,k4:P,kernelMatrix:Ge,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:P,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:P,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:P,overlineThickness:P,paintOrder:null,panose1:null,path:null,pathLength:P,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:F,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:P,pointsAtY:P,pointsAtZ:P,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ge,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ge,rev:Ge,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ge,requiredFeatures:Ge,requiredFonts:Ge,requiredFormats:Ge,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:P,specularExponent:P,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:P,strikethroughThickness:P,string:null,stroke:null,strokeDashArray:Ge,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:P,strokeOpacity:P,strokeWidth:null,style:null,surfaceScale:P,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ge,tabIndex:P,tableValues:null,target:null,targetX:P,targetY:P,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ge,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:P,underlineThickness:P,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:P,values:null,vAlphabetic:P,vMathematical:P,vectorEffect:null,vHanging:P,vIdeographic:P,version:null,vertAdvY:P,vertOriginX:P,vertOriginY:P,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:P,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Qe}),nt=Xe({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()}}),rt=Xe({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:$e}),it=Xe({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),at={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`},ot=/[A-Z]/g,st=/-[a-z]/g,ct=/^data[-\w.:]+$/i;function lt(e,t){let n=Re(t),r=t,i=ze;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&ct.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(st,dt);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!st.test(e)){let n=e.replace(ot,ut);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Je}return new i(r,t)}function ut(e){return`-`+e.toLowerCase()}function dt(e){return e.charAt(1).toUpperCase()}var ft=Le([Ze,et,nt,rt,it],`html`),pt=Le([Ze,tt,nt,rt,it],`svg`);function mt(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function ht(e){return e.join(` `).trim()}var gt=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
14
14
|
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),_t=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(gt());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),vt=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),yt=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(_t()),r=vt();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),bt=St(`end`),xt=St(`start`);function St(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Ct(e){let t=xt(e),n=bt(e);if(t&&n)return{start:t,end:n}}function wt(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Et(e.position):`start`in e||`end`in e?Et(e):`line`in e||`column`in e?Tt(e):``}function Tt(e){return Dt(e&&e.line)+`:`+Dt(e&&e.column)}function Et(e){return Tt(e&&e.start)+`-`+Tt(e&&e.end)}function Dt(e){return e&&typeof e==`number`?e:1}var Ot=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=wt(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Ot.prototype.file=``,Ot.prototype.name=``,Ot.prototype.reason=``,Ot.prototype.message=``,Ot.prototype.stack=``,Ot.prototype.column=void 0,Ot.prototype.line=void 0,Ot.prototype.ancestors=void 0,Ot.prototype.cause=void 0,Ot.prototype.fatal=void 0,Ot.prototype.place=void 0,Ot.prototype.ruleId=void 0,Ot.prototype.source=void 0;var kt=e(yt(),1),At={}.hasOwnProperty,jt=new Map,Mt=/[A-Z]/g,Nt=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Pt=new Set([`td`,`th`]),Ft=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function It(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=qt(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Kt(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,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`?pt:ft,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Lt(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Lt(e,t,n){if(t.type===`element`)return Rt(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return zt(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Vt(e,t,n);if(t.type===`mdxjsEsm`)return Bt(e,t);if(t.type===`root`)return Ht(e,t,n);if(t.type===`text`)return Ut(e,t)}function Rt(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=pt,e.schema=i),e.ancestors.push(t);let a=Qt(e,t.tagName,!1),o=Jt(e,t),s=Yt(e,t);return Nt.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Pe(e)})),Wt(e,o,a,t),Gt(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function zt(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}$t(e,t.position)}function Bt(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);$t(e,t.position)}function Vt(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=pt,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Qt(e,t.name,!0),o=I(e,t),s=Yt(e,t);return Wt(e,o,a,t),Gt(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Ht(e,t,n){let r={};return Gt(r,Yt(e,t)),e.create(t,e.Fragment,r,n)}function Ut(e,t){return t.value}function Wt(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Gt(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Kt(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function qt(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=xt(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Jt(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&At.call(t.properties,i)){let a=Xt(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Pt.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function I(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else $t(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else $t(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Yt(e,t){let n=[],r=-1,i=e.passKeys?new Map:jt;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Lt(e,a,o);s!==void 0&&n.push(s)}return n}function Xt(e,t,n){let r=lt(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Oe(n):ht(n)),r.property===`style`){let t=typeof n==`object`?n:Zt(e,String(n));return e.stylePropertyNameCase===`css`&&(t=en(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?at[r.property]||r.property:r.attribute,n]}}function Zt(e,t){try{return(0,kt.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Ot("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Ft+`#cannot-parse-style-attribute`,r}}function Qt(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Me(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Me(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return At.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);$t(e)}function $t(e,t){let n=new Ot("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=Ft+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function en(e){let t={},n;for(n in e)At.call(e,n)&&(t[tn(n)]=e[n]);return t}function tn(e){let t=e.replace(Mt,nn);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function nn(e){return`-`+e.toLowerCase()}var rn={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`]},an={};function on(e,t){let n=t||an;return sn(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function sn(e,t,n){if(ln(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 cn(e.children,t,n)}return Array.isArray(e)?cn(e,t,n):``}function cn(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=sn(e[i],t,n);return r.join(``)}function ln(e){return!!(e&&typeof e==`object`)}var un=document.createElement(`i`);function dn(e){let t=`&`+e+`;`;un.innerHTML=t;let n=un.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function fn(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function pn(e,t){return e.length>0?(fn(e,e.length,0,t),e):t}var mn={}.hasOwnProperty;function hn(e){let t={},n=-1;for(;++n<e.length;)gn(t,e[n]);return t}function gn(e,t){let n;for(n in t){let r=(mn.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){mn.call(r,a)||(r[a]=[]);let e=i[a];_n(r[a],Array.isArray(e)?e:e?[e]:[])}}}function _n(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);fn(e,0,0,r)}function vn(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function yn(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var bn=An(/[A-Za-z]/),xn=An(/[\dA-Za-z]/),Sn=An(/[#-'*+\--9=?A-Z^-~]/);function Cn(e){return e!==null&&(e<32||e===127)}var wn=An(/\d/),Tn=An(/[\dA-Fa-f]/),En=An(/[!-/:-@[-`{-~]/);function L(e){return e!==null&&e<-2}function Dn(e){return e!==null&&(e<0||e===32)}function R(e){return e===-2||e===-1||e===32}var On=An(/\p{P}|\p{S}/u),kn=An(/\s/);function An(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function jn(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&xn(e.charCodeAt(n+1))&&xn(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function z(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return R(r)?(e.enter(n),s(r)):t(r)}function s(r){return R(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Mn={tokenize:Nn};function Nn(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),z(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return L(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Pn={tokenize:In},Fn={tokenize:Ln};function In(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return fn(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Fn,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Fn,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return L(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;fn(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Ln(e,t,n){return z(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Rn(e){if(e===null||Dn(e)||kn(e))return 1;if(On(e))return 2}function zn(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Bn={name:`attention`,resolveAll:Vn,tokenize:Hn};function Vn(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Un(d,-c),Un(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=pn(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=pn(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=pn(l,zn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=pn(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=pn(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,fn(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Hn(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Rn(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Rn(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Un(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Wn={name:`autolink`,tokenize:Gn};function Gn(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return bn(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||xn(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||xn(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Cn(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Sn(t)?(e.consume(t),l):n(t)}function u(e){return xn(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||xn(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Kn={partial:!0,tokenize:qn};function qn(e,t,n){return r;function r(t){return R(t)?z(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||L(e)?t(e):n(e)}}var Jn={continuation:{tokenize:Xn},exit:Zn,name:`blockQuote`,tokenize:Yn};function Yn(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return R(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Xn(e,t,n){let r=this;return i;function i(t){return R(t)?z(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Jn,t,n)(r)}}function Zn(e){e.exit(`blockQuote`)}var Qn={name:`characterEscape`,tokenize:$n};function $n(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return En(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var er={name:`characterReference`,tokenize:tr};function tr(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=xn,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Tn,u):(e.enter(`characterReferenceValue`),a=7,o=wn,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===xn&&!dn(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var nr={partial:!0,tokenize:ar},rr={concrete:!0,name:`codeFenced`,tokenize:ir};function ir(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),R(t)?z(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||L(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(nr,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||L(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):R(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),z(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||L(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||L(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&R(t)?z(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||L(t)?e.check(nr,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||L(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),R(t)?z(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),R(t)?z(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||L(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function ar(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var or={name:`codeIndented`,tokenize:cr},sr={partial:!0,tokenize:lr};function cr(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),z(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):L(t)?e.attempt(sr,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||L(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function lr(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):L(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):z(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):L(e)?i(e):n(e)}}var ur={name:`codeText`,previous:fr,resolve:dr,tokenize:pr};function dr(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function fr(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function pr(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):L(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||L(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var mr=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&hr(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),hr(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),hr(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);hr(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);hr(this.left,t.reverse())}}}};function hr(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 gr(e){let t={},n=-1,r,i,a,o,s,c,l,u=new mr(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,_r(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return fn(e,0,1/0,u.slice(0)),!l}function _r(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var vr={resolve:br,tokenize:xr},yr={partial:!0,tokenize:Sr};function br(e){return gr(e),e}function xr(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):L(t)?e.check(yr,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Sr(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),z(e,a,`linePrefix`)}function a(i){if(i===null||L(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Cr(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Cn(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||L(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Dn(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Cn(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function wr(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):L(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||L(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!R(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Tr(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):L(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),z(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||L(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Er(e,t){let n;return r;function r(i){return L(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):R(i)?z(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Dr={name:`definition`,tokenize:kr},Or={partial:!0,tokenize:Ar};function kr(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return wr.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Dn(t)?Er(e,l)(t):l(t)}function l(t){return Cr(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Or,d,d)(t)}function d(t){return R(t)?z(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||L(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Ar(e,t,n){return r;function r(t){return Dn(t)?Er(e,i)(t):n(t)}function i(t){return Tr(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return R(t)?z(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||L(e)?t(e):n(e)}}var jr={name:`hardBreakEscape`,tokenize:Mr};function Mr(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return L(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Nr={name:`headingAtx`,resolve:Pr,tokenize:Fr};function Pr(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},fn(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Fr(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Dn(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||L(n)?(e.exit(`atxHeading`),t(n)):R(n)?z(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Dn(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Ir=`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`.split(`.`),Lr=[`pre`,`script`,`style`,`textarea`],Rr={concrete:!0,name:`htmlFlow`,resolveTo:Vr,tokenize:Hr},zr={partial:!0,tokenize:Wr},Br={partial:!0,tokenize:Ur};function Vr(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 Hr(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:se):bn(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):bn(a)?(e.consume(a),i=4,r.interrupt?t:se):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:se):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:D:m):n(i)}function h(t){return bn(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Dn(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Lr.includes(l)?(i=1,r.interrupt?t(s):D(s)):Ir.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):D(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||xn(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:D):n(i)}function v(t){return R(t)?(e.consume(t),v):T(t)}function y(t){return t===47?(e.consume(t),T):t===58||t===95||bn(t)?(e.consume(t),b):R(t)?(e.consume(t),y):T(t)}function b(t){return t===45||t===46||t===58||t===95||xn(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):R(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):R(t)?(e.consume(t),S):ee(t)}function C(t){return t===c?(e.consume(t),c=null,w):t===null||L(t)?n(t):(e.consume(t),C)}function ee(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Dn(t)?x(t):(e.consume(t),ee)}function w(e){return e===47||e===62||R(e)?y(e):n(e)}function T(t){return t===62?(e.consume(t),E):n(t)}function E(t){return t===null||L(t)?D(t):R(t)?(e.consume(t),E):n(t)}function D(t){return t===45&&i===2?(e.consume(t),ie):t===60&&i===1?(e.consume(t),ae):t===62&&i===4?(e.consume(t),ce):t===63&&i===3?(e.consume(t),se):t===93&&i===5?(e.consume(t),O):L(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(zr,le,te)(t)):t===null||L(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),D)}function te(t){return e.check(Br,ne,le)(t)}function ne(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),re}function re(t){return t===null||L(t)?te(t):(e.enter(`htmlFlowData`),D(t))}function ie(t){return t===45?(e.consume(t),se):D(t)}function ae(t){return t===47?(e.consume(t),o=``,oe):D(t)}function oe(t){if(t===62){let n=o.toLowerCase();return Lr.includes(n)?(e.consume(t),ce):D(t)}return bn(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),oe):D(t)}function O(t){return t===93?(e.consume(t),se):D(t)}function se(t){return t===62?(e.consume(t),ce):t===45&&i===2?(e.consume(t),se):D(t)}function ce(t){return t===null||L(t)?(e.exit(`htmlFlowData`),le(t)):(e.consume(t),ce)}function le(n){return e.exit(`htmlFlow`),t(n)}}function Ur(e,t,n){let r=this;return i;function i(t){return L(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Wr(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Kn,t,n)}}var Gr={name:`htmlText`,tokenize:Kr};function Kr(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):bn(t)?(e.consume(t),ee):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):bn(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):L(t)?(o=d,ae(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ie(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):L(t)?(o=h,ae(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ie(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ie(t):L(t)?(o=v,ae(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):L(t)?(o=y,ae(t)):(e.consume(t),y)}function b(e){return e===62?ie(e):y(e)}function x(t){return bn(t)?(e.consume(t),S):n(t)}function S(t){return t===45||xn(t)?(e.consume(t),S):C(t)}function C(t){return L(t)?(o=C,ae(t)):R(t)?(e.consume(t),C):ie(t)}function ee(t){return t===45||xn(t)?(e.consume(t),ee):t===47||t===62||Dn(t)?w(t):n(t)}function w(t){return t===47?(e.consume(t),ie):t===58||t===95||bn(t)?(e.consume(t),T):L(t)?(o=w,ae(t)):R(t)?(e.consume(t),w):ie(t)}function T(t){return t===45||t===46||t===58||t===95||xn(t)?(e.consume(t),T):E(t)}function E(t){return t===61?(e.consume(t),D):L(t)?(o=E,ae(t)):R(t)?(e.consume(t),E):w(t)}function D(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,te):L(t)?(o=D,ae(t)):R(t)?(e.consume(t),D):(e.consume(t),ne)}function te(t){return t===i?(e.consume(t),i=void 0,re):t===null?n(t):L(t)?(o=te,ae(t)):(e.consume(t),te)}function ne(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Dn(t)?w(t):(e.consume(t),ne)}function re(e){return e===47||e===62||Dn(e)?w(e):n(e)}function ie(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function ae(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),oe}function oe(t){return R(t)?z(e,O,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):O(t)}function O(t){return e.enter(`htmlTextData`),o(t)}}var qr={name:`labelEnd`,resolveAll:Zr,resolveTo:Qr,tokenize:$r},Jr={tokenize:ei},Yr={tokenize:ti},Xr={tokenize:ni};function Zr(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&fn(e,0,e.length,n),e}function Qr(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=pn(s,e.slice(a+1,a+r+3)),s=pn(s,[[`enter`,u,t]]),s=pn(s,zn(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=pn(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=pn(s,e.slice(o+1)),s=pn(s,[[`exit`,c,t]]),fn(e,a,e.length,s),e}function $r(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(yn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Jr,u,o?u:d)(t):t===91?e.attempt(Yr,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Xr,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function ei(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Dn(t)?Er(e,a)(t):a(t)}function a(t){return t===41?u(t):Cr(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Dn(t)?Er(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Tr(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Dn(t)?Er(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function ti(e,t,n){let r=this;return i;function i(t){return wr.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function ni(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var ri={name:`labelStartImage`,resolveAll:qr.resolveAll,tokenize:ii};function ii(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var ai={name:`labelStartLink`,resolveAll:qr.resolveAll,tokenize:oi};function oi(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var si={name:`lineEnding`,tokenize:ci};function ci(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),z(e,t,`linePrefix`)}}var li={name:`thematicBreak`,tokenize:ui};function ui(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||L(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),R(t)?z(e,s,`whitespace`)(t):s(t))}}var di={continuation:{tokenize:hi},exit:_i,name:`list`,tokenize:mi},fi={partial:!0,tokenize:vi},pi={partial:!0,tokenize:gi};function mi(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:wn(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(li,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return wn(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Kn,r.interrupt?n:u,e.attempt(fi,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return R(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function hi(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Kn,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,z(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!R(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(pi,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,z(e,e.attempt(di,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function gi(e,t,n){let r=this;return z(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function _i(e){e.exit(this.containerState.type)}function vi(e,t,n){let r=this;return z(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!R(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var yi={name:`setextUnderline`,resolveTo:bi,tokenize:xi};function bi(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function xi(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),R(t)?z(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||L(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Si={tokenize:Ci};function Ci(e){let t=this,n=e.attempt(Kn,r,e.attempt(this.parser.constructs.flowInitial,i,z(e,e.attempt(this.parser.constructs.flow,i,e.attempt(vr,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var wi={resolveAll:Oi()},Ti=Di(`string`),Ei=Di(`text`);function Di(e){return{resolveAll:Oi(e===`text`?ki:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Oi(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function ki(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Ai=t({attentionMarkers:()=>Ri,contentInitial:()=>Mi,disable:()=>zi,document:()=>ji,flow:()=>Pi,flowInitial:()=>Ni,insideSpan:()=>Li,string:()=>Fi,text:()=>Ii}),ji={42:di,43:di,45:di,48:di,49:di,50:di,51:di,52:di,53:di,54:di,55:di,56:di,57:di,62:Jn},Mi={91:Dr},Ni={[-2]:or,[-1]:or,32:or},Pi={35:Nr,42:li,45:[yi,li],60:Rr,61:yi,95:li,96:rr,126:rr},Fi={38:er,92:Qn},Ii={[-5]:si,[-4]:si,[-3]:si,33:ri,38:er,42:Bn,60:[Wn,Gr],91:ai,92:[jr,Qn],93:qr,95:Bn,96:ur},Li={null:[Bn,wi]},Ri={null:[42,95]},zi={null:[]};function Bi(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=pn(o,e),g(),o[o.length-1]===null?(ee(t,0),l.events=zn(a,l.events,l),l.events):[]}function f(e,t){return Hi(p(e),t)}function p(e){return Vi(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,T()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){L(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,T()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){ee(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=w(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function ee(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&fn(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function w(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,T()}}function T(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Vi(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Hi(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
15
15
|
`;break;case-3:o=`\r
|
|
16
16
|
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Ui(e){let t={constructs:hn([Ai,...(e||{}).extensions||[]]),content:n(Mn),defined:[],document:n(Pn),flow:n(Si),lazy:{},string:n(Ti),text:n(Ei)};return t;function n(e){return n;function n(n){return Bi(t,e,n)}}}function Wi(e){for(;!gr(e););return e}var Gi=/[\0\t\n\r]/g;function Ki(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(Gi.lastIndex=u,c=Gi.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var qi=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ji(e){return e.replace(qi,Yi)}function Yi(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return vn(n.slice(t?2:1),t?16:10)}return dn(n)||e}var Xi={}.hasOwnProperty;function Zi(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Qi(n)(Wi(Ui(n).document().write(Ki()(e,t,!0))))}function Qi(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(Ce),autolinkProtocol:w,autolinkEmail:w,atxHeading:a(A),blockQuote:a(ge),characterEscape:w,characterReference:w,codeFenced:a(_e),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(_e,o),codeText:a(ve,o),codeTextData:w,data:w,codeFlowValue:w,definition:a(ye),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(be),hardBreakEscape:a(j),hardBreakTrailing:a(j),htmlFlow:a(xe,o),htmlFlowData:w,htmlText:a(xe,o),htmlTextData:w,image:a(Se),label:o,link:a(Ce),listItem:a(Te),listItemValue:f,listOrdered:a(we,d),listUnordered:a(we),paragraph:a(M),reference:ue,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(A),strong:a(Ee),thematicBreak:a(Oe)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:he,autolinkProtocol:me,blockQuote:c(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:fe,characterReference:pe,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:T,codeIndented:c(_),codeText:c(re),codeTextData:T,data:T,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(D),hardBreakTrailing:c(D),htmlFlow:c(te),htmlFlowData:T,htmlText:c(ne),htmlTextData:T,image:c(ae),label:O,labelText:oe,lineEnding:E,link:c(ie),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:k,resourceDestinationString:se,resourceTitleString:ce,resource:le,setextHeading:c(ee),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};ea(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Xi.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||na).call(a,void 0,e[0])}for(r.position={start:$i(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:$i(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:$i(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||na).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+wt({start:e.start,end:e.end})+`): it’s not open`);n.position.end=$i(e.end)}function u(){return on(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=yn(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function ee(){this.data.setextHeadingSlurpLineEnding=void 0}function w(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=De(),n.position={start:$i(e.start),end:void 0},t.push(n)),this.stack.push(n)}function T(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=$i(e.end)}function E(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=$i(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(w.call(this,e),T.call(this,e))}function D(){this.data.atHardBreak=!0}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ie(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ae(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function oe(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Ji(t),n.identifier=yn(t).toLowerCase()}function O(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function se(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ce(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function le(){this.data.inReference=void 0}function ue(){this.data.referenceType=`collapsed`}function k(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=yn(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function de(e){this.data.characterReferenceType=e.type}function fe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=vn(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=dn(t);let i=this.stack[this.stack.length-1];i.value+=r}function pe(e){let t=this.stack.pop();t.position.end=$i(e.end)}function me(e){T.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function he(e){T.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ge(){return{type:`blockquote`,children:[]}}function _e(){return{type:`code`,lang:null,meta:null,value:``}}function ve(){return{type:`inlineCode`,value:``}}function ye(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function be(){return{type:`emphasis`,children:[]}}function A(){return{type:`heading`,depth:0,children:[]}}function j(){return{type:`break`}}function xe(){return{type:`html`,value:``}}function Se(){return{type:`image`,title:null,url:``,alt:null}}function Ce(){return{type:`link`,title:null,url:``,children:[]}}function we(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function Te(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function M(){return{type:`paragraph`,children:[]}}function Ee(){return{type:`strong`,children:[]}}function De(){return{type:`text`,value:``}}function Oe(){return{type:`thematicBreak`}}}function $i(e){return{line:e.line,column:e.column,offset:e.offset}}function ea(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?ea(e,r):ta(e,r)}}function ta(e,t){let n;for(n in t)if(Xi.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function na(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+wt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+wt({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+wt({start:t.start,end:t.end})+`) is still open`)}function ra(e){let t=this;t.parser=n;function n(n){return Zi(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function ia(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function B(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
@@ -41,5 +41,6 @@ Error generating stack: `+e.message+`
|
|
|
41
41
|
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return nc(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=tl.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function dl(){return{exit:{taskListCheckValueChecked:pl,taskListCheckValueUnchecked:pl,paragraph:ml}}}function fl(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:hl}}}function pl(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function ml(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function hl(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=tl.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function gl(){return[bs(),Ws(),Ys(),nl(),dl()]}function _l(e){return{extensions:[xs(),Gs(e),Xs(),ul(e),fl()]}}var vl={tokenize:Ml,partial:!0},yl={tokenize:Nl,partial:!0},bl={tokenize:Pl,partial:!0},xl={tokenize:Fl,partial:!0},Sl={tokenize:Il,partial:!0},Cl={name:`wwwAutolink`,tokenize:Al,previous:Ll},wl={name:`protocolAutolink`,tokenize:jl,previous:Rl},Tl={name:`emailAutolink`,tokenize:kl,previous:zl},El={};function Dl(){return{text:El}}for(var Ol=48;Ol<123;)El[Ol]=Tl,Ol++,Ol===58?Ol=65:Ol===91&&(Ol=97);El[43]=Tl,El[45]=Tl,El[46]=Tl,El[95]=Tl,El[72]=[Tl,wl],El[104]=[Tl,wl],El[87]=[Tl,Cl],El[119]=[Tl,Cl];function kl(e,t,n){let r=this,i,a;return o;function o(t){return!Bl(t)||!zl.call(r,r.previous)||Vl(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Bl(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(Sl,u,l)(t):t===45||t===95||xn(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&bn(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Al(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Ll.call(r,r.previous)||Vl(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(vl,e.attempt(yl,e.attempt(bl,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function jl(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Rl.call(r,r.previous)&&!Vl(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(bn(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Cn(t)||Dn(t)||kn(t)||On(t)?n(t):e.attempt(yl,e.attempt(bl,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Ml(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Nl(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(xl,c,s)(t):t===null||Dn(t)||kn(t)||t!==45&&On(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Pl(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(xl,t,a)(o):o===null||Dn(o)||kn(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Fl(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Dn(o)||kn(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Dn(e)||kn(e)?t(e):r(e)}function a(e){return bn(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):bn(t)?(e.consume(t),o):n(t)}}function Il(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return xn(e)?n(e):t(e)}}function Ll(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Dn(e)}function Rl(e){return!bn(e)}function zl(e){return!(e===47||Bl(e))}function Bl(e){return e===43||e===45||e===46||e===95||xn(e)}function Vl(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Hl={tokenize:Xl,partial:!0};function Ul(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:ql,continuation:{tokenize:Jl},exit:Yl}},text:{91:{name:`gfmFootnoteCall`,tokenize:Kl},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Wl,resolveTo:Gl}}}}function Wl(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=yn(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Gl(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`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Kl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Dn(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(yn(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Dn(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function ql(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Dn(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=yn(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Dn(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),z(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Jl(e,t,n){return e.check(Kn,t,e.attempt(Hl,t,n))}function Yl(e){e.exit(`gfmFootnoteDefinition`)}function Xl(e,t,n){let r=this;return z(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Zl(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&fn(o,o.length,0,zn(s,e.slice(r+1,n),t)),fn(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),fn(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Rn(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Rn(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Ql=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){$l(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function $l(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function eu(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function tu(){return{flow:{null:{name:`table`,tokenize:nu,resolveAll:ru}}}}function nu(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):L(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):R(t)?z(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Dn(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,R(t)?z(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return R(t)?z(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||L(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return R(t)?z(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||L(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||L(n)?(e.exit(`tableRow`),t(n)):R(n)?z(e,C,`whitespace`)(n):(e.enter(`data`),ee(n))}function ee(t){return t===null||t===124||Dn(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?w:ee)}function w(t){return t===92||t===124?(e.consume(t),ee):ee(t)}}function ru(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Ql;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(au(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=iu(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=iu(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=iu(f,t,o,i,n,d)):(o[0]=o[1],d=iu(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&au(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=eu(t.events,n))}return e}function iu(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},ou(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=ou(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=ou(t.events,n[2]),a=ou(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},ou(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function au(e,t,n,r,i){let a=[],o=ou(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function ou(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var su={name:`tasklistCheck`,tokenize:lu};function cu(){return{text:{91:su}}}function lu(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Dn(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return L(r)?t(r):R(r)?e.check({tokenize:uu},t,n)(r):n(r)}}function uu(e,t,n){return z(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function du(e){return hn([Dl(),Ul(),Zl(e),tu(),cu()])}var fu={};function pu(e){let t=this,n=e||fu,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(du(n)),a.push(gl()),o.push(_l(n))}var mu=/[#.]/g;function hu(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){mu.lastIndex=i;let e=mu.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function gu(e,t,n){let r=n?Su(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=hu(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,_u(i))a.unshift(i);else for(let[t,n]of Object.entries(i))vu(e,o.properties,t,n)}for(let e of a)yu(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function _u(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function vu(e,t,n,r){let i=lt(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?mt(r):i.commaSeparated?De(r):i.commaOrSpaceSeparated?mt(De(r).join(` `)):bu(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?xu(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(bu(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function yu(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(let n of t)yu(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?yu(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}}function bu(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||Re(n)===Re(t)))return!0}return n}function xu(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function Su(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var Cu=`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`.split(`.`),wu=gu(ft,`div`),Tu=gu(pt,`g`,Cu);function Eu(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=Du(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=Du(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function Du(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
|
|
42
42
|
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var Ou={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/`},ku={}.hasOwnProperty,Au=Object.prototype;function ju(e,t){let n=t||{};return Mu({file:n.file||void 0,location:!1,schema:n.space===`svg`?pt:ft,verbose:n.verbose||!1},e)}function Mu(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},Fu(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:Nu(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=Eu(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},Fu(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},Fu(e,r,n),n}default:return n=Pu(e,t),n}}function Nu(e,t){let n=-1,r=[];for(;++n<t.length;){let i=Mu(e,t[n]);r.push(i)}return r}function Pu(e,t){let n=e.schema;e.schema=t.namespaceURI===Ou.svg?pt:ft;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;ku.call(Au,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?Tu:wu)(t.tagName,i,Nu(e,t.childNodes));if(Fu(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&Lu(r.startTag),o=r&&r.endTag&&Lu(r.endTag),s=Mu(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function Fu(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=Iu(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Iu(e,t,n){let r=Lu(n);if(t.type===`element`){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r={},i;if(n.attrs)for(i in n.attrs)ku.call(n.attrs,i)&&(r[lt(e.schema,i).property]=Lu(n.attrs[i]));n.startTag;let a=Lu(n.startTag),o=n.endTag?Lu(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function Lu(e){let t=Ru({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Ru({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Ru(e){return e.line&&e.column?e:void 0}var zu={},Bu={}.hasOwnProperty,Vu=oc(`type`,{handlers:{root:Uu,element:Ju,text:Ku,comment:qu,doctype:Gu}});function Hu(e,t){let n=(t||zu).space;return Vu(e,n===`svg`?pt:ft)}function Uu(e,t){let n={nodeName:`#document`,mode:(e.data||{}).quirksMode?`quirks`:`no-quirks`,childNodes:[]};return n.childNodes=Xu(e.children,n,t),Zu(e,n),n}function Wu(e,t){let n={nodeName:`#document-fragment`,childNodes:[]};return n.childNodes=Xu(e.children,n,t),Zu(e,n),n}function Gu(e){let t={nodeName:`#documentType`,name:`html`,publicId:``,systemId:``,parentNode:null};return Zu(e,t),t}function Ku(e){let t={nodeName:`#text`,value:e.value,parentNode:null};return Zu(e,t),t}function qu(e){let t={nodeName:`#comment`,data:e.value,parentNode:null};return Zu(e,t),t}function Ju(e,t){let n=t,r=n;e.type===`element`&&e.tagName.toLowerCase()===`svg`&&n.space===`html`&&(r=pt);let i=[],a;if(e.properties){for(a in e.properties)if(a!==`children`&&Bu.call(e.properties,a)){let t=Yu(r,a,e.properties[a]);t&&i.push(t)}}let o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Ou[o],childNodes:[],parentNode:null};return s.childNodes=Xu(e.children,s,r),Zu(e,s),e.tagName===`template`&&e.content&&(s.content=Wu(e.content,r)),s}function Yu(e,t,n){let r=lt(e,t);if(n===!1||n==null||typeof n==`number`&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Oe(n):ht(n));let i={name:r.attribute,value:n===!0?``:String(n)};if(r.space&&r.space!==`html`&&r.space!==`svg`){let e=i.name.indexOf(`:`);e<0?i.prefix=``:(i.name=i.name.slice(e+1),i.prefix=r.attribute.slice(0,e)),i.namespace=Ou[r.space]}return i}function Xu(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=Vu(e[r],n);a.parentNode=t,i.push(a)}return i}function Zu(e,t){let 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})}var Qu=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],$u=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]),H;(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`})(H||={});var ed={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function td(e){return e>=55296&&e<=57343}function nd(e){return e>=56320&&e<=57343}function rd(e,t){return(e-55296)*1024+9216+t}function id(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function U(e){return e>=64976&&e<=65007||$u.has(e)}var W;(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`})(W||={});var ad=65536,od=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=ad,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(nd(t))return this.pos++,this._addGap(),rd(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,H.EOF;return this._err(W.surrogateInInputStream),e}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(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,H.EOF;let n=this.html.charCodeAt(t);return n===H.CARRIAGE_RETURN?H.LINE_FEED:n}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,H.EOF;let e=this.html.charCodeAt(this.pos);return e===H.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,H.LINE_FEED):e===H.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,td(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===H.LINE_FEED||e===H.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){id(e)?this._err(W.controlCharacterInInputStream):U(e)&&this._err(W.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},G;(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`})(G||={});function sd(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}var cd=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肻\xA0ଷ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))),ld=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]]);String.fromCodePoint;function ud(e){return e>=55296&&e<=57343||e>1114111?65533:ld.get(e)??e}var dd;(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`})(dd||={});var fd=32,pd;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(pd||={});function md(e){return e>=dd.ZERO&&e<=dd.NINE}function hd(e){return e>=dd.UPPER_A&&e<=dd.UPPER_F||e>=dd.LOWER_A&&e<=dd.LOWER_F}function gd(e){return e>=dd.UPPER_A&&e<=dd.UPPER_Z||e>=dd.LOWER_A&&e<=dd.LOWER_Z||md(e)}function _d(e){return e===dd.EQUALS||gd(e)}var vd;(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`})(vd||={});var yd;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(yd||={});var bd=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=vd.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=yd.Strict}startEntity(e){this.decodeMode=e,this.state=vd.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case vd.EntityStart:return e.charCodeAt(t)===dd.NUM?(this.state=vd.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=vd.NamedEntity,this.stateNamedEntity(e,t));case vd.NumericStart:return this.stateNumericStart(e,t);case vd.NumericDecimal:return this.stateNumericDecimal(e,t);case vd.NumericHex:return this.stateNumericHex(e,t);case vd.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|fd)===dd.LOWER_X?(this.state=vd.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=vd.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(md(r)||hd(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(md(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===dd.SEMI)this.consumed+=1;else if(this.decodeMode===yd.Strict)return 0;return this.emitCodePoint(ud(this.result),this.consumed),this.errors&&(e!==dd.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&pd.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=xd(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===yd.Attribute&&(i===0||_d(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&pd.VALUE_LENGTH)>>14,i!==0){if(a===dd.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==yd.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&pd.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~pd.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case vd.NamedEntity:return this.result!==0&&(this.decodeMode!==yd.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case vd.NumericDecimal:return this.emitNumericEntity(0,2);case vd.NumericHex:return this.emitNumericEntity(0,3);case vd.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case vd.EntityStart:return 0}}};function xd(e,t,n,r){let i=(t&pd.BRANCH_LENGTH)>>7,a=t&pd.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}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||={});var Sd;(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`})(Sd||={});var q;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(q||={});var J;(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`})(J||={});var Y;(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`})(Y||={});var Cd=new Map([[J.A,Y.A],[J.ADDRESS,Y.ADDRESS],[J.ANNOTATION_XML,Y.ANNOTATION_XML],[J.APPLET,Y.APPLET],[J.AREA,Y.AREA],[J.ARTICLE,Y.ARTICLE],[J.ASIDE,Y.ASIDE],[J.B,Y.B],[J.BASE,Y.BASE],[J.BASEFONT,Y.BASEFONT],[J.BGSOUND,Y.BGSOUND],[J.BIG,Y.BIG],[J.BLOCKQUOTE,Y.BLOCKQUOTE],[J.BODY,Y.BODY],[J.BR,Y.BR],[J.BUTTON,Y.BUTTON],[J.CAPTION,Y.CAPTION],[J.CENTER,Y.CENTER],[J.CODE,Y.CODE],[J.COL,Y.COL],[J.COLGROUP,Y.COLGROUP],[J.DD,Y.DD],[J.DESC,Y.DESC],[J.DETAILS,Y.DETAILS],[J.DIALOG,Y.DIALOG],[J.DIR,Y.DIR],[J.DIV,Y.DIV],[J.DL,Y.DL],[J.DT,Y.DT],[J.EM,Y.EM],[J.EMBED,Y.EMBED],[J.FIELDSET,Y.FIELDSET],[J.FIGCAPTION,Y.FIGCAPTION],[J.FIGURE,Y.FIGURE],[J.FONT,Y.FONT],[J.FOOTER,Y.FOOTER],[J.FOREIGN_OBJECT,Y.FOREIGN_OBJECT],[J.FORM,Y.FORM],[J.FRAME,Y.FRAME],[J.FRAMESET,Y.FRAMESET],[J.H1,Y.H1],[J.H2,Y.H2],[J.H3,Y.H3],[J.H4,Y.H4],[J.H5,Y.H5],[J.H6,Y.H6],[J.HEAD,Y.HEAD],[J.HEADER,Y.HEADER],[J.HGROUP,Y.HGROUP],[J.HR,Y.HR],[J.HTML,Y.HTML],[J.I,Y.I],[J.IMG,Y.IMG],[J.IMAGE,Y.IMAGE],[J.INPUT,Y.INPUT],[J.IFRAME,Y.IFRAME],[J.KEYGEN,Y.KEYGEN],[J.LABEL,Y.LABEL],[J.LI,Y.LI],[J.LINK,Y.LINK],[J.LISTING,Y.LISTING],[J.MAIN,Y.MAIN],[J.MALIGNMARK,Y.MALIGNMARK],[J.MARQUEE,Y.MARQUEE],[J.MATH,Y.MATH],[J.MENU,Y.MENU],[J.META,Y.META],[J.MGLYPH,Y.MGLYPH],[J.MI,Y.MI],[J.MO,Y.MO],[J.MN,Y.MN],[J.MS,Y.MS],[J.MTEXT,Y.MTEXT],[J.NAV,Y.NAV],[J.NOBR,Y.NOBR],[J.NOFRAMES,Y.NOFRAMES],[J.NOEMBED,Y.NOEMBED],[J.NOSCRIPT,Y.NOSCRIPT],[J.OBJECT,Y.OBJECT],[J.OL,Y.OL],[J.OPTGROUP,Y.OPTGROUP],[J.OPTION,Y.OPTION],[J.P,Y.P],[J.PARAM,Y.PARAM],[J.PLAINTEXT,Y.PLAINTEXT],[J.PRE,Y.PRE],[J.RB,Y.RB],[J.RP,Y.RP],[J.RT,Y.RT],[J.RTC,Y.RTC],[J.RUBY,Y.RUBY],[J.S,Y.S],[J.SCRIPT,Y.SCRIPT],[J.SEARCH,Y.SEARCH],[J.SECTION,Y.SECTION],[J.SELECT,Y.SELECT],[J.SOURCE,Y.SOURCE],[J.SMALL,Y.SMALL],[J.SPAN,Y.SPAN],[J.STRIKE,Y.STRIKE],[J.STRONG,Y.STRONG],[J.STYLE,Y.STYLE],[J.SUB,Y.SUB],[J.SUMMARY,Y.SUMMARY],[J.SUP,Y.SUP],[J.TABLE,Y.TABLE],[J.TBODY,Y.TBODY],[J.TEMPLATE,Y.TEMPLATE],[J.TEXTAREA,Y.TEXTAREA],[J.TFOOT,Y.TFOOT],[J.TD,Y.TD],[J.TH,Y.TH],[J.THEAD,Y.THEAD],[J.TITLE,Y.TITLE],[J.TR,Y.TR],[J.TRACK,Y.TRACK],[J.TT,Y.TT],[J.U,Y.U],[J.UL,Y.UL],[J.SVG,Y.SVG],[J.VAR,Y.VAR],[J.WBR,Y.WBR],[J.XMP,Y.XMP]]);function wd(e){return Cd.get(e)??Y.UNKNOWN}var X=Y,Td={[K.HTML]:new Set([X.ADDRESS,X.APPLET,X.AREA,X.ARTICLE,X.ASIDE,X.BASE,X.BASEFONT,X.BGSOUND,X.BLOCKQUOTE,X.BODY,X.BR,X.BUTTON,X.CAPTION,X.CENTER,X.COL,X.COLGROUP,X.DD,X.DETAILS,X.DIR,X.DIV,X.DL,X.DT,X.EMBED,X.FIELDSET,X.FIGCAPTION,X.FIGURE,X.FOOTER,X.FORM,X.FRAME,X.FRAMESET,X.H1,X.H2,X.H3,X.H4,X.H5,X.H6,X.HEAD,X.HEADER,X.HGROUP,X.HR,X.HTML,X.IFRAME,X.IMG,X.INPUT,X.LI,X.LINK,X.LISTING,X.MAIN,X.MARQUEE,X.MENU,X.META,X.NAV,X.NOEMBED,X.NOFRAMES,X.NOSCRIPT,X.OBJECT,X.OL,X.P,X.PARAM,X.PLAINTEXT,X.PRE,X.SCRIPT,X.SECTION,X.SELECT,X.SOURCE,X.STYLE,X.SUMMARY,X.TABLE,X.TBODY,X.TD,X.TEMPLATE,X.TEXTAREA,X.TFOOT,X.TH,X.THEAD,X.TITLE,X.TR,X.TRACK,X.UL,X.WBR,X.XMP]),[K.MATHML]:new Set([X.MI,X.MO,X.MN,X.MS,X.MTEXT,X.ANNOTATION_XML]),[K.SVG]:new Set([X.TITLE,X.FOREIGN_OBJECT,X.DESC]),[K.XLINK]:new Set,[K.XML]:new Set,[K.XMLNS]:new Set},Ed=new Set([X.H1,X.H2,X.H3,X.H4,X.H5,X.H6]);J.STYLE,J.SCRIPT,J.XMP,J.IFRAME,J.NOEMBED,J.NOFRAMES,J.PLAINTEXT;var Z;(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`})(Z||={});var Dd={DATA:Z.DATA,RCDATA:Z.RCDATA,RAWTEXT:Z.RAWTEXT,SCRIPT_DATA:Z.SCRIPT_DATA,PLAINTEXT:Z.PLAINTEXT,CDATA_SECTION:Z.CDATA_SECTION};function Od(e){return e>=H.DIGIT_0&&e<=H.DIGIT_9}function kd(e){return e>=H.LATIN_CAPITAL_A&&e<=H.LATIN_CAPITAL_Z}function Ad(e){return e>=H.LATIN_SMALL_A&&e<=H.LATIN_SMALL_Z}function jd(e){return Ad(e)||kd(e)}function Md(e){return jd(e)||Od(e)}function Nd(e){return e+32}function Pd(e){return e===H.SPACE||e===H.LINE_FEED||e===H.TABULATION||e===H.FORM_FEED}function Fd(e){return Pd(e)||e===H.SOLIDUS||e===H.GREATER_THAN_SIGN}function Id(e){return e===H.NULL?W.nullCharacterReference:e>1114111?W.characterReferenceOutsideUnicodeRange:td(e)?W.surrogateCharacterReference:U(e)?W.noncharacterCharacterReference:id(e)||e===H.CARRIAGE_RETURN?W.controlCharacterReference:null}var Ld=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=Z.DATA,this.returnState=Z.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new od(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new bd(cd,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(W.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(W.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=Id(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),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(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:G.START_TAG,tagName:``,tagID:Y.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:G.END_TAG,tagName:``,tagID:Y.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:G.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:G.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(sd(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(W.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=wd(e.tagName),e.type===G.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(W.endTagWithAttributes),e.selfClosing&&this._err(W.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case G.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case G.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case G.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:G.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){let t=Pd(e)?G.WHITESPACE_CHARACTER:e===H.NULL?G.NULL_CHARACTER:G.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(G.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=Z.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?yd.Attribute:yd.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Z.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Z.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Z.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Z.DATA:this._stateData(e);break;case Z.RCDATA:this._stateRcdata(e);break;case Z.RAWTEXT:this._stateRawtext(e);break;case Z.SCRIPT_DATA:this._stateScriptData(e);break;case Z.PLAINTEXT:this._statePlaintext(e);break;case Z.TAG_OPEN:this._stateTagOpen(e);break;case Z.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Z.TAG_NAME:this._stateTagName(e);break;case Z.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Z.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Z.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Z.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Z.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Z.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Z.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Z.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Z.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Z.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Z.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Z.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Z.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Z.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Z.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Z.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Z.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Z.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Z.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Z.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Z.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Z.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Z.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Z.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Z.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Z.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Z.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Z.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Z.BOGUS_COMMENT:this._stateBogusComment(e);break;case Z.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Z.COMMENT_START:this._stateCommentStart(e);break;case Z.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Z.COMMENT:this._stateComment(e);break;case Z.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Z.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Z.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Z.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Z.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Z.COMMENT_END:this._stateCommentEnd(e);break;case Z.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Z.DOCTYPE:this._stateDoctype(e);break;case Z.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Z.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Z.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Z.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Z.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Z.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Z.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Z.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Z.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Z.CDATA_SECTION:this._stateCdataSection(e);break;case Z.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Z.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Z.CHARACTER_REFERENCE:this._stateCharacterReference();break;case Z.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case H.LESS_THAN_SIGN:this.state=Z.TAG_OPEN;break;case H.AMPERSAND:this._startCharacterReference();break;case H.NULL:this._err(W.unexpectedNullCharacter),this._emitCodePoint(e);break;case H.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case H.AMPERSAND:this._startCharacterReference();break;case H.LESS_THAN_SIGN:this.state=Z.RCDATA_LESS_THAN_SIGN;break;case H.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case H.LESS_THAN_SIGN:this.state=Z.RAWTEXT_LESS_THAN_SIGN;break;case H.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case H.LESS_THAN_SIGN:this.state=Z.SCRIPT_DATA_LESS_THAN_SIGN;break;case H.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case H.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(jd(e))this._createStartTagToken(),this.state=Z.TAG_NAME,this._stateTagName(e);else switch(e){case H.EXCLAMATION_MARK:this.state=Z.MARKUP_DECLARATION_OPEN;break;case H.SOLIDUS:this.state=Z.END_TAG_OPEN;break;case H.QUESTION_MARK:this._err(W.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Z.BOGUS_COMMENT,this._stateBogusComment(e);break;case H.EOF:this._err(W.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(W.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=Z.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(jd(e))this._createEndTagToken(),this.state=Z.TAG_NAME,this._stateTagName(e);else switch(e){case H.GREATER_THAN_SIGN:this._err(W.missingEndTagName),this.state=Z.DATA;break;case H.EOF:this._err(W.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(W.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=Z.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=Z.BEFORE_ATTRIBUTE_NAME;break;case H.SOLIDUS:this.state=Z.SELF_CLOSING_START_TAG;break;case H.GREATER_THAN_SIGN:this.state=Z.DATA,this.emitCurrentTagToken();break;case H.NULL:this._err(W.unexpectedNullCharacter),t.tagName+=`�`;break;case H.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(kd(e)?Nd(e):e)}}_stateRcdataLessThanSign(e){e===H.SOLIDUS?this.state=Z.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=Z.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){jd(e)?(this.state=Z.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=Z.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=Z.BEFORE_ATTRIBUTE_NAME,!1;case H.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=Z.SELF_CLOSING_START_TAG,!1;case H.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=Z.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Z.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===H.SOLIDUS?this.state=Z.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=Z.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){jd(e)?(this.state=Z.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=Z.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Z.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case H.SOLIDUS:this.state=Z.SCRIPT_DATA_END_TAG_OPEN;break;case H.EXCLAMATION_MARK:this.state=Z.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=Z.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){jd(e)?(this.state=Z.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=Z.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Z.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===H.HYPHEN_MINUS?(this.state=Z.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=Z.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===H.HYPHEN_MINUS?(this.state=Z.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=Z.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case H.HYPHEN_MINUS:this.state=Z.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=Z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case H.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case H.HYPHEN_MINUS:this.state=Z.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=Z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case H.NULL:this._err(W.unexpectedNullCharacter),this.state=Z.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case H.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Z.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case H.HYPHEN_MINUS:this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=Z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case H.GREATER_THAN_SIGN:this.state=Z.SCRIPT_DATA,this._emitChars(`>`);break;case H.NULL:this._err(W.unexpectedNullCharacter),this.state=Z.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case H.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Z.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===H.SOLIDUS?this.state=Z.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:jd(e)?(this._emitChars(`<`),this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=Z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){jd(e)?(this.state=Z.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=Z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(ed.SCRIPT,!1)&&Fd(this.preprocessor.peek(ed.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<ed.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=Z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case H.HYPHEN_MINUS:this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case H.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case H.HYPHEN_MINUS:this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case H.NULL:this._err(W.unexpectedNullCharacter),this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case H.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case H.HYPHEN_MINUS:this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case H.GREATER_THAN_SIGN:this.state=Z.SCRIPT_DATA,this._emitChars(`>`);break;case H.NULL:this._err(W.unexpectedNullCharacter),this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case H.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===H.SOLIDUS?(this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(ed.SCRIPT,!1)&&Fd(this.preprocessor.peek(ed.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<ed.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Z.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.SOLIDUS:case H.GREATER_THAN_SIGN:case H.EOF:this.state=Z.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case H.EQUALS_SIGN:this._err(W.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=Z.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=Z.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:case H.SOLIDUS:case H.GREATER_THAN_SIGN:case H.EOF:this._leaveAttrName(),this.state=Z.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case H.EQUALS_SIGN:this._leaveAttrName(),this.state=Z.BEFORE_ATTRIBUTE_VALUE;break;case H.QUOTATION_MARK:case H.APOSTROPHE:case H.LESS_THAN_SIGN:this._err(W.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case H.NULL:this._err(W.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(kd(e)?Nd(e):e)}}_stateAfterAttributeName(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.SOLIDUS:this.state=Z.SELF_CLOSING_START_TAG;break;case H.EQUALS_SIGN:this.state=Z.BEFORE_ATTRIBUTE_VALUE;break;case H.GREATER_THAN_SIGN:this.state=Z.DATA,this.emitCurrentTagToken();break;case H.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=Z.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.QUOTATION_MARK:this.state=Z.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case H.APOSTROPHE:this.state=Z.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case H.GREATER_THAN_SIGN:this._err(W.missingAttributeValue),this.state=Z.DATA,this.emitCurrentTagToken();break;default:this.state=Z.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case H.QUOTATION_MARK:this.state=Z.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case H.AMPERSAND:this._startCharacterReference();break;case H.NULL:this._err(W.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case H.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case H.APOSTROPHE:this.state=Z.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case H.AMPERSAND:this._startCharacterReference();break;case H.NULL:this._err(W.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case H.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this._leaveAttrValue(),this.state=Z.BEFORE_ATTRIBUTE_NAME;break;case H.AMPERSAND:this._startCharacterReference();break;case H.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Z.DATA,this.emitCurrentTagToken();break;case H.NULL:this._err(W.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case H.QUOTATION_MARK:case H.APOSTROPHE:case H.LESS_THAN_SIGN:case H.EQUALS_SIGN:case H.GRAVE_ACCENT:this._err(W.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case H.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this._leaveAttrValue(),this.state=Z.BEFORE_ATTRIBUTE_NAME;break;case H.SOLIDUS:this._leaveAttrValue(),this.state=Z.SELF_CLOSING_START_TAG;break;case H.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Z.DATA,this.emitCurrentTagToken();break;case H.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this._err(W.missingWhitespaceBetweenAttributes),this.state=Z.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case H.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=Z.DATA,this.emitCurrentTagToken();break}case H.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this._err(W.unexpectedSolidusInTag),this.state=Z.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case H.GREATER_THAN_SIGN:this.state=Z.DATA,this.emitCurrentComment(t);break;case H.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case H.NULL:this._err(W.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(ed.DASH_DASH,!0)?(this._createCommentToken(ed.DASH_DASH.length+1),this.state=Z.COMMENT_START):this._consumeSequenceIfMatch(ed.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(ed.DOCTYPE.length+1),this.state=Z.DOCTYPE):this._consumeSequenceIfMatch(ed.CDATA_START,!0)?this.inForeignNode?this.state=Z.CDATA_SECTION:(this._err(W.cdataInHtmlContent),this._createCommentToken(ed.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=Z.BOGUS_COMMENT):this._ensureHibernation()||(this._err(W.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Z.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case H.HYPHEN_MINUS:this.state=Z.COMMENT_START_DASH;break;case H.GREATER_THAN_SIGN:{this._err(W.abruptClosingOfEmptyComment),this.state=Z.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=Z.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case H.HYPHEN_MINUS:this.state=Z.COMMENT_END;break;case H.GREATER_THAN_SIGN:this._err(W.abruptClosingOfEmptyComment),this.state=Z.DATA,this.emitCurrentComment(t);break;case H.EOF:this._err(W.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Z.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case H.HYPHEN_MINUS:this.state=Z.COMMENT_END_DASH;break;case H.LESS_THAN_SIGN:t.data+=`<`,this.state=Z.COMMENT_LESS_THAN_SIGN;break;case H.NULL:this._err(W.unexpectedNullCharacter),t.data+=`�`;break;case H.EOF:this._err(W.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case H.EXCLAMATION_MARK:t.data+=`!`,this.state=Z.COMMENT_LESS_THAN_SIGN_BANG;break;case H.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=Z.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===H.HYPHEN_MINUS?this.state=Z.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Z.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===H.HYPHEN_MINUS?this.state=Z.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Z.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==H.GREATER_THAN_SIGN&&e!==H.EOF&&this._err(W.nestedComment),this.state=Z.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case H.HYPHEN_MINUS:this.state=Z.COMMENT_END;break;case H.EOF:this._err(W.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Z.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case H.GREATER_THAN_SIGN:this.state=Z.DATA,this.emitCurrentComment(t);break;case H.EXCLAMATION_MARK:this.state=Z.COMMENT_END_BANG;break;case H.HYPHEN_MINUS:t.data+=`-`;break;case H.EOF:this._err(W.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=Z.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case H.HYPHEN_MINUS:t.data+=`--!`,this.state=Z.COMMENT_END_DASH;break;case H.GREATER_THAN_SIGN:this._err(W.incorrectlyClosedComment),this.state=Z.DATA,this.emitCurrentComment(t);break;case H.EOF:this._err(W.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=Z.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=Z.BEFORE_DOCTYPE_NAME;break;case H.GREATER_THAN_SIGN:this.state=Z.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case H.EOF:{this._err(W.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(W.missingWhitespaceBeforeDoctypeName),this.state=Z.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(kd(e))this._createDoctypeToken(String.fromCharCode(Nd(e))),this.state=Z.DOCTYPE_NAME;else switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.NULL:this._err(W.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=Z.DOCTYPE_NAME;break;case H.GREATER_THAN_SIGN:{this._err(W.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=Z.DATA;break}case H.EOF:{this._err(W.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=Z.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=Z.AFTER_DOCTYPE_NAME;break;case H.GREATER_THAN_SIGN:this.state=Z.DATA,this.emitCurrentDoctype(t);break;case H.NULL:this._err(W.unexpectedNullCharacter),t.name+=`�`;break;case H.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(kd(e)?Nd(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.GREATER_THAN_SIGN:this.state=Z.DATA,this.emitCurrentDoctype(t);break;case H.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(ed.PUBLIC,!1)?this.state=Z.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(ed.SYSTEM,!1)?this.state=Z.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(W.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=Z.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case H.QUOTATION_MARK:this._err(W.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:this._err(W.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case H.GREATER_THAN_SIGN:this._err(W.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Z.DATA,this.emitCurrentDoctype(t);break;case H.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.QUOTATION_MARK:t.publicId=``,this.state=Z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:t.publicId=``,this.state=Z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case H.GREATER_THAN_SIGN:this._err(W.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Z.DATA,this.emitCurrentDoctype(t);break;case H.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case H.QUOTATION_MARK:this.state=Z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case H.NULL:this._err(W.unexpectedNullCharacter),t.publicId+=`�`;break;case H.GREATER_THAN_SIGN:this._err(W.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Z.DATA;break;case H.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case H.APOSTROPHE:this.state=Z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case H.NULL:this._err(W.unexpectedNullCharacter),t.publicId+=`�`;break;case H.GREATER_THAN_SIGN:this._err(W.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Z.DATA;break;case H.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=Z.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case H.GREATER_THAN_SIGN:this.state=Z.DATA,this.emitCurrentDoctype(t);break;case H.QUOTATION_MARK:this._err(W.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:this._err(W.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case H.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Z.DATA;break;case H.QUOTATION_MARK:t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case H.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=Z.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case H.QUOTATION_MARK:this._err(W.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:this._err(W.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case H.GREATER_THAN_SIGN:this._err(W.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Z.DATA,this.emitCurrentDoctype(t);break;case H.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.QUOTATION_MARK:t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case H.GREATER_THAN_SIGN:this._err(W.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Z.DATA,this.emitCurrentDoctype(t);break;case H.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case H.QUOTATION_MARK:this.state=Z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case H.NULL:this._err(W.unexpectedNullCharacter),t.systemId+=`�`;break;case H.GREATER_THAN_SIGN:this._err(W.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Z.DATA;break;case H.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case H.APOSTROPHE:this.state=Z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case H.NULL:this._err(W.unexpectedNullCharacter),t.systemId+=`�`;break;case H.GREATER_THAN_SIGN:this._err(W.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Z.DATA;break;case H.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Z.DATA;break;case H.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case H.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Z.DATA;break;case H.NULL:this._err(W.unexpectedNullCharacter);break;case H.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case H.RIGHT_SQUARE_BRACKET:this.state=Z.CDATA_SECTION_BRACKET;break;case H.EOF:this._err(W.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===H.RIGHT_SQUARE_BRACKET?this.state=Z.CDATA_SECTION_END:(this._emitChars(`]`),this.state=Z.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case H.GREATER_THAN_SIGN:this.state=Z.DATA;break;case H.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=Z.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0){if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(H.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Md(this.preprocessor.peek(1))?Z.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Md(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===H.SEMICOLON&&this._err(W.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},Rd=new Set([Y.DD,Y.DT,Y.LI,Y.OPTGROUP,Y.OPTION,Y.P,Y.RB,Y.RP,Y.RT,Y.RTC]),zd=new Set([...Rd,Y.CAPTION,Y.COLGROUP,Y.TBODY,Y.TD,Y.TFOOT,Y.TH,Y.THEAD,Y.TR]),Bd=new Set([Y.APPLET,Y.CAPTION,Y.HTML,Y.MARQUEE,Y.OBJECT,Y.TABLE,Y.TD,Y.TEMPLATE,Y.TH]),Vd=new Set([...Bd,Y.OL,Y.UL]),Hd=new Set([...Bd,Y.BUTTON]),Ud=new Set([Y.ANNOTATION_XML,Y.MI,Y.MN,Y.MO,Y.MS,Y.MTEXT]),Wd=new Set([Y.DESC,Y.FOREIGN_OBJECT,Y.TITLE]),Gd=new Set([Y.TR,Y.TEMPLATE,Y.HTML]),Kd=new Set([Y.TBODY,Y.TFOOT,Y.THEAD,Y.TEMPLATE,Y.HTML]),qd=new Set([Y.TABLE,Y.TEMPLATE,Y.HTML]),Jd=new Set([Y.TD,Y.TH]),Yd=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=Y.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===Y.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===K.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==K.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Ed,K.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Jd,K.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(qd,K.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Kd,K.HTML)}clearBackToTableRowContext(){this.clearBackTo(Gd,K.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===Y.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===Y.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case K.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case K.SVG:if(Wd.has(r))return!1;break;case K.MATHML:if(Ud.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Bd)}hasInListItemScope(e){return this.hasInDynamicScope(e,Vd)}hasInButtonScope(e){return this.hasInDynamicScope(e,Hd)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case K.HTML:if(Ed.has(t))return!0;if(Bd.has(t))return!1;break;case K.SVG:if(Wd.has(t))return!1;break;case K.MATHML:if(Ud.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===K.HTML)switch(this.tagIDs[t]){case e:return!0;case Y.TABLE:case Y.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===K.HTML)switch(this.tagIDs[e]){case Y.TBODY:case Y.THEAD:case Y.TFOOT:return!0;case Y.TABLE:case Y.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===K.HTML)switch(this.tagIDs[t]){case e:return!0;case Y.OPTION:case Y.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Rd.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&zd.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&zd.has(this.currentTagId);)this.pop()}},Xd=3,Zd;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(Zd||={});var Qd={type:Zd.Marker},$d=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===Zd.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<Xd)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<Xd)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=Xd&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(Qd)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:Zd.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:Zd.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(Qd);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===Zd.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===Zd.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===Zd.Element&&t.element===e)}},ef={createDocument(){return{nodeName:`#document`,mode:q.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){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};ef.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(ef.isTextNode(n)){n.value+=t;return}}ef.appendChild(e,ef.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&ef.isTextNode(r)?r.value+=t:ef.insertBefore(e,ef.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},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}}},tf=`html`,nf=`about:legacy-compat`,rf=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,af=`+//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//`.split(`,`),of=[...af,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],sf=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),cf=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],lf=[...cf,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function uf(e,t){return t.some(t=>e.startsWith(t))}function df(e){return e.name===tf&&e.publicId===null&&(e.systemId===null||e.systemId===nf)}function ff(e){if(e.name!==tf)return q.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===rf)return q.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),sf.has(n))return q.QUIRKS;let e=t===null?of:af;if(uf(n,e))return q.QUIRKS;if(e=t===null?cf:lf,uf(n,e))return q.LIMITED_QUIRKS}return q.NO_QUIRKS}var pf={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},mf=`definitionurl`,hf=`definitionURL`,gf=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`.split(`.`).map(e=>[e.toLowerCase(),e])),_f=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}]]),vf=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`.split(`.`).map(e=>[e.toLowerCase(),e])),yf=new Set([Y.B,Y.BIG,Y.BLOCKQUOTE,Y.BODY,Y.BR,Y.CENTER,Y.CODE,Y.DD,Y.DIV,Y.DL,Y.DT,Y.EM,Y.EMBED,Y.H1,Y.H2,Y.H3,Y.H4,Y.H5,Y.H6,Y.HEAD,Y.HR,Y.I,Y.IMG,Y.LI,Y.LISTING,Y.MENU,Y.META,Y.NOBR,Y.OL,Y.P,Y.PRE,Y.RUBY,Y.S,Y.SMALL,Y.SPAN,Y.STRONG,Y.STRIKE,Y.SUB,Y.SUP,Y.TABLE,Y.TT,Y.U,Y.UL,Y.VAR]);function bf(e){let t=e.tagID;return t===Y.FONT&&e.attrs.some(({name:e})=>e===Sd.COLOR||e===Sd.SIZE||e===Sd.FACE)||yf.has(t)}function xf(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===mf){e.attrs[t].name=hf;break}}function Sf(e){for(let t=0;t<e.attrs.length;t++){let n=gf.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Cf(e){for(let t=0;t<e.attrs.length;t++){let n=_f.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 wf(e){let t=vf.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=wd(e.tagName))}function Tf(e,t){return t===K.MATHML&&(e===Y.MI||e===Y.MO||e===Y.MN||e===Y.MS||e===Y.MTEXT)}function Ef(e,t,n){if(t===K.MATHML&&e===Y.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===Sd.ENCODING){let t=n[e].value.toLowerCase();return t===pf.TEXT_HTML||t===pf.APPLICATION_XML}}return t===K.SVG&&(e===Y.FOREIGN_OBJECT||e===Y.DESC||e===Y.TITLE)}function Df(e,t,n,r){return(!r||r===K.HTML)&&Ef(e,t,n)||(!r||r===K.MATHML)&&Tf(e,t)}var Of=`hidden`,kf=8,Af=3,Q;(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`})(Q||={});var jf={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Mf=new Set([Y.TABLE,Y.TBODY,Y.TFOOT,Y.THEAD,Y.TR]),Nf={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ef,onParseError:null},Pf=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=Q.INITIAL,this.originalInsertionMode=Q.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={...Nf,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new Ld(this.options,this),this.activeFormattingElements=new $d(this.treeAdapter),this.fragmentContextID=n?wd(this.treeAdapter.getTagName(n)):Y.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new Yd(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...Nf,...t};e??=n.treeAdapter.createElement(J.TEMPLATE,K.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,K.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===Y.TEMPLATE&&i.tmplInsertionModeStack.unshift(Q.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??jf,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===K.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,K.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=Q.TEXT}switchToPlaintextParsing(){this.insertionMode=Q.TEXT,this.originalInsertionMode=Q.IN_BODY,this.tokenizer.state=Dd.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===J.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===K.HTML)switch(this.fragmentContextID){case Y.TITLE:case Y.TEXTAREA:this.tokenizer.state=Dd.RCDATA;break;case Y.STYLE:case Y.XMP:case Y.IFRAME:case Y.NOEMBED:case Y.NOFRAMES:case Y.NOSCRIPT:this.tokenizer.state=Dd.RAWTEXT;break;case Y.SCRIPT:this.tokenizer.state=Dd.SCRIPT_DATA;break;case Y.PLAINTEXT:this.tokenizer.state=Dd.PLAINTEXT}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,K.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,K.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(J.HTML,K.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,Y.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===G.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===Y.SVG&&this.treeAdapter.getTagName(t)===J.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===K.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===Y.MGLYPH||e.tagID===Y.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,K.HTML)}_processToken(e){switch(e.type){case G.CHARACTER:this.onCharacter(e);break;case G.NULL_CHARACTER:this.onNullCharacter(e);break;case G.COMMENT:this.onComment(e);break;case G.DOCTYPE:this.onDoctype(e);break;case G.START_TAG:this._processStartTag(e);break;case G.END_TAG:this.onEndTag(e);break;case G.EOF:this.onEof(e);break;case G.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return Df(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===Zd.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=Q.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(Y.P),this.openElements.popUntilTagNamePopped(Y.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case Y.TR:this.insertionMode=Q.IN_ROW;return;case Y.TBODY:case Y.THEAD:case Y.TFOOT:this.insertionMode=Q.IN_TABLE_BODY;return;case Y.CAPTION:this.insertionMode=Q.IN_CAPTION;return;case Y.COLGROUP:this.insertionMode=Q.IN_COLUMN_GROUP;return;case Y.TABLE:this.insertionMode=Q.IN_TABLE;return;case Y.BODY:this.insertionMode=Q.IN_BODY;return;case Y.FRAMESET:this.insertionMode=Q.IN_FRAMESET;return;case Y.SELECT:this._resetInsertionModeForSelect(e);return;case Y.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case Y.HTML:this.insertionMode=this.headElement?Q.AFTER_HEAD:Q.BEFORE_HEAD;return;case Y.TD:case Y.TH:if(e>0){this.insertionMode=Q.IN_CELL;return}break;case Y.HEAD:if(e>0){this.insertionMode=Q.IN_HEAD;return}}this.insertionMode=Q.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===Y.TEMPLATE)break;if(e===Y.TABLE){this.insertionMode=Q.IN_SELECT_IN_TABLE;return}}this.insertionMode=Q.IN_SELECT}_isElementCausesFosterParenting(e){return Mf.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case Y.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===K.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case Y.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return Td[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Zm(this,e);return}switch(this.insertionMode){case Q.INITIAL:Kf(this,e);break;case Q.BEFORE_HTML:Yf(this,e);break;case Q.BEFORE_HEAD:Qf(this,e);break;case Q.IN_HEAD:np(this,e);break;case Q.IN_HEAD_NO_SCRIPT:ap(this,e);break;case Q.AFTER_HEAD:cp(this,e);break;case Q.IN_BODY:case Q.IN_CAPTION:case Q.IN_CELL:case Q.IN_TEMPLATE:dp(this,e);break;case Q.TEXT:case Q.IN_SELECT:case Q.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case Q.IN_TABLE:case Q.IN_TABLE_BODY:case Q.IN_ROW:om(this,e);break;case Q.IN_TABLE_TEXT:ym(this,e);break;case Q.IN_COLUMN_GROUP:Em(this,e);break;case Q.AFTER_BODY:Hm(this,e);break;case Q.AFTER_AFTER_BODY:Jm(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Xm(this,e);return}switch(this.insertionMode){case Q.INITIAL:Kf(this,e);break;case Q.BEFORE_HTML:Yf(this,e);break;case Q.BEFORE_HEAD:Qf(this,e);break;case Q.IN_HEAD:np(this,e);break;case Q.IN_HEAD_NO_SCRIPT:ap(this,e);break;case Q.AFTER_HEAD:cp(this,e);break;case Q.TEXT:this._insertCharacters(e);break;case Q.IN_TABLE:case Q.IN_TABLE_BODY:case Q.IN_ROW:om(this,e);break;case Q.IN_COLUMN_GROUP:Em(this,e);break;case Q.AFTER_BODY:Hm(this,e);break;case Q.AFTER_AFTER_BODY:Jm(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){Vf(this,e);return}switch(this.insertionMode){case Q.INITIAL:case Q.BEFORE_HTML:case Q.BEFORE_HEAD:case Q.IN_HEAD:case Q.IN_HEAD_NO_SCRIPT:case Q.AFTER_HEAD:case Q.IN_BODY:case Q.IN_TABLE:case Q.IN_CAPTION:case Q.IN_COLUMN_GROUP:case Q.IN_TABLE_BODY:case Q.IN_ROW:case Q.IN_CELL:case Q.IN_SELECT:case Q.IN_SELECT_IN_TABLE:case Q.IN_TEMPLATE:case Q.IN_FRAMESET:case Q.AFTER_FRAMESET:Vf(this,e);break;case Q.IN_TABLE_TEXT:bm(this,e);break;case Q.AFTER_BODY:Hf(this,e);break;case Q.AFTER_AFTER_BODY:case Q.AFTER_AFTER_FRAMESET:Uf(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case Q.INITIAL:Gf(this,e);break;case Q.BEFORE_HEAD:case Q.IN_HEAD:case Q.IN_HEAD_NO_SCRIPT:case Q.AFTER_HEAD:this._err(e,W.misplacedDoctype);break;case Q.IN_TABLE_TEXT:bm(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,W.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?$m(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case Q.INITIAL:Kf(this,e);break;case Q.BEFORE_HTML:qf(this,e);break;case Q.BEFORE_HEAD:Xf(this,e);break;case Q.IN_HEAD:$f(this,e);break;case Q.IN_HEAD_NO_SCRIPT:rp(this,e);break;case Q.AFTER_HEAD:op(this,e);break;case Q.IN_BODY:Wp(this,e);break;case Q.IN_TABLE:hm(this,e);break;case Q.IN_TABLE_TEXT:bm(this,e);break;case Q.IN_CAPTION:Sm(this,e);break;case Q.IN_COLUMN_GROUP:wm(this,e);break;case Q.IN_TABLE_BODY:Dm(this,e);break;case Q.IN_ROW:km(this,e);break;case Q.IN_CELL:jm(this,e);break;case Q.IN_SELECT:Nm(this,e);break;case Q.IN_SELECT_IN_TABLE:Fm(this,e);break;case Q.IN_TEMPLATE:Lm(this,e);break;case Q.AFTER_BODY:Bm(this,e);break;case Q.IN_FRAMESET:Um(this,e);break;case Q.AFTER_FRAMESET:Gm(this,e);break;case Q.AFTER_AFTER_BODY:qm(this,e);break;case Q.AFTER_AFTER_FRAMESET:Ym(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?eh(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case Q.INITIAL:Kf(this,e);break;case Q.BEFORE_HTML:Jf(this,e);break;case Q.BEFORE_HEAD:Zf(this,e);break;case Q.IN_HEAD:ep(this,e);break;case Q.IN_HEAD_NO_SCRIPT:ip(this,e);break;case Q.AFTER_HEAD:sp(this,e);break;case Q.IN_BODY:nm(this,e);break;case Q.TEXT:im(this,e);break;case Q.IN_TABLE:gm(this,e);break;case Q.IN_TABLE_TEXT:bm(this,e);break;case Q.IN_CAPTION:Cm(this,e);break;case Q.IN_COLUMN_GROUP:Tm(this,e);break;case Q.IN_TABLE_BODY:Om(this,e);break;case Q.IN_ROW:Am(this,e);break;case Q.IN_CELL:Mm(this,e);break;case Q.IN_SELECT:Pm(this,e);break;case Q.IN_SELECT_IN_TABLE:Im(this,e);break;case Q.IN_TEMPLATE:Rm(this,e);break;case Q.AFTER_BODY:Vm(this,e);break;case Q.IN_FRAMESET:Wm(this,e);break;case Q.AFTER_FRAMESET:Km(this,e);break;case Q.AFTER_AFTER_BODY:Jm(this,e)}}onEof(e){switch(this.insertionMode){case Q.INITIAL:Kf(this,e);break;case Q.BEFORE_HTML:Yf(this,e);break;case Q.BEFORE_HEAD:Qf(this,e);break;case Q.IN_HEAD:np(this,e);break;case Q.IN_HEAD_NO_SCRIPT:ap(this,e);break;case Q.AFTER_HEAD:cp(this,e);break;case Q.IN_BODY:case Q.IN_TABLE:case Q.IN_CAPTION:case Q.IN_COLUMN_GROUP:case Q.IN_TABLE_BODY:case Q.IN_ROW:case Q.IN_CELL:case Q.IN_SELECT:case Q.IN_SELECT_IN_TABLE:rm(this,e);break;case Q.TEXT:am(this,e);break;case Q.IN_TABLE_TEXT:bm(this,e);break;case Q.IN_TEMPLATE:zm(this,e);break;case Q.AFTER_BODY:case Q.IN_FRAMESET:case Q.AFTER_FRAMESET:case Q.AFTER_AFTER_BODY:case Q.AFTER_AFTER_FRAMESET:Wf(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===H.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case Q.IN_HEAD:case Q.IN_HEAD_NO_SCRIPT:case Q.AFTER_HEAD:case Q.TEXT:case Q.IN_COLUMN_GROUP:case Q.IN_SELECT:case Q.IN_SELECT_IN_TABLE:case Q.IN_FRAMESET:case Q.AFTER_FRAMESET:this._insertCharacters(e);break;case Q.IN_BODY:case Q.IN_CAPTION:case Q.IN_CELL:case Q.IN_TEMPLATE:case Q.AFTER_BODY:case Q.AFTER_AFTER_BODY:case Q.AFTER_AFTER_FRAMESET:up(this,e);break;case Q.IN_TABLE:case Q.IN_TABLE_BODY:case Q.IN_ROW:om(this,e);break;case Q.IN_TABLE_TEXT:vm(this,e)}}};function Ff(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):tm(e,t),n}function If(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Lf(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=Af;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=Rf(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function Rf(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function zf(e,t,n){let r=wd(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===Y.TEMPLATE&&i===K.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Bf(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function $(e,t){for(let n=0;n<kf;n++){let n=Ff(e,t);if(!n)break;let r=If(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=Lf(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&zf(e,a,i),Bf(e,r,n)}}function Vf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Hf(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Uf(e,t){e._appendCommentNode(t,e.document)}function Wf(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function Gf(e,t){e._setDocumentType(t);let n=t.forceQuirks?q.QUIRKS:ff(t);df(t)||e._err(t,W.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=Q.BEFORE_HTML}function Kf(e,t){e._err(t,W.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,q.QUIRKS),e.insertionMode=Q.BEFORE_HTML,e._processToken(t)}function qf(e,t){t.tagID===Y.HTML?(e._insertElement(t,K.HTML),e.insertionMode=Q.BEFORE_HEAD):Yf(e,t)}function Jf(e,t){let n=t.tagID;(n===Y.HTML||n===Y.HEAD||n===Y.BODY||n===Y.BR)&&Yf(e,t)}function Yf(e,t){e._insertFakeRootElement(),e.insertionMode=Q.BEFORE_HEAD,e._processToken(t)}function Xf(e,t){switch(t.tagID){case Y.HTML:Wp(e,t);break;case Y.HEAD:e._insertElement(t,K.HTML),e.headElement=e.openElements.current,e.insertionMode=Q.IN_HEAD;break;default:Qf(e,t)}}function Zf(e,t){let n=t.tagID;n===Y.HEAD||n===Y.BODY||n===Y.HTML||n===Y.BR?Qf(e,t):e._err(t,W.endTagWithoutMatchingOpenElement)}function Qf(e,t){e._insertFakeElement(J.HEAD,Y.HEAD),e.headElement=e.openElements.current,e.insertionMode=Q.IN_HEAD,e._processToken(t)}function $f(e,t){switch(t.tagID){case Y.HTML:Wp(e,t);break;case Y.BASE:case Y.BASEFONT:case Y.BGSOUND:case Y.LINK:case Y.META:e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case Y.TITLE:e._switchToTextParsing(t,Dd.RCDATA);break;case Y.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Dd.RAWTEXT):(e._insertElement(t,K.HTML),e.insertionMode=Q.IN_HEAD_NO_SCRIPT);break;case Y.NOFRAMES:case Y.STYLE:e._switchToTextParsing(t,Dd.RAWTEXT);break;case Y.SCRIPT:e._switchToTextParsing(t,Dd.SCRIPT_DATA);break;case Y.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Q.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(Q.IN_TEMPLATE);break;case Y.HEAD:e._err(t,W.misplacedStartTagForHeadElement);break;default:np(e,t)}}function ep(e,t){switch(t.tagID){case Y.HEAD:e.openElements.pop(),e.insertionMode=Q.AFTER_HEAD;break;case Y.BODY:case Y.BR:case Y.HTML:np(e,t);break;case Y.TEMPLATE:tp(e,t);break;default:e._err(t,W.endTagWithoutMatchingOpenElement)}}function tp(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==Y.TEMPLATE&&e._err(t,W.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(Y.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,W.endTagWithoutMatchingOpenElement)}function np(e,t){e.openElements.pop(),e.insertionMode=Q.AFTER_HEAD,e._processToken(t)}function rp(e,t){switch(t.tagID){case Y.HTML:Wp(e,t);break;case Y.BASEFONT:case Y.BGSOUND:case Y.HEAD:case Y.LINK:case Y.META:case Y.NOFRAMES:case Y.STYLE:$f(e,t);break;case Y.NOSCRIPT:e._err(t,W.nestedNoscriptInHead);break;default:ap(e,t)}}function ip(e,t){switch(t.tagID){case Y.NOSCRIPT:e.openElements.pop(),e.insertionMode=Q.IN_HEAD;break;case Y.BR:ap(e,t);break;default:e._err(t,W.endTagWithoutMatchingOpenElement)}}function ap(e,t){let n=t.type===G.EOF?W.openElementsLeftAfterEof:W.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=Q.IN_HEAD,e._processToken(t)}function op(e,t){switch(t.tagID){case Y.HTML:Wp(e,t);break;case Y.BODY:e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=Q.IN_BODY;break;case Y.FRAMESET:e._insertElement(t,K.HTML),e.insertionMode=Q.IN_FRAMESET;break;case Y.BASE:case Y.BASEFONT:case Y.BGSOUND:case Y.LINK:case Y.META:case Y.NOFRAMES:case Y.SCRIPT:case Y.STYLE:case Y.TEMPLATE:case Y.TITLE:e._err(t,W.abandonedHeadElementChild),e.openElements.push(e.headElement,Y.HEAD),$f(e,t),e.openElements.remove(e.headElement);break;case Y.HEAD:e._err(t,W.misplacedStartTagForHeadElement);break;default:cp(e,t)}}function sp(e,t){switch(t.tagID){case Y.BODY:case Y.HTML:case Y.BR:cp(e,t);break;case Y.TEMPLATE:tp(e,t);break;default:e._err(t,W.endTagWithoutMatchingOpenElement)}}function cp(e,t){e._insertFakeElement(J.BODY,Y.BODY),e.insertionMode=Q.IN_BODY,lp(e,t)}function lp(e,t){switch(t.type){case G.CHARACTER:dp(e,t);break;case G.WHITESPACE_CHARACTER:up(e,t);break;case G.COMMENT:Vf(e,t);break;case G.START_TAG:Wp(e,t);break;case G.END_TAG:nm(e,t);break;case G.EOF:rm(e,t)}}function up(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function dp(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function fp(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function pp(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function mp(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,K.HTML),e.insertionMode=Q.IN_FRAMESET)}function hp(e,t){e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._insertElement(t,K.HTML)}function gp(e,t){e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Ed.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,K.HTML)}function _p(e,t){e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function vp(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._insertElement(t,K.HTML),n||(e.formElement=e.openElements.current))}function yp(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===Y.LI&&r===Y.LI||(n===Y.DD||n===Y.DT)&&(r===Y.DD||r===Y.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==Y.ADDRESS&&r!==Y.DIV&&r!==Y.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._insertElement(t,K.HTML)}function bp(e,t){e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.tokenizer.state=Dd.PLAINTEXT}function xp(e,t){e.openElements.hasInScope(Y.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Y.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.framesetOk=!1}function Sp(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(J.A);n&&($(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 Cp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function wp(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(Y.NOBR)&&($(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Tp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Ep(e,t){e.treeAdapter.getDocumentMode(e.document)!==q.QUIRKS&&e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=Q.IN_TABLE}function Dp(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Op(e){let t=sd(e,Sd.TYPE);return t!=null&&t.toLowerCase()===Of}function kp(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),Op(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Ap(e,t){e._appendElement(t,K.HTML),t.ackSelfClosing=!0}function jp(e,t){e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Mp(e,t){t.tagName=J.IMG,t.tagID=Y.IMG,Dp(e,t)}function Np(e,t){e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Dd.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Q.TEXT}function Pp(e,t){e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Dd.RAWTEXT)}function Fp(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Dd.RAWTEXT)}function Ip(e,t){e._switchToTextParsing(t,Dd.RAWTEXT)}function Lp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===Q.IN_TABLE||e.insertionMode===Q.IN_CAPTION||e.insertionMode===Q.IN_TABLE_BODY||e.insertionMode===Q.IN_ROW||e.insertionMode===Q.IN_CELL?Q.IN_SELECT_IN_TABLE:Q.IN_SELECT}function Rp(e,t){e.openElements.currentTagId===Y.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function zp(e,t){e.openElements.hasInScope(Y.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,K.HTML)}function Bp(e,t){e.openElements.hasInScope(Y.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(Y.RTC),e._insertElement(t,K.HTML)}function Vp(e,t){e._reconstructActiveFormattingElements(),xf(t),Cf(t),t.selfClosing?e._appendElement(t,K.MATHML):e._insertElement(t,K.MATHML),t.ackSelfClosing=!0}function Hp(e,t){e._reconstructActiveFormattingElements(),Sf(t),Cf(t),t.selfClosing?e._appendElement(t,K.SVG):e._insertElement(t,K.SVG),t.ackSelfClosing=!0}function Up(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function Wp(e,t){switch(t.tagID){case Y.I:case Y.S:case Y.B:case Y.U:case Y.EM:case Y.TT:case Y.BIG:case Y.CODE:case Y.FONT:case Y.SMALL:case Y.STRIKE:case Y.STRONG:Cp(e,t);break;case Y.A:Sp(e,t);break;case Y.H1:case Y.H2:case Y.H3:case Y.H4:case Y.H5:case Y.H6:gp(e,t);break;case Y.P:case Y.DL:case Y.OL:case Y.UL:case Y.DIV:case Y.DIR:case Y.NAV:case Y.MAIN:case Y.MENU:case Y.ASIDE:case Y.CENTER:case Y.FIGURE:case Y.FOOTER:case Y.HEADER:case Y.HGROUP:case Y.DIALOG:case Y.DETAILS:case Y.ADDRESS:case Y.ARTICLE:case Y.SEARCH:case Y.SECTION:case Y.SUMMARY:case Y.FIELDSET:case Y.BLOCKQUOTE:case Y.FIGCAPTION:hp(e,t);break;case Y.LI:case Y.DD:case Y.DT:yp(e,t);break;case Y.BR:case Y.IMG:case Y.WBR:case Y.AREA:case Y.EMBED:case Y.KEYGEN:Dp(e,t);break;case Y.HR:jp(e,t);break;case Y.RB:case Y.RTC:zp(e,t);break;case Y.RT:case Y.RP:Bp(e,t);break;case Y.PRE:case Y.LISTING:_p(e,t);break;case Y.XMP:Pp(e,t);break;case Y.SVG:Hp(e,t);break;case Y.HTML:fp(e,t);break;case Y.BASE:case Y.LINK:case Y.META:case Y.STYLE:case Y.TITLE:case Y.SCRIPT:case Y.BGSOUND:case Y.BASEFONT:case Y.TEMPLATE:$f(e,t);break;case Y.BODY:pp(e,t);break;case Y.FORM:vp(e,t);break;case Y.NOBR:wp(e,t);break;case Y.MATH:Vp(e,t);break;case Y.TABLE:Ep(e,t);break;case Y.INPUT:kp(e,t);break;case Y.PARAM:case Y.TRACK:case Y.SOURCE:Ap(e,t);break;case Y.IMAGE:Mp(e,t);break;case Y.BUTTON:xp(e,t);break;case Y.APPLET:case Y.OBJECT:case Y.MARQUEE:Tp(e,t);break;case Y.IFRAME:Fp(e,t);break;case Y.SELECT:Lp(e,t);break;case Y.OPTION:case Y.OPTGROUP:Rp(e,t);break;case Y.NOEMBED:case Y.NOFRAMES:Ip(e,t);break;case Y.FRAMESET:mp(e,t);break;case Y.TEXTAREA:Np(e,t);break;case Y.NOSCRIPT:e.options.scriptingEnabled?Ip(e,t):Up(e,t);break;case Y.PLAINTEXT:bp(e,t);break;case Y.COL:case Y.TH:case Y.TD:case Y.TR:case Y.HEAD:case Y.FRAME:case Y.TBODY:case Y.TFOOT:case Y.THEAD:case Y.CAPTION:case Y.COLGROUP:break;default:Up(e,t)}}function Gp(e,t){if(e.openElements.hasInScope(Y.BODY)&&(e.insertionMode=Q.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Kp(e,t){e.openElements.hasInScope(Y.BODY)&&(e.insertionMode=Q.AFTER_BODY,Vm(e,t))}function qp(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Jp(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(Y.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(Y.FORM):n&&e.openElements.remove(n))}function Yp(e){e.openElements.hasInButtonScope(Y.P)||e._insertFakeElement(J.P,Y.P),e._closePElement()}function Xp(e){e.openElements.hasInListItemScope(Y.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(Y.LI),e.openElements.popUntilTagNamePopped(Y.LI))}function Zp(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Qp(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function $p(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function em(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(J.BR,Y.BR),e.openElements.pop(),e.framesetOk=!1}function tm(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==Y.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function nm(e,t){switch(t.tagID){case Y.A:case Y.B:case Y.I:case Y.S:case Y.U:case Y.EM:case Y.TT:case Y.BIG:case Y.CODE:case Y.FONT:case Y.NOBR:case Y.SMALL:case Y.STRIKE:case Y.STRONG:$(e,t);break;case Y.P:Yp(e);break;case Y.DL:case Y.UL:case Y.OL:case Y.DIR:case Y.DIV:case Y.NAV:case Y.PRE:case Y.MAIN:case Y.MENU:case Y.ASIDE:case Y.BUTTON:case Y.CENTER:case Y.FIGURE:case Y.FOOTER:case Y.HEADER:case Y.HGROUP:case Y.DIALOG:case Y.ADDRESS:case Y.ARTICLE:case Y.DETAILS:case Y.SEARCH:case Y.SECTION:case Y.SUMMARY:case Y.LISTING:case Y.FIELDSET:case Y.BLOCKQUOTE:case Y.FIGCAPTION:qp(e,t);break;case Y.LI:Xp(e);break;case Y.DD:case Y.DT:Zp(e,t);break;case Y.H1:case Y.H2:case Y.H3:case Y.H4:case Y.H5:case Y.H6:Qp(e);break;case Y.BR:em(e);break;case Y.BODY:Gp(e,t);break;case Y.HTML:Kp(e,t);break;case Y.FORM:Jp(e);break;case Y.APPLET:case Y.OBJECT:case Y.MARQUEE:$p(e,t);break;case Y.TEMPLATE:tp(e,t);break;default:tm(e,t)}}function rm(e,t){e.tmplInsertionModeStack.length>0?zm(e,t):Wf(e,t)}function im(e,t){var n;t.tagID===Y.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function am(e,t){e._err(t,W.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function om(e,t){if(e.openElements.currentTagId!==void 0&&Mf.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Q.IN_TABLE_TEXT,t.type){case G.CHARACTER:ym(e,t);break;case G.WHITESPACE_CHARACTER:vm(e,t)}else _m(e,t)}function sm(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,K.HTML),e.insertionMode=Q.IN_CAPTION}function cm(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=Q.IN_COLUMN_GROUP}function lm(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(J.COLGROUP,Y.COLGROUP),e.insertionMode=Q.IN_COLUMN_GROUP,wm(e,t)}function um(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=Q.IN_TABLE_BODY}function dm(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(J.TBODY,Y.TBODY),e.insertionMode=Q.IN_TABLE_BODY,Dm(e,t)}function fm(e,t){e.openElements.hasInTableScope(Y.TABLE)&&(e.openElements.popUntilTagNamePopped(Y.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function pm(e,t){Op(t)?e._appendElement(t,K.HTML):_m(e,t),t.ackSelfClosing=!0}function mm(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,K.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function hm(e,t){switch(t.tagID){case Y.TD:case Y.TH:case Y.TR:dm(e,t);break;case Y.STYLE:case Y.SCRIPT:case Y.TEMPLATE:$f(e,t);break;case Y.COL:lm(e,t);break;case Y.FORM:mm(e,t);break;case Y.TABLE:fm(e,t);break;case Y.TBODY:case Y.TFOOT:case Y.THEAD:um(e,t);break;case Y.INPUT:pm(e,t);break;case Y.CAPTION:sm(e,t);break;case Y.COLGROUP:cm(e,t);break;default:_m(e,t)}}function gm(e,t){switch(t.tagID){case Y.TABLE:e.openElements.hasInTableScope(Y.TABLE)&&(e.openElements.popUntilTagNamePopped(Y.TABLE),e._resetInsertionMode());break;case Y.TEMPLATE:tp(e,t);break;case Y.BODY:case Y.CAPTION:case Y.COL:case Y.COLGROUP:case Y.HTML:case Y.TBODY:case Y.TD:case Y.TFOOT:case Y.TH:case Y.THEAD:case Y.TR:break;default:_m(e,t)}}function _m(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,lp(e,t),e.fosterParentingEnabled=n}function vm(e,t){e.pendingCharacterTokens.push(t)}function ym(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function bm(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)_m(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var xm=new Set([Y.CAPTION,Y.COL,Y.COLGROUP,Y.TBODY,Y.TD,Y.TFOOT,Y.TH,Y.THEAD,Y.TR]);function Sm(e,t){let n=t.tagID;xm.has(n)?e.openElements.hasInTableScope(Y.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Y.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Q.IN_TABLE,hm(e,t)):Wp(e,t)}function Cm(e,t){let n=t.tagID;switch(n){case Y.CAPTION:case Y.TABLE:e.openElements.hasInTableScope(Y.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Y.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Q.IN_TABLE,n===Y.TABLE&&gm(e,t));break;case Y.BODY:case Y.COL:case Y.COLGROUP:case Y.HTML:case Y.TBODY:case Y.TD:case Y.TFOOT:case Y.TH:case Y.THEAD:case Y.TR:break;default:nm(e,t)}}function wm(e,t){switch(t.tagID){case Y.HTML:Wp(e,t);break;case Y.COL:e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case Y.TEMPLATE:$f(e,t);break;default:Em(e,t)}}function Tm(e,t){switch(t.tagID){case Y.COLGROUP:e.openElements.currentTagId===Y.COLGROUP&&(e.openElements.pop(),e.insertionMode=Q.IN_TABLE);break;case Y.TEMPLATE:tp(e,t);break;case Y.COL:break;default:Em(e,t)}}function Em(e,t){e.openElements.currentTagId===Y.COLGROUP&&(e.openElements.pop(),e.insertionMode=Q.IN_TABLE,e._processToken(t))}function Dm(e,t){switch(t.tagID){case Y.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,K.HTML),e.insertionMode=Q.IN_ROW;break;case Y.TH:case Y.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(J.TR,Y.TR),e.insertionMode=Q.IN_ROW,km(e,t);break;case Y.CAPTION:case Y.COL:case Y.COLGROUP:case Y.TBODY:case Y.TFOOT:case Y.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Q.IN_TABLE,hm(e,t));break;default:hm(e,t)}}function Om(e,t){let n=t.tagID;switch(t.tagID){case Y.TBODY:case Y.TFOOT:case Y.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Q.IN_TABLE);break;case Y.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Q.IN_TABLE,gm(e,t));break;case Y.BODY:case Y.CAPTION:case Y.COL:case Y.COLGROUP:case Y.HTML:case Y.TD:case Y.TH:case Y.TR:break;default:gm(e,t)}}function km(e,t){switch(t.tagID){case Y.TH:case Y.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,K.HTML),e.insertionMode=Q.IN_CELL,e.activeFormattingElements.insertMarker();break;case Y.CAPTION:case Y.COL:case Y.COLGROUP:case Y.TBODY:case Y.TFOOT:case Y.THEAD:case Y.TR:e.openElements.hasInTableScope(Y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Q.IN_TABLE_BODY,Dm(e,t));break;default:hm(e,t)}}function Am(e,t){switch(t.tagID){case Y.TR:e.openElements.hasInTableScope(Y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Q.IN_TABLE_BODY);break;case Y.TABLE:e.openElements.hasInTableScope(Y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Q.IN_TABLE_BODY,Om(e,t));break;case Y.TBODY:case Y.TFOOT:case Y.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(Y.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Q.IN_TABLE_BODY,Om(e,t));break;case Y.BODY:case Y.CAPTION:case Y.COL:case Y.COLGROUP:case Y.HTML:case Y.TD:case Y.TH:break;default:gm(e,t)}}function jm(e,t){let n=t.tagID;xm.has(n)?(e.openElements.hasInTableScope(Y.TD)||e.openElements.hasInTableScope(Y.TH))&&(e._closeTableCell(),km(e,t)):Wp(e,t)}function Mm(e,t){let n=t.tagID;switch(n){case Y.TD:case Y.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Q.IN_ROW);break;case Y.TABLE:case Y.TBODY:case Y.TFOOT:case Y.THEAD:case Y.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Am(e,t));break;case Y.BODY:case Y.CAPTION:case Y.COL:case Y.COLGROUP:case Y.HTML:break;default:nm(e,t)}}function Nm(e,t){switch(t.tagID){case Y.HTML:Wp(e,t);break;case Y.OPTION:e.openElements.currentTagId===Y.OPTION&&e.openElements.pop(),e._insertElement(t,K.HTML);break;case Y.OPTGROUP:e.openElements.currentTagId===Y.OPTION&&e.openElements.pop(),e.openElements.currentTagId===Y.OPTGROUP&&e.openElements.pop(),e._insertElement(t,K.HTML);break;case Y.HR:e.openElements.currentTagId===Y.OPTION&&e.openElements.pop(),e.openElements.currentTagId===Y.OPTGROUP&&e.openElements.pop(),e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case Y.INPUT:case Y.KEYGEN:case Y.TEXTAREA:case Y.SELECT:e.openElements.hasInSelectScope(Y.SELECT)&&(e.openElements.popUntilTagNamePopped(Y.SELECT),e._resetInsertionMode(),t.tagID!==Y.SELECT&&e._processStartTag(t));break;case Y.SCRIPT:case Y.TEMPLATE:$f(e,t)}}function Pm(e,t){switch(t.tagID){case Y.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===Y.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===Y.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===Y.OPTGROUP&&e.openElements.pop();break;case Y.OPTION:e.openElements.currentTagId===Y.OPTION&&e.openElements.pop();break;case Y.SELECT:e.openElements.hasInSelectScope(Y.SELECT)&&(e.openElements.popUntilTagNamePopped(Y.SELECT),e._resetInsertionMode());break;case Y.TEMPLATE:tp(e,t)}}function Fm(e,t){let n=t.tagID;n===Y.CAPTION||n===Y.TABLE||n===Y.TBODY||n===Y.TFOOT||n===Y.THEAD||n===Y.TR||n===Y.TD||n===Y.TH?(e.openElements.popUntilTagNamePopped(Y.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Nm(e,t)}function Im(e,t){let n=t.tagID;n===Y.CAPTION||n===Y.TABLE||n===Y.TBODY||n===Y.TFOOT||n===Y.THEAD||n===Y.TR||n===Y.TD||n===Y.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(Y.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Pm(e,t)}function Lm(e,t){switch(t.tagID){case Y.BASE:case Y.BASEFONT:case Y.BGSOUND:case Y.LINK:case Y.META:case Y.NOFRAMES:case Y.SCRIPT:case Y.STYLE:case Y.TEMPLATE:case Y.TITLE:$f(e,t);break;case Y.CAPTION:case Y.COLGROUP:case Y.TBODY:case Y.TFOOT:case Y.THEAD:e.tmplInsertionModeStack[0]=Q.IN_TABLE,e.insertionMode=Q.IN_TABLE,hm(e,t);break;case Y.COL:e.tmplInsertionModeStack[0]=Q.IN_COLUMN_GROUP,e.insertionMode=Q.IN_COLUMN_GROUP,wm(e,t);break;case Y.TR:e.tmplInsertionModeStack[0]=Q.IN_TABLE_BODY,e.insertionMode=Q.IN_TABLE_BODY,Dm(e,t);break;case Y.TD:case Y.TH:e.tmplInsertionModeStack[0]=Q.IN_ROW,e.insertionMode=Q.IN_ROW,km(e,t);break;default:e.tmplInsertionModeStack[0]=Q.IN_BODY,e.insertionMode=Q.IN_BODY,Wp(e,t)}}function Rm(e,t){t.tagID===Y.TEMPLATE&&tp(e,t)}function zm(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(Y.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Wf(e,t)}function Bm(e,t){t.tagID===Y.HTML?Wp(e,t):Hm(e,t)}function Vm(e,t){if(t.tagID===Y.HTML){if(e.fragmentContext||(e.insertionMode=Q.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===Y.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else Hm(e,t)}function Hm(e,t){e.insertionMode=Q.IN_BODY,lp(e,t)}function Um(e,t){switch(t.tagID){case Y.HTML:Wp(e,t);break;case Y.FRAMESET:e._insertElement(t,K.HTML);break;case Y.FRAME:e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case Y.NOFRAMES:$f(e,t)}}function Wm(e,t){t.tagID===Y.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==Y.FRAMESET&&(e.insertionMode=Q.AFTER_FRAMESET))}function Gm(e,t){switch(t.tagID){case Y.HTML:Wp(e,t);break;case Y.NOFRAMES:$f(e,t)}}function Km(e,t){t.tagID===Y.HTML&&(e.insertionMode=Q.AFTER_AFTER_FRAMESET)}function qm(e,t){t.tagID===Y.HTML?Wp(e,t):Jm(e,t)}function Jm(e,t){e.insertionMode=Q.IN_BODY,lp(e,t)}function Ym(e,t){switch(t.tagID){case Y.HTML:Wp(e,t);break;case Y.NOFRAMES:$f(e,t)}}function Xm(e,t){t.chars=`�`,e._insertCharacters(t)}function Zm(e,t){e._insertCharacters(t),e.framesetOk=!1}function Qm(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 $m(e,t){if(bf(t))Qm(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===K.MATHML?xf(t):r===K.SVG&&(wf(t),Sf(t)),Cf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function eh(e,t){if(t.tagID===Y.P||t.tagID===Y.BR){Qm(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===K.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}J.AREA,J.BASE,J.BASEFONT,J.BGSOUND,J.BR,J.COL,J.EMBED,J.FRAME,J.HR,J.IMG,J.INPUT,J.KEYGEN,J.LINK,J.META,J.PARAM,J.SOURCE,J.TRACK,J.WBR;var th=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,nh=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),rh={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function ih(e,t){let n=vh(e),r=oc(`type`,{handlers:{root:oh,element:sh,text:ch,comment:dh,doctype:lh,raw:fh},unknown:ph}),i={parser:n?new Pf(rh):Pf.getFragmentParser(void 0,rh),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),mh(i,xt());let a=ju(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&lo(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function ah(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function oh(e,t){ah(e.children,t)}function sh(e,t){gh(e,t),ah(e.children,t),_h(e,t)}function ch(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:G.CHARACTER,chars:e.value,location:yh(e)};mh(t,xt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function lh(e,t){let n={type:G.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:yh(e)};mh(t,xt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function uh(e,t){t.stitches=!0;let n=bh(e);`children`in e&&`children`in n&&(n.children=ih({type:`root`,children:e.children},t.options).children),dh({type:`comment`,value:{stitch:n}},t)}function dh(e,t){let n=e.value,r={type:G.COMMENT,data:n,location:yh(e)};mh(t,xt(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function fh(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,hh(t,xt(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(th,`<$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;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function ph(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))uh(n,t);else{let e=``;throw nh.has(n.type)&&(e=". 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"),Error("Cannot compile `"+n.type+"` node"+e)}}function mh(e,t){hh(e,t);let 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=Dd.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 hh(e,t){if(t&&t.offset!==void 0){let 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 gh(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Dd.PLAINTEXT)return;mh(t,xt(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:Ou.html;i===Ou.html&&n===`svg`&&(i=Ou.svg);let a=Hu({...e,children:[]},{space:i===Ou.svg?`svg`:`html`}),o={type:G.START_TAG,tagName:n,tagID:wd(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:yh(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function _h(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Qu.includes(n)||t.parser.tokenizer.state===Dd.PLAINTEXT)return;mh(t,bt(e));let r={type:G.END_TAG,tagName:n,tagID:wd(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:yh(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Dd.RCDATA||t.parser.tokenizer.state===Dd.RAWTEXT||t.parser.tokenizer.state===Dd.SCRIPT_DATA)&&(t.parser.tokenizer.state=Dd.DATA)}function vh(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function yh(e){let t=xt(e)||{line:void 0,column:void 0,offset:void 0},n=bt(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 bh(e){return`children`in e?Ja({...e,children:[]}):Ja(e)}function xh(e){return function(t,n){return ih(t,{...e,file:n})}}var Sh=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],Ch={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...Sh,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...Sh],h2:[[`className`,`sr-only`]],img:[...Sh,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...Sh,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...Sh],table:[...Sh],ul:[...Sh,[`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`.split(`.`)},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`.split(`.`)},wh={}.hasOwnProperty;function Th(e,t){let n={type:`root`,children:[]},r=Eh({schema:t?{...Ch,...t}:Ch,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function Eh(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return Dh(e,n);case`doctype`:return Oh(e,n);case`element`:return kh(e,n);case`root`:return Ah(e,n);case`text`:return jh(e,n)}}}function Dh(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return Rh(r,t),r}}function Oh(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return Rh(e,t),e}}function kh(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=Mh(e,t.children),i=Nh(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&wh.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return Rh(o,t),o}function Ah(e,t){let n={type:`root`,children:Mh(e,t.children)};return Rh(n,t),n}function jh(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return Rh(n,t),n}function Mh(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=Eh(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function Nh(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&wh.call(r,n)?r[n]:void 0,o=r&&wh.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(wh.call(s,l)){let t=s[l],n=Ph(e,zh(a,l),l,t);n??=Ph(e,zh(o,l),l,t),n!=null&&(c[l]=n)}if(i&&wh.call(i,n)){let e=i[n];for(l in e)wh.call(e,l)&&!wh.call(c,l)&&(c[l]=e[l])}return c}function Ph(e,t,n,r){return t?Array.isArray(r)?Fh(e,t,n,r):Ih(e,t,n,r):void 0}function Fh(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=Ih(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function Ih(e,t,n,r){if((typeof r==`boolean`||typeof r==`number`||typeof r==`string`)&&Lh(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function Lh(e,t,n){let r=e.schema.protocols&&wh.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function Rh(e,t){let n=Ct(t);t.data&&(e.data=Ja(t.data)),n&&(e.position=n)}function zh(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function Bh(e){return function(t){return Th(t,e)}}function Vh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Hh(e){if(Array.isArray(e))return e}function Uh(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Wh(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
43
43
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gh(e,t){return Hh(e)||Uh(e,t)||Kh(e,t)||Wh()}function Kh(e,t){if(e){if(typeof e==`string`)return Vh(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vh(e,t):void 0}}var qh=Object.entries,Jh=Object.setPrototypeOf,Yh=Object.isFrozen,Xh=Object.getPrototypeOf,Zh=Object.getOwnPropertyDescriptor,Qh=Object.freeze,$h=Object.seal,eg=Object.create,tg=typeof Reflect<`u`&&Reflect,ng=tg.apply,rg=tg.construct;Qh||=function(e){return e},$h||=function(e){return e},ng||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},rg||=function(e){return new e(...[...arguments].slice(1))};var ig=wg(Array.prototype.forEach),ag=wg(Array.prototype.lastIndexOf),og=wg(Array.prototype.pop),sg=wg(Array.prototype.push),cg=wg(Array.prototype.splice),lg=Array.isArray,ug=wg(String.prototype.toLowerCase),dg=wg(String.prototype.toString),fg=wg(String.prototype.match),pg=wg(String.prototype.replace),mg=wg(String.prototype.indexOf),hg=wg(String.prototype.trim),gg=wg(Number.prototype.toString),_g=wg(Boolean.prototype.toString),vg=typeof BigInt>`u`?null:wg(BigInt.prototype.toString),yg=typeof Symbol>`u`?null:wg(Symbol.prototype.toString),bg=wg(Object.prototype.hasOwnProperty),xg=wg(Object.prototype.toString),Sg=wg(RegExp.prototype.test),Cg=Tg(TypeError);function wg(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return ng(e,t,n)}}function Tg(e){return function(){return rg(e,[...arguments])}}function Eg(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ug;if(Jh&&Jh(e,null),!lg(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(Yh(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Dg(e){for(let t=0;t<e.length;t++)bg(e,t)||(e[t]=null);return e}function Og(e){let t=eg(null);for(let r of qh(e)){var n=Gh(r,2);let i=n[0],a=n[1];bg(e,i)&&(t[i]=lg(a)?Dg(a):a&&typeof a==`object`&&a.constructor===Object?Og(a):a)}return t}function kg(e){switch(typeof e){case`string`:return e;case`number`:return gg(e);case`boolean`:return _g(e);case`bigint`:return vg?vg(e):`0`;case`symbol`:return yg?yg(e):`Symbol()`;case`undefined`:return xg(e);case`function`:case`object`:{if(e===null)return xg(e);let t=e,n=Ag(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:xg(e)}return xg(e)}default:return xg(e)}}function Ag(e,t){for(;e!==null;){let n=Zh(e,t);if(n){if(n.get)return wg(n.get);if(typeof n.value==`function`)return wg(n.value)}e=Xh(e)}function n(){return null}return n}function jg(e){try{return Sg(e,``),!0}catch{return!1}}var Mg=Qh(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Ng=Qh(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Pg=Qh([`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`]),Fg=Qh([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Ig=Qh(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Lg=Qh([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Rg=Qh([`#text`]),zg=Qh(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Bg=Qh(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Vg=Qh(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Hg=Qh([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Ug=$h(/{{[\w\W]*|^[\w\W]*}}/g),Wg=$h(/<%[\w\W]*|^[\w\W]*%>/g),Gg=$h(/\${[\w\W]*/g),Kg=$h(/^data-[\-\w.\u00B7-\uFFFF]+$/),qg=$h(/^aria-[\-\w]+$/),Jg=$h(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Yg=$h(/^(?:\w+script|data):/i),Xg=$h(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Zg=$h(/^html$/i),Qg=$h(/^[a-z][.\w]*(-[.\w]+)+$/i),$g=$h(/<[/\w!]/g),e_=$h(/<[/\w]/g),t_=$h(/<\/no(script|embed|frames)/i),n_=$h(/\/>/i),r_={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},i_=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],a_=Qh(Eg({},i_)),o_=function(){let e={};return ig(i_,t=>{e[t]=$h(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),Qh(e)}(),s_=function(){return typeof window>`u`?null:window},c_=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},l_=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},u_=function(e,t,n,r){return bg(e,t)&&lg(e[t])?Eg(r.base?Og(r.base):{},e[t],r.transform):n},d_=function(e,t,n){let r=bg(e,t)?e[t]:void 0;return r&&typeof r==`object`?Og(r):n()};function f_(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s_(),t=e=>f_(e);if(t.version=`3.4.15`,t.removed=[],!e||!e.document||e.document.nodeType!==r_.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=Ag(d,`cloneNode`),p=Ag(d,`remove`),m=Ag(d,`removeAttributeNode`),h=Ag(d,`nextSibling`),g=Ag(d,`childNodes`),_=Ag(d,`parentNode`),v=Ag(d,`shadowRoot`),y=Ag(d,`attributes`),b=o&&o.prototype?Ag(o.prototype,`nodeType`):null,x=o&&o.prototype?Ag(o.prototype,`nodeName`):null,S=o&&o.prototype?Ag(o.prototype,`ownerDocument`):null,C=function(e){return b?b(e):e.nodeType},ee=function(e){return x?x(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let w,T=``,E,D=!1,te=0,ne=function(){if(te>0)throw Cg(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},re=function(e){ne(),te++;try{return w.createHTML(e)}finally{te--}},ie=function(e){ne(),te++;try{return w.createScriptURL(e)}finally{te--}},ae=function(){return D||=(E=c_(u,i),!0),E},oe=n,O=oe.implementation,se=oe.createNodeIterator,ce=oe.createDocumentFragment,le=oe.getElementsByTagName,ue=r.importNode,k=l_();t.isSupported=typeof qh==`function`&&typeof _==`function`&&O&&O.createHTMLDocument!==void 0;let de=Ug,fe=Wg,pe=Gg,me=Kg,he=qg,ge=Yg,_e=Xg,ve=Qg,ye=Jg,be=null,A=Eg({},[...Mg,...Ng,...Pg,...Ig,...Rg]),j=null,xe=Eg({},[...zg,...Bg,...Vg,...Hg]),Se=Object.seal(eg(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ce=null,we=null,Te=Object.seal(eg(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),M=!0,Ee=!0,De=!1,Oe=!0,ke=!1,Ae=!0,je=!1,Me=!1,Ne=null,Pe=null,Fe=!1,Ie=!1,Le=!1,Re=!1,ze=!0,Be=!1,Ve=`user-content-`,N=!0,He=!1,Ue={},P=null,F=Eg({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),We=null,Ge=Eg({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Ke=null,qe=Eg({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Je=`http://www.w3.org/1998/Math/MathML`,Ye=`http://www.w3.org/2000/svg`,Xe=`http://www.w3.org/1999/xhtml`,Ze=Xe,Qe=!1,$e=null,et=Eg({},[Je,Ye,Xe],dg),tt=Qh([`mi`,`mo`,`mn`,`ms`,`mtext`]),nt=Eg({},tt),rt=Qh([`annotation-xml`]),it=Eg({},rt),at=Eg({},[`title`,`style`,`font`,`a`,`script`]),ot=null,st=[`application/xhtml+xml`,`text/html`],ct=null,lt=null,ut=n.createElement(`form`),dt=function(e){return e instanceof RegExp||e instanceof Function},ft=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(lt&<===e)return;(!e||typeof e!=`object`)&&(e={}),e=Og(e),ot=st.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,ct=ot===`application/xhtml+xml`?dg:ug,be=u_(e,`ALLOWED_TAGS`,A,{transform:ct}),j=u_(e,`ALLOWED_ATTR`,xe,{transform:ct}),$e=u_(e,`ALLOWED_NAMESPACES`,et,{transform:dg}),Ke=u_(e,`ADD_URI_SAFE_ATTR`,qe,{transform:ct,base:qe}),We=u_(e,`ADD_DATA_URI_TAGS`,Ge,{transform:ct,base:Ge}),P=u_(e,`FORBID_CONTENTS`,F,{transform:ct}),Ce=u_(e,`FORBID_TAGS`,Og({}),{transform:ct}),we=u_(e,`FORBID_ATTR`,Og({}),{transform:ct}),Ue=bg(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?Og(e.USE_PROFILES):e.USE_PROFILES:!1,M=e.ALLOW_ARIA_ATTR!==!1,Ee=e.ALLOW_DATA_ATTR!==!1,De=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Oe=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ke=e.SAFE_FOR_TEMPLATES||!1,Ae=e.SAFE_FOR_XML!==!1,je=e.WHOLE_DOCUMENT||!1,Ie=e.RETURN_DOM||!1,Le=e.RETURN_DOM_FRAGMENT||!1,Re=e.RETURN_TRUSTED_TYPE||!1,Fe=e.FORCE_BODY||!1,ze=e.SANITIZE_DOM!==!1,Be=e.SANITIZE_NAMED_PROPS||!1,N=e.KEEP_CONTENT!==!1,He=e.IN_PLACE||!1,ye=jg(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Jg,Ze=typeof e.NAMESPACE==`string`?e.NAMESPACE:Xe,nt=d_(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>Eg({},tt)),it=d_(e,`HTML_INTEGRATION_POINTS`,()=>Eg({},rt));let t=d_(e,`CUSTOM_ELEMENT_HANDLING`,()=>eg(null));if(Se=eg(null),bg(t,`tagNameCheck`)&&dt(t.tagNameCheck)&&(Se.tagNameCheck=t.tagNameCheck),bg(t,`attributeNameCheck`)&&dt(t.attributeNameCheck)&&(Se.attributeNameCheck=t.attributeNameCheck),bg(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(Se.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),$h(Se),ke&&(Ee=!1),Le&&(Ie=!0),Ue&&(be=Eg({},Rg),j=eg(null),Ue.html===!0&&(Eg(be,Mg),Eg(j,zg)),Ue.svg===!0&&(Eg(be,Ng),Eg(j,Bg),Eg(j,Hg)),Ue.svgFilters===!0&&(Eg(be,Pg),Eg(j,Bg),Eg(j,Hg)),Ue.mathMl===!0&&(Eg(be,Ig),Eg(j,Vg),Eg(j,Hg))),Te.tagCheck=null,Te.attributeCheck=null,bg(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?Te.tagCheck=e.ADD_TAGS:lg(e.ADD_TAGS)&&(be===A&&(be=Og(be)),Eg(be,e.ADD_TAGS,ct))),bg(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?Te.attributeCheck=e.ADD_ATTR:lg(e.ADD_ATTR)&&(j===xe&&(j=Og(j)),Eg(j,e.ADD_ATTR,ct))),bg(e,`ADD_FORBID_CONTENTS`)&&lg(e.ADD_FORBID_CONTENTS)&&(P===F&&(P=Og(P)),Eg(P,e.ADD_FORBID_CONTENTS,ct)),N&&(be[`#text`]=!0),je&&Eg(be,[`html`,`head`,`body`]),be.table&&(Eg(be,[`tbody`]),delete Ce.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Cg(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Cg(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=w;w=e.TRUSTED_TYPES_POLICY;try{T=re(``)}catch(e){throw w=t,e}}else e.TRUSTED_TYPES_POLICY===null?(w=void 0,T=``):(w===void 0&&(w=ae()),w&&typeof T==`string`&&(T=re(``)));Qh&&Qh(e),lt=e},pt=Eg({},[...Ng,...Pg,...Fg]),mt=Eg({},[...Ig,...Lg]),ht=function(e,t,n){return t.namespaceURI===Xe?e===`svg`:t.namespaceURI===Je?e===`svg`&&(n===`annotation-xml`||nt[n]):!!pt[e]},gt=function(e,t,n){return t.namespaceURI===Xe?e===`math`:t.namespaceURI===Ye?e===`math`&&it[n]:!!mt[e]},_t=function(e,t,n){return t.namespaceURI===Ye&&!it[n]||t.namespaceURI===Je&&!nt[n]?!1:!mt[e]&&(at[e]||!pt[e])},vt=function(e){let t=_(e);(!t||!t.tagName)&&(t={namespaceURI:Ze,tagName:`template`});let n=ug(e.tagName),r=ug(t.tagName);return $e[e.namespaceURI]?e.namespaceURI===Ye?ht(n,t,r):e.namespaceURI===Je?gt(n,t,r):e.namespaceURI===Xe?_t(n,t,r):!!(ot===`application/xhtml+xml`&&$e[e.namespaceURI]):!1},yt=function(e){sg(t.removed,{element:e});try{_(e).removeChild(e)}catch{if(p(e),!_(e))throw Cg(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},bt=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},xt=function(e){wt(e);let t=g(e);if(t){let e=[];ig(t,t=>{sg(e,t)}),ig(e,e=>{try{p(e)}catch{}})}let n=y(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&bt(e,r,i)}},St=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}sg(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(Ie||Le)try{yt(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},Ct=function(e){let t=y(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||j[ct(i)]||bt(e,r,i)}},wt=function(e){let t=[e];for(;t.length>0;){let e=t.pop();C(e)===r_.element&&Ct(e);let n=g(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},Tt=function(e,t){return Ae?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},Et=function(e){if(!Ae)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=C(e);if(n===r_.processingInstruction||n===r_.comment&&Sg(e_,e.data)){try{p(e)}catch{}continue}if(n===r_.element){let t=e,n=ct(ee(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&Tt(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=g(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},Dt=function(e){let t=null,r=null;if(Fe)e=`<remove></remove>`+e;else{let t=fg(e,/^[\r\n\t ]+/);r=t&&t[0]}ot===`application/xhtml+xml`&&Ze===Xe&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=w?re(e):e;if(Ze===Xe)try{t=new l().parseFromString(i,ot)}catch{}if(!t||!t.documentElement){t=O.createDocument(Ze,`template`,null);try{t.documentElement.innerHTML=Qe?T:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ze===Xe?le.call(t,je?`html`:`body`)[0]:je?t.documentElement:a},Ot=function(e){let t=S?S(e):e.ownerDocument;return se.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},kt=function(e){return e=pg(e,de,` `),e=pg(e,fe,` `),e=pg(e,pe,` `),e},At=function(e){e.normalize();let t=S?S(e):e.ownerDocument,n=se.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=kt(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&ig(i,e=>{Mt(e.content)&&At(e.content)})},jt=function(e){let t=x?x(e):null;return typeof t!=`string`||ct(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==y(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==b(e)||e.childNodes!==g(e)},Mt=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return b(e)===r_.documentFragment}catch{return!1}},Nt=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return typeof b(e)==`number`}catch{return!1}};function Pt(e,n,r){e.length!==0&&ig(e,e=>{e.call(t,n,r,lt)})}let Ft=function(e,t){return!!(Ae&&e.hasChildNodes()&&!Nt(e.firstElementChild)&&Sg($g,e.textContent)&&Sg($g,e.innerHTML)||Ae&&e.namespaceURI===Xe&&a_[t]&&(Nt(e.firstElementChild)||typeof e.textContent==`string`&&Sg(o_[t],e.textContent))||e.nodeType===r_.processingInstruction||Ae&&e.nodeType===r_.comment&&Sg(e_,e.data))},It=function(e,t){return e instanceof RegExp?Sg(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},Lt=function(e,t,n){if(!Ce[t]&&Ut(t)&&It(Se.tagNameCheck,t))return!1;if(N&&!P[t]){let t=_(e),r=g(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,h(e))}}}return yt(e),!0},Rt=function(e,t,n,r){return e.length===0?t:t===n||t===r?Og(t):t},zt=function(e,t){return e===t||_(e)!==null?!1:(He&&wt(e),!0)},Bt=function(e,n){if(Pt(k.beforeSanitizeElements,e,null),zt(e,n))return!0;if(jt(e))return yt(e),!0;let r=ct(ee(e));if(be=Rt(k.uponSanitizeElement,be,A,Ne),Pt(k.uponSanitizeElement,e,{tagName:r,allowedTags:be}),zt(e,n))return!0;if(Ft(e,r))return yt(e),!0;if(Ce[r]||!(Te.tagCheck instanceof Function&&Te.tagCheck(r))&&!be[r]){let t=Lt(e,r,n);return t===!1&&Pt(k.afterSanitizeElements,e,null),t}if(C(e)===r_.element&&!vt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&Sg(t_,e.innerHTML))return yt(e),!0;if(ke&&e.nodeType===r_.text){let n=kt(e.textContent);e.textContent!==n&&(sg(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Pt(k.afterSanitizeElements,e,null),!1},Vt=function(e,t,r){if(we[t]||Tt(t,e)||ze&&(t===`id`||t===`name`)&&(r in n||r in ut))return!1;let i=j[t]||Te.attributeCheck instanceof Function&&Te.attributeCheck(t,e);return Ee&&Sg(me,t)||M&&Sg(he,t)?!0:i?Ke[t]||Sg(ye,pg(r,_e,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&mg(r,`data:`)===0&&We[e]||De&&!Sg(ge,pg(r,_e,``))?!0:!r:Ut(e)&&It(Se.tagNameCheck,e)&&It(Se.attributeNameCheck,t,e)||t===`is`&&Se.allowCustomizedBuiltInElements&&It(Se.tagNameCheck,r)},Ht=Eg({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Ut=function(e){return!Ht[ug(e)]&&Sg(ve,e)},Wt=function(e,t,n,r){if(w&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return re(r);case`TrustedScriptURL`:return ie(r)}return r},Gt=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!jt(e)||(yt(e),!1)}catch{return St(t,e),!1}},Kt=function(e){Pt(k.beforeSanitizeAttributes,e,null);let n=e.attributes;if(!n||jt(e))return;j=Rt(k.uponSanitizeAttribute,j,xe,Pe);let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:j,forceKeepAttr:void 0},i=n.length,a=ct(e.nodeName);for(;i--;){let o=n[i],s=o.name,c=o.namespaceURI,l=o.value,u=ct(s),d=l,f=s===`value`?d:hg(d),p=!1;if(r.attrName=u,r.attrValue=f,r.keepAttr=!0,r.forceKeepAttr=void 0,Pt(k.uponSanitizeAttribute,e,r),f=r.attrValue,Be&&(u===`id`||u===`name`)&&mg(f,Ve)!==0&&(St(s,e,o),f=Ve+f,p=!0),Ae&&Sg(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){St(s,e,o);continue}if(u===`attributename`&&fg(f,`href`)){St(s,e,o);continue}if(!r.forceKeepAttr){if(!r.keepAttr){St(s,e,o);continue}if(!Oe&&Sg(n_,f)){St(s,e,o);continue}if(ke&&(f=kt(f)),!Vt(a,u,f)){St(s,e,o);continue}f=Wt(a,u,c,f),f!==d&&Gt(e,s,c,f)&&p&&og(t.removed)}}Pt(k.afterSanitizeAttributes,e,null)},qt=function(e){let t=null,n=Ot(e);for(Pt(k.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Pt(k.uponSanitizeShadowNode,t,null),Bt(t,e),Kt(t),Mt(t.content)&&qt(t.content),C(t)===r_.element){let e=v(t);Mt(e)&&(Jt(e),qt(e))}Pt(k.afterSanitizeShadowDOM,e,null)},Jt=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){qt(e.shadow);continue}let n=e.node,r=C(n)===r_.element,i=g(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=x?x(n):null;if(typeof e==`string`&&ct(e)===`template`){let e=n.content;Mt(e)&&t.push({node:e,shadow:null})}}if(r){let e=v(n);Mt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Qe=!e,Qe&&(e=`<!-->`),typeof e!=`string`&&!Nt(e)&&(e=kg(e),typeof e!=`string`))throw Cg(`dirty is not a string, aborting`);if(!t.isSupported)return e;Me?(be=Ne,j=Pe):ft(n),(k.uponSanitizeElement.length>0||k.uponSanitizeAttribute.length>0)&&(be=Og(be)),k.uponSanitizeAttribute.length>0&&(j=Og(j)),t.removed=[];let c=He&&typeof e!=`string`&&Nt(e);if(c){Et(e);let t=ee(e);if(typeof t==`string`){let n=ct(t);if(!be[n]||Ce[n])throw xt(e),Cg(`root node is forbidden and cannot be sanitized in-place`)}if(jt(e))throw xt(e),Cg(`root node is clobbered and cannot be sanitized in-place`);try{Jt(e)}catch(t){throw xt(e),t}}else if(Nt(e))i=Dt(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===r_.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Jt(i);else{if(!Ie&&!ke&&!je&&e.indexOf(`<`)===-1)return w&&Re?re(e):e;if(i=Dt(e),!i)return Ie?null:Re?T:``}i&&Fe&&yt(i.firstChild);let l=c?e:i;try{let e=Ot(l);for(;o=e.nextNode();)Bt(o,l),Kt(o),Mt(o.content)&&qt(o.content)}catch(n){throw c&&(xt(e),ig(t.removed,e=>{e.element&&wt(e.element)})),n}if(c)return ig(t.removed,e=>{e.element&&wt(e.element)}),ke&&At(e),e;if(Ie){if(ke&&At(i),Le)for(s=ce.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(j.shadowroot||j.shadowrootmode)&&(s=ue.call(r,s,!0)),s}let u=je?i.outerHTML:i.innerHTML;return je&&be[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Sg(Zg,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
44
|
-
`+u),ke&&(u=kt(u)),w&&Re?re(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ft(e),Me=!0,Ne=be,Pe=j},t.clearConfig=function(){lt=null,Me=!1,Ne=null,Pe=null,w=E,T=``},t.isValidAttribute=function(e,t,n){lt||ft({});let r=ct(e),i=ct(t);return Vt(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&bg(k,e)&&sg(k[e],t)},t.removeHook=function(e,t){if(bg(k,e)){if(t!==void 0){let n=ag(k[e],t);return n===-1?void 0:cg(k[e],n,1)[0]}return og(k[e])}},t.removeHooks=function(e){bg(k,e)&&(k[e]=[])},t.removeAllHooks=function(){k=l_()},t}var p_=f_(),m_=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),h_=function(e){return`/`+e},g_={},__=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=h_(t,n),t=s(t),t in g_)return;g_[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:m_,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},v_={...Ch,tagNames:(Ch.tagNames??[]).filter(e=>![`input`].includes(e))},y_=null;function b_(){return y_??=__(()=>import(`./mermaid.core-Bnyaa0nF.js`).then(e=>{let t=!window.matchMedia?.(`(prefers-color-scheme: light)`).matches;return e.default.initialize({startOnLoad:!1,securityLevel:`strict`,theme:t?`dark`:`neutral`,fontFamily:`var(--font-sans)`,htmlLabels:!1,flowchart:{htmlLabels:!1}}),e.default}),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])),y_}function x_({chart:e}){let t=(0,d.useRef)(null),n=`m${(0,d.useId)().replace(/[^a-zA-Z0-9]/g,``)}`,[r,i]=(0,d.useState)(null);return(0,d.useEffect)(()=>{let r=!1;return b_().then(t=>t.render(n,e)).then(({svg:e})=>{!r&&t.current&&(t.current.innerHTML=p_.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0}}),i(null))}).catch(e=>!r&&i(e.message)),()=>{r=!0}},[e,n]),r?(0,S.jsxs)(`div`,{className:`mermaid-error`,children:[(0,S.jsx)(`div`,{className:`mermaid-error__title`,children:`Diagram could not be rendered`}),(0,S.jsx)(`pre`,{children:(0,S.jsx)(`code`,{children:e})})]}):(0,S.jsx)(`div`,{className:`mermaid`,ref:t,"aria-label":`Diagram`})}function S_(e){return typeof e==`string`?e:Array.isArray(e)?e.map(S_).join(``):(0,d.isValidElement)(e)?S_(e.props.children):``}var C_={pre({children:e}){let t=Array.isArray(e)?e[0]:e;return(0,d.isValidElement)(t)&&String(t.props.className??``).includes(`language-mermaid`)?(0,S.jsx)(x_,{chart:S_(t).replace(/\n$/,``)}):(0,S.jsx)(`pre`,{children:e})},a({href:e,children:t}){let n=e&&/^https?:\/\//.test(e);return(0,S.jsx)(`a`,{href:e,...n?{target:`_blank`,rel:`noopener noreferrer`}:{},children:t})},table({children:e}){return(0,S.jsx)(`div`,{className:`table-wrap`,children:(0,S.jsx)(`table`,{children:e})})}};function w_({source:e}){return(0,S.jsx)(`div`,{className:`markdown`,children:(0,S.jsx)(ss,{remarkPlugins:[pu],rehypePlugins:[xh,[Bh,v_]],components:C_,children:e})})}var T_=(0,d.lazy)(()=>__(()=>import(`./Editor-DAXvniWB.js`).then(e=>({default:e.Editor})),[]));function E_({segment:e,showLabels:t}){return e.kind===`developer`?(0,S.jsxs)(`div`,{className:`segment segment--developer ${t?`segment--labeled`:``}`,children:[t&&(0,S.jsx)(`div`,{className:`segment__label`,children:`Developer content · never modified by Athena`}),(0,S.jsx)(w_,{source:e.content})]}):(0,S.jsxs)(`div`,{className:`segment segment--generated ${e.modified?`segment--modified`:``} ${t?`segment--labeled`:``}`,children:[t&&(0,S.jsxs)(`div`,{className:`segment__label`,children:[e.modified?`Generated section · edited by a developer — preserved, not refreshed`:`Generated section · refreshed by athena analyze`,(0,S.jsx)(`span`,{className:`mono segment__id`,children:e.id})]}),(0,S.jsx)(w_,{source:e.content})]})}function D_({id:e}){let{revision:t}=oe(),{data:n,error:r}=O(`/api/docs/${e}/history`,[t]),[i,a]=(0,d.useState)(null),[o,s]=(0,d.useState)(null),[c,l]=(0,d.useState)(null);(0,d.useEffect)(()=>{a(null),s(null)},[e]);let u=async t=>{a(t),s(null),l(null);try{s((await v(`/api/docs/${e}/history/${t}`)).content)}catch(e){l(e)}};return r?(0,S.jsx)(fe,{error:r}):n?!n.available||!n.entries.length?(0,S.jsx)(k,{title:`No history`,children:n.reason}):(0,S.jsxs)(`div`,{className:`history`,children:[(0,S.jsx)(`ol`,{className:`history__list`,children:n.entries.map((e,t)=>(0,S.jsx)(`li`,{children:(0,S.jsxs)(`button`,{className:`history__item ${i===e.sha?`history__item--active`:``}`,onClick:()=>u(e.sha),children:[(0,S.jsxs)(`span`,{className:`history__version`,children:[`v`,n.entries.length-t]}),(0,S.jsx)(`span`,{className:`history__subject`,children:e.subject||`(no message)`}),(0,S.jsxs)(`span`,{className:`history__meta mono`,children:[e.sha.slice(0,8),` · `,D(e.date)]})]})},e.sha))}),(0,S.jsxs)(`div`,{className:`history__view`,children:[!i&&(0,S.jsx)(k,{title:`Select a version`,children:`History comes from Git commits that touched this file.`}),c&&(0,S.jsx)(fe,{error:c}),i&&!o&&!c&&(0,S.jsx)(de,{}),o!==null&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`note`,children:[`Read-only view of `,(0,S.jsx)(`span`,{className:`mono`,children:i?.slice(0,12)})]}),(0,S.jsx)(w_,{source:o.replace(/<!-- athena:[^>]*-->/g,``)})]})]})]}):(0,S.jsx)(de,{})}function O_({id:e}){let{revision:t,toast:n,refreshDocs:r}=oe(),[i,a]=(0,d.useState)(null),[o,s]=(0,d.useState)(null),[c,l]=(0,d.useState)(`preview`),[u,f]=(0,d.useState)(``),[p,m]=(0,d.useState)(!1),[h,g]=(0,d.useState)(!1),[y,b]=(0,d.useState)(null),[x,C]=(0,d.useState)(!0),[ee,w]=(0,d.useState)(null),T=i!==null&&u!==i.content,E=(0,d.useRef)(T);E.current=T;let te=(0,d.useCallback)(async()=>{try{let t=await v(`/api/docs/${e}`);a(t),f(t.content),s(null),g(!1),b(null)}catch(e){s(e)}},[e]);(0,d.useEffect)(()=>{a(null),l(`preview`),te()},[te]),(0,d.useEffect)(()=>{t!==0&&i&&v(`/api/docs/${e}`).then(e=>{if(e.hash===i.hash){a(t=>t&&{...t,sync:e.sync,affectedBy:e.affectedBy,lastChangedAt:e.lastChangedAt});return}E.current?g(!0):(a(e),f(e.content))}).catch(()=>{})},[t]),(0,d.useEffect)(()=>{let e=e=>{E.current&&e.preventDefault()};return window.addEventListener(`beforeunload`,e),()=>window.removeEventListener(`beforeunload`,e)},[]);let ne=async()=>{if(i&&E.current&&!p){m(!0),b(null);try{let t=await v(`/api/docs/${e}`,{method:`PUT`,body:{content:u,baseHash:i.hash}});a(e=>({...e,...t})),f(t.content),g(!1),n(`Saved ${t.file}`,`success`),r()}catch(e){e instanceof _?(b(e),e.status===409&&g(!0)):n(`Save failed`,`error`)}finally{m(!1)}}};if(o)return(0,S.jsx)(`div`,{className:`page`,children:(0,S.jsx)(fe,{error:o})});if(!i)return(0,S.jsx)(`div`,{className:`page-loading`,children:(0,S.jsx)(de,{})});let re=ce[i.sync]??ce.synchronized,ie=e=>l(e);return(0,S.jsxs)(`div`,{className:`page page--doc`,children:[(0,S.jsxs)(`header`,{className:`page__header page__header--doc`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`div`,{className:`page__kicker mono`,children:[`.athena/`,i.file]}),(0,S.jsx)(`h1`,{className:`page__title`,children:i.title}),(0,S.jsx)(`p`,{className:`page__subtitle`,children:i.purpose})]}),(0,S.jsxs)(`div`,{className:`doc-meta`,children:[(0,S.jsx)(se,{tone:re.tone,title:i.affectedBy.length?`Changed files: ${i.affectedBy.join(`, `)}`:void 0,children:re.label}),i.editedSections.length>0&&(0,S.jsxs)(se,{tone:`blue`,title:i.editedSections.join(`, `),children:[i.editedSections.length,` developer-edited section`,i.editedSections.length===1?``:`s`]}),(0,S.jsx)(`span`,{className:`muted`,children:i.lastGeneratedAt?`Last synchronized ${D(i.lastGeneratedAt)}`:`Not generated by Athena`})]})]}),(0,S.jsxs)(`div`,{className:`toolbar`,children:[(0,S.jsx)(`div`,{className:`tabs`,role:`tablist`,children:[`preview`,`edit`,`history`].map(e=>(0,S.jsxs)(`button`,{role:`tab`,"aria-selected":c===e,className:`tab ${c===e?`tab--active`:``}`,onClick:()=>ie(e),children:[e===`preview`?`Preview`:e===`edit`?`Edit`:`History`,e===`edit`&&T&&(0,S.jsx)(`span`,{className:`tab__dirty`,"aria-label":`unsaved changes`})]},e))}),(0,S.jsxs)(`div`,{className:`toolbar__actions`,children:[c===`preview`&&(0,S.jsxs)(`label`,{className:`toggle-label`,children:[(0,S.jsx)(`input`,{type:`checkbox`,checked:x,onChange:e=>C(e.target.checked)}),` Show section ownership`]}),c===`edit`&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`span`,{className:`muted fineprint`,children:[T?`Unsaved changes`:`Saved`,` · ⌘S`]}),(0,S.jsx)(`button`,{className:`btn`,disabled:!T||p,onClick:()=>w(()=>()=>f(i.content)),children:`Discard`}),(0,S.jsx)(`button`,{className:`btn btn--primary`,disabled:!T||p,onClick:ne,children:p?`Saving…`:`Save`})]})]})]}),h&&(0,S.jsxs)(`div`,{className:`note note--warn`,role:`alert`,children:[(0,S.jsxs)(`strong`,{children:[i.file,` changed on disk`]}),` while you were editing.`,(0,S.jsxs)(`div`,{className:`note__actions`,children:[(0,S.jsx)(`button`,{className:`btn btn--sm`,onClick:()=>w(()=>()=>void te()),children:`Reload from disk (discard my edits)`}),(0,S.jsx)(`button`,{className:`btn btn--sm`,onClick:()=>navigator.clipboard?.writeText(u).then(()=>n(`Your version was copied to the clipboard`,`success`)),children:`Copy my version`})]})]}),y&&y.status!==409&&(0,S.jsxs)(`div`,{className:`note note--error`,role:`alert`,children:[(0,S.jsx)(`strong`,{children:y.message}),y.hint&&(0,S.jsx)(`div`,{className:`note__hint`,children:y.hint}),Array.isArray(y.details?.secrets)&&(0,S.jsx)(`ul`,{className:`note__list`,children:y.details.secrets.map((e,t)=>(0,S.jsxs)(`li`,{children:[`Line `,e.line,`: `,e.type]},t))})]}),c===`preview`&&(0,S.jsx)(`article`,{className:`doc`,children:i.segments.map((e,t)=>(0,S.jsx)(E_,{segment:e,showLabels:x},e.kind===`generated`?e.id:`dev-${t}`))}),c===`edit`&&(0,S.jsxs)(`div`,{className:`editor-wrap`,children:[(0,S.jsx)(d.Suspense,{fallback:(0,S.jsx)(`div`,{className:`editor editor--loading`,children:(0,S.jsx)(de,{label:`Loading editor`})}),children:(0,S.jsx)(T_,{value:u,onChange:f,onSave:ne})}),(0,S.jsxs)(`p`,{className:`fineprint`,children:[`Edits inside `,(0,S.jsx)(`span`,{className:`mono`,children:`athena:generated`}),` markers are kept and stop that section from being refreshed. Put your own notes under `,(0,S.jsx)(`em`,{children:`Developer Notes`}),`. Saving is refused if the content looks like it contains a secret.`]})]}),c===`history`&&(0,S.jsx)(D_,{id:e}),(0,S.jsx)(pe,{open:ee!==null,title:`Discard unsaved changes?`,body:`Your edits to this document will be lost.`,confirmLabel:`Discard`,danger:!0,onCancel:()=>w(null),onConfirm:()=>{ee?.(),w(null)}})]})}function k_({rule:e,busy:t,onToggle:n,onEdit:r,onDelete:i}){let[a,o]=(0,d.useState)(!1),[s,c]=(0,d.useState)(e.text),l=(0,d.useRef)(null);(0,d.useEffect)(()=>c(e.text),[e.text]),(0,d.useEffect)(()=>{a&&l.current?.focus()},[a]);let u=async()=>{let t=s.trim();if(!t||t===e.text){o(!1),c(e.text);return}await r(t)&&o(!1)};return(0,S.jsxs)(`li`,{className:`rule ${e.enabled?``:`rule--disabled`}`,children:[(0,S.jsx)(`button`,{role:`switch`,"aria-checked":e.enabled,"aria-label":e.enabled?`Disable rule`:`Enable rule`,className:`switch ${e.enabled?`switch--on`:``}`,onClick:n,disabled:t,children:(0,S.jsx)(`span`,{className:`switch__thumb`})}),(0,S.jsxs)(`span`,{className:`rule__index mono`,children:[`#`,e.index]}),a?(0,S.jsx)(`textarea`,{ref:l,className:`rule__input`,value:s,rows:Math.min(4,Math.max(1,Math.ceil(s.length/90))),maxLength:1e3,onChange:e=>c(e.target.value),onKeyDown:t=>{t.key===`Enter`&&!t.shiftKey&&(t.preventDefault(),u()),t.key===`Escape`&&(o(!1),c(e.text))},onBlur:()=>void u(),"aria-label":`Edit rule text`}):(0,S.jsxs)(`button`,{className:`rule__text`,onClick:()=>o(!0),title:`Click to edit`,children:[e.text,!e.enabled&&(0,S.jsx)(`span`,{className:`rule__off`,children:`disabled`})]}),(0,S.jsx)(`button`,{className:`icon-btn`,onClick:i,disabled:t,"aria-label":`Delete rule #${e.index}`,title:`Delete rule`,children:(0,S.jsx)(`svg`,{viewBox:`0 0 16 16`,"aria-hidden":`true`,children:(0,S.jsx)(`path`,{d:`M3 4.5h10M6.5 4.5V3h3v1.5M4.5 4.5l.7 9h5.6l.7-9`})})})]})}function A_(){let{revision:e,toast:t,refreshDocs:n}=oe(),[r,i]=(0,d.useState)(null),[a,o]=(0,d.useState)(null),[s,c]=(0,d.useState)(!1),[l,u]=(0,d.useState)(``),[f,p]=(0,d.useState)(``),[m,h]=(0,d.useState)(``),[g,y]=(0,d.useState)(null),b=async()=>{try{i(await v(`/api/rules`)),o(null)}catch(e){o(e)}};(0,d.useEffect)(()=>{b()},[e]);let x=(0,d.useMemo)(()=>{let e=new Map;for(let t of r?.sections??[])e.set(t,[]);for(let t of r?.rules??[])e.set(t.section,[...e.get(t.section)??[],t]);return[...e.entries()].filter(([,e])=>e.length)},[r]),C=async(e,a)=>{if(!r)return!1;c(!0);try{return i(await e(r.hash)),a&&t(a,`success`),n(),!0}catch(e){return e instanceof _&&e.status===409?(t(`rules.md changed on disk — reloaded the latest version. Please retry.`,`error`),await b()):t(e instanceof Error?e.message:`Update failed`,`error`),!1}finally{c(!1)}};if(a)return(0,S.jsx)(`div`,{className:`page`,children:(0,S.jsx)(fe,{error:a})});if(!r)return(0,S.jsx)(`div`,{className:`page-loading`,children:(0,S.jsx)(de,{})});let ee=l===`__new`?f.trim():l||r.sections[0]||`General`,w=r.rules.filter(e=>e.enabled).length,T=async()=>{m.trim()&&ee&&await C(e=>v(`/api/rules`,{method:`POST`,body:{section:ee,text:m.trim(),baseHash:e}}),`Rule added to ${ee}`)&&(h(``),l===`__new`&&(u(ee),p(``)))};return(0,S.jsxs)(`div`,{className:`page`,children:[(0,S.jsxs)(`header`,{className:`page__header`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`page__kicker mono`,children:`.athena/rules.md`}),(0,S.jsx)(`h1`,{className:`page__title`,children:`Project Rules`}),(0,S.jsxs)(`p`,{className:`page__subtitle`,children:[`Rules every configured AI agent is instructed to follow. This page edits `,(0,S.jsx)(`span`,{className:`mono`,children:`rules.md`}),` directly; the file stays the source of truth.`]})]}),(0,S.jsxs)(`div`,{className:`page__meta`,children:[(0,S.jsxs)(`span`,{children:[w,` enabled · `,r.rules.length-w,` disabled`]}),(0,S.jsx)(E,{to:`/docs/rules`,className:`btn btn--sm`,children:`Edit raw Markdown`})]})]}),(0,S.jsx)(`form`,{className:`card add-rule`,onSubmit:e=>{e.preventDefault(),T()},children:(0,S.jsxs)(`div`,{className:`add-rule__row`,children:[(0,S.jsxs)(`select`,{className:`select`,value:l||r.sections[0]||``,onChange:e=>u(e.target.value),"aria-label":`Section`,children:[r.sections.map(e=>(0,S.jsx)(`option`,{value:e,children:e},e)),(0,S.jsx)(`option`,{value:`__new`,children:`+ New section…`})]}),l===`__new`&&(0,S.jsx)(`input`,{className:`input add-rule__section`,placeholder:`Section name`,value:f,maxLength:80,onChange:e=>p(e.target.value),"aria-label":`New section name`}),(0,S.jsx)(`input`,{className:`input add-rule__text`,placeholder:`Add a rule, e.g. “Every tenant-owned table must include tenant_id.”`,value:m,maxLength:1e3,onChange:e=>h(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.nativeEvent.isComposing&&(e.preventDefault(),T())},"aria-label":`Rule text`}),(0,S.jsx)(`button`,{className:`btn btn--primary`,type:`submit`,disabled:s||!m.trim()||!ee,children:`Add rule`})]})}),x.length===0?(0,S.jsx)(k,{title:`No rules yet`,children:`Add your first rule above.`}):x.map(([e,t])=>(0,S.jsxs)(`section`,{className:`rule-section`,children:[(0,S.jsxs)(`h2`,{className:`rule-section__title`,children:[e,` `,(0,S.jsx)(`span`,{className:`muted`,children:t.length})]}),(0,S.jsx)(`ul`,{className:`rules`,children:t.map(e=>(0,S.jsx)(k_,{rule:e,busy:s,onToggle:()=>void C(t=>v(`/api/rules/${e.index}`,{method:`PATCH`,body:{enabled:!e.enabled,baseHash:t}})),onEdit:t=>C(n=>v(`/api/rules/${e.index}`,{method:`PATCH`,body:{text:t,baseHash:n}}),`Rule updated`),onDelete:()=>y(e)},`${e.index}:${e.text}`))})]},e)),(0,S.jsxs)(`p`,{className:`fineprint`,children:[`Disabled rules stay in the file as `,(0,S.jsx)(`span`,{className:`mono`,children:`- [disabled] …`}),` so they can be re-enabled later. Suggestions seeded by Athena start disabled.`]}),(0,S.jsx)(pe,{open:g!==null,title:`Delete rule?`,body:(0,S.jsx)(`p`,{className:`dialog__quote`,children:g?.text}),confirmLabel:`Delete`,danger:!0,onCancel:()=>y(null),onConfirm:()=>{let e=g;y(null),C(t=>v(`/api/rules/${e.index}?baseHash=${encodeURIComponent(t)}`,{method:`DELETE`}),`Rule deleted`)}})]})}function j_(){let{revision:e,toast:t}=oe(),{data:n,error:r,reload:i}=O(`/api/agents`,[e]),[a,o]=(0,d.useState)(null),[s,c]=(0,d.useState)(!1);return r?(0,S.jsx)(`div`,{className:`page`,children:(0,S.jsx)(fe,{error:r})}):n?(0,S.jsxs)(`div`,{className:`page`,children:[(0,S.jsx)(`header`,{className:`page__header`,children:(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`page__kicker`,children:`Integrations`}),(0,S.jsx)(`h1`,{className:`page__title`,children:`AI Agents`}),(0,S.jsx)(`p`,{className:`page__subtitle`,children:`Each agent is a separate client of the same project knowledge. Athena writes instructions using each agent's own supported mechanism.`})]})}),(0,S.jsxs)(`div`,{className:`note`,children:[(0,S.jsx)(`strong`,{children:`What "configured" means:`}),` Athena's instruction files are in place, and for agents that support hooks, those hooks report tool use to Athena. Athena sees which tool ran and on which files — never the agent's reasoning. It cannot tell whether an agent is running when no hook has fired.`]}),(0,S.jsx)(`div`,{className:`agents`,children:n.map(e=>(0,S.jsxs)(`article`,{className:`card agent ${e.configured?`agent--on`:``}`,children:[(0,S.jsxs)(`header`,{className:`agent__header`,children:[(0,S.jsx)(`span`,{className:`dot ${e.configured?`dot--green`:`dot--off`}`}),(0,S.jsx)(`h2`,{className:`agent__name`,children:e.name}),e.configured?(0,S.jsx)(se,{tone:`green`,children:`Configured`}):(0,S.jsx)(se,{children:`Not configured`}),e.detectedInProject&&(0,S.jsx)(se,{tone:`accent`,title:e.evidence.join(`, `),children:`Detected in project`})]}),(0,S.jsx)(`p`,{className:`agent__note`,children:e.note}),(0,S.jsxs)(`dl`,{className:`facts facts--compact`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:`Files`}),(0,S.jsx)(`dd`,{className:`mono`,children:e.files.length?e.files.join(`, `):`—`})]}),e.configuredAt&&(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:`Configured`}),(0,S.jsx)(`dd`,{children:D(e.configuredAt)})]}),e.detectedInProject&&(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:`Evidence`}),(0,S.jsx)(`dd`,{className:`mono`,children:e.evidence.join(`, `)})]}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:`Activity`}),(0,S.jsx)(`dd`,{children:e.activityObservation===`hooks`?(0,S.jsxs)(S.Fragment,{children:[`Reporting via hooks`,e.lastActivityAt?(0,S.jsxs)(`span`,{className:`muted`,children:[` · last seen `,D(e.lastActivityAt),` · `,e.observedEvents,` events`]}):(0,S.jsx)(`span`,{className:`muted`,children:` · nothing observed yet`})]}):e.activityObservation===`not-configured`?(0,S.jsx)(`span`,{className:`muted`,children:`Hooks not installed — configure to see activity`}):(0,S.jsx)(`span`,{className:`muted`,children:`No documented hook mechanism`})})]})]}),e.checks.length>0&&(0,S.jsx)(`ul`,{className:`checks`,children:e.checks.map((e,t)=>(0,S.jsxs)(`li`,{className:`check check--${e.level}`,children:[(0,S.jsx)(`span`,{"aria-hidden":`true`,children:e.level===`ok`?`✓`:e.level===`warn`?`!`:`✗`}),` `,e.message]},t))}),(0,S.jsx)(`footer`,{className:`agent__footer`,children:e.configured?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`button`,{className:`btn btn--sm`,disabled:s,onClick:()=>o({agent:e,action:`configure`}),children:`Refresh instructions`}),(0,S.jsx)(`button`,{className:`btn btn--sm btn--danger-ghost`,disabled:s,onClick:()=>o({agent:e,action:`remove`}),children:`Remove`})]}):(0,S.jsx)(`button`,{className:`btn btn--sm btn--primary`,disabled:s,onClick:()=>o({agent:e,action:`configure`}),children:`Configure`})})]},e.id))}),(0,S.jsx)(pe,{open:a!==null,title:a?.action===`remove`?`Remove ${a.agent.name} integration?`:`Configure ${a?.agent.name??``}?`,body:a?.action===`remove`?(0,S.jsxs)(`p`,{children:[`Athena will remove its block or file (`,a.agent.files.join(`, `)||`none recorded`,`). Your own content in those files is kept.`]}):(0,S.jsx)(`p`,{children:`Athena will write instruction files for this agent into your project. Existing content in shared files is preserved; Athena only manages its own marked block.`}),confirmLabel:a?.action===`remove`?`Remove`:`Configure`,danger:a?.action===`remove`,onCancel:()=>o(null),onConfirm:async()=>{if(!a)return;let{agent:e,action:n}=a;o(null),c(!0);try{await v(`/api/agents/${n}`,{method:`POST`,body:{agents:[e.id]}}),t(n===`configure`?`${e.name} integration configured`:`${e.name} integration removed`,`success`),i()}catch(e){t(e.message,`error`)}finally{c(!1)}}})]}):(0,S.jsx)(`div`,{className:`page-loading`,children:(0,S.jsx)(de,{})})}var M_=[{id:`all`,label:`All`},{id:`athena`,label:`Athena`},{id:`web-ui`,label:`Web UI`},{id:`filesystem`,label:`File system`},{id:`agent`,label:`AI agents`}];function N_(){let{events:e,connected:t,revision:n}=oe(),{data:r}=O(`/api/activity`,[n,e.length]),i=r?.agentObservation,a=r?.sessions??[],[o,s]=(0,d.useState)(`all`),c=(0,d.useMemo)(()=>o===`all`?e:e.filter(e=>e.source===o),[e,o]);return(0,S.jsxs)(`div`,{className:`page`,children:[(0,S.jsxs)(`header`,{className:`page__header`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`page__kicker`,children:`Timeline`}),(0,S.jsx)(`h1`,{className:`page__title`,children:`Activity`}),(0,S.jsx)(`p`,{className:`page__subtitle`,children:`Only events Athena directly observed in this session. Nothing here is simulated.`})]}),(0,S.jsx)(`div`,{className:`page__meta`,children:(0,S.jsx)(`span`,{className:`conn ${t?`conn--on`:`conn--off`}`,children:t?`Live`:`Reconnecting`})})]}),(0,S.jsxs)(`div`,{className:`activity-layout`,children:[(0,S.jsx)(ue,{children:(0,S.jsx)(we,{})}),(0,S.jsxs)(ue,{title:`What Athena can observe`,children:[(0,S.jsxs)(`ul`,{className:`observe`,children:[(0,S.jsx)(`li`,{className:`observe--yes`,children:`Analyses and knowledge updates (started here or by the CLI)`}),(0,S.jsxs)(`li`,{className:`observe--yes`,children:[`Changes to `,(0,S.jsx)(`span`,{className:`mono`,children:`.athena/*.md`}),` made elsewhere`]}),(0,S.jsxs)(`li`,{className:i?.available?`observe--yes`:`observe--no`,children:[`AI agent tool use via hooks`,i?.available?`: ${i.agents.join(`, `)}`:` — no agent is reporting yet`]}),(0,S.jsx)(`li`,{className:`observe--no`,children:`Agent reasoning or plans — hooks report which tool ran, never why`})]}),i&&(0,S.jsx)(`p`,{className:`fineprint`,children:i.reason}),a.length>0&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`label`,style:{marginTop:14},children:`Agent sessions seen`}),(0,S.jsx)(`ul`,{className:`agentlist`,children:a.slice(0,4).map(e=>(0,S.jsxs)(`li`,{children:[(0,S.jsx)(`span`,{className:`dot dot--green`}),(0,S.jsxs)(`span`,{children:[e.agent,` `,(0,S.jsx)(`span`,{className:`muted mono`,children:e.session?.slice(0,8)??``})]}),(0,S.jsxs)(`span`,{className:`muted`,children:[e.events,` events · `,D(e.lastEventAt)]})]},`${e.agent}:${e.session??`-`}`))})]})]})]}),(0,S.jsx)(ue,{title:`Events`,actions:(0,S.jsx)(`div`,{className:`segmented`,role:`tablist`,children:M_.map(e=>(0,S.jsx)(`button`,{role:`tab`,"aria-selected":o===e.id,className:`segmented__btn ${o===e.id?`segmented__btn--active`:``}`,onClick:()=>s(e.id),children:e.label},e.id))}),children:o===`agent`&&!c.length?(0,S.jsx)(`div`,{className:`events-empty`,children:`No agent events recorded yet. Configure Claude Code, Cursor, Codex, GitHub Copilot or Gemini CLI on the AI Agents page, then start a session.`}):(0,S.jsx)(Te,{events:c})})]})}function P_(e){let t=[],n=0,r=0;for(let i of e.split(`
|
|
45
|
-
`)){if(i.startsWith(`===`)||i.startsWith(`Index:`)||i.startsWith(`---`)||i.startsWith(`+++`))continue;let e=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@(.*)$/.exec(i);e?(n=Number(e[1]),r=Number(e[2]),t.push({kind:`hunk`,text:i})):i.startsWith(`+`)?t.push({kind:`add`,text:i.slice(1),newNo:r++}):i.startsWith(`-`)?t.push({kind:`del`,text:i.slice(1),oldNo:n++}):i.startsWith(` `)?t.push({kind:`ctx`,text:i.slice(1),oldNo:n++,newNo:r++}):(i.startsWith(`\\`)||i.startsWith(`…`))&&t.push({kind:`note`,text:i})}return t}function F_({patch:e,truncated:t}){let n=(0,d.useMemo)(()=>P_(e),[e]);return(0,S.jsxs)(`div`,{className:`diff`,role:`table`,"aria-label":`Proposed changes`,children:[n.map((e,t)=>(0,S.jsxs)(`div`,{className:`diff__row diff__row--${e.kind}`,role:`row`,children:[(0,S.jsx)(`span`,{className:`diff__no`,"aria-hidden":`true`,children:e.oldNo??``}),(0,S.jsx)(`span`,{className:`diff__no`,"aria-hidden":`true`,children:e.newNo??``}),(0,S.jsx)(`span`,{className:`diff__sign`,"aria-hidden":`true`,children:e.kind===`add`?`+`:e.kind===`del`?`−`:``}),(0,S.jsx)(`span`,{className:`diff__text`,children:e.kind===`hunk`?e.text.replace(/^@@.*@@\s?/,``)||`…`:e.text})]},t)),t&&(0,S.jsx)(`div`,{className:`diff__row diff__row--note`,children:(0,S.jsxs)(`span`,{className:`diff__text`,children:[`Diff truncated. Run `,(0,S.jsx)(`code`,{children:`athena sync --diff`}),` for the full change.`]})})]})}function I_({plan:e}){let t=e.fileChanges,n=[...t.modified.map(e=>({k:`M`,p:e})),...t.added.map(e=>({k:`A`,p:e})),...t.deleted.map(e=>({k:`D`,p:e})),...t.renamed.map(e=>({k:`R`,p:`${e.from} → ${e.to}`}))],[r,i]=(0,d.useState)(!1);return n.length?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`ul`,{className:`filechanges`,children:(r?n:n.slice(0,8)).map(e=>(0,S.jsxs)(`li`,{children:[(0,S.jsx)(`span`,{className:`filechanges__kind filechanges__kind--${e.k}`,children:e.k}),(0,S.jsx)(`span`,{className:`mono`,children:e.p})]},`${e.k}:${e.p}`))}),n.length>8&&(0,S.jsx)(`button`,{className:`btn btn--ghost btn--sm`,onClick:()=>i(!r),children:r?`Show less`:`Show all ${n.length}`})]}):(0,S.jsx)(`p`,{className:`muted`,children:`No file changes since the last analysis.`})}function L_(){let{revision:e,toast:t,activity:n}=oe(),{data:r,error:i,reload:a}=O(`/api/sync`,[e]),[o,s]=(0,d.useState)({}),[c,l]=(0,d.useState)(null);if(i)return(0,S.jsx)(`div`,{className:`page`,children:(0,S.jsx)(fe,{error:i})});if(!r)return(0,S.jsx)(`div`,{className:`page-loading`,children:(0,S.jsx)(de,{})});let u=r.plan,f=n.state===`ANALYZING`||c===`check`,p=async e=>{l(e);try{e===`check`?(await v(`/api/sync/check`,{method:`POST`,body:{}})).upToDate&&t(`Knowledge is up to date`,`success`):(await v(`/api/sync/${e}`,{method:`POST`,body:{planId:u.id}}),t(e===`apply`?`Knowledge updated`:`Proposal ignored until files change again`,`success`)),a()}catch(e){t(e instanceof _?`${e.message}${e.hint?` ${e.hint}`:``}`:`Request failed`,`error`),a()}finally{l(null)}};return(0,S.jsxs)(`div`,{className:`page`,children:[(0,S.jsxs)(`header`,{className:`page__header`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`page__kicker`,children:`Continuous synchronization`}),(0,S.jsx)(`h1`,{className:`page__title`,children:`Sync`}),(0,S.jsx)(`p`,{className:`page__subtitle`,children:`When project files change, Athena re-analyzes and proposes updates only for knowledge that actually changes. Nothing is written until you review it.`})]}),(0,S.jsxs)(`div`,{className:`page__meta`,children:[(0,S.jsx)(`span`,{children:r.watching?(0,S.jsx)(se,{tone:`green`,children:`Watching files`}):(0,S.jsx)(se,{children:`Not watching`})}),(0,S.jsx)(`span`,{children:r.lastCheckedAt?`Checked ${D(r.lastCheckedAt)}`:`Not checked yet`}),(0,S.jsx)(`button`,{className:`btn btn--sm`,onClick:()=>p(`check`),disabled:c!==null,children:f?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(de,{label:`Checking`}),` Checking…`]}):`Check now`})]})]}),u?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`proposal ${u.ignored?`proposal--ignored`:``}`,children:[(0,S.jsxs)(`div`,{className:`proposal__text`,children:[(0,S.jsxs)(`strong`,{children:[u.documents.length,` document`,u.documents.length===1?``:`s`,` would change`]}),(0,S.jsxs)(`span`,{className:`muted`,children:[` `,`· `,u.documents.reduce((e,t)=>e+t.additions,0),` additions, `,u.documents.reduce((e,t)=>e+t.deletions,0),` deletions · planned `,D(u.createdAt)]}),u.ignored&&(0,S.jsx)(`div`,{className:`muted fineprint`,children:`You ignored this proposal. It will resurface when files change again.`})]}),(0,S.jsxs)(`div`,{className:`proposal__actions`,children:[!u.ignored&&(0,S.jsx)(`button`,{className:`btn`,onClick:()=>p(`ignore`),disabled:c!==null,children:`Ignore`}),(0,S.jsx)(`button`,{className:`btn btn--primary`,onClick:()=>p(`apply`),disabled:c!==null,children:c===`apply`?`Updating…`:`Update ${u.documents.length} document${u.documents.length===1?``:`s`}`})]})]}),(0,S.jsxs)(`div`,{className:`sync-grid`,children:[(0,S.jsxs)(ue,{title:`What changed in the project`,children:[(0,S.jsx)(I_,{plan:u}),u.git.isRepo&&u.git.previousHead&&u.git.head!==u.git.previousHead&&(0,S.jsxs)(`div`,{className:`gitmove`,children:[(0,S.jsx)(`div`,{className:`label`,children:`Git`}),u.git.branchChanged&&(0,S.jsxs)(`p`,{children:[`Branch changed `,(0,S.jsx)(`span`,{className:`mono`,children:u.git.previousBranch}),` → `,(0,S.jsx)(`span`,{className:`mono`,children:u.git.branch})]}),u.git.diverged?(0,S.jsx)(`p`,{className:`muted`,children:`HEAD moved to a commit that does not descend from the last analysis (checkout, rebase or reset).`}):(0,S.jsxs)(`ul`,{className:`commits`,children:[u.git.commits.map(e=>(0,S.jsxs)(`li`,{children:[(0,S.jsx)(`span`,{className:`mono muted`,children:e.sha.slice(0,8)}),` `,e.subject]},e.sha)),u.git.truncated&&(0,S.jsx)(`li`,{className:`muted`,children:`…more commits`})]})]})]}),(0,S.jsx)(ue,{title:`Detected project changes`,children:u.modelChanges.length?(0,S.jsx)(`ul`,{className:`modelchanges`,children:u.modelChanges.map(e=>(0,S.jsxs)(`li`,{children:[(0,S.jsx)(`span`,{className:`modelchanges__label`,children:e.label}),(0,S.jsx)(`span`,{className:`muted`,children:e.summary})]},e.label))}):(0,S.jsx)(`p`,{className:`muted`,children:`No structural changes recorded (previous model unavailable, or changes are formatting-only).`})})]}),(0,S.jsx)(`h2`,{className:`section-title`,children:`Proposed knowledge updates`}),(0,S.jsx)(`div`,{className:`proposed`,children:u.documents.map(e=>{let t=o[e.id]??u.documents.length<=2;return(0,S.jsxs)(`article`,{className:`card proposed__doc`,children:[(0,S.jsxs)(`button`,{className:`proposed__head`,onClick:()=>s({...o,[e.id]:!t}),"aria-expanded":t,children:[(0,S.jsx)(`span`,{className:`chevron ${t?`chevron--open`:``}`,"aria-hidden":`true`,children:`›`}),(0,S.jsx)(`span`,{className:`proposed__file mono`,children:e.file}),e.status===`created`&&(0,S.jsx)(se,{tone:`green`,children:`new`}),(0,S.jsxs)(`span`,{className:`proposed__counts`,children:[(0,S.jsxs)(`span`,{className:`add`,children:[`+`,e.additions]}),` `,(0,S.jsxs)(`span`,{className:`del`,children:[`−`,e.deletions]})]})]}),(0,S.jsx)(`ul`,{className:`reasons`,children:e.reasons.map(e=>(0,S.jsx)(`li`,{children:e},e))}),(0,S.jsxs)(`div`,{className:`proposed__sections`,children:[`Sections: `,e.changedSections.map(e=>(0,S.jsx)(`span`,{className:`mono tag`,children:e},e)),(0,S.jsx)(E,{to:`/docs/${e.id}`,className:`proposed__open`,children:`Open current`})]}),e.preservedSections.length>0&&(0,S.jsxs)(`div`,{className:`note note--info`,children:[`Your edits in `,(0,S.jsx)(`span`,{className:`mono`,children:e.preservedSections.join(`, `)}),` are kept and not overwritten.`]}),t&&(0,S.jsx)(F_,{patch:e.diff,truncated:e.diffTruncated})]},e.id)})}),u.checkedUnchanged.length>0&&(0,S.jsxs)(`p`,{className:`fineprint`,children:[`Also checked and unchanged: `,u.checkedUnchanged.join(`, `)]})]}):(0,S.jsx)(ue,{children:(0,S.jsx)(k,{title:`Knowledge is up to date`,children:r.watching?`Athena is watching this project and will propose updates when relevant files change.`:`Run a check to compare the project with its knowledge.`})})]})}var R_={critical:`red`,high:`red`,moderate:`yellow`,low:`blue`,unrated:`neutral`},z_=[`critical`,`high`,`moderate`,`low`,`unrated`];function B_(){let{revision:e,toast:t,activity:n}=oe(),{data:r,error:i,reload:a}=O(`/api/security`,[e]),[o,s]=(0,d.useState)(!1);if(i)return(0,S.jsx)(`div`,{className:`page`,children:(0,S.jsx)(fe,{error:i})});if(!r)return(0,S.jsx)(`div`,{className:`page-loading`,children:(0,S.jsx)(de,{})});let c=r.scan,l=r.running||o||n.state===`REVIEWING`&&n.actor===`athena`,u=async()=>{s(!0);try{await v(`/api/security/scan`,{method:`POST`,body:{}}),t(`Security scan started`,`success`)}catch(e){t(e instanceof _?e.message:`Could not start the scan`,`error`)}finally{s(!1),setTimeout(a,1e3)}},f=c?.tools.flatMap(e=>e.findings.map(t=>({...t,tool:e.tool})))??[],p=z_.map(e=>[e,f.filter(t=>t.severity===e).length]).filter(([,e])=>e>0);return(0,S.jsxs)(`div`,{className:`page`,children:[(0,S.jsxs)(`header`,{className:`page__header`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`page__kicker`,children:`Dependencies & secrets`}),(0,S.jsx)(`h1`,{className:`page__title`,children:`Security`}),(0,S.jsx)(`p`,{className:`page__subtitle`,children:`Athena runs the audit tools installed for this project and reports what they find. It has no vulnerability database of its own, and a clean audit is not proof that the project is secure.`})]}),(0,S.jsxs)(`div`,{className:`page__meta`,children:[c&&(0,S.jsxs)(`span`,{children:[`Scanned `,D(c.scannedAt)]}),(0,S.jsx)(`button`,{className:`btn btn--primary btn--sm`,onClick:u,disabled:l,children:l?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(de,{label:`Scanning`}),` Scanning…`]}):c?`Re-scan`:`Run scan`})]})]}),c?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`stats`,children:[(0,S.jsxs)(`div`,{className:`stat`,children:[(0,S.jsx)(`div`,{className:`stat__label`,children:`Dependency findings`}),(0,S.jsx)(`div`,{className:`stat__value ${f.length?`stat__value--warn`:``}`,children:f.length}),(0,S.jsx)(`div`,{className:`stat__sub`,children:p.map(([e,t])=>`${t} ${e}`).join(` · `)||`none reported`})]}),(0,S.jsxs)(`div`,{className:`stat`,children:[(0,S.jsx)(`div`,{className:`stat__label`,children:`Potential secrets`}),(0,S.jsx)(`div`,{className:`stat__value ${c.secrets.count?`stat__value--warn`:``}`,children:c.secrets.count}),(0,S.jsx)(`div`,{className:`stat__sub`,children:c.secrets.count?`values never stored`:`none matched`})]}),(0,S.jsxs)(`div`,{className:`stat`,children:[(0,S.jsx)(`div`,{className:`stat__label`,children:`Tools run`}),(0,S.jsxs)(`div`,{className:`stat__value`,children:[c.tools.filter(e=>e.status===`ok`).length,`/`,c.tools.length]}),(0,S.jsxs)(`div`,{className:`stat__sub`,children:[(c.durationMs/1e3).toFixed(1),`s`]})]})]}),(0,S.jsxs)(ue,{title:`Audit tools`,children:[(0,S.jsxs)(`ul`,{className:`checks`,children:[c.tools.length===0&&(0,S.jsx)(`li`,{className:`muted`,children:`No auditable ecosystems detected (no lockfiles or supported manifests).`}),c.tools.map(e=>(0,S.jsxs)(`li`,{className:`check check--${e.status===`ok`?e.findings.length?`warn`:`ok`:`warn`}`,children:[(0,S.jsx)(`span`,{"aria-hidden":`true`,children:e.status===`ok`?e.findings.length?`!`:`✓`:`○`}),` `,(0,S.jsx)(`strong`,{children:e.tool}),` `,e.status===`ok`?`${e.findings.length} finding(s) in ${(e.durationMs/1e3).toFixed(1)}s`:`${e.status} — ${e.message??``}`]},e.tool))]}),(0,S.jsx)(`p`,{className:`fineprint`,children:`An ecosystem without its tool installed is reported as unknown, never as "no problems".`})]}),f.length>0&&(0,S.jsx)(ue,{title:`Vulnerable dependencies`,className:`card--flush`,children:(0,S.jsx)(`div`,{className:`table-wrap`,children:(0,S.jsxs)(`table`,{children:[(0,S.jsx)(`thead`,{children:(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`th`,{children:`Severity`}),(0,S.jsx)(`th`,{children:`Package`}),(0,S.jsx)(`th`,{children:`Advisory`}),(0,S.jsx)(`th`,{children:`ID`}),(0,S.jsx)(`th`,{children:`Tool`}),(0,S.jsx)(`th`,{children:`Fix`})]})}),(0,S.jsx)(`tbody`,{children:f.slice(0,200).map((e,t)=>(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`td`,{children:(0,S.jsx)(se,{tone:R_[e.severity],children:e.severity})}),(0,S.jsx)(`td`,{className:`mono`,children:e.package}),(0,S.jsx)(`td`,{children:e.url?(0,S.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,children:e.title}):e.title}),(0,S.jsx)(`td`,{className:`mono`,children:e.id??`—`}),(0,S.jsx)(`td`,{className:`muted`,children:e.tool}),(0,S.jsx)(`td`,{children:e.fixAvailable===!0?`available`:e.fixAvailable===!1?`none reported`:`unknown`})]},`${e.package}:${e.id??t}`))})]})})}),(0,S.jsx)(ue,{title:`Potential secrets`,children:c.secrets.count?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`p`,{children:[c.secrets.count,` potential hardcoded secret(s) across `,c.secrets.files.length,` file(s). Athena stores the type and location only — never the value.`]}),(0,S.jsx)(`ul`,{className:`filechanges`,children:c.secrets.files.slice(0,15).map(e=>(0,S.jsxs)(`li`,{children:[(0,S.jsx)(`span`,{className:`filechanges__kind filechanges__kind--M`,children:`!`}),(0,S.jsx)(`span`,{className:`mono`,children:e})]},e))}),(0,S.jsxs)(`p`,{className:`fineprint`,children:[`Types and line numbers are listed in `,(0,S.jsx)(E,{to:`/docs/security`,children:`security.md`}),`. Rotate anything real.`]})]}):(0,S.jsx)(`p`,{className:`muted`,children:`No likely secrets matched Athena's patterns. Gitignored and oversized files are not scanned, so this is not proof that none exist.`})}),(0,S.jsxs)(`p`,{className:`fineprint`,children:[`Scan results are stored in `,(0,S.jsx)(`span`,{className:`mono`,children:`.athena/security-scan.json`}),` (gitignored). Run `,(0,S.jsx)(`span`,{className:`mono`,children:`athena sync`}),` to record them in `,(0,S.jsx)(E,{to:`/docs/security`,children:`security.md`}),`.`]})]}):(0,S.jsx)(ue,{children:(0,S.jsx)(k,{title:`No scan yet`,children:`Run a scan to audit dependencies with the tools available on this machine (npm audit, pip-audit, govulncheck, cargo audit, composer audit).`})})]})}var V_=[`add refunds to the payments API`,`fix the failing checkout tests`,`speed up the dashboard query`,`require 2FA for admin login`];function H_(){let{revision:e,toast:t}=oe(),{data:n,reload:r}=O(`/api/graph`,[e]),[i,a]=(0,d.useState)(``),[o,s]=(0,d.useState)(null),[c,l]=(0,d.useState)(null),[u,f]=(0,d.useState)(!1),[p,m]=(0,d.useState)(!1),[h,g]=(0,d.useState)(!1),y=async e=>{let t=e.trim();if(t){f(!0),l(null);try{s(await v(`/api/context?task=${encodeURIComponent(t)}`))}catch(e){l(e),s(null)}finally{f(!1)}}};return(0,S.jsxs)(`div`,{className:`page`,children:[(0,S.jsxs)(`header`,{className:`page__header`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`page__kicker`,children:`Context engine`}),(0,S.jsx)(`h1`,{className:`page__title`,children:`Context`}),(0,S.jsxs)(`p`,{className:`page__subtitle`,children:[`Describe a task and Athena shows exactly which knowledge an agent should read for it — chosen deterministically, with the reason for each choice. This is what the MCP tool `,(0,S.jsx)(`span`,{className:`mono`,children:`get_relevant_context`}),` returns.`]})]}),(0,S.jsxs)(`div`,{className:`page__meta`,children:[n?.built?(0,S.jsxs)(`span`,{children:[`Graph: `,n.stats.nodes,` nodes · `,n.stats.edges,` links · `,D(n.builtAt)]}):(0,S.jsx)(`span`,{className:`muted`,children:`Graph not built`}),(0,S.jsx)(`button`,{className:`btn btn--sm`,onClick:async()=>{m(!0);try{await v(`/api/graph/build`,{method:`POST`,body:{}}),t(`Project graph rebuilt`,`success`),r()}catch(e){t(e instanceof _?e.message:`Could not build the graph`,`error`)}finally{m(!1)}},disabled:p,children:p?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(de,{label:`Building`}),` Building…`]}):n?.built?`Rebuild graph`:`Build graph`})]})]}),(0,S.jsxs)(`form`,{className:`card add-rule`,onSubmit:e=>{e.preventDefault(),y(i)},children:[(0,S.jsxs)(`div`,{className:`add-rule__row`,children:[(0,S.jsx)(`input`,{className:`input add-rule__text`,placeholder:`What are you about to do?`,value:i,onChange:e=>a(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.nativeEvent.isComposing&&(e.preventDefault(),y(i))},"aria-label":`Task description`}),(0,S.jsx)(`button`,{className:`btn btn--primary`,type:`submit`,disabled:u||!i.trim(),children:u?`Selecting…`:`Show context`})]}),(0,S.jsx)(`div`,{className:`examples`,children:V_.map(e=>(0,S.jsx)(`button`,{type:`button`,className:`chip chip--button`,onClick:()=>{a(e),y(e)},children:e},e))})]}),c&&(0,S.jsx)(fe,{error:c}),!o&&!c&&(0,S.jsx)(ue,{children:(0,S.jsx)(k,{title:`No task yet`,children:`Enter a task above, or try one of the examples.`})}),o&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`sync-grid`,children:[(0,S.jsx)(ue,{title:`Documents selected, and why`,children:(0,S.jsx)(`ul`,{className:`modelchanges`,children:o.areas.map(e=>(0,S.jsxs)(`li`,{children:[(0,S.jsx)(`span`,{className:`modelchanges__label`,children:(0,S.jsx)(E,{to:e.id===`rules`?`/rules`:`/docs/${e.id}`,children:e.id})}),(0,S.jsx)(`span`,{className:`muted`,children:e.why.join(`; `)})]},e.id))})}),(0,S.jsx)(ue,{title:`Related code (project graph)`,children:o.graphNodes.length||o.mentionedFiles.length?(0,S.jsxs)(`ul`,{className:`filechanges`,children:[o.mentionedFiles.map(e=>(0,S.jsxs)(`li`,{children:[(0,S.jsx)(`span`,{className:`filechanges__kind filechanges__kind--A`,children:`@`}),(0,S.jsx)(`span`,{className:`mono`,children:e})]},e)),o.graphNodes.filter(e=>!o.mentionedFiles.includes(e.path??``)).slice(0,12).map(e=>(0,S.jsxs)(`li`,{children:[(0,S.jsx)(`span`,{className:`filechanges__kind filechanges__kind--R`,children:e.kind[0].toUpperCase()}),(0,S.jsxs)(`span`,{className:`mono`,children:[e.name,e.path?` · ${e.path}`:``]})]},e.id))]}):(0,S.jsx)(`p`,{className:`muted`,children:`No related nodes. Name a file in the task, or build the graph.`})})]}),(0,S.jsxs)(ue,{title:`Sections an agent would read (${o.sections.length})`,actions:(0,S.jsxs)(`label`,{className:`toggle-label`,children:[(0,S.jsx)(`input`,{type:`checkbox`,checked:h,onChange:e=>g(e.target.checked)}),` Show content`]}),children:[(0,S.jsx)(`div`,{className:`context-sections`,children:o.sections.map(e=>(0,S.jsxs)(`div`,{className:`context-section`,children:[(0,S.jsxs)(`div`,{className:`context-section__head`,children:[(0,S.jsx)(`span`,{className:`mono`,children:e.file}),(0,S.jsx)(se,{children:e.section})]}),h&&(0,S.jsx)(`pre`,{className:`context-section__body`,children:e.content})]},`${e.doc}:${e.section}`))}),(0,S.jsxs)(`p`,{className:`fineprint`,children:[`~`,o.approxChars.toLocaleString(),` characters · `,o.rules.length,` project rules always included`,o.truncated?` · lower-ranked sections omitted for budget`:``]})]})]})]})}var U_=new Set([`project`,`architecture`,`database`,`api`,`auth`,`security`,`testing`,`debugging`,`performance`,`code-review`,`deployment`,`rules`]);function W_(){let e=T();return(0,S.jsx)(A,{resetKey:e,children:(0,S.jsx)(G_,{path:e})})}function G_({path:e}){let t=/^\/docs\/([a-z-]+)\/?$/.exec(e);return e===`/`?(0,S.jsx)(Ee,{}):t&&U_.has(t[1])?(0,S.jsx)(O_,{id:t[1]},t[1]):e===`/rules`?(0,S.jsx)(A_,{}):e===`/sync`?(0,S.jsx)(L_,{}):e===`/security`?(0,S.jsx)(B_,{}):e===`/context`?(0,S.jsx)(H_,{}):e===`/agents`?(0,S.jsx)(j_,{}):e===`/activity`?(0,S.jsx)(N_,{}):(0,S.jsxs)(`div`,{className:`page`,children:[(0,S.jsx)(`h1`,{className:`page__title`,children:`Not found`}),(0,S.jsxs)(`p`,{className:`muted`,children:[`There is no page at `,e,`.`]})]})}function K_(){let[e,t]=(0,d.useState)({state:`loading`});return(0,d.useEffect)(()=>{let e=()=>{let e=g();/[#&]token=/.test(window.location.hash)&&m()!==e&&window.location.reload()};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]),(0,d.useEffect)(()=>{if(!m()){t({state:`unauthorized`});return}v(`/api/session`).then(()=>v(`/api/overview`)).then(e=>t({state:`ready`,project:e.project.name})).catch(e=>{e instanceof _&&e.status===401?t({state:`unauthorized`}):t({state:`error`,message:e instanceof Error?e.message:`Could not reach the Athena server`})})},[]),e.state===`loading`?(0,S.jsx)(`div`,{className:`gate`,children:(0,S.jsx)(de,{})}):e.state===`ready`?(0,S.jsx)(ae,{children:(0,S.jsxs)(`div`,{className:`app`,children:[(0,S.jsx)(ye,{projectName:e.project}),(0,S.jsxs)(`div`,{className:`app__body`,children:[(0,S.jsx)(_e,{}),(0,S.jsx)(`main`,{className:`app__main`,id:`main`,children:(0,S.jsx)(W_,{})})]}),(0,S.jsx)(be,{})]})}):(0,S.jsx)(`div`,{className:`gate`,children:(0,S.jsxs)(`div`,{className:`gate__card`,children:[(0,S.jsx)(`div`,{className:`gate__mark`,children:`ATHENA`}),(0,S.jsx)(`h1`,{children:e.state===`unauthorized`?`Open Athena from your terminal`:`Athena is unavailable`}),e.state===`unauthorized`?(0,S.jsxs)(`p`,{children:[`This local server only accepts requests with the private access link printed by `,(0,S.jsx)(`code`,{children:`athena open`}),`. Run it in your project and use the link it shows.`]}):(0,S.jsx)(`p`,{children:e.message})]})})}(0,f.createRoot)(document.getElementById(`root`)).render((0,S.jsx)(d.StrictMode,{children:(0,S.jsx)(K_,{})}));export{i,p_ as n,x as r,__ as t};
|
|
44
|
+
`+u),ke&&(u=kt(u)),w&&Re?re(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ft(e),Me=!0,Ne=be,Pe=j},t.clearConfig=function(){lt=null,Me=!1,Ne=null,Pe=null,w=E,T=``},t.isValidAttribute=function(e,t,n){lt||ft({});let r=ct(e),i=ct(t);return Vt(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&bg(k,e)&&sg(k[e],t)},t.removeHook=function(e,t){if(bg(k,e)){if(t!==void 0){let n=ag(k[e],t);return n===-1?void 0:cg(k[e],n,1)[0]}return og(k[e])}},t.removeHooks=function(e){bg(k,e)&&(k[e]=[])},t.removeAllHooks=function(){k=l_()},t}var p_=f_(),m_=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),h_=function(e){return`/`+e},g_={},__=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=h_(t,n),t=s(t),t in g_)return;g_[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:m_,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},v_={...Ch,tagNames:(Ch.tagNames??[]).filter(e=>![`input`].includes(e))},y_=null;function b_(){return y_??=__(()=>import(`./mermaid.core-DMsM3ZX7.js`).then(e=>{let t=!window.matchMedia?.(`(prefers-color-scheme: light)`).matches;return e.default.initialize({startOnLoad:!1,securityLevel:`strict`,theme:t?`dark`:`neutral`,fontFamily:`var(--font-sans)`,htmlLabels:!1,flowchart:{htmlLabels:!1}}),e.default}),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])),y_}function x_({chart:e}){let t=(0,d.useRef)(null),n=`m${(0,d.useId)().replace(/[^a-zA-Z0-9]/g,``)}`,[r,i]=(0,d.useState)(null);return(0,d.useEffect)(()=>{let r=!1;return b_().then(t=>t.render(n,e)).then(({svg:e})=>{!r&&t.current&&(t.current.innerHTML=p_.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0}}),i(null))}).catch(e=>!r&&i(e.message)),()=>{r=!0}},[e,n]),r?(0,S.jsxs)(`div`,{className:`mermaid-error`,children:[(0,S.jsx)(`div`,{className:`mermaid-error__title`,children:`Diagram could not be rendered`}),(0,S.jsx)(`pre`,{children:(0,S.jsx)(`code`,{children:e})})]}):(0,S.jsx)(`div`,{className:`mermaid`,ref:t,"aria-label":`Diagram`})}function S_(e){return typeof e==`string`?e:Array.isArray(e)?e.map(S_).join(``):(0,d.isValidElement)(e)?S_(e.props.children):``}var C_={pre({children:e}){let t=Array.isArray(e)?e[0]:e;return(0,d.isValidElement)(t)&&String(t.props.className??``).includes(`language-mermaid`)?(0,S.jsx)(x_,{chart:S_(t).replace(/\n$/,``)}):(0,S.jsx)(`pre`,{children:e})},a({href:e,children:t}){let n=e&&/^https?:\/\//.test(e);return(0,S.jsx)(`a`,{href:e,...n?{target:`_blank`,rel:`noopener noreferrer`}:{},children:t})},table({children:e}){return(0,S.jsx)(`div`,{className:`table-wrap`,children:(0,S.jsx)(`table`,{children:e})})}};function w_({source:e}){return(0,S.jsx)(`div`,{className:`markdown`,children:(0,S.jsx)(ss,{remarkPlugins:[pu],rehypePlugins:[xh,[Bh,v_]],components:C_,children:e})})}var T_=(0,d.lazy)(()=>__(()=>import(`./Editor-Bnilgch0.js`).then(e=>({default:e.Editor})),[]));function E_({segment:e,showLabels:t}){return e.kind===`developer`?(0,S.jsxs)(`div`,{className:`segment segment--developer ${t?`segment--labeled`:``}`,children:[t&&(0,S.jsx)(`div`,{className:`segment__label`,children:`Developer content · never modified by Athena`}),(0,S.jsx)(w_,{source:e.content})]}):(0,S.jsxs)(`div`,{className:`segment segment--generated ${e.modified?`segment--modified`:``} ${t?`segment--labeled`:``}`,children:[t&&(0,S.jsxs)(`div`,{className:`segment__label`,children:[e.modified?`Generated section · edited by a developer — preserved, not refreshed`:`Generated section · refreshed by athena analyze`,(0,S.jsx)(`span`,{className:`mono segment__id`,children:e.id})]}),(0,S.jsx)(w_,{source:e.content})]})}function D_({id:e}){let{revision:t}=oe(),{data:n,error:r}=O(`/api/docs/${e}/history`,[t]),[i,a]=(0,d.useState)(null),[o,s]=(0,d.useState)(null),[c,l]=(0,d.useState)(null);(0,d.useEffect)(()=>{a(null),s(null)},[e]);let u=async t=>{a(t),s(null),l(null);try{s((await v(`/api/docs/${e}/history/${t}`)).content)}catch(e){l(e)}};return r?(0,S.jsx)(fe,{error:r}):n?!n.available||!n.entries.length?(0,S.jsx)(k,{title:`No history`,children:n.reason}):(0,S.jsxs)(`div`,{className:`history`,children:[(0,S.jsx)(`ol`,{className:`history__list`,children:n.entries.map((e,t)=>(0,S.jsx)(`li`,{children:(0,S.jsxs)(`button`,{className:`history__item ${i===e.sha?`history__item--active`:``}`,onClick:()=>u(e.sha),children:[(0,S.jsxs)(`span`,{className:`history__version`,children:[`v`,n.entries.length-t]}),(0,S.jsx)(`span`,{className:`history__subject`,children:e.subject||`(no message)`}),(0,S.jsxs)(`span`,{className:`history__meta mono`,children:[e.sha.slice(0,8),` · `,D(e.date)]})]})},e.sha))}),(0,S.jsxs)(`div`,{className:`history__view`,children:[!i&&(0,S.jsx)(k,{title:`Select a version`,children:`History comes from Git commits that touched this file.`}),c&&(0,S.jsx)(fe,{error:c}),i&&!o&&!c&&(0,S.jsx)(de,{}),o!==null&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`note`,children:[`Read-only view of `,(0,S.jsx)(`span`,{className:`mono`,children:i?.slice(0,12)})]}),(0,S.jsx)(w_,{source:o.replace(/<!-- athena:[^>]*-->/g,``)})]})]})]}):(0,S.jsx)(de,{})}function O_({id:e}){let{revision:t,toast:n,refreshDocs:r}=oe(),[i,a]=(0,d.useState)(null),[o,s]=(0,d.useState)(null),[c,l]=(0,d.useState)(`preview`),[u,f]=(0,d.useState)(``),[p,m]=(0,d.useState)(!1),[h,g]=(0,d.useState)(!1),[y,b]=(0,d.useState)(null),[x,C]=(0,d.useState)(!0),[ee,w]=(0,d.useState)(null),T=i!==null&&u!==i.content,E=(0,d.useRef)(T);E.current=T;let te=(0,d.useCallback)(async()=>{try{let t=await v(`/api/docs/${e}`);a(t),f(t.content),s(null),g(!1),b(null)}catch(e){s(e)}},[e]);(0,d.useEffect)(()=>{a(null),l(`preview`),te()},[te]),(0,d.useEffect)(()=>{t!==0&&i&&v(`/api/docs/${e}`).then(e=>{if(e.hash===i.hash){a(t=>t&&{...t,sync:e.sync,affectedBy:e.affectedBy,lastChangedAt:e.lastChangedAt});return}E.current?g(!0):(a(e),f(e.content))}).catch(()=>{})},[t]),(0,d.useEffect)(()=>{let e=e=>{E.current&&e.preventDefault()};return window.addEventListener(`beforeunload`,e),()=>window.removeEventListener(`beforeunload`,e)},[]);let ne=async()=>{if(i&&E.current&&!p){m(!0),b(null);try{let t=await v(`/api/docs/${e}`,{method:`PUT`,body:{content:u,baseHash:i.hash}});a(e=>({...e,...t})),f(t.content),g(!1),n(`Saved ${t.file}`,`success`),r()}catch(e){e instanceof _?(b(e),e.status===409&&g(!0)):n(`Save failed`,`error`)}finally{m(!1)}}};if(o)return(0,S.jsx)(`div`,{className:`page`,children:(0,S.jsx)(fe,{error:o})});if(!i)return(0,S.jsx)(`div`,{className:`page-loading`,children:(0,S.jsx)(de,{})});let re=ce[i.sync]??ce.synchronized,ie=e=>l(e);return(0,S.jsxs)(`div`,{className:`page page--doc`,children:[(0,S.jsxs)(`header`,{className:`page__header page__header--doc`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`div`,{className:`page__kicker mono`,children:[`.athena/`,i.file]}),(0,S.jsx)(`h1`,{className:`page__title`,children:i.title}),(0,S.jsx)(`p`,{className:`page__subtitle`,children:i.purpose})]}),(0,S.jsxs)(`div`,{className:`doc-meta`,children:[(0,S.jsx)(se,{tone:re.tone,title:i.affectedBy.length?`Changed files: ${i.affectedBy.join(`, `)}`:void 0,children:re.label}),i.editedSections.length>0&&(0,S.jsxs)(se,{tone:`blue`,title:i.editedSections.join(`, `),children:[i.editedSections.length,` developer-edited section`,i.editedSections.length===1?``:`s`]}),(0,S.jsx)(`span`,{className:`muted`,children:i.lastGeneratedAt?`Last synchronized ${D(i.lastGeneratedAt)}`:`Not generated by Athena`})]})]}),(0,S.jsxs)(`div`,{className:`toolbar`,children:[(0,S.jsx)(`div`,{className:`tabs`,role:`tablist`,children:[`preview`,`edit`,`history`].map(e=>(0,S.jsxs)(`button`,{role:`tab`,"aria-selected":c===e,className:`tab ${c===e?`tab--active`:``}`,onClick:()=>ie(e),children:[e===`preview`?`Preview`:e===`edit`?`Edit`:`History`,e===`edit`&&T&&(0,S.jsx)(`span`,{className:`tab__dirty`,"aria-label":`unsaved changes`})]},e))}),(0,S.jsxs)(`div`,{className:`toolbar__actions`,children:[c===`preview`&&(0,S.jsxs)(`label`,{className:`toggle-label`,children:[(0,S.jsx)(`input`,{type:`checkbox`,checked:x,onChange:e=>C(e.target.checked)}),` Show section ownership`]}),c===`edit`&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`span`,{className:`muted fineprint`,children:[T?`Unsaved changes`:`Saved`,` · ⌘S`]}),(0,S.jsx)(`button`,{className:`btn`,disabled:!T||p,onClick:()=>w(()=>()=>f(i.content)),children:`Discard`}),(0,S.jsx)(`button`,{className:`btn btn--primary`,disabled:!T||p,onClick:ne,children:p?`Saving…`:`Save`})]})]})]}),h&&(0,S.jsxs)(`div`,{className:`note note--warn`,role:`alert`,children:[(0,S.jsxs)(`strong`,{children:[i.file,` changed on disk`]}),` while you were editing.`,(0,S.jsxs)(`div`,{className:`note__actions`,children:[(0,S.jsx)(`button`,{className:`btn btn--sm`,onClick:()=>w(()=>()=>void te()),children:`Reload from disk (discard my edits)`}),(0,S.jsx)(`button`,{className:`btn btn--sm`,onClick:()=>navigator.clipboard?.writeText(u).then(()=>n(`Your version was copied to the clipboard`,`success`)),children:`Copy my version`})]})]}),y&&y.status!==409&&(0,S.jsxs)(`div`,{className:`note note--error`,role:`alert`,children:[(0,S.jsx)(`strong`,{children:y.message}),y.hint&&(0,S.jsx)(`div`,{className:`note__hint`,children:y.hint}),Array.isArray(y.details?.secrets)&&(0,S.jsx)(`ul`,{className:`note__list`,children:y.details.secrets.map((e,t)=>(0,S.jsxs)(`li`,{children:[`Line `,e.line,`: `,e.type]},t))})]}),c===`preview`&&(0,S.jsx)(`article`,{className:`doc`,children:i.segments.map((e,t)=>(0,S.jsx)(E_,{segment:e,showLabels:x},e.kind===`generated`?e.id:`dev-${t}`))}),c===`edit`&&(0,S.jsxs)(`div`,{className:`editor-wrap`,children:[(0,S.jsx)(d.Suspense,{fallback:(0,S.jsx)(`div`,{className:`editor editor--loading`,children:(0,S.jsx)(de,{label:`Loading editor`})}),children:(0,S.jsx)(T_,{value:u,onChange:f,onSave:ne})}),(0,S.jsxs)(`p`,{className:`fineprint`,children:[`Edits inside `,(0,S.jsx)(`span`,{className:`mono`,children:`athena:generated`}),` markers are kept and stop that section from being refreshed. Put your own notes under `,(0,S.jsx)(`em`,{children:`Developer Notes`}),`. Saving is refused if the content looks like it contains a secret.`]})]}),c===`history`&&(0,S.jsx)(D_,{id:e}),(0,S.jsx)(pe,{open:ee!==null,title:`Discard unsaved changes?`,body:`Your edits to this document will be lost.`,confirmLabel:`Discard`,danger:!0,onCancel:()=>w(null),onConfirm:()=>{ee?.(),w(null)}})]})}function k_({rule:e,busy:t,onToggle:n,onEdit:r,onDelete:i}){let[a,o]=(0,d.useState)(!1),[s,c]=(0,d.useState)(e.text),l=(0,d.useRef)(null);(0,d.useEffect)(()=>c(e.text),[e.text]),(0,d.useEffect)(()=>{a&&l.current?.focus()},[a]);let u=async()=>{let t=s.trim();if(!t||t===e.text){o(!1),c(e.text);return}await r(t)&&o(!1)};return(0,S.jsxs)(`li`,{className:`rule ${e.enabled?``:`rule--disabled`}`,children:[(0,S.jsx)(`button`,{role:`switch`,"aria-checked":e.enabled,"aria-label":e.enabled?`Disable rule`:`Enable rule`,className:`switch ${e.enabled?`switch--on`:``}`,onClick:n,disabled:t,children:(0,S.jsx)(`span`,{className:`switch__thumb`})}),(0,S.jsxs)(`span`,{className:`rule__index mono`,children:[`#`,e.index]}),a?(0,S.jsx)(`textarea`,{ref:l,className:`rule__input`,value:s,rows:Math.min(4,Math.max(1,Math.ceil(s.length/90))),maxLength:1e3,onChange:e=>c(e.target.value),onKeyDown:t=>{t.key===`Enter`&&!t.shiftKey&&(t.preventDefault(),u()),t.key===`Escape`&&(o(!1),c(e.text))},onBlur:()=>void u(),"aria-label":`Edit rule text`}):(0,S.jsxs)(`button`,{className:`rule__text`,onClick:()=>o(!0),title:`Click to edit`,children:[e.text,!e.enabled&&(0,S.jsx)(`span`,{className:`rule__off`,children:`disabled`})]}),(0,S.jsx)(`button`,{className:`icon-btn`,onClick:i,disabled:t,"aria-label":`Delete rule #${e.index}`,title:`Delete rule`,children:(0,S.jsx)(`svg`,{viewBox:`0 0 16 16`,"aria-hidden":`true`,children:(0,S.jsx)(`path`,{d:`M3 4.5h10M6.5 4.5V3h3v1.5M4.5 4.5l.7 9h5.6l.7-9`})})})]})}function A_(){let{revision:e,toast:t,refreshDocs:n}=oe(),[r,i]=(0,d.useState)(null),[a,o]=(0,d.useState)(null),[s,c]=(0,d.useState)(!1),[l,u]=(0,d.useState)(``),[f,p]=(0,d.useState)(``),[m,h]=(0,d.useState)(``),[g,y]=(0,d.useState)(null),b=async()=>{try{i(await v(`/api/rules`)),o(null)}catch(e){o(e)}};(0,d.useEffect)(()=>{b()},[e]);let x=(0,d.useMemo)(()=>{let e=new Map;for(let t of r?.sections??[])e.set(t,[]);for(let t of r?.rules??[])e.set(t.section,[...e.get(t.section)??[],t]);return[...e.entries()].filter(([,e])=>e.length)},[r]),C=async(e,a)=>{if(!r)return!1;c(!0);try{return i(await e(r.hash)),a&&t(a,`success`),n(),!0}catch(e){return e instanceof _&&e.status===409?(t(`rules.md changed on disk — reloaded the latest version. Please retry.`,`error`),await b()):t(e instanceof Error?e.message:`Update failed`,`error`),!1}finally{c(!1)}};if(a)return(0,S.jsx)(`div`,{className:`page`,children:(0,S.jsx)(fe,{error:a})});if(!r)return(0,S.jsx)(`div`,{className:`page-loading`,children:(0,S.jsx)(de,{})});let ee=l===`__new`?f.trim():l||r.sections[0]||`General`,w=r.rules.filter(e=>e.enabled).length,T=async()=>{m.trim()&&ee&&await C(e=>v(`/api/rules`,{method:`POST`,body:{section:ee,text:m.trim(),baseHash:e}}),`Rule added to ${ee}`)&&(h(``),l===`__new`&&(u(ee),p(``)))};return(0,S.jsxs)(`div`,{className:`page`,children:[(0,S.jsxs)(`header`,{className:`page__header`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`page__kicker mono`,children:`.athena/rules.md`}),(0,S.jsx)(`h1`,{className:`page__title`,children:`Project Rules`}),(0,S.jsxs)(`p`,{className:`page__subtitle`,children:[`Rules every configured AI agent is instructed to follow. This page edits `,(0,S.jsx)(`span`,{className:`mono`,children:`rules.md`}),` directly; the file stays the source of truth.`]})]}),(0,S.jsxs)(`div`,{className:`page__meta`,children:[(0,S.jsxs)(`span`,{children:[w,` enabled · `,r.rules.length-w,` disabled`]}),(0,S.jsx)(E,{to:`/docs/rules`,className:`btn btn--sm`,children:`Edit raw Markdown`})]})]}),(0,S.jsx)(`form`,{className:`card add-rule`,onSubmit:e=>{e.preventDefault(),T()},children:(0,S.jsxs)(`div`,{className:`add-rule__row`,children:[(0,S.jsxs)(`select`,{className:`select`,value:l||r.sections[0]||``,onChange:e=>u(e.target.value),"aria-label":`Section`,children:[r.sections.map(e=>(0,S.jsx)(`option`,{value:e,children:e},e)),(0,S.jsx)(`option`,{value:`__new`,children:`+ New section…`})]}),l===`__new`&&(0,S.jsx)(`input`,{className:`input add-rule__section`,placeholder:`Section name`,value:f,maxLength:80,onChange:e=>p(e.target.value),"aria-label":`New section name`}),(0,S.jsx)(`input`,{className:`input add-rule__text`,placeholder:`Add a rule, e.g. “Every tenant-owned table must include tenant_id.”`,value:m,maxLength:1e3,onChange:e=>h(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.nativeEvent.isComposing&&(e.preventDefault(),T())},"aria-label":`Rule text`}),(0,S.jsx)(`button`,{className:`btn btn--primary`,type:`submit`,disabled:s||!m.trim()||!ee,children:`Add rule`})]})}),x.length===0?(0,S.jsx)(k,{title:`No rules yet`,children:`Add your first rule above.`}):x.map(([e,t])=>(0,S.jsxs)(`section`,{className:`rule-section`,children:[(0,S.jsxs)(`h2`,{className:`rule-section__title`,children:[e,` `,(0,S.jsx)(`span`,{className:`muted`,children:t.length})]}),(0,S.jsx)(`ul`,{className:`rules`,children:t.map(e=>(0,S.jsx)(k_,{rule:e,busy:s,onToggle:()=>void C(t=>v(`/api/rules/${e.index}`,{method:`PATCH`,body:{enabled:!e.enabled,baseHash:t}})),onEdit:t=>C(n=>v(`/api/rules/${e.index}`,{method:`PATCH`,body:{text:t,baseHash:n}}),`Rule updated`),onDelete:()=>y(e)},`${e.index}:${e.text}`))})]},e)),(0,S.jsxs)(`p`,{className:`fineprint`,children:[`Disabled rules stay in the file as `,(0,S.jsx)(`span`,{className:`mono`,children:`- [disabled] …`}),` so they can be re-enabled later. Suggestions seeded by Athena start disabled.`]}),(0,S.jsx)(pe,{open:g!==null,title:`Delete rule?`,body:(0,S.jsx)(`p`,{className:`dialog__quote`,children:g?.text}),confirmLabel:`Delete`,danger:!0,onCancel:()=>y(null),onConfirm:()=>{let e=g;y(null),C(t=>v(`/api/rules/${e.index}?baseHash=${encodeURIComponent(t)}`,{method:`DELETE`}),`Rule deleted`)}})]})}function j_(){let{revision:e,toast:t}=oe(),{data:n,error:r,reload:i}=O(`/api/agents`,[e]),[a,o]=(0,d.useState)(null),[s,c]=(0,d.useState)(!1);return r?(0,S.jsx)(`div`,{className:`page`,children:(0,S.jsx)(fe,{error:r})}):n?(0,S.jsxs)(`div`,{className:`page`,children:[(0,S.jsx)(`header`,{className:`page__header`,children:(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`page__kicker`,children:`Integrations`}),(0,S.jsx)(`h1`,{className:`page__title`,children:`AI Agents`}),(0,S.jsx)(`p`,{className:`page__subtitle`,children:`Each agent is a separate client of the same project knowledge. Athena writes instructions using each agent's own supported mechanism.`})]})}),(0,S.jsxs)(`div`,{className:`note`,children:[(0,S.jsx)(`strong`,{children:`What "configured" means:`}),` Athena's instruction files are in place, and for agents that support hooks, those hooks report tool use to Athena. Athena sees which tool ran and on which files — never the agent's reasoning. It cannot tell whether an agent is running when no hook has fired.`]}),(0,S.jsx)(`div`,{className:`agents`,children:n.map(e=>(0,S.jsxs)(`article`,{className:`card agent ${e.configured?`agent--on`:``}`,children:[(0,S.jsxs)(`header`,{className:`agent__header`,children:[(0,S.jsx)(`span`,{className:`dot ${e.configured?`dot--green`:`dot--off`}`}),(0,S.jsx)(`h2`,{className:`agent__name`,children:e.name}),e.configured?(0,S.jsx)(se,{tone:`green`,children:`Configured`}):(0,S.jsx)(se,{children:`Not configured`}),e.detectedInProject&&(0,S.jsx)(se,{tone:`accent`,title:e.evidence.join(`, `),children:`Detected in project`})]}),(0,S.jsx)(`p`,{className:`agent__note`,children:e.note}),(0,S.jsxs)(`dl`,{className:`facts facts--compact`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:`Files`}),(0,S.jsx)(`dd`,{className:`mono`,children:e.files.length?e.files.join(`, `):`—`})]}),e.configuredAt&&(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:`Configured`}),(0,S.jsx)(`dd`,{children:D(e.configuredAt)})]}),e.detectedInProject&&(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:`Evidence`}),(0,S.jsx)(`dd`,{className:`mono`,children:e.evidence.join(`, `)})]}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:`Activity`}),(0,S.jsx)(`dd`,{children:e.activityObservation===`hooks`?(0,S.jsxs)(S.Fragment,{children:[`Reporting via hooks`,e.lastActivityAt?(0,S.jsxs)(`span`,{className:`muted`,children:[` · last seen `,D(e.lastActivityAt),` · `,e.observedEvents,` events`]}):(0,S.jsx)(`span`,{className:`muted`,children:` · nothing observed yet`})]}):e.activityObservation===`not-configured`?(0,S.jsx)(`span`,{className:`muted`,children:`Hooks not installed — configure to see activity`}):(0,S.jsx)(`span`,{className:`muted`,children:`No documented hook mechanism`})})]})]}),e.checks.length>0&&(0,S.jsx)(`ul`,{className:`checks`,children:e.checks.map((e,t)=>(0,S.jsxs)(`li`,{className:`check check--${e.level}`,children:[(0,S.jsx)(`span`,{"aria-hidden":`true`,children:e.level===`ok`?`✓`:e.level===`warn`?`!`:`✗`}),` `,e.message]},t))}),(0,S.jsx)(`footer`,{className:`agent__footer`,children:e.configured?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`button`,{className:`btn btn--sm`,disabled:s,onClick:()=>o({agent:e,action:`configure`}),children:`Refresh instructions`}),(0,S.jsx)(`button`,{className:`btn btn--sm btn--danger-ghost`,disabled:s,onClick:()=>o({agent:e,action:`remove`}),children:`Remove`})]}):(0,S.jsx)(`button`,{className:`btn btn--sm btn--primary`,disabled:s,onClick:()=>o({agent:e,action:`configure`}),children:`Configure`})})]},e.id))}),(0,S.jsx)(pe,{open:a!==null,title:a?.action===`remove`?`Remove ${a.agent.name} integration?`:`Configure ${a?.agent.name??``}?`,body:a?.action===`remove`?(0,S.jsxs)(`p`,{children:[`Athena will remove its block or file (`,a.agent.files.join(`, `)||`none recorded`,`). Your own content in those files is kept.`]}):(0,S.jsx)(`p`,{children:`Athena will write instruction files for this agent into your project. Existing content in shared files is preserved; Athena only manages its own marked block.`}),confirmLabel:a?.action===`remove`?`Remove`:`Configure`,danger:a?.action===`remove`,onCancel:()=>o(null),onConfirm:async()=>{if(!a)return;let{agent:e,action:n}=a;o(null),c(!0);try{await v(`/api/agents/${n}`,{method:`POST`,body:{agents:[e.id]}}),t(n===`configure`?`${e.name} integration configured`:`${e.name} integration removed`,`success`),i()}catch(e){t(e.message,`error`)}finally{c(!1)}}})]}):(0,S.jsx)(`div`,{className:`page-loading`,children:(0,S.jsx)(de,{})})}var M_=[{id:`all`,label:`All`},{id:`athena`,label:`Athena`},{id:`web-ui`,label:`Web UI`},{id:`filesystem`,label:`File system`},{id:`agent`,label:`AI agents`}];function N_(){let{events:e,connected:t,revision:n}=oe(),{data:r}=O(`/api/activity`,[n,e.length]),i=r?.agentObservation,a=r?.sessions??[],[o,s]=(0,d.useState)(`all`),c=(0,d.useMemo)(()=>o===`all`?e:e.filter(e=>e.source===o),[e,o]);return(0,S.jsxs)(`div`,{className:`page`,children:[(0,S.jsxs)(`header`,{className:`page__header`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`page__kicker`,children:`Timeline`}),(0,S.jsx)(`h1`,{className:`page__title`,children:`Activity`}),(0,S.jsx)(`p`,{className:`page__subtitle`,children:`Only events Athena directly observed in this session. Nothing here is simulated.`})]}),(0,S.jsx)(`div`,{className:`page__meta`,children:(0,S.jsx)(`span`,{className:`conn ${t?`conn--on`:`conn--off`}`,children:t?`Live`:`Reconnecting`})})]}),(0,S.jsxs)(`div`,{className:`activity-layout`,children:[(0,S.jsx)(ue,{children:(0,S.jsx)(we,{})}),(0,S.jsxs)(ue,{title:`What Athena can observe`,children:[(0,S.jsxs)(`ul`,{className:`observe`,children:[(0,S.jsx)(`li`,{className:`observe--yes`,children:`Analyses and knowledge updates (started here or by the CLI)`}),(0,S.jsxs)(`li`,{className:`observe--yes`,children:[`Changes to `,(0,S.jsx)(`span`,{className:`mono`,children:`.athena/*.md`}),` made elsewhere`]}),(0,S.jsxs)(`li`,{className:i?.available?`observe--yes`:`observe--no`,children:[`AI agent tool use via hooks`,i?.available?`: ${i.agents.join(`, `)}`:` — no agent is reporting yet`]}),(0,S.jsx)(`li`,{className:`observe--no`,children:`Agent reasoning or plans — hooks report which tool ran, never why`})]}),i&&(0,S.jsx)(`p`,{className:`fineprint`,children:i.reason}),a.length>0&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`label`,style:{marginTop:14},children:`Agent sessions seen`}),(0,S.jsx)(`ul`,{className:`agentlist`,children:a.slice(0,4).map(e=>(0,S.jsxs)(`li`,{children:[(0,S.jsx)(`span`,{className:`dot dot--green`}),(0,S.jsxs)(`span`,{children:[e.agent,` `,(0,S.jsx)(`span`,{className:`muted mono`,children:e.session?.slice(0,8)??``})]}),(0,S.jsxs)(`span`,{className:`muted`,children:[e.events,` events · `,D(e.lastEventAt)]})]},`${e.agent}:${e.session??`-`}`))})]})]})]}),(0,S.jsx)(ue,{title:`Events`,actions:(0,S.jsx)(`div`,{className:`segmented`,role:`tablist`,children:M_.map(e=>(0,S.jsx)(`button`,{role:`tab`,"aria-selected":o===e.id,className:`segmented__btn ${o===e.id?`segmented__btn--active`:``}`,onClick:()=>s(e.id),children:e.label},e.id))}),children:o===`agent`&&!c.length?(0,S.jsx)(`div`,{className:`events-empty`,children:`No agent events recorded yet. Configure Claude Code, Cursor, Codex, GitHub Copilot or Gemini CLI on the AI Agents page, then start a session.`}):(0,S.jsx)(Te,{events:c})})]})}function P_(e){let t=[],n=0,r=0;for(let i of e.split(`
|
|
45
|
+
`)){if(i.startsWith(`===`)||i.startsWith(`Index:`)||i.startsWith(`---`)||i.startsWith(`+++`))continue;let e=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@(.*)$/.exec(i);e?(n=Number(e[1]),r=Number(e[2]),t.push({kind:`hunk`,text:i})):i.startsWith(`+`)?t.push({kind:`add`,text:i.slice(1),newNo:r++}):i.startsWith(`-`)?t.push({kind:`del`,text:i.slice(1),oldNo:n++}):i.startsWith(` `)?t.push({kind:`ctx`,text:i.slice(1),oldNo:n++,newNo:r++}):(i.startsWith(`\\`)||i.startsWith(`…`))&&t.push({kind:`note`,text:i})}return t}function F_({patch:e,truncated:t}){let n=(0,d.useMemo)(()=>P_(e),[e]);return(0,S.jsxs)(`div`,{className:`diff`,role:`table`,"aria-label":`Proposed changes`,children:[n.map((e,t)=>(0,S.jsxs)(`div`,{className:`diff__row diff__row--${e.kind}`,role:`row`,children:[(0,S.jsx)(`span`,{className:`diff__no`,"aria-hidden":`true`,children:e.oldNo??``}),(0,S.jsx)(`span`,{className:`diff__no`,"aria-hidden":`true`,children:e.newNo??``}),(0,S.jsx)(`span`,{className:`diff__sign`,"aria-hidden":`true`,children:e.kind===`add`?`+`:e.kind===`del`?`−`:``}),(0,S.jsx)(`span`,{className:`diff__text`,children:e.kind===`hunk`?e.text.replace(/^@@.*@@\s?/,``)||`…`:e.text})]},t)),t&&(0,S.jsx)(`div`,{className:`diff__row diff__row--note`,children:(0,S.jsxs)(`span`,{className:`diff__text`,children:[`Diff truncated. Run `,(0,S.jsx)(`code`,{children:`athena sync --diff`}),` for the full change.`]})})]})}function I_({plan:e}){let t=e.fileChanges,n=[...t.modified.map(e=>({k:`M`,p:e})),...t.added.map(e=>({k:`A`,p:e})),...t.deleted.map(e=>({k:`D`,p:e})),...t.renamed.map(e=>({k:`R`,p:`${e.from} → ${e.to}`}))],[r,i]=(0,d.useState)(!1);return n.length?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`ul`,{className:`filechanges`,children:(r?n:n.slice(0,8)).map(e=>(0,S.jsxs)(`li`,{children:[(0,S.jsx)(`span`,{className:`filechanges__kind filechanges__kind--${e.k}`,children:e.k}),(0,S.jsx)(`span`,{className:`mono`,children:e.p})]},`${e.k}:${e.p}`))}),n.length>8&&(0,S.jsx)(`button`,{className:`btn btn--ghost btn--sm`,onClick:()=>i(!r),children:r?`Show less`:`Show all ${n.length}`})]}):(0,S.jsx)(`p`,{className:`muted`,children:`No file changes since the last analysis.`})}function L_({planId:e,id:t}){let{data:n,error:r}=O(`/api/sync/${encodeURIComponent(t)}?planId=${e}`,[e]);return r?(0,S.jsx)(fe,{error:r}):!n||n.planId!==e?(0,S.jsxs)(`p`,{className:`muted`,children:[(0,S.jsx)(de,{label:`Loading diff`}),` Loading diff…`]}):(0,S.jsx)(F_,{patch:n.diff,truncated:n.diffTruncated})}function R_(){let{revision:e,toast:t,activity:n}=oe(),{data:r,error:i,reload:a}=O(`/api/sync`,[e]),[o,s]=(0,d.useState)({}),[c,l]=(0,d.useState)(null);if(i)return(0,S.jsx)(`div`,{className:`page`,children:(0,S.jsx)(fe,{error:i})});if(!r)return(0,S.jsx)(`div`,{className:`page-loading`,children:(0,S.jsx)(de,{})});let u=r.plan,f=n.state===`ANALYZING`||c===`check`,p=async e=>{l(e);try{e===`check`?(await v(`/api/sync/check`,{method:`POST`,body:{}})).upToDate&&t(`Knowledge is up to date`,`success`):(await v(`/api/sync/${e}`,{method:`POST`,body:{planId:u.id}}),t(e===`apply`?`Knowledge updated`:`Proposal ignored until files change again`,`success`)),a()}catch(e){t(e instanceof _?`${e.message}${e.hint?` ${e.hint}`:``}`:`Request failed`,`error`),a()}finally{l(null)}};return(0,S.jsxs)(`div`,{className:`page`,children:[(0,S.jsxs)(`header`,{className:`page__header`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`page__kicker`,children:`Continuous synchronization`}),(0,S.jsx)(`h1`,{className:`page__title`,children:`Sync`}),(0,S.jsx)(`p`,{className:`page__subtitle`,children:`When project files change, Athena re-analyzes and proposes updates only for knowledge that actually changes. Nothing is written until you review it.`})]}),(0,S.jsxs)(`div`,{className:`page__meta`,children:[(0,S.jsx)(`span`,{children:r.watching?(0,S.jsx)(se,{tone:`green`,children:`Watching files`}):(0,S.jsx)(se,{children:`Not watching`})}),(0,S.jsx)(`span`,{children:r.lastCheckedAt?`Checked ${D(r.lastCheckedAt)}`:`Not checked yet`}),(0,S.jsx)(`button`,{className:`btn btn--sm`,onClick:()=>p(`check`),disabled:c!==null,children:f?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(de,{label:`Checking`}),` Checking…`]}):`Check now`})]})]}),u?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`proposal ${u.ignored?`proposal--ignored`:``}`,children:[(0,S.jsxs)(`div`,{className:`proposal__text`,children:[(0,S.jsxs)(`strong`,{children:[u.documents.length,` document`,u.documents.length===1?``:`s`,` would change`]}),(0,S.jsxs)(`span`,{className:`muted`,children:[` `,`· `,u.documents.reduce((e,t)=>e+t.additions,0),` additions, `,u.documents.reduce((e,t)=>e+t.deletions,0),` deletions · planned `,D(u.createdAt)]}),u.ignored&&(0,S.jsx)(`div`,{className:`muted fineprint`,children:`You ignored this proposal. It will resurface when files change again.`})]}),(0,S.jsxs)(`div`,{className:`proposal__actions`,children:[!u.ignored&&(0,S.jsx)(`button`,{className:`btn`,onClick:()=>p(`ignore`),disabled:c!==null,children:`Ignore`}),(0,S.jsx)(`button`,{className:`btn btn--primary`,onClick:()=>p(`apply`),disabled:c!==null,children:c===`apply`?`Updating…`:`Update ${u.documents.length} document${u.documents.length===1?``:`s`}`})]})]}),(0,S.jsxs)(`div`,{className:`sync-grid`,children:[(0,S.jsxs)(ue,{title:`What changed in the project`,children:[(0,S.jsx)(I_,{plan:u}),u.git.isRepo&&u.git.previousHead&&u.git.head!==u.git.previousHead&&(0,S.jsxs)(`div`,{className:`gitmove`,children:[(0,S.jsx)(`div`,{className:`label`,children:`Git`}),u.git.branchChanged&&(0,S.jsxs)(`p`,{children:[`Branch changed `,(0,S.jsx)(`span`,{className:`mono`,children:u.git.previousBranch}),` → `,(0,S.jsx)(`span`,{className:`mono`,children:u.git.branch})]}),u.git.diverged?(0,S.jsx)(`p`,{className:`muted`,children:`HEAD moved to a commit that does not descend from the last analysis (checkout, rebase or reset).`}):(0,S.jsxs)(`ul`,{className:`commits`,children:[u.git.commits.map(e=>(0,S.jsxs)(`li`,{children:[(0,S.jsx)(`span`,{className:`mono muted`,children:e.sha.slice(0,8)}),` `,e.subject]},e.sha)),u.git.truncated&&(0,S.jsx)(`li`,{className:`muted`,children:`…more commits`})]})]})]}),(0,S.jsx)(ue,{title:`Detected project changes`,children:u.modelChanges.length?(0,S.jsx)(`ul`,{className:`modelchanges`,children:u.modelChanges.map(e=>(0,S.jsxs)(`li`,{children:[(0,S.jsx)(`span`,{className:`modelchanges__label`,children:e.label}),(0,S.jsx)(`span`,{className:`muted`,children:e.summary})]},e.label))}):(0,S.jsx)(`p`,{className:`muted`,children:`No structural changes recorded (previous model unavailable, or changes are formatting-only).`})})]}),(0,S.jsx)(`h2`,{className:`section-title`,children:`Proposed knowledge updates`}),(0,S.jsx)(`div`,{className:`proposed`,children:u.documents.map(e=>{let t=o[e.id]??u.documents.length<=2;return(0,S.jsxs)(`article`,{className:`card proposed__doc`,children:[(0,S.jsxs)(`button`,{className:`proposed__head`,onClick:()=>s({...o,[e.id]:!t}),"aria-expanded":t,children:[(0,S.jsx)(`span`,{className:`chevron ${t?`chevron--open`:``}`,"aria-hidden":`true`,children:`›`}),(0,S.jsx)(`span`,{className:`proposed__file mono`,children:e.file}),e.status===`created`&&(0,S.jsx)(se,{tone:`green`,children:`new`}),(0,S.jsxs)(`span`,{className:`proposed__counts`,children:[(0,S.jsxs)(`span`,{className:`add`,children:[`+`,e.additions]}),` `,(0,S.jsxs)(`span`,{className:`del`,children:[`−`,e.deletions]})]})]}),(0,S.jsx)(`ul`,{className:`reasons`,children:e.reasons.map(e=>(0,S.jsx)(`li`,{children:e},e))}),(0,S.jsxs)(`div`,{className:`proposed__sections`,children:[`Sections: `,e.changedSections.map(e=>(0,S.jsx)(`span`,{className:`mono tag`,children:e},e)),(0,S.jsx)(E,{to:`/docs/${e.id}`,className:`proposed__open`,children:`Open current`})]}),e.preservedSections.length>0&&(0,S.jsxs)(`div`,{className:`note note--info`,children:[`Your edits in `,(0,S.jsx)(`span`,{className:`mono`,children:e.preservedSections.join(`, `)}),` are kept and not overwritten.`]}),t&&(0,S.jsx)(L_,{planId:u.id,id:e.id})]},e.id)})}),u.checkedUnchanged.length>0&&(0,S.jsxs)(`p`,{className:`fineprint`,children:[`Also checked and unchanged: `,u.checkedUnchanged.join(`, `)]})]}):(0,S.jsx)(ue,{children:(0,S.jsx)(k,{title:`Knowledge is up to date`,children:r.watching?`Athena is watching this project and will propose updates when relevant files change.`:`Run a check to compare the project with its knowledge.`})})]})}var z_={critical:`red`,high:`red`,moderate:`yellow`,low:`blue`,unrated:`neutral`},B_=[`critical`,`high`,`moderate`,`low`,`unrated`];function V_(){let{revision:e,toast:t,activity:n}=oe(),{data:r,error:i,reload:a}=O(`/api/security`,[e]),[o,s]=(0,d.useState)(!1);if(i)return(0,S.jsx)(`div`,{className:`page`,children:(0,S.jsx)(fe,{error:i})});if(!r)return(0,S.jsx)(`div`,{className:`page-loading`,children:(0,S.jsx)(de,{})});let c=r.scan,l=r.running||o||n.state===`REVIEWING`&&n.actor===`athena`,u=async()=>{s(!0);try{await v(`/api/security/scan`,{method:`POST`,body:{}}),t(`Security scan started`,`success`)}catch(e){t(e instanceof _?e.message:`Could not start the scan`,`error`)}finally{s(!1),setTimeout(a,1e3)}},f=c?.tools.flatMap(e=>e.findings.map(t=>({...t,tool:e.tool})))??[],p=B_.map(e=>[e,f.filter(t=>t.severity===e).length]).filter(([,e])=>e>0);return(0,S.jsxs)(`div`,{className:`page`,children:[(0,S.jsxs)(`header`,{className:`page__header`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`page__kicker`,children:`Dependencies & secrets`}),(0,S.jsx)(`h1`,{className:`page__title`,children:`Security`}),(0,S.jsx)(`p`,{className:`page__subtitle`,children:`Athena runs the audit tools installed for this project and reports what they find. It has no vulnerability database of its own, and a clean audit is not proof that the project is secure.`})]}),(0,S.jsxs)(`div`,{className:`page__meta`,children:[c&&(0,S.jsxs)(`span`,{children:[`Scanned `,D(c.scannedAt)]}),(0,S.jsx)(`button`,{className:`btn btn--primary btn--sm`,onClick:u,disabled:l,children:l?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(de,{label:`Scanning`}),` Scanning…`]}):c?`Re-scan`:`Run scan`})]})]}),c?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`stats`,children:[(0,S.jsxs)(`div`,{className:`stat`,children:[(0,S.jsx)(`div`,{className:`stat__label`,children:`Dependency findings`}),(0,S.jsx)(`div`,{className:`stat__value ${f.length?`stat__value--warn`:``}`,children:f.length}),(0,S.jsx)(`div`,{className:`stat__sub`,children:p.map(([e,t])=>`${t} ${e}`).join(` · `)||`none reported`})]}),(0,S.jsxs)(`div`,{className:`stat`,children:[(0,S.jsx)(`div`,{className:`stat__label`,children:`Potential secrets`}),(0,S.jsx)(`div`,{className:`stat__value ${c.secrets.count?`stat__value--warn`:``}`,children:c.secrets.count}),(0,S.jsx)(`div`,{className:`stat__sub`,children:c.secrets.count?`values never stored`:`none matched`})]}),(0,S.jsxs)(`div`,{className:`stat`,children:[(0,S.jsx)(`div`,{className:`stat__label`,children:`Tools run`}),(0,S.jsxs)(`div`,{className:`stat__value`,children:[c.tools.filter(e=>e.status===`ok`).length,`/`,c.tools.length]}),(0,S.jsxs)(`div`,{className:`stat__sub`,children:[(c.durationMs/1e3).toFixed(1),`s`]})]})]}),(0,S.jsxs)(ue,{title:`Audit tools`,children:[(0,S.jsxs)(`ul`,{className:`checks`,children:[c.tools.length===0&&(0,S.jsx)(`li`,{className:`muted`,children:`No auditable ecosystems detected (no lockfiles or supported manifests).`}),c.tools.map(e=>(0,S.jsxs)(`li`,{className:`check check--${e.status===`ok`?e.findings.length?`warn`:`ok`:`warn`}`,children:[(0,S.jsx)(`span`,{"aria-hidden":`true`,children:e.status===`ok`?e.findings.length?`!`:`✓`:`○`}),` `,(0,S.jsx)(`strong`,{children:e.tool}),` `,e.status===`ok`?`${e.findings.length} finding(s) in ${(e.durationMs/1e3).toFixed(1)}s`:`${e.status} — ${e.message??``}`]},e.tool))]}),(0,S.jsx)(`p`,{className:`fineprint`,children:`An ecosystem without its tool installed is reported as unknown, never as "no problems".`})]}),f.length>0&&(0,S.jsx)(ue,{title:`Vulnerable dependencies`,className:`card--flush`,children:(0,S.jsx)(`div`,{className:`table-wrap`,children:(0,S.jsxs)(`table`,{children:[(0,S.jsx)(`thead`,{children:(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`th`,{children:`Severity`}),(0,S.jsx)(`th`,{children:`Package`}),(0,S.jsx)(`th`,{children:`Advisory`}),(0,S.jsx)(`th`,{children:`ID`}),(0,S.jsx)(`th`,{children:`Tool`}),(0,S.jsx)(`th`,{children:`Fix`})]})}),(0,S.jsx)(`tbody`,{children:f.slice(0,200).map((e,t)=>(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`td`,{children:(0,S.jsx)(se,{tone:z_[e.severity],children:e.severity})}),(0,S.jsx)(`td`,{className:`mono`,children:e.package}),(0,S.jsx)(`td`,{children:e.url?(0,S.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,children:e.title}):e.title}),(0,S.jsx)(`td`,{className:`mono`,children:e.id??`—`}),(0,S.jsx)(`td`,{className:`muted`,children:e.tool}),(0,S.jsx)(`td`,{children:e.fixAvailable===!0?`available`:e.fixAvailable===!1?`none reported`:`unknown`})]},`${e.package}:${e.id??t}`))})]})})}),(0,S.jsx)(ue,{title:`Potential secrets`,children:c.secrets.count?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`p`,{children:[c.secrets.count,` potential hardcoded secret(s) across `,c.secrets.files.length,` file(s). Athena stores the type and location only — never the value.`]}),(0,S.jsx)(`ul`,{className:`filechanges`,children:c.secrets.files.slice(0,15).map(e=>(0,S.jsxs)(`li`,{children:[(0,S.jsx)(`span`,{className:`filechanges__kind filechanges__kind--M`,children:`!`}),(0,S.jsx)(`span`,{className:`mono`,children:e})]},e))}),(0,S.jsxs)(`p`,{className:`fineprint`,children:[`Types and line numbers are listed in `,(0,S.jsx)(E,{to:`/docs/security`,children:`security.md`}),`. Rotate anything real.`]})]}):(0,S.jsx)(`p`,{className:`muted`,children:`No likely secrets matched Athena's patterns. Gitignored and oversized files are not scanned, so this is not proof that none exist.`})}),(0,S.jsxs)(`p`,{className:`fineprint`,children:[`Scan results are stored in `,(0,S.jsx)(`span`,{className:`mono`,children:`.athena/security-scan.json`}),` (gitignored). Run `,(0,S.jsx)(`span`,{className:`mono`,children:`athena sync`}),` to record them in `,(0,S.jsx)(E,{to:`/docs/security`,children:`security.md`}),`.`]})]}):(0,S.jsx)(ue,{children:(0,S.jsx)(k,{title:`No scan yet`,children:`Run a scan to audit dependencies with the tools available on this machine (npm audit, pip-audit, govulncheck, cargo audit, composer audit).`})})]})}var H_=[`add refunds to the payments API`,`fix the failing checkout tests`,`speed up the dashboard query`,`require 2FA for admin login`];function U_(){let{revision:e,toast:t}=oe(),{data:n,reload:r}=O(`/api/graph`,[e]),[i,a]=(0,d.useState)(``),[o,s]=(0,d.useState)(null),[c,l]=(0,d.useState)(null),[u,f]=(0,d.useState)(!1),[p,m]=(0,d.useState)(!1),[h,g]=(0,d.useState)(!1),y=async e=>{let t=e.trim();if(t){f(!0),l(null);try{s(await v(`/api/context?task=${encodeURIComponent(t)}`))}catch(e){l(e),s(null)}finally{f(!1)}}};return(0,S.jsxs)(`div`,{className:`page`,children:[(0,S.jsxs)(`header`,{className:`page__header`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`page__kicker`,children:`Context engine`}),(0,S.jsx)(`h1`,{className:`page__title`,children:`Context`}),(0,S.jsxs)(`p`,{className:`page__subtitle`,children:[`Describe a task and Athena shows exactly which knowledge an agent should read for it — chosen deterministically, with the reason for each choice. This is what the MCP tool `,(0,S.jsx)(`span`,{className:`mono`,children:`get_relevant_context`}),` returns.`]})]}),(0,S.jsxs)(`div`,{className:`page__meta`,children:[n?.built?(0,S.jsxs)(`span`,{children:[`Graph: `,n.stats.nodes,` nodes · `,n.stats.edges,` links · `,D(n.builtAt)]}):(0,S.jsx)(`span`,{className:`muted`,children:`Graph not built`}),(0,S.jsx)(`button`,{className:`btn btn--sm`,onClick:async()=>{m(!0);try{await v(`/api/graph/build`,{method:`POST`,body:{}}),t(`Project graph rebuilt`,`success`),r()}catch(e){t(e instanceof _?e.message:`Could not build the graph`,`error`)}finally{m(!1)}},disabled:p,children:p?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(de,{label:`Building`}),` Building…`]}):n?.built?`Rebuild graph`:`Build graph`})]})]}),(0,S.jsxs)(`form`,{className:`card add-rule`,onSubmit:e=>{e.preventDefault(),y(i)},children:[(0,S.jsxs)(`div`,{className:`add-rule__row`,children:[(0,S.jsx)(`input`,{className:`input add-rule__text`,placeholder:`What are you about to do?`,value:i,onChange:e=>a(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.nativeEvent.isComposing&&(e.preventDefault(),y(i))},"aria-label":`Task description`}),(0,S.jsx)(`button`,{className:`btn btn--primary`,type:`submit`,disabled:u||!i.trim(),children:u?`Selecting…`:`Show context`})]}),(0,S.jsx)(`div`,{className:`examples`,children:H_.map(e=>(0,S.jsx)(`button`,{type:`button`,className:`chip chip--button`,onClick:()=>{a(e),y(e)},children:e},e))})]}),c&&(0,S.jsx)(fe,{error:c}),!o&&!c&&(0,S.jsx)(ue,{children:(0,S.jsx)(k,{title:`No task yet`,children:`Enter a task above, or try one of the examples.`})}),o&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`sync-grid`,children:[(0,S.jsx)(ue,{title:`Documents selected, and why`,children:(0,S.jsx)(`ul`,{className:`modelchanges`,children:o.areas.map(e=>(0,S.jsxs)(`li`,{children:[(0,S.jsx)(`span`,{className:`modelchanges__label`,children:(0,S.jsx)(E,{to:e.id===`rules`?`/rules`:`/docs/${e.id}`,children:e.id})}),(0,S.jsx)(`span`,{className:`muted`,children:e.why.join(`; `)})]},e.id))})}),(0,S.jsx)(ue,{title:`Related code (project graph)`,children:o.graphNodes.length||o.mentionedFiles.length?(0,S.jsxs)(`ul`,{className:`filechanges`,children:[o.mentionedFiles.map(e=>(0,S.jsxs)(`li`,{children:[(0,S.jsx)(`span`,{className:`filechanges__kind filechanges__kind--A`,children:`@`}),(0,S.jsx)(`span`,{className:`mono`,children:e})]},e)),o.graphNodes.filter(e=>!o.mentionedFiles.includes(e.path??``)).slice(0,12).map(e=>(0,S.jsxs)(`li`,{children:[(0,S.jsx)(`span`,{className:`filechanges__kind filechanges__kind--R`,children:e.kind[0].toUpperCase()}),(0,S.jsxs)(`span`,{className:`mono`,children:[e.name,e.path?` · ${e.path}`:``]})]},e.id))]}):(0,S.jsx)(`p`,{className:`muted`,children:`No related nodes. Name a file in the task, or build the graph.`})})]}),(0,S.jsxs)(ue,{title:`Sections an agent would read (${o.sections.length})`,actions:(0,S.jsxs)(`label`,{className:`toggle-label`,children:[(0,S.jsx)(`input`,{type:`checkbox`,checked:h,onChange:e=>g(e.target.checked)}),` Show content`]}),children:[(0,S.jsx)(`div`,{className:`context-sections`,children:o.sections.map(e=>(0,S.jsxs)(`div`,{className:`context-section`,children:[(0,S.jsxs)(`div`,{className:`context-section__head`,children:[(0,S.jsx)(`span`,{className:`mono`,children:e.file}),(0,S.jsx)(se,{children:e.section})]}),h&&(0,S.jsx)(`pre`,{className:`context-section__body`,children:e.content})]},`${e.doc}:${e.section}`))}),(0,S.jsxs)(`p`,{className:`fineprint`,children:[`~`,o.approxChars.toLocaleString(),` characters · `,o.rules.length,` project rules always included`,o.truncated?` · lower-ranked sections omitted for budget`:``]})]})]})]})}var W_=[{id:`decision`,label:`Decision`,plural:`Decisions`},{id:`gotcha`,label:`Gotcha`,plural:`Gotchas`},{id:`bug`,label:`Bug`,plural:`Bugs`},{id:`convention`,label:`Convention`,plural:`Conventions`},{id:`todo`,label:`To-do`,plural:`To-dos`},{id:`fact`,label:`Fact`,plural:`Facts`}],G_=e=>W_.find(t=>t.id===e)?.label??e,K_={"claude-code":`Claude Code`,claude:`Claude`,cursor:`Cursor`,codex:`Codex`,copilot:`GitHub Copilot`,"github-copilot":`GitHub Copilot`,windsurf:`Windsurf`,gemini:`Gemini`,"gemini-cli":`Gemini CLI`,cline:`Cline`,aider:`Aider`,zed:`Zed`};function q_(e){if(e===`developer`)return`Developer`;let t=/^agent:(.+)$/.exec(e);return t?K_[t[1]]??t[1].split(`-`).map(e=>e&&e[0].toUpperCase()+e.slice(1)).join(` `):e}var J_=e=>e.split(/[\s,]+/).map(e=>e.trim()).filter(Boolean);function Y_({initial:e,replaceable:t,submitLabel:n,onSubmit:r,onCancel:i,busy:a}){let o=(0,d.useId)(),[s,c]=(0,d.useState)(e?.kind??`decision`),[l,u]=(0,d.useState)(e?e.title:``),[f,p]=(0,d.useState)(e?e.details:``),[m,h]=(0,d.useState)(e?.files.join(`, `)??``),[g,_]=(0,d.useState)(e?.tags.join(`, `)??``),[v,y]=(0,d.useState)(e?.evidence?e.evidence:``),[b,x]=(0,d.useState)(``);return(0,S.jsxs)(`form`,{className:`memory-form`,onSubmit:async e=>{e.preventDefault(),!(l.trim().length<3)&&await r({kind:s,title:l.trim(),details:f.trim(),files:J_(m),tags:J_(g),evidence:v.trim()||void 0,supersedes:b||void 0})},"aria-label":e?`Edit memory ${e.id}`:`Add memory`,children:[(0,S.jsxs)(`div`,{className:`memory-form__row`,children:[!e&&(0,S.jsxs)(`label`,{className:`memory-form__field memory-form__field--kind`,htmlFor:`${o}-kind`,children:[(0,S.jsx)(`span`,{children:`Kind`}),(0,S.jsx)(`select`,{id:`${o}-kind`,className:`select`,value:s,onChange:e=>c(e.target.value),children:W_.map(e=>(0,S.jsx)(`option`,{value:e.id,children:e.label},e.id))})]}),(0,S.jsxs)(`label`,{className:`memory-form__field memory-form__field--grow`,htmlFor:`${o}-title`,children:[(0,S.jsx)(`span`,{children:`Title`}),(0,S.jsx)(`input`,{id:`${o}-title`,className:`input`,value:l,maxLength:200,required:!0,minLength:3,placeholder:`e.g. Orders are soft-deleted; always filter on deleted_at`,onChange:e=>u(e.target.value),autoFocus:!0})]})]}),(0,S.jsxs)(`label`,{className:`memory-form__field`,htmlFor:`${o}-details`,children:[(0,S.jsxs)(`span`,{children:[`Details `,(0,S.jsx)(`span`,{className:`muted`,children:`(plain text)`})]}),(0,S.jsx)(`textarea`,{id:`${o}-details`,className:`input memory-form__textarea`,value:f,maxLength:4e3,rows:4,onChange:e=>p(e.target.value)})]}),(0,S.jsxs)(`div`,{className:`memory-form__row`,children:[(0,S.jsxs)(`label`,{className:`memory-form__field memory-form__field--grow`,htmlFor:`${o}-files`,children:[(0,S.jsxs)(`span`,{children:[`Files `,(0,S.jsx)(`span`,{className:`muted`,children:`(project-relative, comma-separated)`})]}),(0,S.jsx)(`input`,{id:`${o}-files`,className:`input mono`,value:m,placeholder:`src/orders/repo.ts`,onChange:e=>h(e.target.value)})]}),(0,S.jsxs)(`label`,{className:`memory-form__field`,htmlFor:`${o}-tags`,children:[(0,S.jsx)(`span`,{children:`Tags`}),(0,S.jsx)(`input`,{id:`${o}-tags`,className:`input`,value:g,placeholder:`orders, db`,onChange:e=>_(e.target.value)})]})]}),(0,S.jsxs)(`label`,{className:`memory-form__field`,htmlFor:`${o}-evidence`,children:[(0,S.jsxs)(`span`,{children:[`Evidence `,(0,S.jsx)(`span`,{className:`muted`,children:`(optional: a commit, issue or test that backs it up)`})]}),(0,S.jsx)(`input`,{id:`${o}-evidence`,className:`input`,value:v,maxLength:500,onChange:e=>y(e.target.value)})]}),!e&&t&&t.length>0&&(0,S.jsxs)(`label`,{className:`memory-form__field`,htmlFor:`${o}-supersedes`,children:[(0,S.jsxs)(`span`,{children:[`Replaces `,(0,S.jsx)(`span`,{className:`muted`,children:`(optional: marks an older memory as superseded)`})]}),(0,S.jsxs)(`select`,{id:`${o}-supersedes`,className:`select`,value:b,onChange:e=>x(e.target.value),children:[(0,S.jsx)(`option`,{value:``,children:`Nothing`}),t.map(e=>(0,S.jsxs)(`option`,{value:e.id,children:[e.id,` · `,e.title.slice(0,80)]},e.id))]})]}),(0,S.jsxs)(`div`,{className:`memory-form__actions`,children:[(0,S.jsx)(`button`,{type:`button`,className:`btn`,onClick:i,children:`Cancel`}),(0,S.jsx)(`button`,{type:`submit`,className:`btn btn--primary`,disabled:a||l.trim().length<3,children:n})]})]})}function X_({entry:e,busy:t,editing:n,onConfirm:r,onEdit:i,onCancelEdit:a,onSave:o,onForget:s}){let c=e.title,l=e.source.startsWith(`agent:`);return(0,S.jsxs)(`article`,{className:`memory memory--${e.status} ${e.flags.length?`memory--flagged`:``}`,"aria-label":`${G_(e.kind)}: ${c}`,"data-testid":`memory-${e.id}`,children:[(0,S.jsxs)(`header`,{className:`memory__meta`,children:[(0,S.jsx)(se,{tone:`accent`,children:G_(e.kind)}),e.status===`superseded`?(0,S.jsx)(se,{title:e.supersededBy?`Replaced by ${e.supersededBy}`:void 0,children:`Superseded`}):(0,S.jsx)(se,{tone:e.label===`FACT`?`green`:`yellow`,title:e.label===`FACT`?`Confirmed by a developer`:`Written by an AI agent, not yet reviewed`,children:e.label}),e.stale&&(0,S.jsx)(se,{tone:`yellow`,children:`Stale`}),(0,S.jsxs)(`span`,{className:`memory__source`,children:[l?`by `:``,(0,S.jsx)(`strong`,{children:q_(e.source)}),` · recorded `,(0,S.jsx)(`time`,{dateTime:e.createdAt,title:new Date(e.createdAt).toLocaleString(),children:D(e.createdAt)}),e.confirmedAt&&e.status!==`unreviewed`&&(0,S.jsxs)(S.Fragment,{children:[` · confirmed `,(0,S.jsx)(`time`,{dateTime:e.confirmedAt,title:new Date(e.confirmedAt).toLocaleString(),children:D(e.confirmedAt)})]})]}),(0,S.jsx)(`span`,{className:`memory__id mono`,children:e.id})]}),e.flags.length>0&&(0,S.jsxs)(`div`,{className:`note note--error memory__flag`,role:`alert`,children:[(0,S.jsx)(`strong`,{children:`Possible prompt injection.`}),` This entry `,e.flags.join(`; `),`. Memory text is read by AI agents, so text like this may be an attempt to steer them. Athena never recalls flagged entries automatically. Read it carefully before confirming, or forget it.`]}),n?(0,S.jsx)(Y_,{initial:e,submitLabel:`Save`,busy:t,onSubmit:o,onCancel:a}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`h3`,{className:`memory__title`,children:c}),e.details&&(0,S.jsx)(`p`,{className:`memory__details`,children:e.details}),(e.files.length>0||e.tags.length>0||e.evidence)&&(0,S.jsxs)(`dl`,{className:`memory__facts`,children:[e.files.length>0&&(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:`Files`}),(0,S.jsx)(`dd`,{children:e.files.map(t=>(0,S.jsx)(`span`,{className:`mono memory__file ${e.changedFiles.includes(t)?`memory__file--changed`:``}`,children:t},t))})]}),e.tags.length>0&&(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:`Tags`}),(0,S.jsx)(`dd`,{children:e.tags.map(e=>(0,S.jsxs)(`span`,{className:`tag`,children:[`#`,e]},e))})]}),e.evidence&&(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:`Evidence`}),(0,S.jsx)(`dd`,{className:`memory__evidence`,children:e.evidence})]})]}),e.supersedes&&(0,S.jsxs)(`p`,{className:`fineprint`,children:[`Replaces `,(0,S.jsx)(`span`,{className:`mono`,children:e.supersedes})]}),e.status===`superseded`&&e.supersededBy&&(0,S.jsxs)(`p`,{className:`fineprint`,children:[`Replaced by `,(0,S.jsx)(`span`,{className:`mono`,children:e.supersededBy})]})]}),e.stale&&!n&&(0,S.jsxs)(`div`,{className:`note note--warn memory__stale`,children:[(0,S.jsx)(`strong`,{children:`May be out of date.`}),` `,e.changedFiles.length===1?`A linked file has`:`Linked files have`,` changed since this was `,e.status===`confirmed`?`confirmed`:`recorded`,`:`,` `,e.changedFiles.map((e,t)=>(0,S.jsxs)(`span`,{children:[t>0&&`, `,(0,S.jsx)(`span`,{className:`mono`,children:e})]},e)),`.`,e.status===`confirmed`&&(0,S.jsx)(`div`,{className:`note__actions`,children:(0,S.jsx)(`button`,{className:`btn btn--sm`,onClick:r,disabled:t,"aria-label":`Re-confirm “${c}” against the current files`,children:`Re-confirm`})})]}),!n&&(0,S.jsxs)(`footer`,{className:`memory__actions`,children:[e.status===`unreviewed`&&(0,S.jsx)(`button`,{className:`btn btn--primary btn--sm`,onClick:r,disabled:t,"aria-label":`Confirm “${c}”`,children:`Confirm`}),e.status!==`superseded`&&(0,S.jsx)(`button`,{className:`btn btn--sm`,onClick:i,disabled:t,"aria-label":`Edit “${c}”`,children:`Edit`}),(0,S.jsx)(`button`,{className:`btn btn--sm btn--danger-ghost`,onClick:s,disabled:t,"aria-label":`Forget “${c}”`,children:`Forget`})]})]})}function Z_({pressed:e,onClick:t,children:n,count:r}){return(0,S.jsxs)(`button`,{type:`button`,className:`chip chip--button ${e?`chip--on`:``}`,"aria-pressed":e,onClick:t,children:[n,r!==void 0&&(0,S.jsx)(`span`,{className:`chip__count`,children:r})]})}function Q_({list:e,actions:t,busy:n=!1}){let[r,i]=(0,d.useState)(`all`),[a,o]=(0,d.useState)(`all`),[s,c]=(0,d.useState)(!1),[l,u]=(0,d.useState)(!1),[f,p]=(0,d.useState)(``),[m,h]=(0,d.useState)(!1),[g,_]=(0,d.useState)(null),[v,y]=(0,d.useState)(null),{entries:b,counts:x}=e,C=(0,d.useMemo)(()=>{let e=f.trim().toLowerCase();return b.filter(t=>r!==`all`&&t.kind!==r||a!==`all`&&t.status!==a||s&&!t.stale||l&&t.flags.length===0?!1:!e||[t.id,t.title,t.details,t.evidence??``,...t.files,...t.tags,q_(t.source)].join(`
|
|
46
|
+
`).toLowerCase().includes(e))},[b,r,a,s,l,f]),ee=C.filter(e=>e.status===`unreviewed`),w=C.filter(e=>e.status===`confirmed`),T=C.filter(e=>e.status===`superseded`),E=b.filter(e=>e.status!==`superseded`),D=e=>b.filter(t=>t.kind===e).length,te=e=>(0,S.jsx)(X_,{entry:e,busy:n,editing:g===e.id,onConfirm:()=>void t.confirm(e.id),onEdit:()=>_(e.id),onCancelEdit:()=>_(null),onSave:async n=>{let r=await t.save(e.id,{title:n.title,details:n.details,files:n.files,tags:n.tags,evidence:n.evidence??``});return r&&_(null),r},onForget:()=>y(e)},e.id);return(0,S.jsxs)(`div`,{className:`page memory-page`,children:[(0,S.jsxs)(`header`,{className:`page__header`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`page__kicker mono`,children:`.athena/memory/`}),(0,S.jsx)(`h1`,{className:`page__title`,children:`Project Memory`}),(0,S.jsx)(`p`,{className:`page__subtitle`,children:`Decisions, gotchas and bug causes that AI agents and developers recorded, so later sessions don't rediscover them. Agent entries stay INFERRED until you confirm them.`})]}),(0,S.jsxs)(`div`,{className:`page__meta`,children:[(0,S.jsxs)(`span`,{children:[x.total,` total`]}),(0,S.jsxs)(`span`,{className:x.unreviewed?`memory-page__count--warn`:``,children:[x.unreviewed,` to review`]}),(0,S.jsxs)(`span`,{children:[x.confirmed,` confirmed`]}),x.stale>0&&(0,S.jsxs)(`span`,{className:`memory-page__count--warn`,children:[x.stale,` stale`]}),x.flagged>0&&(0,S.jsxs)(`span`,{className:`memory-page__count--danger`,children:[x.flagged,` flagged`]}),(0,S.jsx)(`button`,{className:`btn btn--primary btn--sm`,onClick:()=>h(e=>!e),"aria-expanded":m,children:`Add memory`})]})]}),m&&(0,S.jsxs)(`section`,{className:`card memory-add`,"aria-label":`Add memory`,children:[(0,S.jsx)(`p`,{className:`fineprint memory-add__hint`,children:`Memories you add are confirmed right away (FACT).`}),(0,S.jsx)(Y_,{replaceable:E,submitLabel:`Add memory`,busy:n,onCancel:()=>h(!1),onSubmit:async e=>{let n=await t.add(e);return n&&h(!1),n}})]}),x.total===0?(0,S.jsx)(`div`,{className:`card`,children:(0,S.jsxs)(k,{title:`No project memory yet`,children:[(0,S.jsxs)(`p`,{children:[`Project memory holds what a codebase can't tell you: why a decision was made, a gotcha that cost an afternoon, the real cause of a bug. It lives in `,(0,S.jsx)(`span`,{className:`mono`,children:`.athena/memory/*.md`}),`, is committed with the code, and is recalled for agents when they work on related files.`]}),(0,S.jsxs)(`p`,{children:[`AI agents add to it with the MCP `,(0,S.jsx)(`span`,{className:`mono`,children:`remember`}),` tool; you can add entries here or with `,(0,S.jsx)(`span`,{className:`mono`,children:`athena memory add`}),`. Agent entries wait here for your review.`]})]})}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`memory-filters`,role:`group`,"aria-label":`Filter memories`,children:[(0,S.jsxs)(`div`,{className:`chips`,role:`group`,"aria-label":`Kind`,children:[(0,S.jsx)(Z_,{pressed:r===`all`,onClick:()=>i(`all`),children:`All kinds`}),W_.map(e=>(0,S.jsx)(Z_,{pressed:r===e.id,onClick:()=>i(r===e.id?`all`:e.id),count:D(e.id),children:e.plural},e.id))]}),(0,S.jsxs)(`div`,{className:`chips`,role:`group`,"aria-label":`Status`,children:[(0,S.jsx)(Z_,{pressed:a===`all`,onClick:()=>o(`all`),children:`Any status`}),(0,S.jsx)(Z_,{pressed:a===`unreviewed`,onClick:()=>o(a===`unreviewed`?`all`:`unreviewed`),count:x.unreviewed,children:`Unreviewed`}),(0,S.jsx)(Z_,{pressed:a===`confirmed`,onClick:()=>o(a===`confirmed`?`all`:`confirmed`),count:x.confirmed,children:`Confirmed`}),(0,S.jsx)(Z_,{pressed:a===`superseded`,onClick:()=>o(a===`superseded`?`all`:`superseded`),count:x.superseded,children:`Superseded`}),(0,S.jsx)(Z_,{pressed:s,onClick:()=>c(e=>!e),count:x.stale,children:`Stale`}),(0,S.jsx)(Z_,{pressed:l,onClick:()=>u(e=>!e),count:x.flagged,children:`Flagged`})]}),(0,S.jsx)(`input`,{className:`input memory-filters__search`,type:`search`,placeholder:`Filter by text, file or tag`,"aria-label":`Filter memories by text`,value:f,onChange:e=>p(e.target.value)})]}),C.length===0&&(0,S.jsx)(k,{title:`No memories match`,children:`Clear a filter or the search to see more.`}),ee.length>0&&(0,S.jsxs)(`section`,{className:`memory-section`,"aria-labelledby":`memory-queue`,children:[(0,S.jsxs)(`h2`,{className:`memory-section__title`,id:`memory-queue`,children:[`Review queue `,(0,S.jsx)(`span`,{className:`muted`,children:ee.length})]}),(0,S.jsx)(`p`,{className:`fineprint memory-section__hint`,children:`Written by AI agents. Confirm what is true, edit what is close, forget the rest.`}),(0,S.jsx)(`div`,{className:`memory-list`,children:ee.map(te)})]}),w.length>0&&(0,S.jsxs)(`section`,{className:`memory-section`,"aria-labelledby":`memory-confirmed`,children:[(0,S.jsxs)(`h2`,{className:`memory-section__title`,id:`memory-confirmed`,children:[`Confirmed `,(0,S.jsx)(`span`,{className:`muted`,children:w.length})]}),(0,S.jsx)(`div`,{className:`memory-list`,children:w.map(te)})]}),T.length>0&&(0,S.jsxs)(`details`,{className:`memory-section memory-superseded`,open:a===`superseded`,children:[(0,S.jsxs)(`summary`,{className:`memory-section__title`,children:[`Superseded `,(0,S.jsx)(`span`,{className:`muted`,children:T.length})]}),(0,S.jsx)(`div`,{className:`memory-list`,children:T.map(te)})]})]}),(0,S.jsx)(pe,{open:v!==null,title:`Forget this memory?`,body:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`p`,{className:`dialog__quote`,children:v?v.title:``}),(0,S.jsxs)(`p`,{className:`muted`,children:[`It is removed from `,(0,S.jsx)(`span`,{className:`mono`,children:`.athena/memory/`}),`. Git history keeps the old version.`]})]}),confirmLabel:`Forget`,danger:!0,onCancel:()=>y(null),onConfirm:()=>{let e=v;y(null),t.forget(e.id)}})]})}function $_(){let{revision:e,toast:t}=oe(),[n,r]=(0,d.useState)(null),[i,a]=(0,d.useState)(null),[o,s]=(0,d.useState)(!1),c=async()=>{try{r(await v(`/api/memory`)),a(null)}catch(e){a(e)}};(0,d.useEffect)(()=>{c()},[e]);let l=async(e,n)=>{s(!0);try{return await e(),t(n,`success`),await c(),!0}catch(e){let n=e;return t(n.hint?`${n.message} ${n.hint}`:n.message||`Update failed`,`error`),!1}finally{s(!1)}};return i?(0,S.jsx)(`div`,{className:`page`,children:(0,S.jsx)(fe,{error:i})}):n?(0,S.jsx)(Q_,{list:n,actions:{confirm:e=>l(()=>v(`/api/memory/${e}/confirm`,{method:`POST`}),`Memory confirmed`),save:(e,t)=>l(()=>v(`/api/memory/${e}`,{method:`PATCH`,body:t}),`Memory updated`),forget:e=>l(()=>v(`/api/memory/${e}`,{method:`DELETE`}),`Memory forgotten`),add:e=>l(()=>v(`/api/memory`,{method:`POST`,body:{kind:e.kind,title:e.title,details:e.details||void 0,files:e.files,tags:e.tags,evidence:e.evidence,supersedes:e.supersedes}}),`Memory added`)},busy:o}):(0,S.jsx)(`div`,{className:`page-loading`,children:(0,S.jsx)(de,{})})}var ev=new Set([`project`,`architecture`,`database`,`api`,`auth`,`security`,`testing`,`debugging`,`performance`,`code-review`,`deployment`,`rules`]);function tv(){let e=T();return(0,S.jsx)(A,{resetKey:e,children:(0,S.jsx)(nv,{path:e})})}function nv({path:e}){let t=/^\/docs\/([a-z-]+)\/?$/.exec(e);return e===`/`?(0,S.jsx)(Ee,{}):t&&ev.has(t[1])?(0,S.jsx)(O_,{id:t[1]},t[1]):e===`/rules`?(0,S.jsx)(A_,{}):e===`/sync`?(0,S.jsx)(R_,{}):e===`/security`?(0,S.jsx)(V_,{}):e===`/context`?(0,S.jsx)(U_,{}):e===`/memory`?(0,S.jsx)($_,{}):e===`/agents`?(0,S.jsx)(j_,{}):e===`/activity`?(0,S.jsx)(N_,{}):(0,S.jsxs)(`div`,{className:`page`,children:[(0,S.jsx)(`h1`,{className:`page__title`,children:`Not found`}),(0,S.jsxs)(`p`,{className:`muted`,children:[`There is no page at `,e,`.`]})]})}function rv(){let[e,t]=(0,d.useState)({state:`loading`});return(0,d.useEffect)(()=>{let e=()=>{let e=g();/[#&]token=/.test(window.location.hash)&&m()!==e&&window.location.reload()};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]),(0,d.useEffect)(()=>{if(!m()){t({state:`unauthorized`});return}v(`/api/session`).then(()=>v(`/api/overview`)).then(e=>t({state:`ready`,project:e.project.name})).catch(e=>{e instanceof _&&e.status===401?t({state:`unauthorized`}):t({state:`error`,message:e instanceof Error?e.message:`Could not reach the Athena server`})})},[]),e.state===`loading`?(0,S.jsx)(`div`,{className:`gate`,children:(0,S.jsx)(de,{})}):e.state===`ready`?(0,S.jsx)(ae,{children:(0,S.jsxs)(`div`,{className:`app`,children:[(0,S.jsx)(ye,{projectName:e.project}),(0,S.jsxs)(`div`,{className:`app__body`,children:[(0,S.jsx)(_e,{}),(0,S.jsx)(`main`,{className:`app__main`,id:`main`,children:(0,S.jsx)(tv,{})})]}),(0,S.jsx)(be,{})]})}):(0,S.jsx)(`div`,{className:`gate`,children:(0,S.jsxs)(`div`,{className:`gate__card`,children:[(0,S.jsx)(`div`,{className:`gate__mark`,children:`ATHENA`}),(0,S.jsx)(`h1`,{children:e.state===`unauthorized`?`Open Athena from your terminal`:`Athena is unavailable`}),e.state===`unauthorized`?(0,S.jsxs)(`p`,{children:[`This local server only accepts requests with the private access link printed by `,(0,S.jsx)(`code`,{children:`athena open`}),`. Run it in your project and use the link it shows.`]}):(0,S.jsx)(`p`,{children:e.message})]})})}(0,f.createRoot)(document.getElementById(`root`)).render((0,S.jsx)(d.StrictMode,{children:(0,S.jsx)(rv,{})}));export{i,p_ as n,x as r,__ as t};
|