@inkeep/open-knowledge 0.88.6-beta.5 → 0.88.7-beta.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/dist/{cli-DtqA8k1H.mjs → cli-DQ5TRJJ6.mjs} +6 -6
- package/dist/cli.mjs +1 -1
- package/dist/constants-ByArn8Uc.mjs +1 -0
- package/dist/{dist-DPe6aLSk.mjs → dist-C0XJngDM.mjs} +486 -486
- package/dist/{dist-D4ipyg1q.mjs → dist-COp4sNKv.mjs} +1 -1
- package/dist/index.mjs +225 -225
- package/dist/init-1w34eprd.mjs +1 -0
- package/dist/{init-C08CTCp9.mjs → init-DGCtjpyb.mjs} +2 -2
- package/dist/{launch-json-removal-B39BoBBe.mjs → launch-json-removal-CRho5R7M.mjs} +1 -1
- package/dist/loader-CFMHZMVd.mjs +1 -0
- package/dist/{loader-DeOCcx0c.mjs → loader-CZwtXZkB.mjs} +1 -1
- package/dist/{md-manager-BGnqyqi1-DmEmjhMs.mjs → md-manager-BGnqyqi1-Bysdmc53.mjs} +33 -33
- package/dist/{open-browser-d8GjenQK.mjs → open-browser-CQmRm2DN.mjs} +1 -1
- package/dist/parse-worker.mjs +1 -1
- package/dist/preview-BK6-T46h.mjs +1 -0
- package/dist/{preview-BOmvdi0o.mjs → preview-g-N2TxEd.mjs} +1 -1
- package/dist/public/assets/{AccountSection-UK4fSEAo.js → AccountSection-C1XF5H-K.js} +1 -1
- package/dist/public/assets/{ActivityModeContent-CD3FGIx9.js → ActivityModeContent-45sPjAH2.js} +1 -1
- package/dist/public/assets/{AddPropertiesButton-B6p_gdr8.js → AddPropertiesButton-DEPRcgMv.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-DkoQ7ai2.js → AgentDiffPane-Dm84II0t.js} +1 -1
- package/dist/public/assets/{AttachmentsSection-B4oQIzeZ.js → AttachmentsSection-CNetSRWV.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-B9s5B9Bw.js → CodeMirrorPropInput-BDM_YKv7.js} +73 -73
- package/dist/public/assets/{ContentRulesSection-aWJrYA4j.js → ContentRulesSection-DSyGxMiL.js} +1 -1
- package/dist/public/assets/DocumentContext-Ds_WCp-q.js +108 -0
- package/dist/public/assets/{EditorModeToggle-Diya7MyF.js → EditorModeToggle-Cn6Vd0BP.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-PRwr0WYf.js → ExcalidrawDocEditor-DOQgOzxR.js} +1 -1
- package/dist/public/assets/FeedbackForm-Ctj5h0JW.js +1 -0
- package/dist/public/assets/{GraphPanel-BKOZSzEL.js → GraphPanel-DzaW16wy.js} +1 -1
- package/dist/public/assets/{ImageAttachments-ZsyWloY9.js → ImageAttachments-BGB1Xeig.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-CMk2xlCO.js → ImportSkillDialog-CI-vt5vZ.js} +1 -1
- package/dist/public/assets/{LinkPreviewsSection-KX_4h53c.js → LinkPreviewsSection-CRe9Rv7Q.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-7ZtCVw7Y.js → LintConfigEditor-8yx9BBjY.js} +1 -1
- package/dist/public/assets/{LintingSection-ClAY_FjD.js → LintingSection-Dm0ivtyy.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-BZfiRd5r.js +1 -0
- package/dist/public/assets/{ManagedArtifactProperties-lEwwds9N.js → ManagedArtifactProperties-Do3tsLHs.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-DHUtun4r.js → MermaidDocEditor-CZP5Lalg.js} +1 -1
- package/dist/public/assets/{NetworkAccessSection-CkW30CIT.js → NetworkAccessSection-BYUz0t1p.js} +1 -1
- package/dist/public/assets/{ProjectTemplatesSection-UjpQZz_R.js → ProjectTemplatesSection-Dp-kDF0K.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-D6c0dfSa.js → PropertyDisplayRow-V2EqJbC4.js} +1 -1
- package/dist/public/assets/{PublishToGitHubDialog-CwF7zH2X.js → PublishToGitHubDialog-DCHPi0uF.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-XI6d2pdl.js → ReportBugDialogBody-CRJYG8f4.js} +1 -1
- package/dist/public/assets/{ReportBugMenuTrigger-DOnz_QvF.js → ReportBugMenuTrigger-6Fv3-kOi.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-BEJxtFtu.js → SchemaConfigEditor-B-m31Ta_.js} +1 -1
- package/dist/public/assets/{SearchSection-CDyx2C9f.js → SearchSection-BY-qHde-.js} +1 -1
- package/dist/public/assets/{SessionsHost-H5NLeN9a.js → SessionsHost-BgWfHGin.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-C_YjecBu.js → SettingsDialogBody-CmLVqJE6.js} +2 -2
- package/dist/public/assets/{ShareReceiveMissDialog-D_FkOpht.js → ShareReceiveMissDialog-CfqK2Jt_.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-CtxNLAp-.js → SkillToolbarControls-B6mpoiv4.js} +1 -1
- package/dist/public/assets/{SkillsManagerSection-1S3uJAoU.js → SkillsManagerSection-DX46AtUJ.js} +1 -1
- package/dist/public/assets/SourceEditor-DW_YtAjp.js +1 -0
- package/dist/public/assets/{SpellingSettings-05EGR87o.js → SpellingSettings-VSSG8Ec7.js} +1 -1
- package/dist/public/assets/{SyncSection-D3PTVWIM.js → SyncSection-C2elfy6V.js} +1 -1
- package/dist/public/assets/{SyncStatusBadge-BaJrZaL1.js → SyncStatusBadge-ZQoQHaMb.js} +1 -1
- package/dist/public/assets/{TerminalPanel-D_wlGpMl.js → TerminalPanel-CJw-L8JD.js} +1 -1
- package/dist/public/assets/{TerminalSection-CsRkbMx2.js → TerminalSection-Bw5_wox0.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-CA9GKqNE.js → TerminalWindowApp-Cu8C_tq8.js} +1 -1
- package/dist/public/assets/{TextDocEditor-Ch27GvYs.js → TextDocEditor-Dr8kuo_r.js} +1 -1
- package/dist/public/assets/{ThemePluginSection-_vipA-fZ.js → ThemePluginSection-Mi8IQECM.js} +1 -1
- package/dist/public/assets/{ThreadView-Dj6jQfOU.js → ThreadView-3weWYXF7.js} +8 -8
- package/dist/public/assets/{TimelineDiffPane-4gPranZj.js → TimelineDiffPane-C-owD8k9.js} +1 -1
- package/dist/public/assets/{client-version-B_xA5Zs6.js → client-version-DH6nNp0A.js} +1 -1
- package/dist/public/assets/{comment-chips-nSpyi8g5.js → comment-chips-D6LdpTZ_.js} +2 -2
- package/dist/public/assets/{config-provider-CNRgcd7O.js → config-provider-B-SgDFOZ.js} +1 -1
- package/dist/public/assets/config-schema-C4By76V-.js +1 -0
- package/dist/public/assets/doc-hash-BT2I193z.js +1 -0
- package/dist/public/assets/{doc-undo-manager-mWX4_oGV.js → doc-undo-manager-Bsjnf7tk.js} +1 -1
- package/dist/public/assets/{field-controls-7BMlpso-.js → field-controls-DJJJfwYy.js} +1 -1
- package/dist/public/assets/field-controls-DQ7RRqg2.js +1 -0
- package/dist/public/assets/{file-tree-adapter-4QsCjiID.js → file-tree-adapter-BD1Le0QE.js} +1 -1
- package/dist/public/assets/globals-LvHcnSk0.css +1 -0
- package/dist/public/assets/index-B-YJsR8V.js +2209 -0
- package/dist/public/assets/{lint-config-client-CE9biPJr.js → lint-config-client-DT0sX4qO.js} +1 -1
- package/dist/public/assets/{lint-plugins-DAx86XSh.js → lint-plugins-Bd6NPSSm.js} +1 -1
- package/dist/public/assets/{markdown-lint-BU1ReVdL.js → markdown-lint-CrflrW2h.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-CX5Nb4yK.js → markdownlint-rule-browser-BcfCidvx.js} +1 -1
- package/dist/public/assets/messages-AhR6hFhG.js +1 -0
- package/dist/public/assets/messages-BG06D2oG.js +1 -0
- package/dist/public/assets/messages-BWf_mE1f.js +1 -0
- package/dist/public/assets/messages-CC_nyZaD.js +1 -0
- package/dist/public/assets/messages-CCpyckwF.js +1 -0
- package/dist/public/assets/messages-Caz0X-QI.js +1 -0
- package/dist/public/assets/messages-Cl664i6S.js +1 -0
- package/dist/public/assets/messages-DF-5evdp.js +1 -0
- package/dist/public/assets/messages-I4dOt3Id.js +1 -0
- package/dist/public/assets/messages-asQSLar1.js +1 -0
- package/dist/public/assets/messages-gyTavuOO.js +1 -0
- package/dist/public/assets/messages-uNPe6akt.js +1 -0
- package/dist/public/assets/messages-v-wOP1Ps.js +1 -0
- package/dist/public/assets/{open-managed-artifact-tab-CQcoj0K0.js → open-managed-artifact-tab-BcMHQbeA.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-hbWxGWbG.js → pending-receive-nav-store-BxD0Scwr.js} +1 -1
- package/dist/public/assets/{preferred-session-events-CD3TX4uI.js → preferred-session-events-DWPbdnLw.js} +1 -1
- package/dist/public/assets/{progress-Bp-8Nd7B.js → progress-4sczcUHL.js} +3 -3
- package/dist/public/assets/{saved-themes-client-Cefq8Snw.js → saved-themes-client-C13JFxXb.js} +1 -1
- package/dist/public/assets/{schema-section-BTjV9wCm.js → schema-section-E86E_YDa.js} +1 -1
- package/dist/public/assets/{selection-context-C7DBYtd4.js → selection-context-BzIbXNrx.js} +1 -1
- package/dist/public/assets/{src-Bd4ITI6l.js → src-fhB8gZg-.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-CsNETqXT.js → target-navigation-intent-D_irC8wr.js} +1 -1
- package/dist/public/assets/{telemetry-impl-D34TS_t5.js → telemetry-impl-B_G4ohQ7.js} +1 -1
- package/dist/public/assets/{telemetry-startup-S6YVb_-D.js → telemetry-startup-CuwkwMm5.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-BPhBcJhO.js → typing-burst-detector-Cb6xLu-v.js} +4 -4
- package/dist/public/assets/{uninstall-CBADj29y.js → uninstall-DHlBU1US.js} +1 -1
- package/dist/public/assets/{use-activity-panel-DAiQAul-.js → use-activity-panel-BwBm-kRR.js} +1 -1
- package/dist/public/assets/{use-apply-config-language-BVhx79Sp.js → use-apply-config-language-N3OMaFbH.js} +2 -2
- package/dist/public/assets/{use-installed-clis-Cub5OhU0.js → use-installed-clis-ClJJP5v-.js} +2 -2
- package/dist/public/assets/{use-open-skill-BiGTEBAG.js → use-open-skill-B4jnX_P2.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-BPFt3ZjV.js → use-terminal-enabled-CdHtbpPs.js} +1 -1
- package/dist/public/assets/use-timeline-entry-diff-CXwyyO5W.js +7 -0
- package/dist/public/index.html +33 -33
- package/dist/public/uninstall.html +5 -5
- package/dist/{registry-probes-CQ5QHLWA.mjs → registry-probes-DGmSZwcJ.mjs} +1 -1
- package/dist/{removal-file-path-DhnfL9uo.mjs → removal-file-path-Dk0W-cV7.mjs} +1 -1
- package/dist/{repair-launch-json-D4tGRImu.mjs → repair-launch-json-BMvVnZKM.mjs} +1 -1
- package/dist/{repair-mcp-configs-CkXUYNJq.mjs → repair-mcp-configs-D2314y6D.mjs} +1 -1
- package/dist/src-Df2uYEvG.mjs +1 -0
- package/dist/{src-uYPRavFi.mjs → src-a_XnpCzx.mjs} +1 -1
- package/dist/start-BD3KhXxj.mjs +1 -0
- package/dist/{start-BVplvpm0.mjs → start-ByjiEqB9.mjs} +3 -3
- package/package.json +4 -4
- package/dist/constants-D-73L_8T.mjs +0 -1
- package/dist/init-CSYVvJYZ.mjs +0 -1
- package/dist/loader-D4dq2xfA.mjs +0 -1
- package/dist/preview-BD9T555q.mjs +0 -1
- package/dist/public/assets/DocumentContext-DXpWi5ky.js +0 -108
- package/dist/public/assets/FeedbackForm-Cvqd9EXq.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-C6A9h_XM.js +0 -1
- package/dist/public/assets/SourceEditor-B5LnWxyf.js +0 -1
- package/dist/public/assets/config-schema-BiXW8bgJ.js +0 -1
- package/dist/public/assets/doc-hash-i74qqRXc.js +0 -1
- package/dist/public/assets/field-controls-Bx5mePuq.js +0 -1
- package/dist/public/assets/globals-DXOnw7YU.css +0 -1
- package/dist/public/assets/index-DvFhVjVJ.js +0 -2209
- package/dist/public/assets/messages-3TywIfo0.js +0 -1
- package/dist/public/assets/messages-60dgDSH4.js +0 -1
- package/dist/public/assets/messages-9vrrNpJf.js +0 -1
- package/dist/public/assets/messages-B-A9_jul.js +0 -1
- package/dist/public/assets/messages-B4Eyfdod.js +0 -1
- package/dist/public/assets/messages-BsQXyfTQ.js +0 -1
- package/dist/public/assets/messages-CIj-vRyV.js +0 -1
- package/dist/public/assets/messages-CZbBFMhU.js +0 -1
- package/dist/public/assets/messages-D5Q2aWu3.js +0 -1
- package/dist/public/assets/messages-D6ypArrS.js +0 -1
- package/dist/public/assets/messages-Zpi3sLU2.js +0 -1
- package/dist/public/assets/messages-lMmvlKg7.js +0 -1
- package/dist/public/assets/messages-yXb-shTo.js +0 -1
- package/dist/public/assets/use-timeline-entry-diff-DI6wb0mp.js +0 -7
- package/dist/src-DxORHPwx.mjs +0 -1
- package/dist/start-Dp7OVBDP.mjs +0 -1
- /package/dist/public/assets/{globals-9eCy8irk.js → globals-C_rdkif1.js} +0 -0
|
@@ -293,46 +293,46 @@ ${t.slice(l+2)}`,d+=1;else break}t.push({indent:l,number:parseInt(s,10),content:
|
|
|
293
293
|
`),patterns:[...t],lineCount:n}}function GY(e){return WY(e).redacted}function KY(e,t,n=3){let r=RegExp(`^ {0,3}(\\${e}+)[ \\t]*$`),i=Math.max(3,n);for(let e of t.split(`
|
|
294
294
|
`)){let t=r.exec(e);t&&t[1].length>=i&&(i=t[1].length+1)}return i}function qY(e){let t=[],n=0,r=()=>{t.length>0&&(n+=1)},i=e=>{for(;n>0;)t.push({type:`break`}),--n;t.push(e)},a=e=>{e.split(`
|
|
295
295
|
`).forEach((e,t)=>{t>0&&r(),e.length>0&&i({type:`text`,value:e})})},o=e=>{let t=e.ordered===!0,n=typeof e.start==`number`?e.start:1,a=e.data,o=typeof a?.bulletMarker==`string`?a.bulletMarker:`-`,c=typeof a?.listMarkerDelimiter==`string`?a.listMarkerDelimiter:`.`;e.children.forEach((e,a)=>{a>0&&r();let l=t?`${n+a}${c} `:`${o} `;i({type:`text`,value:l}),e.children.forEach((e,t)=>{t>0&&r(),s(e)})})},s=e=>{switch(e.type){case`paragraph`:case`heading`:e.children.forEach(i);return;case`list`:o(e);return;case`code`:case`html`:a(e.value);return;case`thematicBreak`:i({type:`text`,value:e.data?.sourceRaw??`---`});return;default:{let t=e;if(Array.isArray(t.children)&&t.children.length>0){t.children.forEach((e,t)=>{t>0&&r(),s(e)});return}let n=e;if(typeof n.value==`string`){a(n.value);return}console.warn(JSON.stringify({event:`table-cell-flatten-dropped-block`,nodeType:e.type}))}}};return e.forEach((e,t)=>{t>0&&r(),s(e)}),t}var JY=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};JY.prototype.normal={},JY.prototype.property={},JY.prototype.space=void 0;function YY(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new JY(n,r,t)}function XY(e){return e.toLowerCase()}var ZY=class{constructor(e,t){this.attribute=t,this.property=e}};ZY.prototype.attribute=``,ZY.prototype.booleanish=!1,ZY.prototype.boolean=!1,ZY.prototype.commaOrSpaceSeparated=!1,ZY.prototype.commaSeparated=!1,ZY.prototype.defined=!1,ZY.prototype.mustUseProperty=!1,ZY.prototype.number=!1,ZY.prototype.overloadedBoolean=!1,ZY.prototype.property=``,ZY.prototype.spaceSeparated=!1,ZY.prototype.space=void 0;var QY=n({boolean:()=>eX,booleanish:()=>tX,commaOrSpaceSeparated:()=>aX,commaSeparated:()=>iX,number:()=>G,overloadedBoolean:()=>nX,spaceSeparated:()=>rX});let $Y=0;const eX=oX(),tX=oX(),nX=oX(),G=oX(),rX=oX(),iX=oX(),aX=oX();function oX(){return 2**++$Y}const sX=Object.keys(QY);var cX=class extends ZY{constructor(e,t,n,r){let i=-1;if(super(e,t),lX(this,`space`,r),typeof n==`number`)for(;++i<sX.length;){let e=sX[i];lX(this,sX[i],(n&QY[e])===QY[e])}}};cX.prototype.defined=!0;function lX(e,t,n){n&&(e[t]=n)}function uX(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new cX(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[XY(r)]=r,n[XY(a.attribute)]=r}return new JY(t,n,e.space)}const dX=uX({properties:{ariaActiveDescendant:null,ariaAtomic:tX,ariaAutoComplete:null,ariaBusy:tX,ariaChecked:tX,ariaColCount:G,ariaColIndex:G,ariaColSpan:G,ariaControls:rX,ariaCurrent:null,ariaDescribedBy:rX,ariaDetails:null,ariaDisabled:tX,ariaDropEffect:rX,ariaErrorMessage:null,ariaExpanded:tX,ariaFlowTo:rX,ariaGrabbed:tX,ariaHasPopup:null,ariaHidden:tX,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:rX,ariaLevel:G,ariaLive:null,ariaModal:tX,ariaMultiLine:tX,ariaMultiSelectable:tX,ariaOrientation:null,ariaOwns:rX,ariaPlaceholder:null,ariaPosInSet:G,ariaPressed:tX,ariaReadOnly:tX,ariaRelevant:null,ariaRequired:tX,ariaRoleDescription:rX,ariaRowCount:G,ariaRowIndex:G,ariaRowSpan:G,ariaSelected:tX,ariaSetSize:G,ariaSort:null,ariaValueMax:G,ariaValueMin:G,ariaValueNow:G,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function fX(e,t){return t in e?e[t]:t}function pX(e,t){return fX(e,t.toLowerCase())}const mX=uX({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:iX,acceptCharset:rX,accessKey:rX,action:null,allow:null,allowFullScreen:eX,allowPaymentRequest:eX,allowUserMedia:eX,alpha:eX,alt:null,as:null,async:eX,autoCapitalize:null,autoComplete:rX,autoFocus:eX,autoPlay:eX,blocking:rX,capture:null,charSet:null,checked:eX,cite:null,className:rX,closedBy:null,colorSpace:null,cols:G,colSpan:G,command:null,commandFor:null,content:null,contentEditable:tX,controls:eX,controlsList:rX,coords:G|iX,crossOrigin:null,data:null,dateTime:null,decoding:null,default:eX,defer:eX,dir:null,dirName:null,disabled:eX,download:nX,draggable:tX,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:eX,formTarget:null,headers:rX,height:G,hidden:nX,high:G,href:null,hrefLang:null,htmlFor:rX,httpEquiv:rX,id:null,imageSizes:null,imageSrcSet:null,inert:eX,inputMode:null,integrity:null,is:null,isMap:eX,itemId:null,itemProp:rX,itemRef:rX,itemScope:eX,itemType:rX,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:eX,low:G,manifest:null,max:null,maxLength:G,media:null,method:null,min:null,minLength:G,multiple:eX,muted:eX,name:null,nonce:null,noModule:eX,noValidate:eX,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:eX,optimum:G,pattern:null,ping:rX,placeholder:null,playsInline:eX,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:eX,referrerPolicy:null,rel:rX,required:eX,reversed:eX,rows:G,rowSpan:G,sandbox:rX,scope:null,scoped:eX,seamless:eX,selected:eX,shadowRootClonable:eX,shadowRootCustomElementRegistry:eX,shadowRootDelegatesFocus:eX,shadowRootMode:null,shadowRootSerializable:eX,shape:null,size:G,sizes:null,slot:null,span:G,spellCheck:tX,src:null,srcDoc:null,srcLang:null,srcSet:null,start:G,step:null,style:null,tabIndex:G,target:null,title:null,translate:null,type:null,typeMustMatch:eX,useMap:null,value:tX,width:G,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:rX,axis:null,background:null,bgColor:null,border:G,borderColor:null,bottomMargin:G,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:eX,declare:eX,event:null,face:null,frame:null,frameBorder:null,hSpace:G,leftMargin:G,link:null,longDesc:null,lowSrc:null,marginHeight:G,marginWidth:G,noResize:eX,noHref:eX,noShade:eX,noWrap:eX,object:null,profile:null,prompt:null,rev:null,rightMargin:G,rules:null,scheme:null,scrolling:tX,standby:null,summary:null,text:null,topMargin:G,valueType:null,version:null,vAlign:null,vLink:null,vSpace:G,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:eX,disablePictureInPicture:eX,disableRemotePlayback:eX,exportParts:iX,part:rX,prefix:null,property:null,results:G,security:null,unselectable:null},space:`html`,transform:pX}),hX=uX({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:aX,accentHeight:G,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:G,amplitude:G,arabicForm:null,ascent:G,attributeName:null,attributeType:null,azimuth:G,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:G,by:null,calcMode:null,capHeight:G,className:rX,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:G,diffuseConstant:G,direction:null,display:null,dur:null,divisor:G,dominantBaseline:null,download:eX,dx:null,dy:null,edgeMode:null,editable:null,elevation:G,enableBackground:null,end:null,event:null,exponent:G,externalResourcesRequired:null,fill:null,fillOpacity:G,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:iX,g2:iX,glyphName:iX,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:G,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:G,horizOriginX:G,horizOriginY:G,id:null,ideographic:G,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:G,k:G,k1:G,k2:G,k3:G,k4:G,kernelMatrix:aX,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:G,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:G,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:G,overlineThickness:G,paintOrder:null,panose1:null,path:null,pathLength:G,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:rX,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:G,pointsAtY:G,pointsAtZ:G,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:aX,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:aX,rev:aX,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:aX,requiredFeatures:aX,requiredFonts:aX,requiredFormats:aX,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:G,specularExponent:G,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:G,strikethroughThickness:G,string:null,stroke:null,strokeDashArray:aX,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:G,strokeOpacity:G,strokeWidth:null,style:null,surfaceScale:G,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:aX,tabIndex:G,tableValues:null,target:null,targetX:G,targetY:G,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:aX,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:G,underlineThickness:G,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:G,values:null,vAlphabetic:G,vMathematical:G,vectorEffect:null,vHanging:G,vIdeographic:G,version:null,vertAdvY:G,vertOriginX:G,vertOriginY:G,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:G,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:fX}),gX=uX({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()}}),_X=uX({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:pX}),vX=uX({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),yX=/[A-Z]/g,bX=/-[a-z]/g,xX=/^data[-\w.:]+$/i;function SX(e,t){let n=XY(t),r=t,i=ZY;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&xX.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(bX,wX);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!bX.test(e)){let n=e.replace(yX,CX);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=cX}return new i(r,t)}function CX(e){return`-`+e.toLowerCase()}function wX(e){return e.charAt(1).toUpperCase()}const TX=YY([dX,mX,gX,_X,vX],`html`),EX=YY([dX,hX,gX,_X,vX],`svg`);function DX(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}const OX=/[#.]/g;function kX(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){OX.lastIndex=i;let e=OX.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 AX(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function jX(e,t,n){let r=n?LX(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=kX(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,MX(i))a.unshift(i);else for(let[t,n]of Object.entries(i))NX(e,o.properties,t,n)}for(let e of a)PX(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function MX(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 NX(e,t,n,r){let i=SX(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?AX(r):i.commaSeparated?DX(r):i.commaOrSpaceSeparated?AX(DX(r).join(` `)):FX(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?IX(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(FX(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function PX(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)PX(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?PX(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}}function FX(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||XY(n)===XY(t)))return!0}return n}function IX(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function LX(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}const RX=`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(`.`),zX=jX(TX,`div`),BX=jX(EX,`g`,RX);function VX(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=HX(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=HX(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 HX(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
|
|
296
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const UX={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/`},WX={}.hasOwnProperty,GX=Object.prototype;function KX(e,t){let n=t||{};return qX({file:n.file||void 0,location:!1,schema:n.space===`svg`?EX:TX,verbose:n.verbose||!1},e)}function qX(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},XX(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:JX(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=VX(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`},XX(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},XX(e,r,n),n}default:return n=YX(e,t),n}}function JX(e,t){let n=-1,r=[];for(;++n<t.length;){let i=qX(e,t[n]);r.push(i)}return r}function YX(e,t){let n=e.schema;e.schema=t.namespaceURI===UX.svg?EX:TX;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;WX.call(GX,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?BX:zX)(t.tagName,i,JX(e,t.childNodes));if(XX(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&QX(r.startTag),o=r&&r.endTag&&QX(r.endTag),s=qX(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function XX(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=ZX(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function ZX(e,t,n){let r=QX(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)WX.call(n.attrs,i)&&(r[SX(e.schema,i).property]=QX(n.attrs[i]));n.startTag;let a=QX(n.startTag),o=n.endTag?QX(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function QX(e){let t=$X({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=$X({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function $X(e){return e.line&&e.column?e:void 0}const eZ=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]);var K;(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`})(K||={});const tZ={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function nZ(e){return e>=55296&&e<=57343}function rZ(e){return e>=56320&&e<=57343}function iZ(e,t){return(e-55296)*1024+9216+t}function aZ(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function oZ(e){return e>=64976&&e<=65007||eZ.has(e)}var q;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(q||={});var sZ=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=65536,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(rZ(t))return this.pos++,this._addGap(),iZ(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,K.EOF;return this._err(q.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,K.EOF;let n=this.html.charCodeAt(t);return n===K.CARRIAGE_RETURN?K.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,K.EOF;let e=this.html.charCodeAt(this.pos);return e===K.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,K.LINE_FEED):e===K.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,nZ(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===K.LINE_FEED||e===K.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){aZ(e)?this._err(q.controlCharacterInInputStream):oZ(e)&&this._err(q.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},cZ;(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`})(cZ||={});function lZ(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const uZ=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))),dZ=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 fZ(e){return e>=55296&&e<=57343||e>1114111?65533:dZ.get(e)??e}var pZ;(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`})(pZ||={});var mZ;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(mZ||={});function hZ(e){return e>=pZ.ZERO&&e<=pZ.NINE}function gZ(e){return e>=pZ.UPPER_A&&e<=pZ.UPPER_F||e>=pZ.LOWER_A&&e<=pZ.LOWER_F}function _Z(e){return e>=pZ.UPPER_A&&e<=pZ.UPPER_Z||e>=pZ.LOWER_A&&e<=pZ.LOWER_Z||hZ(e)}function vZ(e){return e===pZ.EQUALS||_Z(e)}var yZ;(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`})(yZ||={});var bZ;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(bZ||={});var xZ=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=yZ.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=bZ.Strict}startEntity(e){this.decodeMode=e,this.state=yZ.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case yZ.EntityStart:return e.charCodeAt(t)===pZ.NUM?(this.state=yZ.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=yZ.NamedEntity,this.stateNamedEntity(e,t));case yZ.NumericStart:return this.stateNumericStart(e,t);case yZ.NumericDecimal:return this.stateNumericDecimal(e,t);case yZ.NumericHex:return this.stateNumericHex(e,t);case yZ.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|32)===pZ.LOWER_X?(this.state=yZ.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=yZ.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(hZ(r)||gZ(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(hZ(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===pZ.SEMI)this.consumed+=1;else if(this.decodeMode===bZ.Strict)return 0;return this.emitCodePoint(fZ(this.result),this.consumed),this.errors&&(e!==pZ.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&mZ.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=SZ(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===bZ.Attribute&&(i===0||vZ(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&mZ.VALUE_LENGTH)>>14,i!==0){if(a===pZ.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==bZ.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]&mZ.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]&~mZ.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case yZ.NamedEntity:return this.result!==0&&(this.decodeMode!==bZ.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case yZ.NumericDecimal:return this.emitNumericEntity(0,2);case yZ.NumericHex:return this.emitNumericEntity(0,3);case yZ.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case yZ.EntityStart:return 0}}};function SZ(e,t,n,r){let i=(t&mZ.BRANCH_LENGTH)>>7,a=t&mZ.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 J;(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/`})(J||={});var CZ;(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`})(CZ||={});var wZ;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(wZ||={});var Y;(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`})(Y||={});var X;(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`})(X||={});const TZ=new Map([[Y.A,X.A],[Y.ADDRESS,X.ADDRESS],[Y.ANNOTATION_XML,X.ANNOTATION_XML],[Y.APPLET,X.APPLET],[Y.AREA,X.AREA],[Y.ARTICLE,X.ARTICLE],[Y.ASIDE,X.ASIDE],[Y.B,X.B],[Y.BASE,X.BASE],[Y.BASEFONT,X.BASEFONT],[Y.BGSOUND,X.BGSOUND],[Y.BIG,X.BIG],[Y.BLOCKQUOTE,X.BLOCKQUOTE],[Y.BODY,X.BODY],[Y.BR,X.BR],[Y.BUTTON,X.BUTTON],[Y.CAPTION,X.CAPTION],[Y.CENTER,X.CENTER],[Y.CODE,X.CODE],[Y.COL,X.COL],[Y.COLGROUP,X.COLGROUP],[Y.DD,X.DD],[Y.DESC,X.DESC],[Y.DETAILS,X.DETAILS],[Y.DIALOG,X.DIALOG],[Y.DIR,X.DIR],[Y.DIV,X.DIV],[Y.DL,X.DL],[Y.DT,X.DT],[Y.EM,X.EM],[Y.EMBED,X.EMBED],[Y.FIELDSET,X.FIELDSET],[Y.FIGCAPTION,X.FIGCAPTION],[Y.FIGURE,X.FIGURE],[Y.FONT,X.FONT],[Y.FOOTER,X.FOOTER],[Y.FOREIGN_OBJECT,X.FOREIGN_OBJECT],[Y.FORM,X.FORM],[Y.FRAME,X.FRAME],[Y.FRAMESET,X.FRAMESET],[Y.H1,X.H1],[Y.H2,X.H2],[Y.H3,X.H3],[Y.H4,X.H4],[Y.H5,X.H5],[Y.H6,X.H6],[Y.HEAD,X.HEAD],[Y.HEADER,X.HEADER],[Y.HGROUP,X.HGROUP],[Y.HR,X.HR],[Y.HTML,X.HTML],[Y.I,X.I],[Y.IMG,X.IMG],[Y.IMAGE,X.IMAGE],[Y.INPUT,X.INPUT],[Y.IFRAME,X.IFRAME],[Y.KEYGEN,X.KEYGEN],[Y.LABEL,X.LABEL],[Y.LI,X.LI],[Y.LINK,X.LINK],[Y.LISTING,X.LISTING],[Y.MAIN,X.MAIN],[Y.MALIGNMARK,X.MALIGNMARK],[Y.MARQUEE,X.MARQUEE],[Y.MATH,X.MATH],[Y.MENU,X.MENU],[Y.META,X.META],[Y.MGLYPH,X.MGLYPH],[Y.MI,X.MI],[Y.MO,X.MO],[Y.MN,X.MN],[Y.MS,X.MS],[Y.MTEXT,X.MTEXT],[Y.NAV,X.NAV],[Y.NOBR,X.NOBR],[Y.NOFRAMES,X.NOFRAMES],[Y.NOEMBED,X.NOEMBED],[Y.NOSCRIPT,X.NOSCRIPT],[Y.OBJECT,X.OBJECT],[Y.OL,X.OL],[Y.OPTGROUP,X.OPTGROUP],[Y.OPTION,X.OPTION],[Y.P,X.P],[Y.PARAM,X.PARAM],[Y.PLAINTEXT,X.PLAINTEXT],[Y.PRE,X.PRE],[Y.RB,X.RB],[Y.RP,X.RP],[Y.RT,X.RT],[Y.RTC,X.RTC],[Y.RUBY,X.RUBY],[Y.S,X.S],[Y.SCRIPT,X.SCRIPT],[Y.SEARCH,X.SEARCH],[Y.SECTION,X.SECTION],[Y.SELECT,X.SELECT],[Y.SOURCE,X.SOURCE],[Y.SMALL,X.SMALL],[Y.SPAN,X.SPAN],[Y.STRIKE,X.STRIKE],[Y.STRONG,X.STRONG],[Y.STYLE,X.STYLE],[Y.SUB,X.SUB],[Y.SUMMARY,X.SUMMARY],[Y.SUP,X.SUP],[Y.TABLE,X.TABLE],[Y.TBODY,X.TBODY],[Y.TEMPLATE,X.TEMPLATE],[Y.TEXTAREA,X.TEXTAREA],[Y.TFOOT,X.TFOOT],[Y.TD,X.TD],[Y.TH,X.TH],[Y.THEAD,X.THEAD],[Y.TITLE,X.TITLE],[Y.TR,X.TR],[Y.TRACK,X.TRACK],[Y.TT,X.TT],[Y.U,X.U],[Y.UL,X.UL],[Y.SVG,X.SVG],[Y.VAR,X.VAR],[Y.WBR,X.WBR],[Y.XMP,X.XMP]]);function EZ(e){return TZ.get(e)??X.UNKNOWN}const Z=X,DZ={[J.HTML]:new Set([Z.ADDRESS,Z.APPLET,Z.AREA,Z.ARTICLE,Z.ASIDE,Z.BASE,Z.BASEFONT,Z.BGSOUND,Z.BLOCKQUOTE,Z.BODY,Z.BR,Z.BUTTON,Z.CAPTION,Z.CENTER,Z.COL,Z.COLGROUP,Z.DD,Z.DETAILS,Z.DIR,Z.DIV,Z.DL,Z.DT,Z.EMBED,Z.FIELDSET,Z.FIGCAPTION,Z.FIGURE,Z.FOOTER,Z.FORM,Z.FRAME,Z.FRAMESET,Z.H1,Z.H2,Z.H3,Z.H4,Z.H5,Z.H6,Z.HEAD,Z.HEADER,Z.HGROUP,Z.HR,Z.HTML,Z.IFRAME,Z.IMG,Z.INPUT,Z.LI,Z.LINK,Z.LISTING,Z.MAIN,Z.MARQUEE,Z.MENU,Z.META,Z.NAV,Z.NOEMBED,Z.NOFRAMES,Z.NOSCRIPT,Z.OBJECT,Z.OL,Z.P,Z.PARAM,Z.PLAINTEXT,Z.PRE,Z.SCRIPT,Z.SECTION,Z.SELECT,Z.SOURCE,Z.STYLE,Z.SUMMARY,Z.TABLE,Z.TBODY,Z.TD,Z.TEMPLATE,Z.TEXTAREA,Z.TFOOT,Z.TH,Z.THEAD,Z.TITLE,Z.TR,Z.TRACK,Z.UL,Z.WBR,Z.XMP]),[J.MATHML]:new Set([Z.MI,Z.MO,Z.MN,Z.MS,Z.MTEXT,Z.ANNOTATION_XML]),[J.SVG]:new Set([Z.TITLE,Z.FOREIGN_OBJECT,Z.DESC]),[J.XLINK]:new Set,[J.XML]:new Set,[J.XMLNS]:new Set},OZ=new Set([Z.H1,Z.H2,Z.H3,Z.H4,Z.H5,Z.H6]);Y.STYLE,Y.SCRIPT,Y.XMP,Y.IFRAME,Y.NOEMBED,Y.NOFRAMES,Y.PLAINTEXT;var Q;(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`})(Q||={});const kZ={DATA:Q.DATA,RCDATA:Q.RCDATA,RAWTEXT:Q.RAWTEXT,SCRIPT_DATA:Q.SCRIPT_DATA,PLAINTEXT:Q.PLAINTEXT,CDATA_SECTION:Q.CDATA_SECTION};function AZ(e){return e>=K.DIGIT_0&&e<=K.DIGIT_9}function jZ(e){return e>=K.LATIN_CAPITAL_A&&e<=K.LATIN_CAPITAL_Z}function MZ(e){return e>=K.LATIN_SMALL_A&&e<=K.LATIN_SMALL_Z}function NZ(e){return MZ(e)||jZ(e)}function PZ(e){return NZ(e)||AZ(e)}function FZ(e){return e+32}function IZ(e){return e===K.SPACE||e===K.LINE_FEED||e===K.TABULATION||e===K.FORM_FEED}function LZ(e){return IZ(e)||e===K.SOLIDUS||e===K.GREATER_THAN_SIGN}function RZ(e){return e===K.NULL?q.nullCharacterReference:e>1114111?q.characterReferenceOutsideUnicodeRange:nZ(e)?q.surrogateCharacterReference:oZ(e)?q.noncharacterCharacterReference:aZ(e)||e===K.CARRIAGE_RETURN?q.controlCharacterReference:null}var zZ=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=Q.DATA,this.returnState=Q.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new sZ(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new xZ(uZ,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(q.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(q.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=RZ(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:cZ.START_TAG,tagName:``,tagID:X.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:cZ.END_TAG,tagName:``,tagID:X.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:cZ.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:cZ.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(lZ(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(q.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=EZ(e.tagName),e.type===cZ.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(q.endTagWithAttributes),e.selfClosing&&this._err(q.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 cZ.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case cZ.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case cZ.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:cZ.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=IZ(e)?cZ.WHITESPACE_CHARACTER:e===K.NULL?cZ.NULL_CHARACTER:cZ.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(cZ.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=Q.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?bZ.Attribute:bZ.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Q.DATA:this._stateData(e);break;case Q.RCDATA:this._stateRcdata(e);break;case Q.RAWTEXT:this._stateRawtext(e);break;case Q.SCRIPT_DATA:this._stateScriptData(e);break;case Q.PLAINTEXT:this._statePlaintext(e);break;case Q.TAG_OPEN:this._stateTagOpen(e);break;case Q.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Q.TAG_NAME:this._stateTagName(e);break;case Q.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Q.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Q.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Q.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Q.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Q.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Q.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Q.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Q.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Q.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Q.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Q.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Q.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Q.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Q.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Q.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Q.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Q.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Q.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Q.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Q.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Q.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Q.BOGUS_COMMENT:this._stateBogusComment(e);break;case Q.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Q.COMMENT_START:this._stateCommentStart(e);break;case Q.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Q.COMMENT:this._stateComment(e);break;case Q.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Q.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Q.COMMENT_END:this._stateCommentEnd(e);break;case Q.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Q.DOCTYPE:this._stateDoctype(e);break;case Q.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Q.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Q.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Q.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Q.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Q.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Q.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Q.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Q.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Q.CDATA_SECTION:this._stateCdataSection(e);break;case Q.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Q.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Q.CHARACTER_REFERENCE:this._stateCharacterReference();break;case Q.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case K.LESS_THAN_SIGN:this.state=Q.TAG_OPEN;break;case K.AMPERSAND:this._startCharacterReference();break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitCodePoint(e);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case K.AMPERSAND:this._startCharacterReference();break;case K.LESS_THAN_SIGN:this.state=Q.RCDATA_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case K.LESS_THAN_SIGN:this.state=Q.RAWTEXT_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(NZ(e))this._createStartTagToken(),this.state=Q.TAG_NAME,this._stateTagName(e);else switch(e){case K.EXCLAMATION_MARK:this.state=Q.MARKUP_DECLARATION_OPEN;break;case K.SOLIDUS:this.state=Q.END_TAG_OPEN;break;case K.QUESTION_MARK:this._err(q.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e);break;case K.EOF:this._err(q.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(q.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=Q.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(NZ(e))this._createEndTagToken(),this.state=Q.TAG_NAME,this._stateTagName(e);else switch(e){case K.GREATER_THAN_SIGN:this._err(q.missingEndTagName),this.state=Q.DATA;break;case K.EOF:this._err(q.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(q.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case K.SOLIDUS:this.state=Q.SELF_CLOSING_START_TAG;break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentTagToken();break;case K.NULL:this._err(q.unexpectedNullCharacter),t.tagName+=`�`;break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(jZ(e)?FZ(e):e)}}_stateRcdataLessThanSign(e){e===K.SOLIDUS?this.state=Q.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=Q.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){NZ(e)?(this.state=Q.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=Q.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 K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=Q.BEFORE_ATTRIBUTE_NAME,!1;case K.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=Q.SELF_CLOSING_START_TAG,!1;case K.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=Q.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===K.SOLIDUS?this.state=Q.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){NZ(e)?(this.state=Q.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case K.SOLIDUS:this.state=Q.SCRIPT_DATA_END_TAG_OPEN;break;case K.EXCLAMATION_MARK:this.state=Q.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){NZ(e)?(this.state=Q.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===K.HYPHEN_MINUS?(this.state=Q.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===K.HYPHEN_MINUS?(this.state=Q.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case K.HYPHEN_MINUS:this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case K.GREATER_THAN_SIGN:this.state=Q.SCRIPT_DATA,this._emitChars(`>`);break;case K.NULL:this._err(q.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===K.SOLIDUS?this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:NZ(e)?(this._emitChars(`<`),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){NZ(e)?(this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(tZ.SCRIPT,!1)&&LZ(this.preprocessor.peek(tZ.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<tZ.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case K.NULL:this._err(q.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case K.HYPHEN_MINUS:this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case K.GREATER_THAN_SIGN:this.state=Q.SCRIPT_DATA,this._emitChars(`>`);break;case K.NULL:this._err(q.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===K.SOLIDUS?(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(tZ.SCRIPT,!1)&&LZ(this.preprocessor.peek(tZ.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<tZ.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Q.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.SOLIDUS:case K.GREATER_THAN_SIGN:case K.EOF:this.state=Q.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case K.EQUALS_SIGN:this._err(q.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=Q.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=Q.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:case K.SOLIDUS:case K.GREATER_THAN_SIGN:case K.EOF:this._leaveAttrName(),this.state=Q.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case K.EQUALS_SIGN:this._leaveAttrName(),this.state=Q.BEFORE_ATTRIBUTE_VALUE;break;case K.QUOTATION_MARK:case K.APOSTROPHE:case K.LESS_THAN_SIGN:this._err(q.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case K.NULL:this._err(q.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(jZ(e)?FZ(e):e)}}_stateAfterAttributeName(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.SOLIDUS:this.state=Q.SELF_CLOSING_START_TAG;break;case K.EQUALS_SIGN:this.state=Q.BEFORE_ATTRIBUTE_VALUE;break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentTagToken();break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=Q.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.QUOTATION_MARK:this.state=Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case K.APOSTROPHE:this.state=Q.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingAttributeValue),this.state=Q.DATA,this.emitCurrentTagToken();break;default:this.state=Q.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case K.QUOTATION_MARK:this.state=Q.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case K.AMPERSAND:this._startCharacterReference();break;case K.NULL:this._err(q.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case K.APOSTROPHE:this.state=Q.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case K.AMPERSAND:this._startCharacterReference();break;case K.NULL:this._err(q.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this._leaveAttrValue(),this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case K.AMPERSAND:this._startCharacterReference();break;case K.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Q.DATA,this.emitCurrentTagToken();break;case K.NULL:this._err(q.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case K.QUOTATION_MARK:case K.APOSTROPHE:case K.LESS_THAN_SIGN:case K.EQUALS_SIGN:case K.GRAVE_ACCENT:this._err(q.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this._leaveAttrValue(),this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case K.SOLIDUS:this._leaveAttrValue(),this.state=Q.SELF_CLOSING_START_TAG;break;case K.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Q.DATA,this.emitCurrentTagToken();break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this._err(q.missingWhitespaceBetweenAttributes),this.state=Q.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case K.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=Q.DATA,this.emitCurrentTagToken();break}case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this._err(q.unexpectedSolidusInTag),this.state=Q.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentComment(t);break;case K.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case K.NULL:this._err(q.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(tZ.DASH_DASH,!0)?(this._createCommentToken(tZ.DASH_DASH.length+1),this.state=Q.COMMENT_START):this._consumeSequenceIfMatch(tZ.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(tZ.DOCTYPE.length+1),this.state=Q.DOCTYPE):this._consumeSequenceIfMatch(tZ.CDATA_START,!0)?this.inForeignNode?this.state=Q.CDATA_SECTION:(this._err(q.cdataInHtmlContent),this._createCommentToken(tZ.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=Q.BOGUS_COMMENT):this._ensureHibernation()||(this._err(q.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.COMMENT_START_DASH;break;case K.GREATER_THAN_SIGN:{this._err(q.abruptClosingOfEmptyComment),this.state=Q.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case K.HYPHEN_MINUS:this.state=Q.COMMENT_END;break;case K.GREATER_THAN_SIGN:this._err(q.abruptClosingOfEmptyComment),this.state=Q.DATA,this.emitCurrentComment(t);break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Q.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case K.HYPHEN_MINUS:this.state=Q.COMMENT_END_DASH;break;case K.LESS_THAN_SIGN:t.data+=`<`,this.state=Q.COMMENT_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.data+=`�`;break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case K.EXCLAMATION_MARK:t.data+=`!`,this.state=Q.COMMENT_LESS_THAN_SIGN_BANG;break;case K.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===K.HYPHEN_MINUS?this.state=Q.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Q.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===K.HYPHEN_MINUS?this.state=Q.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Q.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==K.GREATER_THAN_SIGN&&e!==K.EOF&&this._err(q.nestedComment),this.state=Q.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case K.HYPHEN_MINUS:this.state=Q.COMMENT_END;break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentComment(t);break;case K.EXCLAMATION_MARK:this.state=Q.COMMENT_END_BANG;break;case K.HYPHEN_MINUS:t.data+=`-`;break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case K.HYPHEN_MINUS:t.data+=`--!`,this.state=Q.COMMENT_END_DASH;break;case K.GREATER_THAN_SIGN:this._err(q.incorrectlyClosedComment),this.state=Q.DATA,this.emitCurrentComment(t);break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=Q.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_NAME;break;case K.GREATER_THAN_SIGN:this.state=Q.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case K.EOF:{this._err(q.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(q.missingWhitespaceBeforeDoctypeName),this.state=Q.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(jZ(e))this._createDoctypeToken(String.fromCharCode(FZ(e))),this.state=Q.DOCTYPE_NAME;else switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.NULL:this._err(q.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=Q.DOCTYPE_NAME;break;case K.GREATER_THAN_SIGN:{this._err(q.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=Q.DATA;break}case K.EOF:{this._err(q.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=Q.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.AFTER_DOCTYPE_NAME;break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.NULL:this._err(q.unexpectedNullCharacter),t.name+=`�`;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(jZ(e)?FZ(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(tZ.PUBLIC,!1)?this.state=Q.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(tZ.SYSTEM,!1)?this.state=Q.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(q.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case K.QUOTATION_MARK:this._err(q.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:this._err(q.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.QUOTATION_MARK:t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case K.QUOTATION_MARK:this.state=Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.publicId+=`�`;break;case K.GREATER_THAN_SIGN:this._err(q.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.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 K.APOSTROPHE:this.state=Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.publicId+=`�`;break;case K.GREATER_THAN_SIGN:this._err(q.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.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 K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.QUOTATION_MARK:this._err(q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:this._err(q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.QUOTATION_MARK:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case K.QUOTATION_MARK:this._err(q.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:this._err(q.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.QUOTATION_MARK:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case K.QUOTATION_MARK:this.state=Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.systemId+=`�`;break;case K.GREATER_THAN_SIGN:this._err(q.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.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 K.APOSTROPHE:this.state=Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.systemId+=`�`;break;case K.GREATER_THAN_SIGN:this._err(q.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.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 K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case K.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.NULL:this._err(q.unexpectedNullCharacter);break;case K.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case K.RIGHT_SQUARE_BRACKET:this.state=Q.CDATA_SECTION_BRACKET;break;case K.EOF:this._err(q.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===K.RIGHT_SQUARE_BRACKET?this.state=Q.CDATA_SECTION_END:(this._emitChars(`]`),this.state=Q.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case K.GREATER_THAN_SIGN:this.state=Q.DATA;break;case K.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=Q.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(K.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&PZ(this.preprocessor.peek(1))?Q.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){PZ(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===K.SEMICOLON&&this._err(q.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}};const BZ=new Set([X.DD,X.DT,X.LI,X.OPTGROUP,X.OPTION,X.P,X.RB,X.RP,X.RT,X.RTC]),VZ=new Set([...BZ,X.CAPTION,X.COLGROUP,X.TBODY,X.TD,X.TFOOT,X.TH,X.THEAD,X.TR]),HZ=new Set([X.APPLET,X.CAPTION,X.HTML,X.MARQUEE,X.OBJECT,X.TABLE,X.TD,X.TEMPLATE,X.TH]),UZ=new Set([...HZ,X.OL,X.UL]),WZ=new Set([...HZ,X.BUTTON]),GZ=new Set([X.ANNOTATION_XML,X.MI,X.MN,X.MO,X.MS,X.MTEXT]),KZ=new Set([X.DESC,X.FOREIGN_OBJECT,X.TITLE]),qZ=new Set([X.TR,X.TEMPLATE,X.HTML]),JZ=new Set([X.TBODY,X.TFOOT,X.THEAD,X.TEMPLATE,X.HTML]),YZ=new Set([X.TABLE,X.TEMPLATE,X.HTML]),XZ=new Set([X.TD,X.TH]);var ZZ=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=X.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===X.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===J.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])!==J.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(OZ,J.HTML)}popUntilTableCellPopped(){this.popUntilPopped(XZ,J.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(YZ,J.HTML)}clearBackToTableBodyContext(){this.clearBackTo(JZ,J.HTML)}clearBackToTableRowContext(){this.clearBackTo(qZ,J.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]===X.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]===X.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 J.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case J.SVG:if(KZ.has(r))return!1;break;case J.MATHML:if(GZ.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,HZ)}hasInListItemScope(e){return this.hasInDynamicScope(e,UZ)}hasInButtonScope(e){return this.hasInDynamicScope(e,WZ)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case J.HTML:if(OZ.has(t))return!0;if(HZ.has(t))return!1;break;case J.SVG:if(KZ.has(t))return!1;break;case J.MATHML:if(GZ.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===J.HTML)switch(this.tagIDs[t]){case e:return!0;case X.TABLE:case X.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===J.HTML)switch(this.tagIDs[e]){case X.TBODY:case X.THEAD:case X.TFOOT:return!0;case X.TABLE:case X.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===J.HTML)switch(this.tagIDs[t]){case e:return!0;case X.OPTION:case X.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&BZ.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&VZ.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&VZ.has(this.currentTagId);)this.pop()}},QZ;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(QZ||={});const $Z={type:QZ.Marker};var eQ=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===QZ.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<3)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<3)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>=3&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift($Z)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:QZ.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:QZ.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($Z);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===QZ.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===QZ.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===QZ.Element&&t.element===e)}};const tQ={createDocument(){return{nodeName:`#document`,mode:wZ.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};tQ.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(tQ.isTextNode(n)){n.value+=t;return}}tQ.appendChild(e,tQ.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&tQ.isTextNode(r)?r.value+=t:tQ.insertBefore(e,tQ.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}}},nQ=`html`,rQ=`+//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(`,`),iQ=[...rQ,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],aQ=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),oQ=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],sQ=[...oQ,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function cQ(e,t){return t.some(t=>e.startsWith(t))}function lQ(e){return e.name===nQ&&e.publicId===null&&(e.systemId===null||e.systemId===`about:legacy-compat`)}function uQ(e){if(e.name!==nQ)return wZ.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`)return wZ.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),aQ.has(n))return wZ.QUIRKS;let e=t===null?iQ:rQ;if(cQ(n,e))return wZ.QUIRKS;if(e=t===null?oQ:sQ,cQ(n,e))return wZ.LIMITED_QUIRKS}return wZ.NO_QUIRKS}const dQ={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},fQ=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])),pQ=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:J.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:J.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:J.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:J.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:J.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:J.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:J.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:J.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:J.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:J.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:J.XMLNS}]]),mQ=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])),hQ=new Set([X.B,X.BIG,X.BLOCKQUOTE,X.BODY,X.BR,X.CENTER,X.CODE,X.DD,X.DIV,X.DL,X.DT,X.EM,X.EMBED,X.H1,X.H2,X.H3,X.H4,X.H5,X.H6,X.HEAD,X.HR,X.I,X.IMG,X.LI,X.LISTING,X.MENU,X.META,X.NOBR,X.OL,X.P,X.PRE,X.RUBY,X.S,X.SMALL,X.SPAN,X.STRONG,X.STRIKE,X.SUB,X.SUP,X.TABLE,X.TT,X.U,X.UL,X.VAR]);function gQ(e){let t=e.tagID;return t===X.FONT&&e.attrs.some(({name:e})=>e===CZ.COLOR||e===CZ.SIZE||e===CZ.FACE)||hQ.has(t)}function _Q(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===`definitionurl`){e.attrs[t].name=`definitionURL`;break}}function vQ(e){for(let t=0;t<e.attrs.length;t++){let n=fQ.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function yQ(e){for(let t=0;t<e.attrs.length;t++){let n=pQ.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 bQ(e){let t=mQ.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=EZ(e.tagName))}function xQ(e,t){return t===J.MATHML&&(e===X.MI||e===X.MO||e===X.MN||e===X.MS||e===X.MTEXT)}function SQ(e,t,n){if(t===J.MATHML&&e===X.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===CZ.ENCODING){let t=n[e].value.toLowerCase();return t===dQ.TEXT_HTML||t===dQ.APPLICATION_XML}}return t===J.SVG&&(e===X.FOREIGN_OBJECT||e===X.DESC||e===X.TITLE)}function CQ(e,t,n,r){return(!r||r===J.HTML)&&SQ(e,t,n)||(!r||r===J.MATHML)&&xQ(e,t)}var $;(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`})($||={});const wQ={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},TQ=new Set([X.TABLE,X.TBODY,X.TFOOT,X.THEAD,X.TR]),EQ={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:tQ,onParseError:null};var DQ=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=$.INITIAL,this.originalInsertionMode=$.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={...EQ,...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 zZ(this.options,this),this.activeFormattingElements=new eQ(this.treeAdapter),this.fragmentContextID=n?EZ(this.treeAdapter.getTagName(n)):X.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new ZZ(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={...EQ,...t};e??=n.treeAdapter.createElement(Y.TEMPLATE,J.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,J.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===X.TEMPLATE&&i.tmplInsertionModeStack.unshift($.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??wQ,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)===J.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,J.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=$.TEXT}switchToPlaintextParsing(){this.insertionMode=$.TEXT,this.originalInsertionMode=$.IN_BODY,this.tokenizer.state=kZ.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)===Y.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==J.HTML))switch(this.fragmentContextID){case X.TITLE:case X.TEXTAREA:this.tokenizer.state=kZ.RCDATA;break;case X.STYLE:case X.XMP:case X.IFRAME:case X.NOEMBED:case X.NOFRAMES:case X.NOSCRIPT:this.tokenizer.state=kZ.RAWTEXT;break;case X.SCRIPT:this.tokenizer.state=kZ.SCRIPT_DATA;break;case X.PLAINTEXT:this.tokenizer.state=kZ.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,J.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,J.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(Y.HTML,J.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,X.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===cZ.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===X.SVG&&this.treeAdapter.getTagName(t)===Y.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===J.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===X.MGLYPH||e.tagID===X.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,J.HTML)}_processToken(e){switch(e.type){case cZ.CHARACTER:this.onCharacter(e);break;case cZ.NULL_CHARACTER:this.onNullCharacter(e);break;case cZ.COMMENT:this.onComment(e);break;case cZ.DOCTYPE:this.onDoctype(e);break;case cZ.START_TAG:this._processStartTag(e);break;case cZ.END_TAG:this.onEndTag(e);break;case cZ.EOF:this.onEof(e);break;case cZ.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return CQ(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===QZ.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=$.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(X.P),this.openElements.popUntilTagNamePopped(X.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case X.TR:this.insertionMode=$.IN_ROW;return;case X.TBODY:case X.THEAD:case X.TFOOT:this.insertionMode=$.IN_TABLE_BODY;return;case X.CAPTION:this.insertionMode=$.IN_CAPTION;return;case X.COLGROUP:this.insertionMode=$.IN_COLUMN_GROUP;return;case X.TABLE:this.insertionMode=$.IN_TABLE;return;case X.BODY:this.insertionMode=$.IN_BODY;return;case X.FRAMESET:this.insertionMode=$.IN_FRAMESET;return;case X.SELECT:this._resetInsertionModeForSelect(e);return;case X.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case X.HTML:this.insertionMode=this.headElement?$.AFTER_HEAD:$.BEFORE_HEAD;return;case X.TD:case X.TH:if(e>0){this.insertionMode=$.IN_CELL;return}break;case X.HEAD:if(e>0){this.insertionMode=$.IN_HEAD;return}}this.insertionMode=$.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===X.TEMPLATE)break;if(e===X.TABLE){this.insertionMode=$.IN_SELECT_IN_TABLE;return}}this.insertionMode=$.IN_SELECT}_isElementCausesFosterParenting(e){return TQ.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 X.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===J.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case X.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){let n=this.treeAdapter.getNamespaceURI(e);return DZ[n].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){G1(this,e);return}switch(this.insertionMode){case $.INITIAL:BQ(this,e);break;case $.BEFORE_HTML:UQ(this,e);break;case $.BEFORE_HEAD:KQ(this,e);break;case $.IN_HEAD:XQ(this,e);break;case $.IN_HEAD_NO_SCRIPT:$Q(this,e);break;case $.AFTER_HEAD:n$(this,e);break;case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:a$(this,e);break;case $.TEXT:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:e1(this,e);break;case $.IN_TABLE_TEXT:p1(this,e);break;case $.IN_COLUMN_GROUP:b1(this,e);break;case $.AFTER_BODY:I1(this,e);break;case $.AFTER_AFTER_BODY:H1(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){W1(this,e);return}switch(this.insertionMode){case $.INITIAL:BQ(this,e);break;case $.BEFORE_HTML:UQ(this,e);break;case $.BEFORE_HEAD:KQ(this,e);break;case $.IN_HEAD:XQ(this,e);break;case $.IN_HEAD_NO_SCRIPT:$Q(this,e);break;case $.AFTER_HEAD:n$(this,e);break;case $.TEXT:this._insertCharacters(e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:e1(this,e);break;case $.IN_COLUMN_GROUP:b1(this,e);break;case $.AFTER_BODY:I1(this,e);break;case $.AFTER_AFTER_BODY:H1(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){FQ(this,e);return}switch(this.insertionMode){case $.INITIAL:case $.BEFORE_HTML:case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_TEMPLATE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:FQ(this,e);break;case $.IN_TABLE_TEXT:m1(this,e);break;case $.AFTER_BODY:IQ(this,e);break;case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:LQ(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case $.INITIAL:zQ(this,e);break;case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:this._err(e,q.misplacedDoctype);break;case $.IN_TABLE_TEXT:m1(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,q.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?q1(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:BQ(this,e);break;case $.BEFORE_HTML:VQ(this,e);break;case $.BEFORE_HEAD:WQ(this,e);break;case $.IN_HEAD:qQ(this,e);break;case $.IN_HEAD_NO_SCRIPT:ZQ(this,e);break;case $.AFTER_HEAD:e$(this,e);break;case $.IN_BODY:R$(this,e);break;case $.IN_TABLE:l1(this,e);break;case $.IN_TABLE_TEXT:m1(this,e);break;case $.IN_CAPTION:g1(this,e);break;case $.IN_COLUMN_GROUP:v1(this,e);break;case $.IN_TABLE_BODY:x1(this,e);break;case $.IN_ROW:C1(this,e);break;case $.IN_CELL:T1(this,e);break;case $.IN_SELECT:D1(this,e);break;case $.IN_SELECT_IN_TABLE:k1(this,e);break;case $.IN_TEMPLATE:j1(this,e);break;case $.AFTER_BODY:P1(this,e);break;case $.IN_FRAMESET:L1(this,e);break;case $.AFTER_FRAMESET:z1(this,e);break;case $.AFTER_AFTER_BODY:V1(this,e);break;case $.AFTER_AFTER_FRAMESET:U1(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?J1(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:BQ(this,e);break;case $.BEFORE_HTML:HQ(this,e);break;case $.BEFORE_HEAD:GQ(this,e);break;case $.IN_HEAD:JQ(this,e);break;case $.IN_HEAD_NO_SCRIPT:QQ(this,e);break;case $.AFTER_HEAD:t$(this,e);break;case $.IN_BODY:X$(this,e);break;case $.TEXT:Q$(this,e);break;case $.IN_TABLE:u1(this,e);break;case $.IN_TABLE_TEXT:m1(this,e);break;case $.IN_CAPTION:_1(this,e);break;case $.IN_COLUMN_GROUP:y1(this,e);break;case $.IN_TABLE_BODY:S1(this,e);break;case $.IN_ROW:w1(this,e);break;case $.IN_CELL:E1(this,e);break;case $.IN_SELECT:O1(this,e);break;case $.IN_SELECT_IN_TABLE:A1(this,e);break;case $.IN_TEMPLATE:M1(this,e);break;case $.AFTER_BODY:F1(this,e);break;case $.IN_FRAMESET:R1(this,e);break;case $.AFTER_FRAMESET:B1(this,e);break;case $.AFTER_AFTER_BODY:H1(this,e)}}onEof(e){switch(this.insertionMode){case $.INITIAL:BQ(this,e);break;case $.BEFORE_HTML:UQ(this,e);break;case $.BEFORE_HEAD:KQ(this,e);break;case $.IN_HEAD:XQ(this,e);break;case $.IN_HEAD_NO_SCRIPT:$Q(this,e);break;case $.AFTER_HEAD:n$(this,e);break;case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:Z$(this,e);break;case $.TEXT:$$(this,e);break;case $.IN_TABLE_TEXT:m1(this,e);break;case $.IN_TEMPLATE:N1(this,e);break;case $.AFTER_BODY:case $.IN_FRAMESET:case $.AFTER_FRAMESET:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:RQ(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===K.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 $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.TEXT:case $.IN_COLUMN_GROUP:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:this._insertCharacters(e);break;case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:case $.AFTER_BODY:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:i$(this,e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:e1(this,e);break;case $.IN_TABLE_TEXT:f1(this,e)}}};function OQ(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):Y$(e,t),n}function kQ(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 AQ(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>=3;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=jQ(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function jQ(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 MQ(e,t,n){let r=EZ(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===X.TEMPLATE&&i===J.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function NQ(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 PQ(e,t){for(let n=0;n<8;n++){let n=OQ(e,t);if(!n)break;let r=kQ(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=AQ(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&MQ(e,a,i),NQ(e,r,n)}}function FQ(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function IQ(e,t){e._appendCommentNode(t,e.openElements.items[0])}function LQ(e,t){e._appendCommentNode(t,e.document)}function RQ(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 zQ(e,t){e._setDocumentType(t);let n=t.forceQuirks?wZ.QUIRKS:uQ(t);lQ(t)||e._err(t,q.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=$.BEFORE_HTML}function BQ(e,t){e._err(t,q.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,wZ.QUIRKS),e.insertionMode=$.BEFORE_HTML,e._processToken(t)}function VQ(e,t){t.tagID===X.HTML?(e._insertElement(t,J.HTML),e.insertionMode=$.BEFORE_HEAD):UQ(e,t)}function HQ(e,t){let n=t.tagID;(n===X.HTML||n===X.HEAD||n===X.BODY||n===X.BR)&&UQ(e,t)}function UQ(e,t){e._insertFakeRootElement(),e.insertionMode=$.BEFORE_HEAD,e._processToken(t)}function WQ(e,t){switch(t.tagID){case X.HTML:R$(e,t);break;case X.HEAD:e._insertElement(t,J.HTML),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD;break;default:KQ(e,t)}}function GQ(e,t){let n=t.tagID;n===X.HEAD||n===X.BODY||n===X.HTML||n===X.BR?KQ(e,t):e._err(t,q.endTagWithoutMatchingOpenElement)}function KQ(e,t){e._insertFakeElement(Y.HEAD,X.HEAD),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD,e._processToken(t)}function qQ(e,t){switch(t.tagID){case X.HTML:R$(e,t);break;case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.TITLE:e._switchToTextParsing(t,kZ.RCDATA);break;case X.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,kZ.RAWTEXT):(e._insertElement(t,J.HTML),e.insertionMode=$.IN_HEAD_NO_SCRIPT);break;case X.NOFRAMES:case X.STYLE:e._switchToTextParsing(t,kZ.RAWTEXT);break;case X.SCRIPT:e._switchToTextParsing(t,kZ.SCRIPT_DATA);break;case X.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=$.IN_TEMPLATE,e.tmplInsertionModeStack.unshift($.IN_TEMPLATE);break;case X.HEAD:e._err(t,q.misplacedStartTagForHeadElement);break;default:XQ(e,t)}}function JQ(e,t){switch(t.tagID){case X.HEAD:e.openElements.pop(),e.insertionMode=$.AFTER_HEAD;break;case X.BODY:case X.BR:case X.HTML:XQ(e,t);break;case X.TEMPLATE:YQ(e,t);break;default:e._err(t,q.endTagWithoutMatchingOpenElement)}}function YQ(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==X.TEMPLATE&&e._err(t,q.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(X.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,q.endTagWithoutMatchingOpenElement)}function XQ(e,t){e.openElements.pop(),e.insertionMode=$.AFTER_HEAD,e._processToken(t)}function ZQ(e,t){switch(t.tagID){case X.HTML:R$(e,t);break;case X.BASEFONT:case X.BGSOUND:case X.HEAD:case X.LINK:case X.META:case X.NOFRAMES:case X.STYLE:qQ(e,t);break;case X.NOSCRIPT:e._err(t,q.nestedNoscriptInHead);break;default:$Q(e,t)}}function QQ(e,t){switch(t.tagID){case X.NOSCRIPT:e.openElements.pop(),e.insertionMode=$.IN_HEAD;break;case X.BR:$Q(e,t);break;default:e._err(t,q.endTagWithoutMatchingOpenElement)}}function $Q(e,t){let n=t.type===cZ.EOF?q.openElementsLeftAfterEof:q.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=$.IN_HEAD,e._processToken(t)}function e$(e,t){switch(t.tagID){case X.HTML:R$(e,t);break;case X.BODY:e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=$.IN_BODY;break;case X.FRAMESET:e._insertElement(t,J.HTML),e.insertionMode=$.IN_FRAMESET;break;case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:case X.NOFRAMES:case X.SCRIPT:case X.STYLE:case X.TEMPLATE:case X.TITLE:e._err(t,q.abandonedHeadElementChild),e.openElements.push(e.headElement,X.HEAD),qQ(e,t),e.openElements.remove(e.headElement);break;case X.HEAD:e._err(t,q.misplacedStartTagForHeadElement);break;default:n$(e,t)}}function t$(e,t){switch(t.tagID){case X.BODY:case X.HTML:case X.BR:n$(e,t);break;case X.TEMPLATE:YQ(e,t);break;default:e._err(t,q.endTagWithoutMatchingOpenElement)}}function n$(e,t){e._insertFakeElement(Y.BODY,X.BODY),e.insertionMode=$.IN_BODY,r$(e,t)}function r$(e,t){switch(t.type){case cZ.CHARACTER:a$(e,t);break;case cZ.WHITESPACE_CHARACTER:i$(e,t);break;case cZ.COMMENT:FQ(e,t);break;case cZ.START_TAG:R$(e,t);break;case cZ.END_TAG:X$(e,t);break;case cZ.EOF:Z$(e,t)}}function i$(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function a$(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function o$(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function s$(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function c$(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_FRAMESET)}function l$(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function u$(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&OZ.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,J.HTML)}function d$(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function f$(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),n||(e.formElement=e.openElements.current))}function p$(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===X.LI&&r===X.LI||(n===X.DD||n===X.DT)&&(r===X.DD||r===X.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==X.ADDRESS&&r!==X.DIV&&r!==X.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function m$(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.tokenizer.state=kZ.PLAINTEXT}function h$(e,t){e.openElements.hasInScope(X.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1}function g$(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Y.A);n&&(PQ(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function _$(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function v$(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(X.NOBR)&&(PQ(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function y$(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function b$(e,t){e.treeAdapter.getDocumentMode(e.document)!==wZ.QUIRKS&&e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=$.IN_TABLE}function x$(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function S$(e){let t=lZ(e,CZ.TYPE);return t!=null&&t.toLowerCase()===`hidden`}function C$(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),S$(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function w$(e,t){e._appendElement(t,J.HTML),t.ackSelfClosing=!0}function T$(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function E$(e,t){t.tagName=Y.IMG,t.tagID=X.IMG,x$(e,t)}function D$(e,t){e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.tokenizer.state=kZ.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=$.TEXT}function O$(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,kZ.RAWTEXT)}function k$(e,t){e.framesetOk=!1,e._switchToTextParsing(t,kZ.RAWTEXT)}function A$(e,t){e._switchToTextParsing(t,kZ.RAWTEXT)}function j$(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===$.IN_TABLE||e.insertionMode===$.IN_CAPTION||e.insertionMode===$.IN_TABLE_BODY||e.insertionMode===$.IN_ROW||e.insertionMode===$.IN_CELL?$.IN_SELECT_IN_TABLE:$.IN_SELECT}function M$(e,t){e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function N$(e,t){e.openElements.hasInScope(X.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,J.HTML)}function P$(e,t){e.openElements.hasInScope(X.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(X.RTC),e._insertElement(t,J.HTML)}function F$(e,t){e._reconstructActiveFormattingElements(),_Q(t),yQ(t),t.selfClosing?e._appendElement(t,J.MATHML):e._insertElement(t,J.MATHML),t.ackSelfClosing=!0}function I$(e,t){e._reconstructActiveFormattingElements(),vQ(t),yQ(t),t.selfClosing?e._appendElement(t,J.SVG):e._insertElement(t,J.SVG),t.ackSelfClosing=!0}function L$(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function R$(e,t){switch(t.tagID){case X.I:case X.S:case X.B:case X.U:case X.EM:case X.TT:case X.BIG:case X.CODE:case X.FONT:case X.SMALL:case X.STRIKE:case X.STRONG:_$(e,t);break;case X.A:g$(e,t);break;case X.H1:case X.H2:case X.H3:case X.H4:case X.H5:case X.H6:u$(e,t);break;case X.P:case X.DL:case X.OL:case X.UL:case X.DIV:case X.DIR:case X.NAV:case X.MAIN:case X.MENU:case X.ASIDE:case X.CENTER:case X.FIGURE:case X.FOOTER:case X.HEADER:case X.HGROUP:case X.DIALOG:case X.DETAILS:case X.ADDRESS:case X.ARTICLE:case X.SEARCH:case X.SECTION:case X.SUMMARY:case X.FIELDSET:case X.BLOCKQUOTE:case X.FIGCAPTION:l$(e,t);break;case X.LI:case X.DD:case X.DT:p$(e,t);break;case X.BR:case X.IMG:case X.WBR:case X.AREA:case X.EMBED:case X.KEYGEN:x$(e,t);break;case X.HR:T$(e,t);break;case X.RB:case X.RTC:N$(e,t);break;case X.RT:case X.RP:P$(e,t);break;case X.PRE:case X.LISTING:d$(e,t);break;case X.XMP:O$(e,t);break;case X.SVG:I$(e,t);break;case X.HTML:o$(e,t);break;case X.BASE:case X.LINK:case X.META:case X.STYLE:case X.TITLE:case X.SCRIPT:case X.BGSOUND:case X.BASEFONT:case X.TEMPLATE:qQ(e,t);break;case X.BODY:s$(e,t);break;case X.FORM:f$(e,t);break;case X.NOBR:v$(e,t);break;case X.MATH:F$(e,t);break;case X.TABLE:b$(e,t);break;case X.INPUT:C$(e,t);break;case X.PARAM:case X.TRACK:case X.SOURCE:w$(e,t);break;case X.IMAGE:E$(e,t);break;case X.BUTTON:h$(e,t);break;case X.APPLET:case X.OBJECT:case X.MARQUEE:y$(e,t);break;case X.IFRAME:k$(e,t);break;case X.SELECT:j$(e,t);break;case X.OPTION:case X.OPTGROUP:M$(e,t);break;case X.NOEMBED:case X.NOFRAMES:A$(e,t);break;case X.FRAMESET:c$(e,t);break;case X.TEXTAREA:D$(e,t);break;case X.NOSCRIPT:e.options.scriptingEnabled?A$(e,t):L$(e,t);break;case X.PLAINTEXT:m$(e,t);break;case X.COL:case X.TH:case X.TD:case X.TR:case X.HEAD:case X.FRAME:case X.TBODY:case X.TFOOT:case X.THEAD:case X.CAPTION:case X.COLGROUP:break;default:L$(e,t)}}function z$(e,t){if(e.openElements.hasInScope(X.BODY)&&(e.insertionMode=$.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function B$(e,t){e.openElements.hasInScope(X.BODY)&&(e.insertionMode=$.AFTER_BODY,F1(e,t))}function V$(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function H$(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(X.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(X.FORM):n&&e.openElements.remove(n))}function U$(e){e.openElements.hasInButtonScope(X.P)||e._insertFakeElement(Y.P,X.P),e._closePElement()}function W$(e){e.openElements.hasInListItemScope(X.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(X.LI),e.openElements.popUntilTagNamePopped(X.LI))}function G$(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function K$(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function q$(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function J$(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Y.BR,X.BR),e.openElements.pop(),e.framesetOk=!1}function Y$(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!==X.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 X$(e,t){switch(t.tagID){case X.A:case X.B:case X.I:case X.S:case X.U:case X.EM:case X.TT:case X.BIG:case X.CODE:case X.FONT:case X.NOBR:case X.SMALL:case X.STRIKE:case X.STRONG:PQ(e,t);break;case X.P:U$(e);break;case X.DL:case X.UL:case X.OL:case X.DIR:case X.DIV:case X.NAV:case X.PRE:case X.MAIN:case X.MENU:case X.ASIDE:case X.BUTTON:case X.CENTER:case X.FIGURE:case X.FOOTER:case X.HEADER:case X.HGROUP:case X.DIALOG:case X.ADDRESS:case X.ARTICLE:case X.DETAILS:case X.SEARCH:case X.SECTION:case X.SUMMARY:case X.LISTING:case X.FIELDSET:case X.BLOCKQUOTE:case X.FIGCAPTION:V$(e,t);break;case X.LI:W$(e);break;case X.DD:case X.DT:G$(e,t);break;case X.H1:case X.H2:case X.H3:case X.H4:case X.H5:case X.H6:K$(e);break;case X.BR:J$(e);break;case X.BODY:z$(e,t);break;case X.HTML:B$(e,t);break;case X.FORM:H$(e);break;case X.APPLET:case X.OBJECT:case X.MARQUEE:q$(e,t);break;case X.TEMPLATE:YQ(e,t);break;default:Y$(e,t)}}function Z$(e,t){e.tmplInsertionModeStack.length>0?N1(e,t):RQ(e,t)}function Q$(e,t){var n;t.tagID===X.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function $$(e,t){e._err(t,q.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function e1(e,t){if(e.openElements.currentTagId!==void 0&&TQ.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=$.IN_TABLE_TEXT,t.type){case cZ.CHARACTER:p1(e,t);break;case cZ.WHITESPACE_CHARACTER:f1(e,t)}else d1(e,t)}function t1(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_CAPTION}function n1(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_COLUMN_GROUP}function r1(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.COLGROUP,X.COLGROUP),e.insertionMode=$.IN_COLUMN_GROUP,v1(e,t)}function i1(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_TABLE_BODY}function a1(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.TBODY,X.TBODY),e.insertionMode=$.IN_TABLE_BODY,x1(e,t)}function o1(e,t){e.openElements.hasInTableScope(X.TABLE)&&(e.openElements.popUntilTagNamePopped(X.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function s1(e,t){S$(t)?e._appendElement(t,J.HTML):d1(e,t),t.ackSelfClosing=!0}function c1(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,J.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function l1(e,t){switch(t.tagID){case X.TD:case X.TH:case X.TR:a1(e,t);break;case X.STYLE:case X.SCRIPT:case X.TEMPLATE:qQ(e,t);break;case X.COL:r1(e,t);break;case X.FORM:c1(e,t);break;case X.TABLE:o1(e,t);break;case X.TBODY:case X.TFOOT:case X.THEAD:i1(e,t);break;case X.INPUT:s1(e,t);break;case X.CAPTION:t1(e,t);break;case X.COLGROUP:n1(e,t);break;default:d1(e,t)}}function u1(e,t){switch(t.tagID){case X.TABLE:e.openElements.hasInTableScope(X.TABLE)&&(e.openElements.popUntilTagNamePopped(X.TABLE),e._resetInsertionMode());break;case X.TEMPLATE:YQ(e,t);break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TBODY:case X.TD:case X.TFOOT:case X.TH:case X.THEAD:case X.TR:break;default:d1(e,t)}}function d1(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,r$(e,t),e.fosterParentingEnabled=n}function f1(e,t){e.pendingCharacterTokens.push(t)}function p1(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function m1(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)d1(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const h1=new Set([X.CAPTION,X.COL,X.COLGROUP,X.TBODY,X.TD,X.TFOOT,X.TH,X.THEAD,X.TR]);function g1(e,t){let n=t.tagID;h1.has(n)?e.openElements.hasInTableScope(X.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_TABLE,l1(e,t)):R$(e,t)}function _1(e,t){let n=t.tagID;switch(n){case X.CAPTION:case X.TABLE:e.openElements.hasInTableScope(X.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_TABLE,n===X.TABLE&&u1(e,t));break;case X.BODY:case X.COL:case X.COLGROUP:case X.HTML:case X.TBODY:case X.TD:case X.TFOOT:case X.TH:case X.THEAD:case X.TR:break;default:X$(e,t)}}function v1(e,t){switch(t.tagID){case X.HTML:R$(e,t);break;case X.COL:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.TEMPLATE:qQ(e,t);break;default:b1(e,t)}}function y1(e,t){switch(t.tagID){case X.COLGROUP:e.openElements.currentTagId===X.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE);break;case X.TEMPLATE:YQ(e,t);break;case X.COL:break;default:b1(e,t)}}function b1(e,t){e.openElements.currentTagId===X.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE,e._processToken(t))}function x1(e,t){switch(t.tagID){case X.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_ROW;break;case X.TH:case X.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Y.TR,X.TR),e.insertionMode=$.IN_ROW,C1(e,t);break;case X.CAPTION:case X.COL:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE,l1(e,t));break;default:l1(e,t)}}function S1(e,t){let n=t.tagID;switch(t.tagID){case X.TBODY:case X.TFOOT:case X.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE);break;case X.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE,u1(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TD:case X.TH:case X.TR:break;default:u1(e,t)}}function C1(e,t){switch(t.tagID){case X.TH:case X.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_CELL,e.activeFormattingElements.insertMarker();break;case X.CAPTION:case X.COL:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:case X.TR:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,x1(e,t));break;default:l1(e,t)}}function w1(e,t){switch(t.tagID){case X.TR:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY);break;case X.TABLE:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,S1(e,t));break;case X.TBODY:case X.TFOOT:case X.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(X.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,S1(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TD:case X.TH:break;default:u1(e,t)}}function T1(e,t){let n=t.tagID;h1.has(n)?(e.openElements.hasInTableScope(X.TD)||e.openElements.hasInTableScope(X.TH))&&(e._closeTableCell(),C1(e,t)):R$(e,t)}function E1(e,t){let n=t.tagID;switch(n){case X.TD:case X.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_ROW);break;case X.TABLE:case X.TBODY:case X.TFOOT:case X.THEAD:case X.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),w1(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:break;default:X$(e,t)}}function D1(e,t){switch(t.tagID){case X.HTML:R$(e,t);break;case X.OPTION:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e._insertElement(t,J.HTML);break;case X.OPTGROUP:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop(),e._insertElement(t,J.HTML);break;case X.HR:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop(),e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.INPUT:case X.KEYGEN:case X.TEXTAREA:case X.SELECT:e.openElements.hasInSelectScope(X.SELECT)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),t.tagID!==X.SELECT&&e._processStartTag(t));break;case X.SCRIPT:case X.TEMPLATE:qQ(e,t)}}function O1(e,t){switch(t.tagID){case X.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===X.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===X.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop();break;case X.OPTION:e.openElements.currentTagId===X.OPTION&&e.openElements.pop();break;case X.SELECT:e.openElements.hasInSelectScope(X.SELECT)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode());break;case X.TEMPLATE:YQ(e,t)}}function k1(e,t){let n=t.tagID;n===X.CAPTION||n===X.TABLE||n===X.TBODY||n===X.TFOOT||n===X.THEAD||n===X.TR||n===X.TD||n===X.TH?(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),e._processStartTag(t)):D1(e,t)}function A1(e,t){let n=t.tagID;n===X.CAPTION||n===X.TABLE||n===X.TBODY||n===X.TFOOT||n===X.THEAD||n===X.TR||n===X.TD||n===X.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),e.onEndTag(t)):O1(e,t)}function j1(e,t){switch(t.tagID){case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:case X.NOFRAMES:case X.SCRIPT:case X.STYLE:case X.TEMPLATE:case X.TITLE:qQ(e,t);break;case X.CAPTION:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:e.tmplInsertionModeStack[0]=$.IN_TABLE,e.insertionMode=$.IN_TABLE,l1(e,t);break;case X.COL:e.tmplInsertionModeStack[0]=$.IN_COLUMN_GROUP,e.insertionMode=$.IN_COLUMN_GROUP,v1(e,t);break;case X.TR:e.tmplInsertionModeStack[0]=$.IN_TABLE_BODY,e.insertionMode=$.IN_TABLE_BODY,x1(e,t);break;case X.TD:case X.TH:e.tmplInsertionModeStack[0]=$.IN_ROW,e.insertionMode=$.IN_ROW,C1(e,t);break;default:e.tmplInsertionModeStack[0]=$.IN_BODY,e.insertionMode=$.IN_BODY,R$(e,t)}}function M1(e,t){t.tagID===X.TEMPLATE&&YQ(e,t)}function N1(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(X.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):RQ(e,t)}function P1(e,t){t.tagID===X.HTML?R$(e,t):I1(e,t)}function F1(e,t){if(t.tagID===X.HTML){if(e.fragmentContext||(e.insertionMode=$.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===X.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 I1(e,t)}function I1(e,t){e.insertionMode=$.IN_BODY,r$(e,t)}function L1(e,t){switch(t.tagID){case X.HTML:R$(e,t);break;case X.FRAMESET:e._insertElement(t,J.HTML);break;case X.FRAME:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.NOFRAMES:qQ(e,t)}}function R1(e,t){t.tagID===X.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==X.FRAMESET&&(e.insertionMode=$.AFTER_FRAMESET))}function z1(e,t){switch(t.tagID){case X.HTML:R$(e,t);break;case X.NOFRAMES:qQ(e,t)}}function B1(e,t){t.tagID===X.HTML&&(e.insertionMode=$.AFTER_AFTER_FRAMESET)}function V1(e,t){t.tagID===X.HTML?R$(e,t):H1(e,t)}function H1(e,t){e.insertionMode=$.IN_BODY,r$(e,t)}function U1(e,t){switch(t.tagID){case X.HTML:R$(e,t);break;case X.NOFRAMES:qQ(e,t)}}function W1(e,t){t.chars=`�`,e._insertCharacters(t)}function G1(e,t){e._insertCharacters(t),e.framesetOk=!1}function K1(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==J.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function q1(e,t){if(gQ(t))K1(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===J.MATHML?_Q(t):r===J.SVG&&(bQ(t),vQ(t)),yQ(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function J1(e,t){if(t.tagID===X.P||t.tagID===X.BR){K1(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)===J.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}Y.AREA,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BR,Y.COL,Y.EMBED,Y.FRAME,Y.HR,Y.IMG,Y.INPUT,Y.KEYGEN,Y.LINK,Y.META,Y.PARAM,Y.SOURCE,Y.TRACK,Y.WBR;function Y1(e,t){return DQ.parse(e,t)}function X1(e,t,n){typeof e==`string`&&(n=t,t=e,e=null);let r=DQ.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}const Z1={abandonedHeadElementChild:{reason:`Unexpected metadata element after head`,description:"Unexpected element after head. Expected the element before `</head>`",url:!1},abruptClosingOfEmptyComment:{reason:`Unexpected abruptly closed empty comment`,description:"Unexpected `>` or `->`. Expected `-->` to close comments"},abruptDoctypePublicIdentifier:{reason:`Unexpected abruptly closed public identifier`,description:"Unexpected `>`. Expected a closing `\"` or `'` after the public identifier"},abruptDoctypeSystemIdentifier:{reason:`Unexpected abruptly closed system identifier`,description:"Unexpected `>`. Expected a closing `\"` or `'` after the identifier identifier"},absenceOfDigitsInNumericCharacterReference:{reason:`Unexpected non-digit at start of numeric character reference`,description:"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},cdataInHtmlContent:{reason:`Unexpected CDATA section in HTML`,description:"Unexpected `<![CDATA[` in HTML. Remove it, use a comment, or encode special characters instead"},characterReferenceOutsideUnicodeRange:{reason:`Unexpected too big numeric character reference`,description:`Unexpectedly high character reference. Expected character references to be at most hexadecimal 10ffff (or decimal 1114111)`},closingOfElementWithOpenChildElements:{reason:`Unexpected closing tag with open child elements`,description:`Unexpectedly closing tag. Expected other tags to be closed first`,url:!1},controlCharacterInInputStream:{reason:`Unexpected control character`,description:"Unexpected control character `%x`. Expected a non-control code point, 0x00, or ASCII whitespace"},controlCharacterReference:{reason:`Unexpected control character reference`,description:`Unexpectedly control character in reference. Expected a non-control code point, 0x00, or ASCII whitespace`},disallowedContentInNoscriptInHead:{reason:"Disallowed content inside `<noscript>` in `<head>`",description:"Unexpected text character `%c`. Only use text in `<noscript>`s in `<body>`",url:!1},duplicateAttribute:{reason:`Unexpected duplicate attribute`,description:`Unexpectedly double attribute. Expected attributes to occur only once`},endTagWithAttributes:{reason:`Unexpected attribute on closing tag`,description:"Unexpected attribute. Expected `>` instead"},endTagWithTrailingSolidus:{reason:`Unexpected slash at end of closing tag`,description:"Unexpected `%c-1`. Expected `>` instead"},endTagWithoutMatchingOpenElement:{reason:`Unexpected unopened end tag`,description:`Unexpected end tag. Expected no end tag or another end tag`,url:!1},eofBeforeTagName:{reason:`Unexpected end of file`,description:`Unexpected end of file. Expected tag name instead`},eofInCdata:{reason:`Unexpected end of file in CDATA`,description:"Unexpected end of file. Expected `]]>` to close the CDATA"},eofInComment:{reason:`Unexpected end of file in comment`,description:"Unexpected end of file. Expected `-->` to close the comment"},eofInDoctype:{reason:`Unexpected end of file in doctype`,description:"Unexpected end of file. Expected a valid doctype (such as `<!doctype html>`)"},eofInElementThatCanContainOnlyText:{reason:`Unexpected end of file in element that can only contain text`,description:`Unexpected end of file. Expected text or a closing tag`,url:!1},eofInScriptHtmlCommentLikeText:{reason:`Unexpected end of file in comment inside script`,description:"Unexpected end of file. Expected `-->` to close the comment"},eofInTag:{reason:`Unexpected end of file in tag`,description:"Unexpected end of file. Expected `>` to close the tag"},incorrectlyClosedComment:{reason:`Incorrectly closed comment`,description:"Unexpected `%c-1`. Expected `-->` to close the comment"},incorrectlyOpenedComment:{reason:`Incorrectly opened comment`,description:"Unexpected `%c`. Expected `<!--` to open the comment"},invalidCharacterSequenceAfterDoctypeName:{reason:`Invalid sequence after doctype name`,description:"Unexpected sequence at `%c`. Expected `public` or `system`"},invalidFirstCharacterOfTagName:{reason:`Invalid first character in tag name`,description:"Unexpected `%c`. Expected an ASCII letter instead"},misplacedDoctype:{reason:`Misplaced doctype`,description:`Unexpected doctype. Expected doctype before head`,url:!1},misplacedStartTagForHeadElement:{reason:"Misplaced `<head>` start tag",description:"Unexpected start tag `<head>`. Expected `<head>` directly after doctype",url:!1},missingAttributeValue:{reason:`Missing attribute value`,description:"Unexpected `%c-1`. Expected an attribute value or no `%c-1` instead"},missingDoctype:{reason:`Missing doctype before other content`,description:"Expected a `<!doctype html>` before anything else",url:!1},missingDoctypeName:{reason:`Missing doctype name`,description:"Unexpected doctype end at `%c`. Expected `html` instead"},missingDoctypePublicIdentifier:{reason:`Missing public identifier in doctype`,description:"Unexpected `%c`. Expected identifier for `public` instead"},missingDoctypeSystemIdentifier:{reason:`Missing system identifier in doctype`,description:'Unexpected `%c`. Expected identifier for `system` instead (suggested: `"about:legacy-compat"`)'},missingEndTagName:{reason:`Missing name in end tag`,description:"Unexpected `%c`. Expected an ASCII letter instead"},missingQuoteBeforeDoctypePublicIdentifier:{reason:`Missing quote before public identifier in doctype`,description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingQuoteBeforeDoctypeSystemIdentifier:{reason:`Missing quote before system identifier in doctype`,description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingSemicolonAfterCharacterReference:{reason:`Missing semicolon after character reference`,description:"Unexpected `%c`. Expected `;` instead"},missingWhitespaceAfterDoctypePublicKeyword:{reason:`Missing whitespace after public identifier in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceAfterDoctypeSystemKeyword:{reason:`Missing whitespace after system identifier in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBeforeDoctypeName:{reason:`Missing whitespace before doctype name`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenAttributes:{reason:`Missing whitespace between attributes`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:{reason:`Missing whitespace between public and system identifiers in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},nestedComment:{reason:`Unexpected nested comment`,description:"Unexpected `<!--`. Expected `-->`"},nestedNoscriptInHead:{reason:"Unexpected nested `<noscript>` in `<head>`",description:"Unexpected `<noscript>`. Expected a closing tag or a meta element",url:!1},nonConformingDoctype:{reason:`Unexpected non-conforming doctype declaration`,description:'Expected `<!doctype html>` or `<!doctype html system "about:legacy-compat">`',url:!1},nonVoidHtmlElementStartTagWithTrailingSolidus:{reason:`Unexpected trailing slash on start tag of non-void element`,description:"Unexpected `/`. Expected `>` instead"},noncharacterCharacterReference:{reason:`Unexpected noncharacter code point referenced by character reference`,description:`Unexpected code point. Do not use noncharacters in HTML`},noncharacterInInputStream:{reason:`Unexpected noncharacter character`,description:"Unexpected code point `%x`. Do not use noncharacters in HTML"},nullCharacterReference:{reason:`Unexpected NULL character referenced by character reference`,description:`Unexpected code point. Do not use NULL characters in HTML`},openElementsLeftAfterEof:{reason:`Unexpected end of file`,description:`Unexpected end of file. Expected closing tag instead`,url:!1},surrogateCharacterReference:{reason:`Unexpected surrogate character referenced by character reference`,description:`Unexpected code point. Do not use lone surrogate characters in HTML`},surrogateInInputStream:{reason:`Unexpected surrogate character`,description:"Unexpected code point `%x`. Do not use lone surrogate characters in HTML"},unexpectedCharacterAfterDoctypeSystemIdentifier:{reason:`Invalid character after system identifier in doctype`,description:"Unexpected character at `%c`. Expected `>`"},unexpectedCharacterInAttributeName:{reason:`Unexpected character in attribute name`,description:"Unexpected `%c`. Expected whitespace, `/`, `>`, `=`, or probably an ASCII letter"},unexpectedCharacterInUnquotedAttributeValue:{reason:`Unexpected character in unquoted attribute value`,description:"Unexpected `%c`. Quote the attribute value to include it"},unexpectedEqualsSignBeforeAttributeName:{reason:`Unexpected equals sign before attribute name`,description:"Unexpected `%c`. Add an attribute name before it"},unexpectedNullCharacter:{reason:`Unexpected NULL character`,description:"Unexpected code point `%x`. Do not use NULL characters in HTML"},unexpectedQuestionMarkInsteadOfTagName:{reason:`Unexpected question mark instead of tag name`,description:"Unexpected `%c`. Expected an ASCII letter instead"},unexpectedSolidusInTag:{reason:`Unexpected slash in tag`,description:"Unexpected `%c-1`. Expected it followed by `>` or in a quoted attribute value"},unknownNamedCharacterReference:{reason:`Unexpected unknown named character reference`,description:`Unexpected character reference. Expected known named character references`}},Q1=/-[a-z]/g,$1=/%c(?:([-+])(\d+))?/g,e0=/%x/g,t0={2:!0,1:!1,0:null},n0={};function r0(e,t){let n=t||n0,r=n.onerror,i=e instanceof Rw?e:new Rw(e),a=n.fragment?X1:Y1,o=String(i);return KX(a(o,{sourceCodeLocationInfo:!0,onParseError:n.onerror?s:null,scriptingEnabled:!1}),{file:i,space:n.space,verbose:n.verbose});function s(e){let t=e.code,a=i0(t),s=n[a]??!0,c=typeof s==`number`?s:+!!s;if(c){let n=Z1[a],o=new Fw(l(n.reason),{place:{start:{line:e.startLine,column:e.startCol,offset:e.startOffset},end:{line:e.endLine,column:e.endCol,offset:e.endOffset}},ruleId:t,source:`hast-util-from-html`});i.path&&(o.file=i.path,o.name=i.path+`:`+o.name),o.fatal=t0[c],o.note=l(n.description),o.url=n.url===!1?void 0:`https://html.spec.whatwg.org/multipage/parsing.html#parse-error-`+t,r(o)}function l(t){return t.replace($1,n).replace(e0,r);function n(t,n,r){let i=(r?Number.parseInt(r,10):0)*(n===`-`?-1:1);return o0(o.charAt(e.startOffset+i))}function r(){return s0(o.charCodeAt(e.startOffset))}}}}function i0(e){return e.replace(Q1,a0)}function a0(e){return e.charAt(1).toUpperCase()}function o0(e){return e==="`"?"` ` `":e}function s0(e){return`0x`+e.toString(16).toUpperCase()}function c0(e){let t=this;t.compiler=n;function n(n){return gx(n,{...t.data(`settings`),...e,extensions:t.data(`toMarkdownExtensions`)||[]})}}const l0=/^[A-Za-z0-9]{20,}$/,u0=/^(?:\d+s?|(?:\d+h)?(?:\d+m)?(?:\d+s)?)$/;function d0(e){let t=e.toLowerCase();return t===`loom.com`||t===`www.loom.com`}function f0(e){let t=e.pathname.match(/^\/(?:share|embed)\/([A-Za-z0-9]+)\/?$/);if(!t)return null;let n=t[1]??``;return l0.test(n)?n:null}function p0(e){if(typeof e!=`string`||e.length===0)return null;let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`||!d0(t.hostname))return null;let n=f0(t);if(!n)return null;let r=t.searchParams.get(`t`);return{id:n,startRaw:r&&r.length>0&&u0.test(r)?r:null}}function m0(e){return p0(e)!==null}function h0(e){let t=e.toLowerCase();return t===`vimeo.com`||t===`www.vimeo.com`||t===`player.vimeo.com`}function g0(e){if(typeof e!=`string`||e.length===0)return!1;let t;try{t=new URL(e)}catch{return!1}return t.protocol!==`http:`&&t.protocol!==`https:`?!1:h0(t.hostname)}const _0=/^[A-Za-z0-9_-]{11}$/;function v0(e){let t=e.toLowerCase();return t===`youtube.com`||t===`www.youtube.com`||t===`m.youtube.com`||t===`music.youtube.com`||t===`youtu.be`||t===`youtube-nocookie.com`||t===`www.youtube-nocookie.com`}function y0(e){if(e.length===0)return null;if(/^[0-9]+$/.test(e)){let t=Number.parseInt(e,10);return t>0?t:null}let t=e.match(/^(?:([0-9]+)h)?(?:([0-9]+)m)?(?:([0-9]+)s?)?$/);if(!t)return null;let n=t[1]?Number.parseInt(t[1],10):0,r=t[2]?Number.parseInt(t[2],10):0,i=t[3]?Number.parseInt(t[3],10):0,a=n*3600+r*60+i;return a>0?a:null}function b0(e){if(e.hostname.toLowerCase()===`youtu.be`){let t=e.pathname.replace(/^\//,``).split(`/`)[0]??``;return _0.test(t)?t:null}if(e.pathname===`/watch`){let t=e.searchParams.get(`v`)??``;return _0.test(t)?t:null}let t=e.pathname.match(/^\/(?:embed|shorts|v)\/([A-Za-z0-9_-]{11})\/?$/);return t?t[1]??null:null}function x0(e){if(typeof e!=`string`||e.length===0)return null;let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`||!v0(t.hostname))return null;let n=b0(t);if(!n)return null;let r=t.searchParams.get(`t`)??t.searchParams.get(`start`)??``;return{id:n,startSeconds:r.length>0?y0(r):null,noCookie:t.hostname.toLowerCase().endsWith(`youtube-nocookie.com`)}}function S0(e,t){let n=Array.isArray(e.attrs.attributes)?e.attrs.attributes.filter(e=>typeof e==`object`&&!!e&&`type`in e):[],r=e.attrs.props??{},i=new Map,a=new Set;if(t)for(let e of t)e.omitOnDefault===!0&&`defaultValue`in e&&e.defaultValue!==void 0&&i.set(e.name,e.defaultValue),e.type===`string`&&e.required===!1&&e.defaultValue===void 0&&a.add(e.name);for(let[e,t]of Object.entries(r)){let r=n.findIndex(t=>t.type===`mdxJsxAttribute`&&t.name===e);if(i.has(e)&&Object.is(i.get(e),t)){r>=0&&n.splice(r,1);continue}if(a.has(e)&&t===``){r>=0&&n.splice(r,1);continue}if(r>=0){let e=n[r];if(e.type===`mdxJsxAttribute`&&e.value!=null&&typeof e.value==`object`&&e.value.type===`mdxJsxAttributeValueExpression`&&C0(e.value.value,t))continue}let o=w0(e,t);r>=0?n[r]=o:n.push(o)}return n}function C0(e,t){try{return JSON.stringify(JSON.parse(e))===JSON.stringify(t)}catch{return!1}}function w0(e,t){if(t===!0)return{type:`mdxJsxAttribute`,name:e,value:null};if(t===!1)return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:`false`}};if(t==null)return{type:`mdxJsxAttribute`,name:e,value:null};if(typeof t==`string`)return{type:`mdxJsxAttribute`,name:e,value:t};if(typeof t==`number`)return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:JSON.stringify(t)}};if(typeof t==`object`){let n;try{n=JSON.stringify(t)}catch{n=String(t)}return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:n}}}return{type:`mdxJsxAttribute`,name:e,value:String(t)}}function T0(e,t,n,r){return{type:`mdxJsxFlowElement`,name:e,attributes:S0(t,r),children:n.all(t),data:{}}}function E0(e,t,n){let r=t.attrs.props?.children;return{type:`mdxJsxTextElement`,name:e,attributes:S0(t,n),children:typeof r==`string`&&r!==``?[{type:`text`,value:r}]:[],data:{}}}const D0=[{name:`type`,type:`enum`,enumValues:[`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`],defaultValue:`note`,required:!1,description:`Callout variant`},{name:`title`,type:`string`,required:!1,description:`Optional heading shown above the body`},{name:`icon`,type:`string`,required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Lightbulb`)",iconPicker:!0},{name:`color`,type:`string`,required:!1,advanced:!0,description:"Optional accent color override (hex — e.g. `#F05032`)",colorPicker:!0},{name:`collapsible`,type:`boolean`,required:!1,defaultValue:!1,advanced:!0,description:"Render as a foldable `<details>`; in the blockquote form, `> [!TYPE]+` starts open and `> [!TYPE]-` starts closed"},{name:`defaultOpen`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,description:`When collapsible, start in the open state`,hideWhen:e=>e.collapsible!==!0},{name:`children`,type:`reactnode`,required:!0,description:`Callout content`}],O0=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Image source URL`,accept:_p,autoFocus:!0},{name:`alt`,type:`string`,required:!0,description:`Alt text`},{name:`width`,type:`number`,required:!1,advanced:!0,description:`Image width`},{name:`height`,type:`number`,required:!1,advanced:!0,description:`Image height`},{name:`srcset`,type:`string`,required:!1,advanced:!0,description:`Responsive image candidate set (e.g. "x.png 1x, y.png 2x")`},{name:`sizes`,type:`string`,required:!1,advanced:!0,description:`Responsive image sizes hint paired with srcset`},{name:`loading`,type:`enum`,enumValues:[`eager`,`lazy`],defaultValue:`lazy`,required:!1,advanced:!0,omitOnDefault:!0,description:`Native img loading strategy (defaults to lazy)`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`decoding`,type:`enum`,enumValues:[`sync`,`async`,`auto`],defaultValue:`auto`,required:!1,advanced:!0,omitOnDefault:!0,description:`Hint for how the browser should decode the image`},{name:`fetchpriority`,type:`enum`,enumValues:[`high`,`low`,`auto`],defaultValue:`auto`,required:!1,advanced:!0,omitOnDefault:!0,description:`Resource fetch priority hint`},{name:`crossorigin`,type:`enum`,enumValues:[`anonymous`,`use-credentials`],required:!1,advanced:!0,description:`CORS mode for the image fetch`},{name:`referrerpolicy`,type:`string`,required:!1,advanced:!0,description:`Referrer policy for the image fetch (HTML referrerpolicy values)`},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],k0=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Embedded page URL (must start with http:// or https://)`,autoFocus:!0},{name:`title`,type:`string`,required:!1,description:`Iframe title (accessible label for screen readers)`},{name:`width`,type:`string`,required:!1,advanced:!0,description:`Embed width as a CSS length (e.g. "100%", "640px")`,cssLengthInput:!0},{name:`height`,type:`string`,required:!1,advanced:!0,description:`Embed height as a CSS length (e.g. "26rem", "480px")`,cssLengthInput:!0},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],A0=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Video source URL`,accept:Ite,autoFocus:!0},{name:`controls`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:`Show native HTML5 video controls (defaults to true)`,hideWhen:e=>typeof e.src==`string`&&(g0(e.src)||m0(e.src))},{name:`autoplay`,type:`boolean`,required:!1,advanced:!0,description:`Begin playback as soon as possible (usually requires muted)`},{name:`poster`,type:`string`,required:!1,advanced:!0,description:`Poster image URL shown before playback`,accept:_p,hideWhen:e=>typeof e.src==`string`&&(g0(e.src)||m0(e.src))},{name:`width`,type:`number`,required:!1,advanced:!0,description:`Video width`},{name:`height`,type:`number`,required:!1,advanced:!0,description:`Video height`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`muted`,type:`boolean`,required:!1,advanced:!0,description:`Mute audio on load`},{name:`loop`,type:`boolean`,required:!1,advanced:!0,description:`Restart from the beginning when playback ends`,hideWhen:e=>typeof e.src==`string`&&m0(e.src)},{name:`playsinline`,type:`boolean`,required:!1,advanced:!0,description:`Play inline on iOS rather than entering fullscreen`,hideWhen:e=>typeof e.src==`string`&&(g0(e.src)||m0(e.src))},{name:`preload`,type:`enum`,enumValues:[`none`,`metadata`,`auto`],required:!1,advanced:!0,description:`Hint for how much of the video to preload`,hideWhen:e=>typeof e.src==`string`&&(x0(e.src)!==null||g0(e.src)||m0(e.src))},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],j0=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Audio source URL`,accept:Lte,autoFocus:!0},{name:`controls`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:`Show native HTML5 audio controls (defaults to true)`},{name:`autoplay`,type:`boolean`,required:!1,advanced:!0,description:`Begin playback as soon as possible (usually requires muted)`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`muted`,type:`boolean`,required:!1,advanced:!0,description:`Mute audio on load`},{name:`loop`,type:`boolean`,required:!1,advanced:!0,description:`Restart from the beginning when playback ends`},{name:`preload`,type:`enum`,enumValues:[`none`,`metadata`,`auto`],required:!1,advanced:!0,description:`Hint for how much of the audio to preload`}],M0=[{name:`title`,type:`string`,required:!0,description:`Heading shown inside the <summary>`},{name:`defaultOpen`,type:`boolean`,required:!1,defaultValue:!1,description:`When true, the block renders expanded on initial load`},{name:`icon`,type:`string`,required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Rocket`)",iconPicker:!0},{name:`description`,type:`string`,required:!1,advanced:!0,description:`Optional subtitle rendered below the title inside <summary>`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#advanced-options`)"},{name:`name`,type:`string`,required:!1,advanced:!0,description:`HTML5 <details name=> group — siblings with the same name are mutually exclusive`}],N0=[D0[0],D0[1],D0[4],D0[5],D0[6]],P0=[O0[0],O0[1],O0[7]],F0=[M0[0],M0[1],M0[4],M0[5]],I0=[{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`,`justify`],required:!1,defaultValue:`center`,description:"Block alignment from the `<div align>` attribute."},{name:`tag`,type:`string`,required:!1,defaultValue:`div`,hidden:!0,description:`Source wrapper tag (div or center).`},{name:`sourceAttrs`,type:`string`,required:!1,defaultValue:``,hidden:!0,description:`Raw opener-tag attribute bytes preserved for round-trip.`}],L0=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Alt text (alias syntax: `![[file.png|alt text]]`)"}],R0=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (alias syntax: `![[clip.mp4|title]]`)"}],z0=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (alias syntax: `![[song.mp3|title]]`)"}],B0=[{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#install-tabs`)"}],V0=[{name:`label`,type:`string`,required:!0,autoFocus:!0,defaultValue:`Tab`,description:`Tab strip label — shown in the clickable pill at the top`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#tab-npm`)"}],H0=[{name:`formula`,type:`string`,required:!0,autoFocus:!0,language:`latex`,description:`LaTeX math source (rendered with KaTeX in the browser)`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#eq-pythagoras`)"},{name:`language`,type:`string`,required:!1,advanced:!0,description:"Forward-compat hint for the math source language (default `latex`). Reserved for future MathJax / Typst / AsciiMath substrates."}],U0=[H0[0]],W0=[H0[0]],G0=[{name:`chart`,type:`string`,required:!0,hidden:!0,description:`Mermaid chart source (graph / flowchart / sequenceDiagram / class / state / etc.)`}],K0=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Display name override (alias syntax: `![[file.zip|label]]`)"}],q0=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`File URL`,accept:[`*/*`],autoFocus:!0}],J0=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`PDF source URL`,accept:Rte,autoFocus:!0},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Accessible label for the embedded PDF viewer`},{name:`anchor`,type:`string`,required:!1,advanced:!0,description:"PDF viewer parameters as a single URL-fragment string (e.g. `page=3&height=600`)"}],Y0=[{name:`src`,type:`string`,required:!0,description:"Path to the `.excalidraw` board this embed renders",autoFocus:!0},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Accessible label for the embedded board`}],X0=[{name:`src`,type:`string`,required:!0,description:"Path of the source doc, extension-less (e.g. `api-spec`).",autoFocus:!0},{name:`anchor`,type:`string`,required:!0,description:"Id of the `<MirrorSource>` block within the source doc."}],Z0=[{name:`id`,type:`string`,required:!0,description:"Stable id agents and authors use to reference this block from `<Mirror>` elsewhere.",autoFocus:!0},{name:`children`,type:`reactnode`,required:!0,description:`Block content this MirrorSource owns — paragraphs, callouts, code, nested JSX, anything.`}];function Q0(e){return e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/</g,`<`).replace(/>/g,`>`)}function $0(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function e2(e){let t=e.attrs.props,n=t?.target??``,r=typeof t?.alias==`string`&&t.alias.length>0?t.alias:null,i=typeof t?.anchor==`string`&&t.anchor.length>0?t.anchor:null,a=typeof t?.sourceTarget==`string`?t.sourceTarget:null,o=typeof t?.sourceAnchor==`string`?t.sourceAnchor:null,s=typeof t?.sourceAlias==`string`?t.sourceAlias:null,c=r??(i?`${n}#${i}`:n);return{type:`wikiLinkEmbed`,value:c,data:{target:n,anchor:i,alias:r,sourceTarget:a,sourceAnchor:o,sourceAlias:s},children:[{type:`text`,value:c}]}}const t2=[{name:`Callout`,surface:`canonical`,hasChildren:!0,props:D0,icon:`MessageSquareWarning`,category:`content`,displayName:`Callout`,description:`Alert / admonition with 15 type variants — 5 GFM (note, tip, important, warning, caution) plus 10 extended (abstract, info, todo, success, question, failure, danger, bug, example, quote)`,searchTerms:[`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`,`alert`,`admonition`,`callout`],serialize:(e,t)=>T0(`Callout`,e,t,D0)},{name:`img`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:O0,icon:`Image`,category:`media`,displayName:`Image`,description:`Image with click-to-zoom and HTML-native attributes`,searchTerms:[`image`,`zoom`,`picture`,`photo`],placeholder:{label:`Add an image`},serialize:(e,t)=>T0(`img`,e,t,O0)},{name:`video`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:A0,icon:`SquarePlay`,category:`media`,displayName:`Video`,description:`HTML5 video player with native controls`,searchTerms:[`video`,`media`,`player`,`mp4`,`webm`,`movie`],placeholder:{label:`Add a video`},serialize:(e,t)=>T0(`video`,e,t,A0)},{name:`audio`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:j0,icon:`Volume2`,category:`media`,displayName:`Audio`,description:`HTML5 audio player with native controls`,searchTerms:[`audio`,`sound`,`music`,`mp3`,`podcast`,`player`],placeholder:{label:`Add audio`},serialize:(e,t)=>T0(`audio`,e,t,j0)},{name:`Pdf`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:J0,icon:`FileText`,category:`media`,displayName:`PDF`,description:"Embedded PDF viewer (`#page=N` to open at page N, `#height=N` for viewer height)",searchTerms:[`pdf`,`document`,`embed`,`pdfjs`],placeholder:{label:`Add a PDF`},serialize:(e,t)=>T0(`Pdf`,e,t,J0)},{name:`Excalidraw`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:Y0,icon:`PenTool`,category:`embed`,displayName:`Excalidraw`,description:"Embedded snapshot of an `.excalidraw` board, linking to its canvas editor",searchTerms:[`excalidraw`,`board`,`whiteboard`,`sketch`,`drawing`,`canvas`],serialize:(e,t)=>T0(`Excalidraw`,e,t,Y0)},{name:`File`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:q0,icon:`Paperclip`,category:`media`,displayName:`File`,description:`Downloadable file attachment — inline row with name + size + download link`,searchTerms:[`file`,`attachment`,`download`,`document`,`zip`,`docx`,`doc`],placeholder:{label:`Add a file`},serialize:(e,t)=>T0(`File`,e,t,q0)},{name:`Embed`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:k0,icon:`AppWindow`,category:`embed`,displayName:`Embed`,description:'Inline web embed (iframe) — drop a URL, get a resizable preview pane. For YouTube / Vimeo / Loom prefer `<video src="…">` (player props, click-facade); `<Embed>` auto-rewrites watch URLs as a fallback.',searchTerms:[`embed`,`iframe`,`website`,`page`,`inline`,`frame`,`preview`],placeholder:{label:`Embed a URL`},serialize:(e,t)=>T0(`Embed`,e,t,k0)},{name:`Accordion`,surface:`canonical`,hasChildren:!0,props:M0,icon:`ChevronRight`,category:`content`,displayName:`Accordion`,description:"Standalone expand/collapse via native HTML5 <details>/<summary>. Group siblings with the `name` prop for exclusive-accordion UX.",searchTerms:[`accordion`,`expandable`,`details`,`disclosure`,`collapse`,`fold`],exampleBody:`Body content revealed when the accordion is expanded.`,serialize:(e,t)=>T0(`Accordion`,e,t,M0)},{name:`Toggle`,surface:`canonical`,hasChildren:!0,props:M0,icon:`ChevronRight`,category:`content`,displayName:`Toggle`,description:"Standalone expand/collapse block. Same render + props as `<Accordion>` under a different tag name; pick whichever name the vault already uses.",searchTerms:[`toggle`,`collapsible`,`expand`,`details`,`disclosure`,`fold`],exampleBody:`Body content revealed when the toggle is expanded.`,serialize:(e,t)=>T0(`Toggle`,e,t,M0)},{name:`Tabs`,surface:`canonical`,hasChildren:!0,emptyChildName:`Tab`,props:B0,icon:`LayoutPanelTop`,category:`content`,displayName:`Tabs`,description:"Horizontal tab strip + active panel below. Each `<Tab>` child is one panel; clickable pills at the top switch the active one. Active selection is ephemeral (resets on reload).",searchTerms:[`tabs`,`tabbed`,`panels`,`tabgroup`,`switcher`],exampleBody:`<Tab label="One">Body of the first tab panel.</Tab>
|
|
297
|
-
<Tab label="Two">Body of the second tab panel.</Tab>`,serialize:(e,t)=>T0(`Tabs`,e,t,B0)},{name:`Tab`,surface:`canonical`,hasChildren:!0,props:V0,icon:`PanelTop`,category:`content`,displayName:`Tab`,description:"A single tab panel inside a `<Tabs>` container — carries the strip label and the block-content body.",searchTerms:[`tab`,`panel`],exampleBody:"Panel content — must be nested inside a `<Tabs>` parent.",serialize:(e,t)=>T0(`Tab`,e,t,V0)},{name:`Math`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:H0,icon:`Sigma`,category:`content`,displayName:`Math`,description:`Block math equation rendered with KaTeX from a LaTeX source string`,searchTerms:[`math`,`latex`,`equation`,`formula`,`katex`,`tex`],serialize:(e,t)=>T0(`Math`,e,t,H0)},{name:`MermaidFence`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:G0,icon:`Workflow`,category:`content`,displayName:`Mermaid`,placeholder:{label:`Add a Mermaid diagram`},description:"Diagram rendered from Mermaid source (flowchart, sequence, class, state, ER, gantt, pie). Authored exclusively as ` ```mermaid ` fenced code.",searchTerms:[`mermaid`,`diagram`,`flowchart`,`graph`,`sequence`,`sequencediagram`,`class`,`state`,`er`,`erdiagram`,`gantt`,`pie`,`chart`],serialize:e=>({type:`code`,lang:`mermaid`,meta:null,value:e.attrs.props?.chart??``})},{name:`Mirror`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:X0,icon:`CopyPlus`,category:`content`,displayName:`Mirror`,description:"Render a read-only copy of a `<MirrorSource>` block from another doc. Use to keep the same content in sync across multiple docs without copy-paste — edits land at the source, every Mirror reflects the change.",searchTerms:[`mirror`,`sync`,`synced`,`transclude`,`embed`,`reference`,`shared block`],serialize:(e,t)=>T0(`Mirror`,e,t,X0)},{name:`MirrorSource`,surface:`canonical`,hasChildren:!0,props:Z0,icon:`GitBranch`,category:`content`,displayName:`Mirror Source`,description:'Mark a block as the source of truth for content that appears in multiple docs. Wrap any block content; `<Mirror src="…" anchor="<id>">` references render this verbatim read-only at every call-site. Edit here, propagate everywhere.',searchTerms:[`mirror source`,`sync source`,`source block`,`master block`,`shared`],exampleBody:"Authoritative content lives inside this block — edits here propagate to every `<Mirror>` that references this id.",serialize:(e,t)=>T0(`MirrorSource`,e,t,Z0)},{name:`GFMCallout`,surface:`compat`,hasChildren:!0,props:N0,icon:`MessageSquareWarning`,category:`content`,displayName:`GFM Callout`,description:"GFM blockquote alert (`> [!NOTE]`) — read-only compat. Preserves `> [!NOTE]` syntax on round-trip; insert a fresh Callout block for the full prop surface.",rendersAs:`Callout`,translateProps:e=>e,serialize:(e,t)=>{let n=e.attrs.props,r=new Set([`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`]),i=n?.type??`note`;return{type:`blockquote`,children:[{type:`html`,value:`[!${(r.has(i.toLowerCase())?i:`note`).toUpperCase()}]${n?.collapsible?n.defaultOpen===!1?`-`:`+`:``}${n?.title?` ${n.title}`:``}`},...t.all(e).filter(e=>{if(e.type!==`paragraph`)return!0;let t=e;return Array.isArray(t.children)&&t.children.length>0})]}}},{name:`CommonMarkImage`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:P0,icon:`Image`,category:`media`,displayName:`CommonMark Image`,description:'CommonMark image (``) — read-only compat. Preserves `` syntax on round-trip; insert a fresh Image block for the full HTML-native attribute surface (srcset, sizes, decoding, etc.).',rendersAs:`img`,translateProps:e=>e,serialize:e=>{let t=e.attrs.props;return{type:`paragraph`,children:[{type:`image`,url:ju(t?.src??``,t?.sourceUrl),alt:t?.alt??``,title:t?.title??null}]}}},{name:`WikiEmbedImage`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:L0,icon:`ZoomIn`,category:`media`,displayName:`Wiki Embed Image`,description:"`![[file.png]]` wiki-embed — read-only compat. Edit the alt-text via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`img`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,alt:t??n}},serialize:e2},{name:`WikiEmbedVideo`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:R0,icon:`Film`,category:`media`,displayName:`Wiki Embed Video`,description:"`![[clip.mp4]]` wiki-embed — read-only compat. Edit the title via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`video`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,title:t??n}},serialize:e2},{name:`WikiEmbedAudio`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:z0,icon:`Volume2`,category:`media`,displayName:`Wiki Embed Audio`,description:"`![[song.mp3]]` wiki-embed — read-only compat. Edit the title via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`audio`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,title:t??n}},serialize:e2},{name:`WikiEmbedFile`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:K0,icon:`Paperclip`,category:`media`,displayName:`Wiki Embed File`,description:"`![[file.zip]]` wiki-embed — read-only compat for arbitrary downloadable attachments. Renders through the `File` canonical (inline row with file-up icon + bold name + optional dim size). Edit the display name via the alias slot.",rendersAs:`File`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.size==`string`&&e.size.length>0?e.size:null;return{src:e.src,name:t??void 0,size:n??void 0}},serialize:e2},{name:`HtmlDetailsAccordion`,surface:`compat`,hasChildren:!0,props:F0,icon:`ChevronRight`,category:`content`,displayName:`HTML5 Details`,description:"HTML5 `<details><summary>` collapsible — read-only compat. Preserves `<details>` syntax on round-trip; insert a fresh Accordion block for icon / description / group-name props.",rendersAs:`Accordion`,translateProps:e=>e,serialize:(e,t)=>{let n=e.attrs.props,r=n?.defaultOpen?` open`:``,i=n?.name?` name="${Q0(n.name)}"`:``,a=n?.id?` id="${Q0(n.id)}"`:``,o=n?.title?.trim(),s=o?`<summary>${$0(o)}</summary>`:``;return{type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:[],children:t.all(e),data:{htmlBoundary:{opener:`<details${r}${i}${a}>\n${s}`,closer:`</details>`}}}}},{name:`HtmlAlignBlock`,surface:`canonical`,hasChildren:!0,props:I0,icon:`AlignCenter`,category:`content`,displayName:`Align block`,description:"GitHub-style `<div align>` wrapper. Children render as normal blocks with the alignment applied; the `<div align>` syntax is preserved on round-trip.",searchTerms:[`align`,`center`,`centered`,`div`],serialize:(e,t)=>{let n=e.attrs.props,r=n?.tag===`center`?`center`:`div`,i=typeof n?.align==`string`&&n.align?n.align:null,a=typeof n?.sourceAttrs==`string`?n.sourceAttrs:``,o=/(\balign\s*=\s*)(?:"[^"]*"|'[^']*'|[^\s"'<>]+)/i;return i!==null&&(r===`div`||i!==`center`)?a=o.test(a)?a.replace(o,`$1"${Q0(i)}"`):`${a} align="${Q0(i)}"`:(i===null||r===`center`&&i===`center`)&&(a=a.replace(RegExp(`\\s*${o.source}`,`i`),``)),{type:`mdxJsxFlowElement`,name:`HtmlAlignBlock`,attributes:[],children:t.all(e),data:{htmlBoundary:{opener:`<${r}${a}>`,closer:`</${r}>`}}}}},{name:`DollarMath`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:U0,icon:`Sigma`,category:`content`,displayName:`Dollar Math`,description:"Block math via `$$…$$` syntax — read-only compat. Preserves `$$…$$` form on round-trip; insert a fresh Math block for the full prop surface (id, language).",rendersAs:`Math`,translateProps:e=>e,serialize:e=>({type:`math`,value:e.attrs.props?.formula??``})},{name:`MathFence`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:W0,icon:`Sigma`,category:`content`,displayName:`Math Fence`,description:"Block math via ` ```math ` fenced code syntax — read-only compat. Preserves the fence form on round-trip; insert a fresh Math block for the full prop surface (id, language).",rendersAs:`Math`,translateProps:e=>e,serialize:e=>({type:`code`,lang:`math`,meta:null,value:e.attrs.props?.formula??``})}],n2={name:`*`,surface:`canonical`,hasChildren:!0,props:[],description:`Unregistered component — children editable as markdown`,serialize:(e,t)=>T0(e.attrs.componentName||`*`,e,t)};function r2(){let e=new Map;e.set(`*`,n2);for(let t of t2)e.set(t.name,t);return{get(t){return e.get(t)},getOrWildcard(t){return e.get(t)??e.get(`*`)},set(t,n){e.set(t,n)},has(t){return e.has(t)},entries(){return e.entries()}}}function i2(){let e=globalThis;return e.__okYpsCounters||={block:0,inline:0},e.__okYpsCounters}const a2={parseFallback:{blockLevel:0,wholeDoc:0,wholeDocBudget:0},jsxRenderFailure:{},jsxAutoConvertFailed:{},jsxAutoConvertSucceeded:{},jsxActionAborted:{},jsxPropDropped:{},jsxMoveFailed:{},jsxStuckCopyFailed:{},jsxStuckDeleteFailed:{},jsxPopoverCloseRestoreFailed:{},jsxKeyboardDeleteFailed:{},jsxChromeDeleteFailed:{},blockGripClickSelectFailed:{},jsxArrowNodeSelectFailed:{}};function o2(){a2.parseFallback.blockLevel++}function s2(){a2.parseFallback.wholeDoc++}function c2(){a2.parseFallback.wholeDocBudget++}function l2(){let e=i2();return{parseFallback:{...a2.parseFallback},ypsMismatch:{block:e.block,inline:e.inline},jsxRenderFailure:{...a2.jsxRenderFailure},jsxAutoConvertFailed:{...a2.jsxAutoConvertFailed},jsxAutoConvertSucceeded:{...a2.jsxAutoConvertSucceeded},jsxActionAborted:{...a2.jsxActionAborted},jsxPropDropped:{...a2.jsxPropDropped},jsxMoveFailed:{...a2.jsxMoveFailed},jsxStuckCopyFailed:{...a2.jsxStuckCopyFailed},jsxStuckDeleteFailed:{...a2.jsxStuckDeleteFailed},jsxPopoverCloseRestoreFailed:{...a2.jsxPopoverCloseRestoreFailed},jsxKeyboardDeleteFailed:{...a2.jsxKeyboardDeleteFailed},jsxChromeDeleteFailed:{...a2.jsxChromeDeleteFailed},blockGripClickSelectFailed:{...a2.blockGripClickSelectFailed},jsxArrowNodeSelectFailed:{...a2.jsxArrowNodeSelectFailed}}}function u2(){return{enter:{mdxFlowExpression:f2,mdxTextExpression:p2},exit:{mdxFlowExpression:m2,mdxFlowExpressionChunk:h2,mdxTextExpression:m2,mdxTextExpressionChunk:h2}}}function d2(){return{handlers:{mdxFlowExpression:g2,mdxTextExpression:g2},unsafe:[{character:`{`,inConstruct:[`phrasing`]},{atBreak:!0,character:`{`}]}}function f2(e){this.enter({type:`mdxFlowExpression`,value:``},e),this.buffer()}function p2(e){this.enter({type:`mdxTextExpression`,value:``},e),this.buffer()}function m2(e){let t=this.resume(),n=e.estree,r=this.stack[this.stack.length-1];r.type===`mdxFlowExpression`||r.type,this.exit(e),r.value=t,n&&(r.data={estree:n})}function h2(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function g2(e,t,n){let r=e.value||``;return`{`+n.indentLines(r,function(e,t,n){return(t===0||n?``:` `)+e})+`}`}const _2=/["&'<>`]/g,v2=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,y2=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,b2=/[|\\{}()[\]^$+*?.]/g,x2=new WeakMap;function S2(e,t){if(e=e.replace(t.subset?C2(t.subset):_2,r),t.subset||t.escapeOnly)return e;return e.replace(v2,n).replace(y2,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function C2(e){let t=x2.get(e);return t||(t=w2(e),x2.set(e,t)),t}function w2(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(b2,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}function qoe(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function T2(e,t){return S2(e,Object.assign({format:qoe},t))}function E2(){return{canContainEols:[`mdxJsxTextElement`],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:d,mdxJsxFlowTagExpressionAttribute:f,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:o,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:d,mdxJsxTextTagExpressionAttribute:f,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:o},exit:{mdxJsxFlowTagClosingMarker:s,mdxJsxFlowTagNamePrimary:c,mdxJsxFlowTagNameMember:l,mdxJsxFlowTagNameLocal:u,mdxJsxFlowTagExpressionAttribute:p,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:m,mdxJsxFlowTagAttributeNameLocal:h,mdxJsxFlowTagAttributeValueLiteral:g,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:_,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:v,mdxJsxFlowTag:y,mdxJsxTextTagClosingMarker:s,mdxJsxTextTagNamePrimary:c,mdxJsxTextTagNameMember:l,mdxJsxTextTagNameLocal:u,mdxJsxTextTagExpressionAttribute:p,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:m,mdxJsxTextTagAttributeNameLocal:h,mdxJsxTextTagAttributeValueLiteral:g,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:_,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:v,mdxJsxTextTag:y}};function e(){this.buffer()}function t(e){return{line:e.line,column:e.column,offset:e.offset}}function n(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function r(e){let t={name:void 0,attributes:[],close:!1,selfClosing:!1,start:e.start,end:e.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=t,this.buffer()}function i(e){if(this.data.mdxJsxTagStack.length===0)throw new Fw("Unexpected closing slash `/` in tag, expected an open tag first",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-closing-slash`)}function a(e){if(this.data.mdxJsxTag.close)throw new Fw(`Unexpected attribute in closing tag, expected the end of the tag`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-attribute`)}function o(e){if(this.data.mdxJsxTag.close)throw new Fw("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-self-closing-slash`)}function s(){let e=this.data.mdxJsxTag;e.close=!0}function c(e){let t=this.data.mdxJsxTag;t.name=this.sliceSerialize(e)}function l(e){let t=this.data.mdxJsxTag;t.name+=`.`+this.sliceSerialize(e)}function u(e){let t=this.data.mdxJsxTag;t.name+=`:`+this.sliceSerialize(e)}function d(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxAttribute`,name:``,value:null,position:{start:t(e.start),end:void 0}})}function f(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxExpressionAttribute`,value:``,position:{start:t(e.start),end:void 0}}),this.buffer()}function p(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i=e.estree;r.value=this.resume(),r.position,r.position.end=t(e.end),i&&(r.data={estree:i})}function m(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name=this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function h(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name+=`:`+this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function g(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.value=Lae(this.resume(),{nonTerminated:!1}),r.position,r.position.end=t(e.end)}function _(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i={type:`mdxJsxAttributeValueExpression`,value:this.resume()},a=e.estree;a&&(i.data={estree:a}),r.value=i,r.position,r.position.end=t(e.end)}function v(){let e=this.data.mdxJsxTag;e.selfClosing=!0}function y(e){let t=this.data.mdxJsxTag,n=this.data.mdxJsxTagStack,r=n[n.length-1];if(t.close&&r.name!==t.name)throw new Fw("Unexpected closing tag `"+S(t)+"`, expected corresponding closing tag for `"+S(r)+"` ("+jw(r)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`);this.resume(),t.close?n.pop():this.enter({type:e.type===`mdxJsxTextTag`?`mdxJsxTextElement`:`mdxJsxFlowElement`,name:t.name||null,attributes:t.attributes,children:[]},e,b),t.selfClosing||t.close?this.exit(e,x):n.push(t)}function b(e,t){let n=this.data.mdxJsxTagStack,r=n[n.length-1],i=e?" before the end of `"+e.type+"`":``,a=e?{start:e.start,end:e.end}:void 0;throw new Fw("Expected a closing tag for `"+S(r)+"` ("+jw({start:t.start,end:t.end})+`)`+i,a,`mdast-util-mdx-jsx:end-tag-mismatch`)}function x(e,t){let n=this.data.mdxJsxTag;throw new Fw("Expected the closing tag `"+S(n)+"` either after the end of `"+t.type+"` ("+jw(t.end)+") or another opening tag after the start of `"+t.type+"` ("+jw(t.start)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`)}function S(e){return`<`+(e.close?`/`:``)+(e.name||``)+`>`}}function D2(e){let t=e||{},n=t.quote||`"`,r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,a=t.printWidth||1/0,o=n===`"`?`'`:`"`;if(n!==`"`&&n!==`'`)throw Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return s.peek=j2,{handlers:{mdxJsxFlowElement:s,mdxJsxTextElement:s},unsafe:[{character:`<`,inConstruct:[`phrasing`]},{atBreak:!0,character:`<`}],fences:!0,resourceLink:!0};function s(e,t,s,c){let l=e.type===`mdxJsxFlowElement`,u=e.name?!e.children||e.children.length===0:!1,d=A2(k2(s)),f=s.createTracker(c),p=s.createTracker(c),m=[],h=(l?d:``)+`<`+(e.name||``),g=s.enter(e.type);if(f.move(h),p.move(h),e.attributes&&e.attributes.length>0){if(!e.name)throw Error(`Cannot serialize fragment w/ attributes`);let t=-1;for(;++t<e.attributes.length;){let i=e.attributes[t],a;if(i.type===`mdxJsxExpressionAttribute`)a=`{`+(i.value||``)+`}`;else{if(!i.name)throw Error(`Cannot serialize attribute w/o name`);let e=i.value,t=i.name,s=``;if(e!=null){if(typeof e==`object`)s=`{`+(e.value||``)+`}`;else{let t=r&&xv(e,n)>xv(e,o)?o:n;s=t+T2(e,{subset:[t]})+t}}a=t+(s?`=`:``)+s}m.push(a)}}let _=!1,v=m.join(` `);l&&(/\r?\n|\r/.test(v)||f.current().now.column+v.length+(u?i?2:3:1)>a)&&(_=!0);let y=f,b=h;if(_){y=p;let e=-1;for(;++e<m.length;)m[e]=d+` `+m[e];b+=y.move(`
|
|
296
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const UX={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/`},WX={}.hasOwnProperty,GX=Object.prototype;function KX(e,t){let n=t||{};return qX({file:n.file||void 0,location:!1,schema:n.space===`svg`?EX:TX,verbose:n.verbose||!1},e)}function qX(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},XX(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:JX(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=VX(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`},XX(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},XX(e,r,n),n}default:return n=YX(e,t),n}}function JX(e,t){let n=-1,r=[];for(;++n<t.length;){let i=qX(e,t[n]);r.push(i)}return r}function YX(e,t){let n=e.schema;e.schema=t.namespaceURI===UX.svg?EX:TX;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;WX.call(GX,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?BX:zX)(t.tagName,i,JX(e,t.childNodes));if(XX(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&QX(r.startTag),o=r&&r.endTag&&QX(r.endTag),s=qX(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function XX(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=ZX(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function ZX(e,t,n){let r=QX(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)WX.call(n.attrs,i)&&(r[SX(e.schema,i).property]=QX(n.attrs[i]));n.startTag;let a=QX(n.startTag),o=n.endTag?QX(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function QX(e){let t=$X({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=$X({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function $X(e){return e.line&&e.column?e:void 0}const eZ=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]);var K;(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`})(K||={});const tZ={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function nZ(e){return e>=55296&&e<=57343}function rZ(e){return e>=56320&&e<=57343}function iZ(e,t){return(e-55296)*1024+9216+t}function aZ(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function oZ(e){return e>=64976&&e<=65007||eZ.has(e)}var q;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(q||={});var sZ=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=65536,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(rZ(t))return this.pos++,this._addGap(),iZ(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,K.EOF;return this._err(q.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,K.EOF;let n=this.html.charCodeAt(t);return n===K.CARRIAGE_RETURN?K.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,K.EOF;let e=this.html.charCodeAt(this.pos);return e===K.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,K.LINE_FEED):e===K.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,nZ(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===K.LINE_FEED||e===K.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){aZ(e)?this._err(q.controlCharacterInInputStream):oZ(e)&&this._err(q.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},cZ;(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`})(cZ||={});function lZ(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const uZ=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))),dZ=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 fZ(e){return e>=55296&&e<=57343||e>1114111?65533:dZ.get(e)??e}var pZ;(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`})(pZ||={});var mZ;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(mZ||={});function hZ(e){return e>=pZ.ZERO&&e<=pZ.NINE}function gZ(e){return e>=pZ.UPPER_A&&e<=pZ.UPPER_F||e>=pZ.LOWER_A&&e<=pZ.LOWER_F}function _Z(e){return e>=pZ.UPPER_A&&e<=pZ.UPPER_Z||e>=pZ.LOWER_A&&e<=pZ.LOWER_Z||hZ(e)}function vZ(e){return e===pZ.EQUALS||_Z(e)}var yZ;(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`})(yZ||={});var bZ;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(bZ||={});var xZ=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=yZ.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=bZ.Strict}startEntity(e){this.decodeMode=e,this.state=yZ.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case yZ.EntityStart:return e.charCodeAt(t)===pZ.NUM?(this.state=yZ.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=yZ.NamedEntity,this.stateNamedEntity(e,t));case yZ.NumericStart:return this.stateNumericStart(e,t);case yZ.NumericDecimal:return this.stateNumericDecimal(e,t);case yZ.NumericHex:return this.stateNumericHex(e,t);case yZ.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|32)===pZ.LOWER_X?(this.state=yZ.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=yZ.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(hZ(r)||gZ(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(hZ(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===pZ.SEMI)this.consumed+=1;else if(this.decodeMode===bZ.Strict)return 0;return this.emitCodePoint(fZ(this.result),this.consumed),this.errors&&(e!==pZ.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&mZ.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=SZ(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===bZ.Attribute&&(i===0||vZ(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&mZ.VALUE_LENGTH)>>14,i!==0){if(a===pZ.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==bZ.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]&mZ.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]&~mZ.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case yZ.NamedEntity:return this.result!==0&&(this.decodeMode!==bZ.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case yZ.NumericDecimal:return this.emitNumericEntity(0,2);case yZ.NumericHex:return this.emitNumericEntity(0,3);case yZ.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case yZ.EntityStart:return 0}}};function SZ(e,t,n,r){let i=(t&mZ.BRANCH_LENGTH)>>7,a=t&mZ.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 J;(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/`})(J||={});var CZ;(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`})(CZ||={});var wZ;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(wZ||={});var Y;(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`})(Y||={});var X;(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`})(X||={});const TZ=new Map([[Y.A,X.A],[Y.ADDRESS,X.ADDRESS],[Y.ANNOTATION_XML,X.ANNOTATION_XML],[Y.APPLET,X.APPLET],[Y.AREA,X.AREA],[Y.ARTICLE,X.ARTICLE],[Y.ASIDE,X.ASIDE],[Y.B,X.B],[Y.BASE,X.BASE],[Y.BASEFONT,X.BASEFONT],[Y.BGSOUND,X.BGSOUND],[Y.BIG,X.BIG],[Y.BLOCKQUOTE,X.BLOCKQUOTE],[Y.BODY,X.BODY],[Y.BR,X.BR],[Y.BUTTON,X.BUTTON],[Y.CAPTION,X.CAPTION],[Y.CENTER,X.CENTER],[Y.CODE,X.CODE],[Y.COL,X.COL],[Y.COLGROUP,X.COLGROUP],[Y.DD,X.DD],[Y.DESC,X.DESC],[Y.DETAILS,X.DETAILS],[Y.DIALOG,X.DIALOG],[Y.DIR,X.DIR],[Y.DIV,X.DIV],[Y.DL,X.DL],[Y.DT,X.DT],[Y.EM,X.EM],[Y.EMBED,X.EMBED],[Y.FIELDSET,X.FIELDSET],[Y.FIGCAPTION,X.FIGCAPTION],[Y.FIGURE,X.FIGURE],[Y.FONT,X.FONT],[Y.FOOTER,X.FOOTER],[Y.FOREIGN_OBJECT,X.FOREIGN_OBJECT],[Y.FORM,X.FORM],[Y.FRAME,X.FRAME],[Y.FRAMESET,X.FRAMESET],[Y.H1,X.H1],[Y.H2,X.H2],[Y.H3,X.H3],[Y.H4,X.H4],[Y.H5,X.H5],[Y.H6,X.H6],[Y.HEAD,X.HEAD],[Y.HEADER,X.HEADER],[Y.HGROUP,X.HGROUP],[Y.HR,X.HR],[Y.HTML,X.HTML],[Y.I,X.I],[Y.IMG,X.IMG],[Y.IMAGE,X.IMAGE],[Y.INPUT,X.INPUT],[Y.IFRAME,X.IFRAME],[Y.KEYGEN,X.KEYGEN],[Y.LABEL,X.LABEL],[Y.LI,X.LI],[Y.LINK,X.LINK],[Y.LISTING,X.LISTING],[Y.MAIN,X.MAIN],[Y.MALIGNMARK,X.MALIGNMARK],[Y.MARQUEE,X.MARQUEE],[Y.MATH,X.MATH],[Y.MENU,X.MENU],[Y.META,X.META],[Y.MGLYPH,X.MGLYPH],[Y.MI,X.MI],[Y.MO,X.MO],[Y.MN,X.MN],[Y.MS,X.MS],[Y.MTEXT,X.MTEXT],[Y.NAV,X.NAV],[Y.NOBR,X.NOBR],[Y.NOFRAMES,X.NOFRAMES],[Y.NOEMBED,X.NOEMBED],[Y.NOSCRIPT,X.NOSCRIPT],[Y.OBJECT,X.OBJECT],[Y.OL,X.OL],[Y.OPTGROUP,X.OPTGROUP],[Y.OPTION,X.OPTION],[Y.P,X.P],[Y.PARAM,X.PARAM],[Y.PLAINTEXT,X.PLAINTEXT],[Y.PRE,X.PRE],[Y.RB,X.RB],[Y.RP,X.RP],[Y.RT,X.RT],[Y.RTC,X.RTC],[Y.RUBY,X.RUBY],[Y.S,X.S],[Y.SCRIPT,X.SCRIPT],[Y.SEARCH,X.SEARCH],[Y.SECTION,X.SECTION],[Y.SELECT,X.SELECT],[Y.SOURCE,X.SOURCE],[Y.SMALL,X.SMALL],[Y.SPAN,X.SPAN],[Y.STRIKE,X.STRIKE],[Y.STRONG,X.STRONG],[Y.STYLE,X.STYLE],[Y.SUB,X.SUB],[Y.SUMMARY,X.SUMMARY],[Y.SUP,X.SUP],[Y.TABLE,X.TABLE],[Y.TBODY,X.TBODY],[Y.TEMPLATE,X.TEMPLATE],[Y.TEXTAREA,X.TEXTAREA],[Y.TFOOT,X.TFOOT],[Y.TD,X.TD],[Y.TH,X.TH],[Y.THEAD,X.THEAD],[Y.TITLE,X.TITLE],[Y.TR,X.TR],[Y.TRACK,X.TRACK],[Y.TT,X.TT],[Y.U,X.U],[Y.UL,X.UL],[Y.SVG,X.SVG],[Y.VAR,X.VAR],[Y.WBR,X.WBR],[Y.XMP,X.XMP]]);function EZ(e){return TZ.get(e)??X.UNKNOWN}const Z=X,DZ={[J.HTML]:new Set([Z.ADDRESS,Z.APPLET,Z.AREA,Z.ARTICLE,Z.ASIDE,Z.BASE,Z.BASEFONT,Z.BGSOUND,Z.BLOCKQUOTE,Z.BODY,Z.BR,Z.BUTTON,Z.CAPTION,Z.CENTER,Z.COL,Z.COLGROUP,Z.DD,Z.DETAILS,Z.DIR,Z.DIV,Z.DL,Z.DT,Z.EMBED,Z.FIELDSET,Z.FIGCAPTION,Z.FIGURE,Z.FOOTER,Z.FORM,Z.FRAME,Z.FRAMESET,Z.H1,Z.H2,Z.H3,Z.H4,Z.H5,Z.H6,Z.HEAD,Z.HEADER,Z.HGROUP,Z.HR,Z.HTML,Z.IFRAME,Z.IMG,Z.INPUT,Z.LI,Z.LINK,Z.LISTING,Z.MAIN,Z.MARQUEE,Z.MENU,Z.META,Z.NAV,Z.NOEMBED,Z.NOFRAMES,Z.NOSCRIPT,Z.OBJECT,Z.OL,Z.P,Z.PARAM,Z.PLAINTEXT,Z.PRE,Z.SCRIPT,Z.SECTION,Z.SELECT,Z.SOURCE,Z.STYLE,Z.SUMMARY,Z.TABLE,Z.TBODY,Z.TD,Z.TEMPLATE,Z.TEXTAREA,Z.TFOOT,Z.TH,Z.THEAD,Z.TITLE,Z.TR,Z.TRACK,Z.UL,Z.WBR,Z.XMP]),[J.MATHML]:new Set([Z.MI,Z.MO,Z.MN,Z.MS,Z.MTEXT,Z.ANNOTATION_XML]),[J.SVG]:new Set([Z.TITLE,Z.FOREIGN_OBJECT,Z.DESC]),[J.XLINK]:new Set,[J.XML]:new Set,[J.XMLNS]:new Set},OZ=new Set([Z.H1,Z.H2,Z.H3,Z.H4,Z.H5,Z.H6]);Y.STYLE,Y.SCRIPT,Y.XMP,Y.IFRAME,Y.NOEMBED,Y.NOFRAMES,Y.PLAINTEXT;var Q;(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`})(Q||={});const kZ={DATA:Q.DATA,RCDATA:Q.RCDATA,RAWTEXT:Q.RAWTEXT,SCRIPT_DATA:Q.SCRIPT_DATA,PLAINTEXT:Q.PLAINTEXT,CDATA_SECTION:Q.CDATA_SECTION};function AZ(e){return e>=K.DIGIT_0&&e<=K.DIGIT_9}function jZ(e){return e>=K.LATIN_CAPITAL_A&&e<=K.LATIN_CAPITAL_Z}function MZ(e){return e>=K.LATIN_SMALL_A&&e<=K.LATIN_SMALL_Z}function NZ(e){return MZ(e)||jZ(e)}function PZ(e){return NZ(e)||AZ(e)}function FZ(e){return e+32}function IZ(e){return e===K.SPACE||e===K.LINE_FEED||e===K.TABULATION||e===K.FORM_FEED}function LZ(e){return IZ(e)||e===K.SOLIDUS||e===K.GREATER_THAN_SIGN}function RZ(e){return e===K.NULL?q.nullCharacterReference:e>1114111?q.characterReferenceOutsideUnicodeRange:nZ(e)?q.surrogateCharacterReference:oZ(e)?q.noncharacterCharacterReference:aZ(e)||e===K.CARRIAGE_RETURN?q.controlCharacterReference:null}var zZ=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=Q.DATA,this.returnState=Q.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new sZ(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new xZ(uZ,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(q.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(q.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=RZ(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:cZ.START_TAG,tagName:``,tagID:X.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:cZ.END_TAG,tagName:``,tagID:X.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:cZ.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:cZ.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(lZ(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(q.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=EZ(e.tagName),e.type===cZ.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(q.endTagWithAttributes),e.selfClosing&&this._err(q.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 cZ.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case cZ.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case cZ.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:cZ.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=IZ(e)?cZ.WHITESPACE_CHARACTER:e===K.NULL?cZ.NULL_CHARACTER:cZ.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(cZ.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=Q.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?bZ.Attribute:bZ.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Q.DATA:this._stateData(e);break;case Q.RCDATA:this._stateRcdata(e);break;case Q.RAWTEXT:this._stateRawtext(e);break;case Q.SCRIPT_DATA:this._stateScriptData(e);break;case Q.PLAINTEXT:this._statePlaintext(e);break;case Q.TAG_OPEN:this._stateTagOpen(e);break;case Q.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Q.TAG_NAME:this._stateTagName(e);break;case Q.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Q.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Q.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Q.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Q.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Q.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Q.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Q.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Q.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Q.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Q.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Q.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Q.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Q.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Q.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Q.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Q.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Q.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Q.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Q.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Q.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Q.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Q.BOGUS_COMMENT:this._stateBogusComment(e);break;case Q.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Q.COMMENT_START:this._stateCommentStart(e);break;case Q.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Q.COMMENT:this._stateComment(e);break;case Q.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Q.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Q.COMMENT_END:this._stateCommentEnd(e);break;case Q.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Q.DOCTYPE:this._stateDoctype(e);break;case Q.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Q.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Q.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Q.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Q.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Q.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Q.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Q.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Q.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Q.CDATA_SECTION:this._stateCdataSection(e);break;case Q.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Q.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Q.CHARACTER_REFERENCE:this._stateCharacterReference();break;case Q.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case K.LESS_THAN_SIGN:this.state=Q.TAG_OPEN;break;case K.AMPERSAND:this._startCharacterReference();break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitCodePoint(e);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case K.AMPERSAND:this._startCharacterReference();break;case K.LESS_THAN_SIGN:this.state=Q.RCDATA_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case K.LESS_THAN_SIGN:this.state=Q.RAWTEXT_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(NZ(e))this._createStartTagToken(),this.state=Q.TAG_NAME,this._stateTagName(e);else switch(e){case K.EXCLAMATION_MARK:this.state=Q.MARKUP_DECLARATION_OPEN;break;case K.SOLIDUS:this.state=Q.END_TAG_OPEN;break;case K.QUESTION_MARK:this._err(q.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e);break;case K.EOF:this._err(q.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(q.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=Q.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(NZ(e))this._createEndTagToken(),this.state=Q.TAG_NAME,this._stateTagName(e);else switch(e){case K.GREATER_THAN_SIGN:this._err(q.missingEndTagName),this.state=Q.DATA;break;case K.EOF:this._err(q.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(q.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case K.SOLIDUS:this.state=Q.SELF_CLOSING_START_TAG;break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentTagToken();break;case K.NULL:this._err(q.unexpectedNullCharacter),t.tagName+=`�`;break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(jZ(e)?FZ(e):e)}}_stateRcdataLessThanSign(e){e===K.SOLIDUS?this.state=Q.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=Q.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){NZ(e)?(this.state=Q.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=Q.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 K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=Q.BEFORE_ATTRIBUTE_NAME,!1;case K.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=Q.SELF_CLOSING_START_TAG,!1;case K.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=Q.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===K.SOLIDUS?this.state=Q.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){NZ(e)?(this.state=Q.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case K.SOLIDUS:this.state=Q.SCRIPT_DATA_END_TAG_OPEN;break;case K.EXCLAMATION_MARK:this.state=Q.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){NZ(e)?(this.state=Q.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===K.HYPHEN_MINUS?(this.state=Q.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===K.HYPHEN_MINUS?(this.state=Q.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case K.HYPHEN_MINUS:this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case K.GREATER_THAN_SIGN:this.state=Q.SCRIPT_DATA,this._emitChars(`>`);break;case K.NULL:this._err(q.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===K.SOLIDUS?this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:NZ(e)?(this._emitChars(`<`),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){NZ(e)?(this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(tZ.SCRIPT,!1)&&LZ(this.preprocessor.peek(tZ.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<tZ.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case K.NULL:this._err(q.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case K.HYPHEN_MINUS:this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case K.GREATER_THAN_SIGN:this.state=Q.SCRIPT_DATA,this._emitChars(`>`);break;case K.NULL:this._err(q.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===K.SOLIDUS?(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(tZ.SCRIPT,!1)&&LZ(this.preprocessor.peek(tZ.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<tZ.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Q.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.SOLIDUS:case K.GREATER_THAN_SIGN:case K.EOF:this.state=Q.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case K.EQUALS_SIGN:this._err(q.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=Q.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=Q.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:case K.SOLIDUS:case K.GREATER_THAN_SIGN:case K.EOF:this._leaveAttrName(),this.state=Q.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case K.EQUALS_SIGN:this._leaveAttrName(),this.state=Q.BEFORE_ATTRIBUTE_VALUE;break;case K.QUOTATION_MARK:case K.APOSTROPHE:case K.LESS_THAN_SIGN:this._err(q.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case K.NULL:this._err(q.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(jZ(e)?FZ(e):e)}}_stateAfterAttributeName(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.SOLIDUS:this.state=Q.SELF_CLOSING_START_TAG;break;case K.EQUALS_SIGN:this.state=Q.BEFORE_ATTRIBUTE_VALUE;break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentTagToken();break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=Q.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.QUOTATION_MARK:this.state=Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case K.APOSTROPHE:this.state=Q.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingAttributeValue),this.state=Q.DATA,this.emitCurrentTagToken();break;default:this.state=Q.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case K.QUOTATION_MARK:this.state=Q.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case K.AMPERSAND:this._startCharacterReference();break;case K.NULL:this._err(q.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case K.APOSTROPHE:this.state=Q.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case K.AMPERSAND:this._startCharacterReference();break;case K.NULL:this._err(q.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this._leaveAttrValue(),this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case K.AMPERSAND:this._startCharacterReference();break;case K.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Q.DATA,this.emitCurrentTagToken();break;case K.NULL:this._err(q.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case K.QUOTATION_MARK:case K.APOSTROPHE:case K.LESS_THAN_SIGN:case K.EQUALS_SIGN:case K.GRAVE_ACCENT:this._err(q.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this._leaveAttrValue(),this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case K.SOLIDUS:this._leaveAttrValue(),this.state=Q.SELF_CLOSING_START_TAG;break;case K.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Q.DATA,this.emitCurrentTagToken();break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this._err(q.missingWhitespaceBetweenAttributes),this.state=Q.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case K.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=Q.DATA,this.emitCurrentTagToken();break}case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this._err(q.unexpectedSolidusInTag),this.state=Q.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentComment(t);break;case K.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case K.NULL:this._err(q.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(tZ.DASH_DASH,!0)?(this._createCommentToken(tZ.DASH_DASH.length+1),this.state=Q.COMMENT_START):this._consumeSequenceIfMatch(tZ.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(tZ.DOCTYPE.length+1),this.state=Q.DOCTYPE):this._consumeSequenceIfMatch(tZ.CDATA_START,!0)?this.inForeignNode?this.state=Q.CDATA_SECTION:(this._err(q.cdataInHtmlContent),this._createCommentToken(tZ.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=Q.BOGUS_COMMENT):this._ensureHibernation()||(this._err(q.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.COMMENT_START_DASH;break;case K.GREATER_THAN_SIGN:{this._err(q.abruptClosingOfEmptyComment),this.state=Q.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case K.HYPHEN_MINUS:this.state=Q.COMMENT_END;break;case K.GREATER_THAN_SIGN:this._err(q.abruptClosingOfEmptyComment),this.state=Q.DATA,this.emitCurrentComment(t);break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Q.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case K.HYPHEN_MINUS:this.state=Q.COMMENT_END_DASH;break;case K.LESS_THAN_SIGN:t.data+=`<`,this.state=Q.COMMENT_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.data+=`�`;break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case K.EXCLAMATION_MARK:t.data+=`!`,this.state=Q.COMMENT_LESS_THAN_SIGN_BANG;break;case K.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===K.HYPHEN_MINUS?this.state=Q.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Q.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===K.HYPHEN_MINUS?this.state=Q.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Q.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==K.GREATER_THAN_SIGN&&e!==K.EOF&&this._err(q.nestedComment),this.state=Q.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case K.HYPHEN_MINUS:this.state=Q.COMMENT_END;break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentComment(t);break;case K.EXCLAMATION_MARK:this.state=Q.COMMENT_END_BANG;break;case K.HYPHEN_MINUS:t.data+=`-`;break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case K.HYPHEN_MINUS:t.data+=`--!`,this.state=Q.COMMENT_END_DASH;break;case K.GREATER_THAN_SIGN:this._err(q.incorrectlyClosedComment),this.state=Q.DATA,this.emitCurrentComment(t);break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=Q.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_NAME;break;case K.GREATER_THAN_SIGN:this.state=Q.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case K.EOF:{this._err(q.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(q.missingWhitespaceBeforeDoctypeName),this.state=Q.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(jZ(e))this._createDoctypeToken(String.fromCharCode(FZ(e))),this.state=Q.DOCTYPE_NAME;else switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.NULL:this._err(q.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=Q.DOCTYPE_NAME;break;case K.GREATER_THAN_SIGN:{this._err(q.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=Q.DATA;break}case K.EOF:{this._err(q.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=Q.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.AFTER_DOCTYPE_NAME;break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.NULL:this._err(q.unexpectedNullCharacter),t.name+=`�`;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(jZ(e)?FZ(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(tZ.PUBLIC,!1)?this.state=Q.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(tZ.SYSTEM,!1)?this.state=Q.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(q.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case K.QUOTATION_MARK:this._err(q.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:this._err(q.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.QUOTATION_MARK:t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case K.QUOTATION_MARK:this.state=Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.publicId+=`�`;break;case K.GREATER_THAN_SIGN:this._err(q.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.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 K.APOSTROPHE:this.state=Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.publicId+=`�`;break;case K.GREATER_THAN_SIGN:this._err(q.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.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 K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.QUOTATION_MARK:this._err(q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:this._err(q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.QUOTATION_MARK:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case K.QUOTATION_MARK:this._err(q.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:this._err(q.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.QUOTATION_MARK:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case K.QUOTATION_MARK:this.state=Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.systemId+=`�`;break;case K.GREATER_THAN_SIGN:this._err(q.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.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 K.APOSTROPHE:this.state=Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.systemId+=`�`;break;case K.GREATER_THAN_SIGN:this._err(q.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.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 K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case K.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.NULL:this._err(q.unexpectedNullCharacter);break;case K.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case K.RIGHT_SQUARE_BRACKET:this.state=Q.CDATA_SECTION_BRACKET;break;case K.EOF:this._err(q.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===K.RIGHT_SQUARE_BRACKET?this.state=Q.CDATA_SECTION_END:(this._emitChars(`]`),this.state=Q.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case K.GREATER_THAN_SIGN:this.state=Q.DATA;break;case K.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=Q.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(K.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&PZ(this.preprocessor.peek(1))?Q.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){PZ(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===K.SEMICOLON&&this._err(q.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}};const BZ=new Set([X.DD,X.DT,X.LI,X.OPTGROUP,X.OPTION,X.P,X.RB,X.RP,X.RT,X.RTC]),VZ=new Set([...BZ,X.CAPTION,X.COLGROUP,X.TBODY,X.TD,X.TFOOT,X.TH,X.THEAD,X.TR]),HZ=new Set([X.APPLET,X.CAPTION,X.HTML,X.MARQUEE,X.OBJECT,X.TABLE,X.TD,X.TEMPLATE,X.TH]),UZ=new Set([...HZ,X.OL,X.UL]),WZ=new Set([...HZ,X.BUTTON]),GZ=new Set([X.ANNOTATION_XML,X.MI,X.MN,X.MO,X.MS,X.MTEXT]),KZ=new Set([X.DESC,X.FOREIGN_OBJECT,X.TITLE]),qZ=new Set([X.TR,X.TEMPLATE,X.HTML]),JZ=new Set([X.TBODY,X.TFOOT,X.THEAD,X.TEMPLATE,X.HTML]),YZ=new Set([X.TABLE,X.TEMPLATE,X.HTML]),XZ=new Set([X.TD,X.TH]);var ZZ=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=X.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===X.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===J.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])!==J.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(OZ,J.HTML)}popUntilTableCellPopped(){this.popUntilPopped(XZ,J.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(YZ,J.HTML)}clearBackToTableBodyContext(){this.clearBackTo(JZ,J.HTML)}clearBackToTableRowContext(){this.clearBackTo(qZ,J.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]===X.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]===X.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 J.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case J.SVG:if(KZ.has(r))return!1;break;case J.MATHML:if(GZ.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,HZ)}hasInListItemScope(e){return this.hasInDynamicScope(e,UZ)}hasInButtonScope(e){return this.hasInDynamicScope(e,WZ)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case J.HTML:if(OZ.has(t))return!0;if(HZ.has(t))return!1;break;case J.SVG:if(KZ.has(t))return!1;break;case J.MATHML:if(GZ.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===J.HTML)switch(this.tagIDs[t]){case e:return!0;case X.TABLE:case X.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===J.HTML)switch(this.tagIDs[e]){case X.TBODY:case X.THEAD:case X.TFOOT:return!0;case X.TABLE:case X.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===J.HTML)switch(this.tagIDs[t]){case e:return!0;case X.OPTION:case X.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&BZ.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&VZ.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&VZ.has(this.currentTagId);)this.pop()}},QZ;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(QZ||={});const $Z={type:QZ.Marker};var eQ=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===QZ.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<3)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<3)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>=3&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift($Z)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:QZ.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:QZ.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($Z);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===QZ.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===QZ.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===QZ.Element&&t.element===e)}};const tQ={createDocument(){return{nodeName:`#document`,mode:wZ.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};tQ.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(tQ.isTextNode(n)){n.value+=t;return}}tQ.appendChild(e,tQ.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&tQ.isTextNode(r)?r.value+=t:tQ.insertBefore(e,tQ.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}}},nQ=`html`,rQ=`+//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(`,`),iQ=[...rQ,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],aQ=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),oQ=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],sQ=[...oQ,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function cQ(e,t){return t.some(t=>e.startsWith(t))}function lQ(e){return e.name===nQ&&e.publicId===null&&(e.systemId===null||e.systemId===`about:legacy-compat`)}function uQ(e){if(e.name!==nQ)return wZ.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`)return wZ.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),aQ.has(n))return wZ.QUIRKS;let e=t===null?iQ:rQ;if(cQ(n,e))return wZ.QUIRKS;if(e=t===null?oQ:sQ,cQ(n,e))return wZ.LIMITED_QUIRKS}return wZ.NO_QUIRKS}const dQ={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},fQ=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])),pQ=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:J.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:J.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:J.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:J.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:J.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:J.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:J.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:J.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:J.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:J.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:J.XMLNS}]]),mQ=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])),hQ=new Set([X.B,X.BIG,X.BLOCKQUOTE,X.BODY,X.BR,X.CENTER,X.CODE,X.DD,X.DIV,X.DL,X.DT,X.EM,X.EMBED,X.H1,X.H2,X.H3,X.H4,X.H5,X.H6,X.HEAD,X.HR,X.I,X.IMG,X.LI,X.LISTING,X.MENU,X.META,X.NOBR,X.OL,X.P,X.PRE,X.RUBY,X.S,X.SMALL,X.SPAN,X.STRONG,X.STRIKE,X.SUB,X.SUP,X.TABLE,X.TT,X.U,X.UL,X.VAR]);function gQ(e){let t=e.tagID;return t===X.FONT&&e.attrs.some(({name:e})=>e===CZ.COLOR||e===CZ.SIZE||e===CZ.FACE)||hQ.has(t)}function _Q(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===`definitionurl`){e.attrs[t].name=`definitionURL`;break}}function vQ(e){for(let t=0;t<e.attrs.length;t++){let n=fQ.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function yQ(e){for(let t=0;t<e.attrs.length;t++){let n=pQ.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 bQ(e){let t=mQ.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=EZ(e.tagName))}function xQ(e,t){return t===J.MATHML&&(e===X.MI||e===X.MO||e===X.MN||e===X.MS||e===X.MTEXT)}function SQ(e,t,n){if(t===J.MATHML&&e===X.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===CZ.ENCODING){let t=n[e].value.toLowerCase();return t===dQ.TEXT_HTML||t===dQ.APPLICATION_XML}}return t===J.SVG&&(e===X.FOREIGN_OBJECT||e===X.DESC||e===X.TITLE)}function CQ(e,t,n,r){return(!r||r===J.HTML)&&SQ(e,t,n)||(!r||r===J.MATHML)&&xQ(e,t)}var $;(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`})($||={});const wQ={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},TQ=new Set([X.TABLE,X.TBODY,X.TFOOT,X.THEAD,X.TR]),EQ={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:tQ,onParseError:null};var DQ=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=$.INITIAL,this.originalInsertionMode=$.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={...EQ,...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 zZ(this.options,this),this.activeFormattingElements=new eQ(this.treeAdapter),this.fragmentContextID=n?EZ(this.treeAdapter.getTagName(n)):X.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new ZZ(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={...EQ,...t};e??=n.treeAdapter.createElement(Y.TEMPLATE,J.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,J.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===X.TEMPLATE&&i.tmplInsertionModeStack.unshift($.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??wQ,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)===J.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,J.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=$.TEXT}switchToPlaintextParsing(){this.insertionMode=$.TEXT,this.originalInsertionMode=$.IN_BODY,this.tokenizer.state=kZ.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)===Y.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==J.HTML))switch(this.fragmentContextID){case X.TITLE:case X.TEXTAREA:this.tokenizer.state=kZ.RCDATA;break;case X.STYLE:case X.XMP:case X.IFRAME:case X.NOEMBED:case X.NOFRAMES:case X.NOSCRIPT:this.tokenizer.state=kZ.RAWTEXT;break;case X.SCRIPT:this.tokenizer.state=kZ.SCRIPT_DATA;break;case X.PLAINTEXT:this.tokenizer.state=kZ.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,J.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,J.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(Y.HTML,J.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,X.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===cZ.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===X.SVG&&this.treeAdapter.getTagName(t)===Y.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===J.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===X.MGLYPH||e.tagID===X.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,J.HTML)}_processToken(e){switch(e.type){case cZ.CHARACTER:this.onCharacter(e);break;case cZ.NULL_CHARACTER:this.onNullCharacter(e);break;case cZ.COMMENT:this.onComment(e);break;case cZ.DOCTYPE:this.onDoctype(e);break;case cZ.START_TAG:this._processStartTag(e);break;case cZ.END_TAG:this.onEndTag(e);break;case cZ.EOF:this.onEof(e);break;case cZ.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return CQ(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===QZ.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=$.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(X.P),this.openElements.popUntilTagNamePopped(X.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case X.TR:this.insertionMode=$.IN_ROW;return;case X.TBODY:case X.THEAD:case X.TFOOT:this.insertionMode=$.IN_TABLE_BODY;return;case X.CAPTION:this.insertionMode=$.IN_CAPTION;return;case X.COLGROUP:this.insertionMode=$.IN_COLUMN_GROUP;return;case X.TABLE:this.insertionMode=$.IN_TABLE;return;case X.BODY:this.insertionMode=$.IN_BODY;return;case X.FRAMESET:this.insertionMode=$.IN_FRAMESET;return;case X.SELECT:this._resetInsertionModeForSelect(e);return;case X.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case X.HTML:this.insertionMode=this.headElement?$.AFTER_HEAD:$.BEFORE_HEAD;return;case X.TD:case X.TH:if(e>0){this.insertionMode=$.IN_CELL;return}break;case X.HEAD:if(e>0){this.insertionMode=$.IN_HEAD;return}}this.insertionMode=$.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===X.TEMPLATE)break;if(e===X.TABLE){this.insertionMode=$.IN_SELECT_IN_TABLE;return}}this.insertionMode=$.IN_SELECT}_isElementCausesFosterParenting(e){return TQ.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 X.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===J.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case X.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){let n=this.treeAdapter.getNamespaceURI(e);return DZ[n].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){G1(this,e);return}switch(this.insertionMode){case $.INITIAL:BQ(this,e);break;case $.BEFORE_HTML:UQ(this,e);break;case $.BEFORE_HEAD:KQ(this,e);break;case $.IN_HEAD:XQ(this,e);break;case $.IN_HEAD_NO_SCRIPT:$Q(this,e);break;case $.AFTER_HEAD:n$(this,e);break;case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:a$(this,e);break;case $.TEXT:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:e1(this,e);break;case $.IN_TABLE_TEXT:p1(this,e);break;case $.IN_COLUMN_GROUP:b1(this,e);break;case $.AFTER_BODY:I1(this,e);break;case $.AFTER_AFTER_BODY:H1(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){W1(this,e);return}switch(this.insertionMode){case $.INITIAL:BQ(this,e);break;case $.BEFORE_HTML:UQ(this,e);break;case $.BEFORE_HEAD:KQ(this,e);break;case $.IN_HEAD:XQ(this,e);break;case $.IN_HEAD_NO_SCRIPT:$Q(this,e);break;case $.AFTER_HEAD:n$(this,e);break;case $.TEXT:this._insertCharacters(e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:e1(this,e);break;case $.IN_COLUMN_GROUP:b1(this,e);break;case $.AFTER_BODY:I1(this,e);break;case $.AFTER_AFTER_BODY:H1(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){FQ(this,e);return}switch(this.insertionMode){case $.INITIAL:case $.BEFORE_HTML:case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_TEMPLATE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:FQ(this,e);break;case $.IN_TABLE_TEXT:m1(this,e);break;case $.AFTER_BODY:IQ(this,e);break;case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:LQ(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case $.INITIAL:zQ(this,e);break;case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:this._err(e,q.misplacedDoctype);break;case $.IN_TABLE_TEXT:m1(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,q.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?q1(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:BQ(this,e);break;case $.BEFORE_HTML:VQ(this,e);break;case $.BEFORE_HEAD:WQ(this,e);break;case $.IN_HEAD:qQ(this,e);break;case $.IN_HEAD_NO_SCRIPT:ZQ(this,e);break;case $.AFTER_HEAD:e$(this,e);break;case $.IN_BODY:R$(this,e);break;case $.IN_TABLE:l1(this,e);break;case $.IN_TABLE_TEXT:m1(this,e);break;case $.IN_CAPTION:g1(this,e);break;case $.IN_COLUMN_GROUP:v1(this,e);break;case $.IN_TABLE_BODY:x1(this,e);break;case $.IN_ROW:C1(this,e);break;case $.IN_CELL:T1(this,e);break;case $.IN_SELECT:D1(this,e);break;case $.IN_SELECT_IN_TABLE:k1(this,e);break;case $.IN_TEMPLATE:j1(this,e);break;case $.AFTER_BODY:P1(this,e);break;case $.IN_FRAMESET:L1(this,e);break;case $.AFTER_FRAMESET:z1(this,e);break;case $.AFTER_AFTER_BODY:V1(this,e);break;case $.AFTER_AFTER_FRAMESET:U1(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?J1(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:BQ(this,e);break;case $.BEFORE_HTML:HQ(this,e);break;case $.BEFORE_HEAD:GQ(this,e);break;case $.IN_HEAD:JQ(this,e);break;case $.IN_HEAD_NO_SCRIPT:QQ(this,e);break;case $.AFTER_HEAD:t$(this,e);break;case $.IN_BODY:X$(this,e);break;case $.TEXT:Q$(this,e);break;case $.IN_TABLE:u1(this,e);break;case $.IN_TABLE_TEXT:m1(this,e);break;case $.IN_CAPTION:_1(this,e);break;case $.IN_COLUMN_GROUP:y1(this,e);break;case $.IN_TABLE_BODY:S1(this,e);break;case $.IN_ROW:w1(this,e);break;case $.IN_CELL:E1(this,e);break;case $.IN_SELECT:O1(this,e);break;case $.IN_SELECT_IN_TABLE:A1(this,e);break;case $.IN_TEMPLATE:M1(this,e);break;case $.AFTER_BODY:F1(this,e);break;case $.IN_FRAMESET:R1(this,e);break;case $.AFTER_FRAMESET:B1(this,e);break;case $.AFTER_AFTER_BODY:H1(this,e)}}onEof(e){switch(this.insertionMode){case $.INITIAL:BQ(this,e);break;case $.BEFORE_HTML:UQ(this,e);break;case $.BEFORE_HEAD:KQ(this,e);break;case $.IN_HEAD:XQ(this,e);break;case $.IN_HEAD_NO_SCRIPT:$Q(this,e);break;case $.AFTER_HEAD:n$(this,e);break;case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:Z$(this,e);break;case $.TEXT:$$(this,e);break;case $.IN_TABLE_TEXT:m1(this,e);break;case $.IN_TEMPLATE:N1(this,e);break;case $.AFTER_BODY:case $.IN_FRAMESET:case $.AFTER_FRAMESET:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:RQ(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===K.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 $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.TEXT:case $.IN_COLUMN_GROUP:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:this._insertCharacters(e);break;case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:case $.AFTER_BODY:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:i$(this,e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:e1(this,e);break;case $.IN_TABLE_TEXT:f1(this,e)}}};function OQ(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):Y$(e,t),n}function kQ(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 AQ(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>=3;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=jQ(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function jQ(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 MQ(e,t,n){let r=EZ(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===X.TEMPLATE&&i===J.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function NQ(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 PQ(e,t){for(let n=0;n<8;n++){let n=OQ(e,t);if(!n)break;let r=kQ(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=AQ(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&MQ(e,a,i),NQ(e,r,n)}}function FQ(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function IQ(e,t){e._appendCommentNode(t,e.openElements.items[0])}function LQ(e,t){e._appendCommentNode(t,e.document)}function RQ(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 zQ(e,t){e._setDocumentType(t);let n=t.forceQuirks?wZ.QUIRKS:uQ(t);lQ(t)||e._err(t,q.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=$.BEFORE_HTML}function BQ(e,t){e._err(t,q.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,wZ.QUIRKS),e.insertionMode=$.BEFORE_HTML,e._processToken(t)}function VQ(e,t){t.tagID===X.HTML?(e._insertElement(t,J.HTML),e.insertionMode=$.BEFORE_HEAD):UQ(e,t)}function HQ(e,t){let n=t.tagID;(n===X.HTML||n===X.HEAD||n===X.BODY||n===X.BR)&&UQ(e,t)}function UQ(e,t){e._insertFakeRootElement(),e.insertionMode=$.BEFORE_HEAD,e._processToken(t)}function WQ(e,t){switch(t.tagID){case X.HTML:R$(e,t);break;case X.HEAD:e._insertElement(t,J.HTML),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD;break;default:KQ(e,t)}}function GQ(e,t){let n=t.tagID;n===X.HEAD||n===X.BODY||n===X.HTML||n===X.BR?KQ(e,t):e._err(t,q.endTagWithoutMatchingOpenElement)}function KQ(e,t){e._insertFakeElement(Y.HEAD,X.HEAD),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD,e._processToken(t)}function qQ(e,t){switch(t.tagID){case X.HTML:R$(e,t);break;case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.TITLE:e._switchToTextParsing(t,kZ.RCDATA);break;case X.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,kZ.RAWTEXT):(e._insertElement(t,J.HTML),e.insertionMode=$.IN_HEAD_NO_SCRIPT);break;case X.NOFRAMES:case X.STYLE:e._switchToTextParsing(t,kZ.RAWTEXT);break;case X.SCRIPT:e._switchToTextParsing(t,kZ.SCRIPT_DATA);break;case X.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=$.IN_TEMPLATE,e.tmplInsertionModeStack.unshift($.IN_TEMPLATE);break;case X.HEAD:e._err(t,q.misplacedStartTagForHeadElement);break;default:XQ(e,t)}}function JQ(e,t){switch(t.tagID){case X.HEAD:e.openElements.pop(),e.insertionMode=$.AFTER_HEAD;break;case X.BODY:case X.BR:case X.HTML:XQ(e,t);break;case X.TEMPLATE:YQ(e,t);break;default:e._err(t,q.endTagWithoutMatchingOpenElement)}}function YQ(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==X.TEMPLATE&&e._err(t,q.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(X.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,q.endTagWithoutMatchingOpenElement)}function XQ(e,t){e.openElements.pop(),e.insertionMode=$.AFTER_HEAD,e._processToken(t)}function ZQ(e,t){switch(t.tagID){case X.HTML:R$(e,t);break;case X.BASEFONT:case X.BGSOUND:case X.HEAD:case X.LINK:case X.META:case X.NOFRAMES:case X.STYLE:qQ(e,t);break;case X.NOSCRIPT:e._err(t,q.nestedNoscriptInHead);break;default:$Q(e,t)}}function QQ(e,t){switch(t.tagID){case X.NOSCRIPT:e.openElements.pop(),e.insertionMode=$.IN_HEAD;break;case X.BR:$Q(e,t);break;default:e._err(t,q.endTagWithoutMatchingOpenElement)}}function $Q(e,t){let n=t.type===cZ.EOF?q.openElementsLeftAfterEof:q.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=$.IN_HEAD,e._processToken(t)}function e$(e,t){switch(t.tagID){case X.HTML:R$(e,t);break;case X.BODY:e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=$.IN_BODY;break;case X.FRAMESET:e._insertElement(t,J.HTML),e.insertionMode=$.IN_FRAMESET;break;case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:case X.NOFRAMES:case X.SCRIPT:case X.STYLE:case X.TEMPLATE:case X.TITLE:e._err(t,q.abandonedHeadElementChild),e.openElements.push(e.headElement,X.HEAD),qQ(e,t),e.openElements.remove(e.headElement);break;case X.HEAD:e._err(t,q.misplacedStartTagForHeadElement);break;default:n$(e,t)}}function t$(e,t){switch(t.tagID){case X.BODY:case X.HTML:case X.BR:n$(e,t);break;case X.TEMPLATE:YQ(e,t);break;default:e._err(t,q.endTagWithoutMatchingOpenElement)}}function n$(e,t){e._insertFakeElement(Y.BODY,X.BODY),e.insertionMode=$.IN_BODY,r$(e,t)}function r$(e,t){switch(t.type){case cZ.CHARACTER:a$(e,t);break;case cZ.WHITESPACE_CHARACTER:i$(e,t);break;case cZ.COMMENT:FQ(e,t);break;case cZ.START_TAG:R$(e,t);break;case cZ.END_TAG:X$(e,t);break;case cZ.EOF:Z$(e,t)}}function i$(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function a$(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function o$(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function s$(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function c$(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_FRAMESET)}function l$(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function u$(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&OZ.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,J.HTML)}function d$(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function f$(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),n||(e.formElement=e.openElements.current))}function p$(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===X.LI&&r===X.LI||(n===X.DD||n===X.DT)&&(r===X.DD||r===X.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==X.ADDRESS&&r!==X.DIV&&r!==X.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function m$(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.tokenizer.state=kZ.PLAINTEXT}function h$(e,t){e.openElements.hasInScope(X.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1}function g$(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Y.A);n&&(PQ(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function _$(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function v$(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(X.NOBR)&&(PQ(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function y$(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function b$(e,t){e.treeAdapter.getDocumentMode(e.document)!==wZ.QUIRKS&&e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=$.IN_TABLE}function x$(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function S$(e){let t=lZ(e,CZ.TYPE);return t!=null&&t.toLowerCase()===`hidden`}function C$(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),S$(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function w$(e,t){e._appendElement(t,J.HTML),t.ackSelfClosing=!0}function T$(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function E$(e,t){t.tagName=Y.IMG,t.tagID=X.IMG,x$(e,t)}function D$(e,t){e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.tokenizer.state=kZ.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=$.TEXT}function O$(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,kZ.RAWTEXT)}function k$(e,t){e.framesetOk=!1,e._switchToTextParsing(t,kZ.RAWTEXT)}function A$(e,t){e._switchToTextParsing(t,kZ.RAWTEXT)}function j$(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===$.IN_TABLE||e.insertionMode===$.IN_CAPTION||e.insertionMode===$.IN_TABLE_BODY||e.insertionMode===$.IN_ROW||e.insertionMode===$.IN_CELL?$.IN_SELECT_IN_TABLE:$.IN_SELECT}function M$(e,t){e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function N$(e,t){e.openElements.hasInScope(X.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,J.HTML)}function P$(e,t){e.openElements.hasInScope(X.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(X.RTC),e._insertElement(t,J.HTML)}function F$(e,t){e._reconstructActiveFormattingElements(),_Q(t),yQ(t),t.selfClosing?e._appendElement(t,J.MATHML):e._insertElement(t,J.MATHML),t.ackSelfClosing=!0}function I$(e,t){e._reconstructActiveFormattingElements(),vQ(t),yQ(t),t.selfClosing?e._appendElement(t,J.SVG):e._insertElement(t,J.SVG),t.ackSelfClosing=!0}function L$(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function R$(e,t){switch(t.tagID){case X.I:case X.S:case X.B:case X.U:case X.EM:case X.TT:case X.BIG:case X.CODE:case X.FONT:case X.SMALL:case X.STRIKE:case X.STRONG:_$(e,t);break;case X.A:g$(e,t);break;case X.H1:case X.H2:case X.H3:case X.H4:case X.H5:case X.H6:u$(e,t);break;case X.P:case X.DL:case X.OL:case X.UL:case X.DIV:case X.DIR:case X.NAV:case X.MAIN:case X.MENU:case X.ASIDE:case X.CENTER:case X.FIGURE:case X.FOOTER:case X.HEADER:case X.HGROUP:case X.DIALOG:case X.DETAILS:case X.ADDRESS:case X.ARTICLE:case X.SEARCH:case X.SECTION:case X.SUMMARY:case X.FIELDSET:case X.BLOCKQUOTE:case X.FIGCAPTION:l$(e,t);break;case X.LI:case X.DD:case X.DT:p$(e,t);break;case X.BR:case X.IMG:case X.WBR:case X.AREA:case X.EMBED:case X.KEYGEN:x$(e,t);break;case X.HR:T$(e,t);break;case X.RB:case X.RTC:N$(e,t);break;case X.RT:case X.RP:P$(e,t);break;case X.PRE:case X.LISTING:d$(e,t);break;case X.XMP:O$(e,t);break;case X.SVG:I$(e,t);break;case X.HTML:o$(e,t);break;case X.BASE:case X.LINK:case X.META:case X.STYLE:case X.TITLE:case X.SCRIPT:case X.BGSOUND:case X.BASEFONT:case X.TEMPLATE:qQ(e,t);break;case X.BODY:s$(e,t);break;case X.FORM:f$(e,t);break;case X.NOBR:v$(e,t);break;case X.MATH:F$(e,t);break;case X.TABLE:b$(e,t);break;case X.INPUT:C$(e,t);break;case X.PARAM:case X.TRACK:case X.SOURCE:w$(e,t);break;case X.IMAGE:E$(e,t);break;case X.BUTTON:h$(e,t);break;case X.APPLET:case X.OBJECT:case X.MARQUEE:y$(e,t);break;case X.IFRAME:k$(e,t);break;case X.SELECT:j$(e,t);break;case X.OPTION:case X.OPTGROUP:M$(e,t);break;case X.NOEMBED:case X.NOFRAMES:A$(e,t);break;case X.FRAMESET:c$(e,t);break;case X.TEXTAREA:D$(e,t);break;case X.NOSCRIPT:e.options.scriptingEnabled?A$(e,t):L$(e,t);break;case X.PLAINTEXT:m$(e,t);break;case X.COL:case X.TH:case X.TD:case X.TR:case X.HEAD:case X.FRAME:case X.TBODY:case X.TFOOT:case X.THEAD:case X.CAPTION:case X.COLGROUP:break;default:L$(e,t)}}function z$(e,t){if(e.openElements.hasInScope(X.BODY)&&(e.insertionMode=$.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function B$(e,t){e.openElements.hasInScope(X.BODY)&&(e.insertionMode=$.AFTER_BODY,F1(e,t))}function V$(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function H$(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(X.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(X.FORM):n&&e.openElements.remove(n))}function U$(e){e.openElements.hasInButtonScope(X.P)||e._insertFakeElement(Y.P,X.P),e._closePElement()}function W$(e){e.openElements.hasInListItemScope(X.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(X.LI),e.openElements.popUntilTagNamePopped(X.LI))}function G$(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function K$(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function q$(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function J$(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Y.BR,X.BR),e.openElements.pop(),e.framesetOk=!1}function Y$(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!==X.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 X$(e,t){switch(t.tagID){case X.A:case X.B:case X.I:case X.S:case X.U:case X.EM:case X.TT:case X.BIG:case X.CODE:case X.FONT:case X.NOBR:case X.SMALL:case X.STRIKE:case X.STRONG:PQ(e,t);break;case X.P:U$(e);break;case X.DL:case X.UL:case X.OL:case X.DIR:case X.DIV:case X.NAV:case X.PRE:case X.MAIN:case X.MENU:case X.ASIDE:case X.BUTTON:case X.CENTER:case X.FIGURE:case X.FOOTER:case X.HEADER:case X.HGROUP:case X.DIALOG:case X.ADDRESS:case X.ARTICLE:case X.DETAILS:case X.SEARCH:case X.SECTION:case X.SUMMARY:case X.LISTING:case X.FIELDSET:case X.BLOCKQUOTE:case X.FIGCAPTION:V$(e,t);break;case X.LI:W$(e);break;case X.DD:case X.DT:G$(e,t);break;case X.H1:case X.H2:case X.H3:case X.H4:case X.H5:case X.H6:K$(e);break;case X.BR:J$(e);break;case X.BODY:z$(e,t);break;case X.HTML:B$(e,t);break;case X.FORM:H$(e);break;case X.APPLET:case X.OBJECT:case X.MARQUEE:q$(e,t);break;case X.TEMPLATE:YQ(e,t);break;default:Y$(e,t)}}function Z$(e,t){e.tmplInsertionModeStack.length>0?N1(e,t):RQ(e,t)}function Q$(e,t){var n;t.tagID===X.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function $$(e,t){e._err(t,q.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function e1(e,t){if(e.openElements.currentTagId!==void 0&&TQ.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=$.IN_TABLE_TEXT,t.type){case cZ.CHARACTER:p1(e,t);break;case cZ.WHITESPACE_CHARACTER:f1(e,t)}else d1(e,t)}function t1(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_CAPTION}function n1(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_COLUMN_GROUP}function r1(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.COLGROUP,X.COLGROUP),e.insertionMode=$.IN_COLUMN_GROUP,v1(e,t)}function i1(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_TABLE_BODY}function a1(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.TBODY,X.TBODY),e.insertionMode=$.IN_TABLE_BODY,x1(e,t)}function o1(e,t){e.openElements.hasInTableScope(X.TABLE)&&(e.openElements.popUntilTagNamePopped(X.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function s1(e,t){S$(t)?e._appendElement(t,J.HTML):d1(e,t),t.ackSelfClosing=!0}function c1(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,J.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function l1(e,t){switch(t.tagID){case X.TD:case X.TH:case X.TR:a1(e,t);break;case X.STYLE:case X.SCRIPT:case X.TEMPLATE:qQ(e,t);break;case X.COL:r1(e,t);break;case X.FORM:c1(e,t);break;case X.TABLE:o1(e,t);break;case X.TBODY:case X.TFOOT:case X.THEAD:i1(e,t);break;case X.INPUT:s1(e,t);break;case X.CAPTION:t1(e,t);break;case X.COLGROUP:n1(e,t);break;default:d1(e,t)}}function u1(e,t){switch(t.tagID){case X.TABLE:e.openElements.hasInTableScope(X.TABLE)&&(e.openElements.popUntilTagNamePopped(X.TABLE),e._resetInsertionMode());break;case X.TEMPLATE:YQ(e,t);break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TBODY:case X.TD:case X.TFOOT:case X.TH:case X.THEAD:case X.TR:break;default:d1(e,t)}}function d1(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,r$(e,t),e.fosterParentingEnabled=n}function f1(e,t){e.pendingCharacterTokens.push(t)}function p1(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function m1(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)d1(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const h1=new Set([X.CAPTION,X.COL,X.COLGROUP,X.TBODY,X.TD,X.TFOOT,X.TH,X.THEAD,X.TR]);function g1(e,t){let n=t.tagID;h1.has(n)?e.openElements.hasInTableScope(X.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_TABLE,l1(e,t)):R$(e,t)}function _1(e,t){let n=t.tagID;switch(n){case X.CAPTION:case X.TABLE:e.openElements.hasInTableScope(X.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_TABLE,n===X.TABLE&&u1(e,t));break;case X.BODY:case X.COL:case X.COLGROUP:case X.HTML:case X.TBODY:case X.TD:case X.TFOOT:case X.TH:case X.THEAD:case X.TR:break;default:X$(e,t)}}function v1(e,t){switch(t.tagID){case X.HTML:R$(e,t);break;case X.COL:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.TEMPLATE:qQ(e,t);break;default:b1(e,t)}}function y1(e,t){switch(t.tagID){case X.COLGROUP:e.openElements.currentTagId===X.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE);break;case X.TEMPLATE:YQ(e,t);break;case X.COL:break;default:b1(e,t)}}function b1(e,t){e.openElements.currentTagId===X.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE,e._processToken(t))}function x1(e,t){switch(t.tagID){case X.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_ROW;break;case X.TH:case X.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Y.TR,X.TR),e.insertionMode=$.IN_ROW,C1(e,t);break;case X.CAPTION:case X.COL:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE,l1(e,t));break;default:l1(e,t)}}function S1(e,t){let n=t.tagID;switch(t.tagID){case X.TBODY:case X.TFOOT:case X.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE);break;case X.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE,u1(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TD:case X.TH:case X.TR:break;default:u1(e,t)}}function C1(e,t){switch(t.tagID){case X.TH:case X.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_CELL,e.activeFormattingElements.insertMarker();break;case X.CAPTION:case X.COL:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:case X.TR:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,x1(e,t));break;default:l1(e,t)}}function w1(e,t){switch(t.tagID){case X.TR:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY);break;case X.TABLE:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,S1(e,t));break;case X.TBODY:case X.TFOOT:case X.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(X.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,S1(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TD:case X.TH:break;default:u1(e,t)}}function T1(e,t){let n=t.tagID;h1.has(n)?(e.openElements.hasInTableScope(X.TD)||e.openElements.hasInTableScope(X.TH))&&(e._closeTableCell(),C1(e,t)):R$(e,t)}function E1(e,t){let n=t.tagID;switch(n){case X.TD:case X.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_ROW);break;case X.TABLE:case X.TBODY:case X.TFOOT:case X.THEAD:case X.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),w1(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:break;default:X$(e,t)}}function D1(e,t){switch(t.tagID){case X.HTML:R$(e,t);break;case X.OPTION:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e._insertElement(t,J.HTML);break;case X.OPTGROUP:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop(),e._insertElement(t,J.HTML);break;case X.HR:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop(),e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.INPUT:case X.KEYGEN:case X.TEXTAREA:case X.SELECT:e.openElements.hasInSelectScope(X.SELECT)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),t.tagID!==X.SELECT&&e._processStartTag(t));break;case X.SCRIPT:case X.TEMPLATE:qQ(e,t)}}function O1(e,t){switch(t.tagID){case X.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===X.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===X.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop();break;case X.OPTION:e.openElements.currentTagId===X.OPTION&&e.openElements.pop();break;case X.SELECT:e.openElements.hasInSelectScope(X.SELECT)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode());break;case X.TEMPLATE:YQ(e,t)}}function k1(e,t){let n=t.tagID;n===X.CAPTION||n===X.TABLE||n===X.TBODY||n===X.TFOOT||n===X.THEAD||n===X.TR||n===X.TD||n===X.TH?(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),e._processStartTag(t)):D1(e,t)}function A1(e,t){let n=t.tagID;n===X.CAPTION||n===X.TABLE||n===X.TBODY||n===X.TFOOT||n===X.THEAD||n===X.TR||n===X.TD||n===X.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),e.onEndTag(t)):O1(e,t)}function j1(e,t){switch(t.tagID){case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:case X.NOFRAMES:case X.SCRIPT:case X.STYLE:case X.TEMPLATE:case X.TITLE:qQ(e,t);break;case X.CAPTION:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:e.tmplInsertionModeStack[0]=$.IN_TABLE,e.insertionMode=$.IN_TABLE,l1(e,t);break;case X.COL:e.tmplInsertionModeStack[0]=$.IN_COLUMN_GROUP,e.insertionMode=$.IN_COLUMN_GROUP,v1(e,t);break;case X.TR:e.tmplInsertionModeStack[0]=$.IN_TABLE_BODY,e.insertionMode=$.IN_TABLE_BODY,x1(e,t);break;case X.TD:case X.TH:e.tmplInsertionModeStack[0]=$.IN_ROW,e.insertionMode=$.IN_ROW,C1(e,t);break;default:e.tmplInsertionModeStack[0]=$.IN_BODY,e.insertionMode=$.IN_BODY,R$(e,t)}}function M1(e,t){t.tagID===X.TEMPLATE&&YQ(e,t)}function N1(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(X.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):RQ(e,t)}function P1(e,t){t.tagID===X.HTML?R$(e,t):I1(e,t)}function F1(e,t){if(t.tagID===X.HTML){if(e.fragmentContext||(e.insertionMode=$.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===X.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 I1(e,t)}function I1(e,t){e.insertionMode=$.IN_BODY,r$(e,t)}function L1(e,t){switch(t.tagID){case X.HTML:R$(e,t);break;case X.FRAMESET:e._insertElement(t,J.HTML);break;case X.FRAME:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.NOFRAMES:qQ(e,t)}}function R1(e,t){t.tagID===X.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==X.FRAMESET&&(e.insertionMode=$.AFTER_FRAMESET))}function z1(e,t){switch(t.tagID){case X.HTML:R$(e,t);break;case X.NOFRAMES:qQ(e,t)}}function B1(e,t){t.tagID===X.HTML&&(e.insertionMode=$.AFTER_AFTER_FRAMESET)}function V1(e,t){t.tagID===X.HTML?R$(e,t):H1(e,t)}function H1(e,t){e.insertionMode=$.IN_BODY,r$(e,t)}function U1(e,t){switch(t.tagID){case X.HTML:R$(e,t);break;case X.NOFRAMES:qQ(e,t)}}function W1(e,t){t.chars=`�`,e._insertCharacters(t)}function G1(e,t){e._insertCharacters(t),e.framesetOk=!1}function K1(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==J.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function q1(e,t){if(gQ(t))K1(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===J.MATHML?_Q(t):r===J.SVG&&(bQ(t),vQ(t)),yQ(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function J1(e,t){if(t.tagID===X.P||t.tagID===X.BR){K1(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)===J.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}Y.AREA,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BR,Y.COL,Y.EMBED,Y.FRAME,Y.HR,Y.IMG,Y.INPUT,Y.KEYGEN,Y.LINK,Y.META,Y.PARAM,Y.SOURCE,Y.TRACK,Y.WBR;function Y1(e,t){return DQ.parse(e,t)}function X1(e,t,n){typeof e==`string`&&(n=t,t=e,e=null);let r=DQ.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}const Z1={abandonedHeadElementChild:{reason:`Unexpected metadata element after head`,description:"Unexpected element after head. Expected the element before `</head>`",url:!1},abruptClosingOfEmptyComment:{reason:`Unexpected abruptly closed empty comment`,description:"Unexpected `>` or `->`. Expected `-->` to close comments"},abruptDoctypePublicIdentifier:{reason:`Unexpected abruptly closed public identifier`,description:"Unexpected `>`. Expected a closing `\"` or `'` after the public identifier"},abruptDoctypeSystemIdentifier:{reason:`Unexpected abruptly closed system identifier`,description:"Unexpected `>`. Expected a closing `\"` or `'` after the identifier identifier"},absenceOfDigitsInNumericCharacterReference:{reason:`Unexpected non-digit at start of numeric character reference`,description:"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},cdataInHtmlContent:{reason:`Unexpected CDATA section in HTML`,description:"Unexpected `<![CDATA[` in HTML. Remove it, use a comment, or encode special characters instead"},characterReferenceOutsideUnicodeRange:{reason:`Unexpected too big numeric character reference`,description:`Unexpectedly high character reference. Expected character references to be at most hexadecimal 10ffff (or decimal 1114111)`},closingOfElementWithOpenChildElements:{reason:`Unexpected closing tag with open child elements`,description:`Unexpectedly closing tag. Expected other tags to be closed first`,url:!1},controlCharacterInInputStream:{reason:`Unexpected control character`,description:"Unexpected control character `%x`. Expected a non-control code point, 0x00, or ASCII whitespace"},controlCharacterReference:{reason:`Unexpected control character reference`,description:`Unexpectedly control character in reference. Expected a non-control code point, 0x00, or ASCII whitespace`},disallowedContentInNoscriptInHead:{reason:"Disallowed content inside `<noscript>` in `<head>`",description:"Unexpected text character `%c`. Only use text in `<noscript>`s in `<body>`",url:!1},duplicateAttribute:{reason:`Unexpected duplicate attribute`,description:`Unexpectedly double attribute. Expected attributes to occur only once`},endTagWithAttributes:{reason:`Unexpected attribute on closing tag`,description:"Unexpected attribute. Expected `>` instead"},endTagWithTrailingSolidus:{reason:`Unexpected slash at end of closing tag`,description:"Unexpected `%c-1`. Expected `>` instead"},endTagWithoutMatchingOpenElement:{reason:`Unexpected unopened end tag`,description:`Unexpected end tag. Expected no end tag or another end tag`,url:!1},eofBeforeTagName:{reason:`Unexpected end of file`,description:`Unexpected end of file. Expected tag name instead`},eofInCdata:{reason:`Unexpected end of file in CDATA`,description:"Unexpected end of file. Expected `]]>` to close the CDATA"},eofInComment:{reason:`Unexpected end of file in comment`,description:"Unexpected end of file. Expected `-->` to close the comment"},eofInDoctype:{reason:`Unexpected end of file in doctype`,description:"Unexpected end of file. Expected a valid doctype (such as `<!doctype html>`)"},eofInElementThatCanContainOnlyText:{reason:`Unexpected end of file in element that can only contain text`,description:`Unexpected end of file. Expected text or a closing tag`,url:!1},eofInScriptHtmlCommentLikeText:{reason:`Unexpected end of file in comment inside script`,description:"Unexpected end of file. Expected `-->` to close the comment"},eofInTag:{reason:`Unexpected end of file in tag`,description:"Unexpected end of file. Expected `>` to close the tag"},incorrectlyClosedComment:{reason:`Incorrectly closed comment`,description:"Unexpected `%c-1`. Expected `-->` to close the comment"},incorrectlyOpenedComment:{reason:`Incorrectly opened comment`,description:"Unexpected `%c`. Expected `<!--` to open the comment"},invalidCharacterSequenceAfterDoctypeName:{reason:`Invalid sequence after doctype name`,description:"Unexpected sequence at `%c`. Expected `public` or `system`"},invalidFirstCharacterOfTagName:{reason:`Invalid first character in tag name`,description:"Unexpected `%c`. Expected an ASCII letter instead"},misplacedDoctype:{reason:`Misplaced doctype`,description:`Unexpected doctype. Expected doctype before head`,url:!1},misplacedStartTagForHeadElement:{reason:"Misplaced `<head>` start tag",description:"Unexpected start tag `<head>`. Expected `<head>` directly after doctype",url:!1},missingAttributeValue:{reason:`Missing attribute value`,description:"Unexpected `%c-1`. Expected an attribute value or no `%c-1` instead"},missingDoctype:{reason:`Missing doctype before other content`,description:"Expected a `<!doctype html>` before anything else",url:!1},missingDoctypeName:{reason:`Missing doctype name`,description:"Unexpected doctype end at `%c`. Expected `html` instead"},missingDoctypePublicIdentifier:{reason:`Missing public identifier in doctype`,description:"Unexpected `%c`. Expected identifier for `public` instead"},missingDoctypeSystemIdentifier:{reason:`Missing system identifier in doctype`,description:'Unexpected `%c`. Expected identifier for `system` instead (suggested: `"about:legacy-compat"`)'},missingEndTagName:{reason:`Missing name in end tag`,description:"Unexpected `%c`. Expected an ASCII letter instead"},missingQuoteBeforeDoctypePublicIdentifier:{reason:`Missing quote before public identifier in doctype`,description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingQuoteBeforeDoctypeSystemIdentifier:{reason:`Missing quote before system identifier in doctype`,description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingSemicolonAfterCharacterReference:{reason:`Missing semicolon after character reference`,description:"Unexpected `%c`. Expected `;` instead"},missingWhitespaceAfterDoctypePublicKeyword:{reason:`Missing whitespace after public identifier in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceAfterDoctypeSystemKeyword:{reason:`Missing whitespace after system identifier in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBeforeDoctypeName:{reason:`Missing whitespace before doctype name`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenAttributes:{reason:`Missing whitespace between attributes`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:{reason:`Missing whitespace between public and system identifiers in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},nestedComment:{reason:`Unexpected nested comment`,description:"Unexpected `<!--`. Expected `-->`"},nestedNoscriptInHead:{reason:"Unexpected nested `<noscript>` in `<head>`",description:"Unexpected `<noscript>`. Expected a closing tag or a meta element",url:!1},nonConformingDoctype:{reason:`Unexpected non-conforming doctype declaration`,description:'Expected `<!doctype html>` or `<!doctype html system "about:legacy-compat">`',url:!1},nonVoidHtmlElementStartTagWithTrailingSolidus:{reason:`Unexpected trailing slash on start tag of non-void element`,description:"Unexpected `/`. Expected `>` instead"},noncharacterCharacterReference:{reason:`Unexpected noncharacter code point referenced by character reference`,description:`Unexpected code point. Do not use noncharacters in HTML`},noncharacterInInputStream:{reason:`Unexpected noncharacter character`,description:"Unexpected code point `%x`. Do not use noncharacters in HTML"},nullCharacterReference:{reason:`Unexpected NULL character referenced by character reference`,description:`Unexpected code point. Do not use NULL characters in HTML`},openElementsLeftAfterEof:{reason:`Unexpected end of file`,description:`Unexpected end of file. Expected closing tag instead`,url:!1},surrogateCharacterReference:{reason:`Unexpected surrogate character referenced by character reference`,description:`Unexpected code point. Do not use lone surrogate characters in HTML`},surrogateInInputStream:{reason:`Unexpected surrogate character`,description:"Unexpected code point `%x`. Do not use lone surrogate characters in HTML"},unexpectedCharacterAfterDoctypeSystemIdentifier:{reason:`Invalid character after system identifier in doctype`,description:"Unexpected character at `%c`. Expected `>`"},unexpectedCharacterInAttributeName:{reason:`Unexpected character in attribute name`,description:"Unexpected `%c`. Expected whitespace, `/`, `>`, `=`, or probably an ASCII letter"},unexpectedCharacterInUnquotedAttributeValue:{reason:`Unexpected character in unquoted attribute value`,description:"Unexpected `%c`. Quote the attribute value to include it"},unexpectedEqualsSignBeforeAttributeName:{reason:`Unexpected equals sign before attribute name`,description:"Unexpected `%c`. Add an attribute name before it"},unexpectedNullCharacter:{reason:`Unexpected NULL character`,description:"Unexpected code point `%x`. Do not use NULL characters in HTML"},unexpectedQuestionMarkInsteadOfTagName:{reason:`Unexpected question mark instead of tag name`,description:"Unexpected `%c`. Expected an ASCII letter instead"},unexpectedSolidusInTag:{reason:`Unexpected slash in tag`,description:"Unexpected `%c-1`. Expected it followed by `>` or in a quoted attribute value"},unknownNamedCharacterReference:{reason:`Unexpected unknown named character reference`,description:`Unexpected character reference. Expected known named character references`}},Q1=/-[a-z]/g,$1=/%c(?:([-+])(\d+))?/g,e0=/%x/g,t0={2:!0,1:!1,0:null},n0={};function r0(e,t){let n=t||n0,r=n.onerror,i=e instanceof Rw?e:new Rw(e),a=n.fragment?X1:Y1,o=String(i);return KX(a(o,{sourceCodeLocationInfo:!0,onParseError:n.onerror?s:null,scriptingEnabled:!1}),{file:i,space:n.space,verbose:n.verbose});function s(e){let t=e.code,a=i0(t),s=n[a]??!0,c=typeof s==`number`?s:+!!s;if(c){let n=Z1[a],o=new Fw(l(n.reason),{place:{start:{line:e.startLine,column:e.startCol,offset:e.startOffset},end:{line:e.endLine,column:e.endCol,offset:e.endOffset}},ruleId:t,source:`hast-util-from-html`});i.path&&(o.file=i.path,o.name=i.path+`:`+o.name),o.fatal=t0[c],o.note=l(n.description),o.url=n.url===!1?void 0:`https://html.spec.whatwg.org/multipage/parsing.html#parse-error-`+t,r(o)}function l(t){return t.replace($1,n).replace(e0,r);function n(t,n,r){let i=(r?Number.parseInt(r,10):0)*(n===`-`?-1:1);return o0(o.charAt(e.startOffset+i))}function r(){return s0(o.charCodeAt(e.startOffset))}}}}function i0(e){return e.replace(Q1,a0)}function a0(e){return e.charAt(1).toUpperCase()}function o0(e){return e==="`"?"` ` `":e}function s0(e){return`0x`+e.toString(16).toUpperCase()}function c0(e){let t=this;t.compiler=n;function n(n){return gx(n,{...t.data(`settings`),...e,extensions:t.data(`toMarkdownExtensions`)||[]})}}const l0=/^[A-Za-z0-9]{20,}$/,u0=/^(?:\d+s?|(?:\d+h)?(?:\d+m)?(?:\d+s)?)$/;function d0(e){let t=e.toLowerCase();return t===`loom.com`||t===`www.loom.com`}function f0(e){let t=e.pathname.match(/^\/(?:share|embed)\/([A-Za-z0-9]+)\/?$/);if(!t)return null;let n=t[1]??``;return l0.test(n)?n:null}function p0(e){if(typeof e!=`string`||e.length===0)return null;let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`||!d0(t.hostname))return null;let n=f0(t);if(!n)return null;let r=t.searchParams.get(`t`);return{id:n,startRaw:r&&r.length>0&&u0.test(r)?r:null}}function m0(e){return p0(e)!==null}function h0(e){let t=e.toLowerCase();return t===`vimeo.com`||t===`www.vimeo.com`||t===`player.vimeo.com`}function g0(e){if(typeof e!=`string`||e.length===0)return!1;let t;try{t=new URL(e)}catch{return!1}return t.protocol!==`http:`&&t.protocol!==`https:`?!1:h0(t.hostname)}const _0=/^[A-Za-z0-9_-]{11}$/;function v0(e){let t=e.toLowerCase();return t===`youtube.com`||t===`www.youtube.com`||t===`m.youtube.com`||t===`music.youtube.com`||t===`youtu.be`||t===`youtube-nocookie.com`||t===`www.youtube-nocookie.com`}function y0(e){if(e.length===0)return null;if(/^[0-9]+$/.test(e)){let t=Number.parseInt(e,10);return t>0?t:null}let t=e.match(/^(?:([0-9]+)h)?(?:([0-9]+)m)?(?:([0-9]+)s?)?$/);if(!t)return null;let n=t[1]?Number.parseInt(t[1],10):0,r=t[2]?Number.parseInt(t[2],10):0,i=t[3]?Number.parseInt(t[3],10):0,a=n*3600+r*60+i;return a>0?a:null}function b0(e){if(e.hostname.toLowerCase()===`youtu.be`){let t=e.pathname.replace(/^\//,``).split(`/`)[0]??``;return _0.test(t)?t:null}if(e.pathname===`/watch`){let t=e.searchParams.get(`v`)??``;return _0.test(t)?t:null}let t=e.pathname.match(/^\/(?:embed|shorts|v)\/([A-Za-z0-9_-]{11})\/?$/);return t?t[1]??null:null}function x0(e){if(typeof e!=`string`||e.length===0)return null;let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`||!v0(t.hostname))return null;let n=b0(t);if(!n)return null;let r=t.searchParams.get(`t`)??t.searchParams.get(`start`)??``;return{id:n,startSeconds:r.length>0?y0(r):null,noCookie:t.hostname.toLowerCase().endsWith(`youtube-nocookie.com`)}}function S0(e,t){let n=Array.isArray(e.attrs.attributes)?e.attrs.attributes.filter(e=>typeof e==`object`&&!!e&&`type`in e):[],r=e.attrs.props??{},i=new Map,a=new Set;if(t)for(let e of t)e.omitOnDefault===!0&&`defaultValue`in e&&e.defaultValue!==void 0&&i.set(e.name,e.defaultValue),e.type===`string`&&e.required===!1&&e.defaultValue===void 0&&a.add(e.name);for(let[e,t]of Object.entries(r)){let r=n.findIndex(t=>t.type===`mdxJsxAttribute`&&t.name===e);if(i.has(e)&&Object.is(i.get(e),t)){r>=0&&n.splice(r,1);continue}if(a.has(e)&&t===``){r>=0&&n.splice(r,1);continue}if(r>=0){let e=n[r];if(e.type===`mdxJsxAttribute`&&e.value!=null&&typeof e.value==`object`&&e.value.type===`mdxJsxAttributeValueExpression`&&C0(e.value.value,t))continue}let o=w0(e,t);r>=0?n[r]=o:n.push(o)}return n}function C0(e,t){try{return JSON.stringify(JSON.parse(e))===JSON.stringify(t)}catch{return!1}}function w0(e,t){if(t===!0)return{type:`mdxJsxAttribute`,name:e,value:null};if(t===!1)return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:`false`}};if(t==null)return{type:`mdxJsxAttribute`,name:e,value:null};if(typeof t==`string`)return{type:`mdxJsxAttribute`,name:e,value:t};if(typeof t==`number`)return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:JSON.stringify(t)}};if(typeof t==`object`){let n;try{n=JSON.stringify(t)}catch{n=String(t)}return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:n}}}return{type:`mdxJsxAttribute`,name:e,value:String(t)}}function T0(e,t,n,r){return{type:`mdxJsxFlowElement`,name:e,attributes:S0(t,r),children:n.all(t),data:{}}}function E0(e,t,n){let r=t.attrs.props?.children;return{type:`mdxJsxTextElement`,name:e,attributes:S0(t,n),children:typeof r==`string`&&r!==``?[{type:`text`,value:r}]:[],data:{}}}const D0=[{name:`type`,type:`enum`,enumValues:[`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`],defaultValue:`note`,required:!1,description:`Callout variant`},{name:`title`,type:`string`,required:!1,description:`Optional heading shown above the body`},{name:`icon`,type:`string`,required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Lightbulb`)",iconPicker:!0},{name:`color`,type:`string`,required:!1,advanced:!0,description:"Optional accent color override (hex — e.g. `#F05032`)",colorPicker:!0},{name:`collapsible`,type:`boolean`,required:!1,defaultValue:!1,advanced:!0,description:"Render as a foldable `<details>`; in the blockquote form, `> [!TYPE]+` starts open and `> [!TYPE]-` starts closed"},{name:`defaultOpen`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,description:`When collapsible, start in the open state`,hideWhen:e=>e.collapsible!==!0},{name:`children`,type:`reactnode`,required:!0,description:`Callout content`}],O0=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Image source URL`,accept:_p,autoFocus:!0},{name:`alt`,type:`string`,required:!0,description:`Alt text`},{name:`width`,type:`number`,required:!1,advanced:!0,description:`Image width`},{name:`height`,type:`number`,required:!1,advanced:!0,description:`Image height`},{name:`srcset`,type:`string`,required:!1,advanced:!0,description:`Responsive image candidate set (e.g. "x.png 1x, y.png 2x")`},{name:`sizes`,type:`string`,required:!1,advanced:!0,description:`Responsive image sizes hint paired with srcset`},{name:`loading`,type:`enum`,enumValues:[`eager`,`lazy`],defaultValue:`lazy`,required:!1,advanced:!0,omitOnDefault:!0,description:`Native img loading strategy (defaults to lazy)`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`decoding`,type:`enum`,enumValues:[`sync`,`async`,`auto`],defaultValue:`auto`,required:!1,advanced:!0,omitOnDefault:!0,description:`Hint for how the browser should decode the image`},{name:`fetchpriority`,type:`enum`,enumValues:[`high`,`low`,`auto`],defaultValue:`auto`,required:!1,advanced:!0,omitOnDefault:!0,description:`Resource fetch priority hint`},{name:`crossorigin`,type:`enum`,enumValues:[`anonymous`,`use-credentials`],required:!1,advanced:!0,description:`CORS mode for the image fetch`},{name:`referrerpolicy`,type:`string`,required:!1,advanced:!0,description:`Referrer policy for the image fetch (HTML referrerpolicy values)`},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],k0=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Embedded page URL (must start with http:// or https://)`,autoFocus:!0},{name:`title`,type:`string`,required:!1,description:`Iframe title (accessible label for screen readers)`},{name:`width`,type:`string`,required:!1,advanced:!0,description:`Embed width as a CSS length (e.g. "100%", "640px")`,cssLengthInput:!0},{name:`height`,type:`string`,required:!1,advanced:!0,description:`Embed height as a CSS length (e.g. "26rem", "480px")`,cssLengthInput:!0},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],A0=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Video source URL`,accept:Ite,autoFocus:!0},{name:`controls`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:`Show native HTML5 video controls (defaults to true)`,hideWhen:e=>typeof e.src==`string`&&(g0(e.src)||m0(e.src))},{name:`autoplay`,type:`boolean`,required:!1,advanced:!0,description:`Begin playback as soon as possible (usually requires muted)`},{name:`poster`,type:`string`,required:!1,advanced:!0,description:`Poster image URL shown before playback`,accept:_p,hideWhen:e=>typeof e.src==`string`&&(g0(e.src)||m0(e.src))},{name:`width`,type:`number`,required:!1,advanced:!0,description:`Video width`},{name:`height`,type:`number`,required:!1,advanced:!0,description:`Video height`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`muted`,type:`boolean`,required:!1,advanced:!0,description:`Mute audio on load`},{name:`loop`,type:`boolean`,required:!1,advanced:!0,description:`Restart from the beginning when playback ends`,hideWhen:e=>typeof e.src==`string`&&m0(e.src)},{name:`playsinline`,type:`boolean`,required:!1,advanced:!0,description:`Play inline on iOS rather than entering fullscreen`,hideWhen:e=>typeof e.src==`string`&&(g0(e.src)||m0(e.src))},{name:`preload`,type:`enum`,enumValues:[`none`,`metadata`,`auto`],required:!1,advanced:!0,description:`Hint for how much of the video to preload`,hideWhen:e=>typeof e.src==`string`&&(x0(e.src)!==null||g0(e.src)||m0(e.src))},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],j0=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Audio source URL`,accept:Lte,autoFocus:!0},{name:`controls`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:`Show native HTML5 audio controls (defaults to true)`},{name:`autoplay`,type:`boolean`,required:!1,advanced:!0,description:`Begin playback as soon as possible (usually requires muted)`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`muted`,type:`boolean`,required:!1,advanced:!0,description:`Mute audio on load`},{name:`loop`,type:`boolean`,required:!1,advanced:!0,description:`Restart from the beginning when playback ends`},{name:`preload`,type:`enum`,enumValues:[`none`,`metadata`,`auto`],required:!1,advanced:!0,description:`Hint for how much of the audio to preload`}],M0=[{name:`title`,type:`string`,required:!0,description:`Heading shown inside the <summary>`},{name:`defaultOpen`,type:`boolean`,required:!1,defaultValue:!1,description:`When true, the block renders expanded on initial load`},{name:`icon`,type:`string`,required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Rocket`)",iconPicker:!0},{name:`description`,type:`string`,required:!1,advanced:!0,description:`Optional subtitle rendered below the title inside <summary>`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#advanced-options`)"},{name:`name`,type:`string`,required:!1,advanced:!0,description:`HTML5 <details name=> group — siblings with the same name are mutually exclusive`}],N0=[D0[0],D0[1],D0[4],D0[5],D0[6]],P0=[O0[0],O0[1],O0[7]],F0=[M0[0],M0[1],M0[4],M0[5]],I0=[{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`,`justify`],required:!1,defaultValue:`center`,description:"Block alignment from the `<div align>` attribute."},{name:`tag`,type:`string`,required:!1,defaultValue:`div`,hidden:!0,description:`Source wrapper tag (div or center).`},{name:`sourceAttrs`,type:`string`,required:!1,defaultValue:``,hidden:!0,description:`Raw opener-tag attribute bytes preserved for round-trip.`}],L0=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Alt text (alias syntax: `![[file.png|alt text]]`)"}],R0=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (alias syntax: `![[clip.mp4|title]]`)"}],z0=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (alias syntax: `![[song.mp3|title]]`)"}],B0=[{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#install-tabs`)"}],V0=[{name:`label`,type:`string`,required:!0,autoFocus:!0,defaultValue:`Tab`,description:`Tab strip label — shown in the clickable pill at the top`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#tab-npm`)"}],H0=[{name:`formula`,type:`string`,required:!0,autoFocus:!0,language:`latex`,description:`LaTeX math source (rendered with KaTeX in the browser)`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#eq-pythagoras`)"},{name:`language`,type:`string`,required:!1,advanced:!0,description:"Forward-compat hint for the math source language (default `latex`). Reserved for future MathJax / Typst / AsciiMath substrates."}],U0=[H0[0]],W0=[H0[0]],G0=[{name:`chart`,type:`string`,required:!0,hidden:!0,description:`Mermaid chart source (graph / flowchart / sequenceDiagram / class / state / etc.)`}],K0=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Display name override (alias syntax: `![[file.zip|label]]`)"}],q0=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`File URL`,accept:[`*/*`],autoFocus:!0}],J0=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`PDF source URL`,accept:Rte,autoFocus:!0},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Accessible label for the embedded PDF viewer`},{name:`anchor`,type:`string`,required:!1,advanced:!0,description:"PDF viewer parameters as a single URL-fragment string (e.g. `page=3&height=600`)"}],Y0=[{name:`src`,type:`string`,required:!0,description:"Path to the `.excalidraw` board this embed renders",autoFocus:!0},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Accessible label for the embedded board`}],X0=[{name:`src`,type:`string`,required:!0,description:"Path of the source doc, extension-less (e.g. `api-spec`).",autoFocus:!0,documentPicker:!0},{name:`name`,type:`string`,required:!0,legacyNames:[`anchor`],mirrorSourcePicker:`src`,description:"Name of the `<MirrorSource>` block in the source doc."}],Z0=[{name:`name`,type:`string`,required:!0,legacyNames:[`id`],description:"Stable name a `<Mirror>` uses to reference this block.",autoFocus:!0},{name:`children`,type:`reactnode`,required:!0,description:`Block content this MirrorSource owns — paragraphs, callouts, code, nested JSX, anything.`}];function Q0(e){return e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/</g,`<`).replace(/>/g,`>`)}function $0(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function e2(e){let t=e.attrs.props,n=t?.target??``,r=typeof t?.alias==`string`&&t.alias.length>0?t.alias:null,i=typeof t?.anchor==`string`&&t.anchor.length>0?t.anchor:null,a=typeof t?.sourceTarget==`string`?t.sourceTarget:null,o=typeof t?.sourceAnchor==`string`?t.sourceAnchor:null,s=typeof t?.sourceAlias==`string`?t.sourceAlias:null,c=r??(i?`${n}#${i}`:n);return{type:`wikiLinkEmbed`,value:c,data:{target:n,anchor:i,alias:r,sourceTarget:a,sourceAnchor:o,sourceAlias:s},children:[{type:`text`,value:c}]}}const t2=[{name:`Callout`,surface:`canonical`,hasChildren:!0,props:D0,icon:`MessageSquareWarning`,category:`content`,displayName:`Callout`,description:`Alert / admonition with 15 type variants — 5 GFM (note, tip, important, warning, caution) plus 10 extended (abstract, info, todo, success, question, failure, danger, bug, example, quote)`,searchTerms:[`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`,`alert`,`admonition`,`callout`],serialize:(e,t)=>T0(`Callout`,e,t,D0)},{name:`img`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:O0,icon:`Image`,category:`media`,displayName:`Image`,description:`Image with click-to-zoom and HTML-native attributes`,searchTerms:[`image`,`zoom`,`picture`,`photo`],placeholder:{label:`Add an image`},serialize:(e,t)=>T0(`img`,e,t,O0)},{name:`video`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:A0,icon:`SquarePlay`,category:`media`,displayName:`Video`,description:`HTML5 video player with native controls`,searchTerms:[`video`,`media`,`player`,`mp4`,`webm`,`movie`],placeholder:{label:`Add a video`},serialize:(e,t)=>T0(`video`,e,t,A0)},{name:`audio`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:j0,icon:`Volume2`,category:`media`,displayName:`Audio`,description:`HTML5 audio player with native controls`,searchTerms:[`audio`,`sound`,`music`,`mp3`,`podcast`,`player`],placeholder:{label:`Add audio`},serialize:(e,t)=>T0(`audio`,e,t,j0)},{name:`Pdf`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:J0,icon:`FileText`,category:`media`,displayName:`PDF`,description:"Embedded PDF viewer (`#page=N` to open at page N, `#height=N` for viewer height)",searchTerms:[`pdf`,`document`,`embed`,`pdfjs`],placeholder:{label:`Add a PDF`},serialize:(e,t)=>T0(`Pdf`,e,t,J0)},{name:`Excalidraw`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:Y0,icon:`PenTool`,category:`embed`,displayName:`Excalidraw`,description:"Embedded snapshot of an `.excalidraw` board, linking to its canvas editor",searchTerms:[`excalidraw`,`board`,`whiteboard`,`sketch`,`drawing`,`canvas`],serialize:(e,t)=>T0(`Excalidraw`,e,t,Y0)},{name:`File`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:q0,icon:`Paperclip`,category:`media`,displayName:`File`,description:`Downloadable file attachment — inline row with name + size + download link`,searchTerms:[`file`,`attachment`,`download`,`document`,`zip`,`docx`,`doc`],placeholder:{label:`Add a file`},serialize:(e,t)=>T0(`File`,e,t,q0)},{name:`Embed`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:k0,icon:`AppWindow`,category:`embed`,displayName:`Embed`,description:'Inline web embed (iframe) — drop a URL, get a resizable preview pane. For YouTube / Vimeo / Loom prefer `<video src="…">` (player props, click-facade); `<Embed>` auto-rewrites watch URLs as a fallback.',searchTerms:[`embed`,`iframe`,`website`,`page`,`inline`,`frame`,`preview`],placeholder:{label:`Embed a URL`},serialize:(e,t)=>T0(`Embed`,e,t,k0)},{name:`Accordion`,surface:`canonical`,hasChildren:!0,props:M0,icon:`ChevronRight`,category:`content`,displayName:`Accordion`,description:"Standalone expand/collapse via native HTML5 <details>/<summary>. Group siblings with the `name` prop for exclusive-accordion UX.",searchTerms:[`accordion`,`expandable`,`details`,`disclosure`,`collapse`,`fold`],exampleBody:`Body content revealed when the accordion is expanded.`,serialize:(e,t)=>T0(`Accordion`,e,t,M0)},{name:`Toggle`,surface:`canonical`,hasChildren:!0,props:M0,icon:`ChevronRight`,category:`content`,displayName:`Toggle`,description:"Standalone expand/collapse block. Same render + props as `<Accordion>` under a different tag name; pick whichever name the vault already uses.",searchTerms:[`toggle`,`collapsible`,`expand`,`details`,`disclosure`,`fold`],exampleBody:`Body content revealed when the toggle is expanded.`,serialize:(e,t)=>T0(`Toggle`,e,t,M0)},{name:`Tabs`,surface:`canonical`,hasChildren:!0,emptyChildName:`Tab`,props:B0,icon:`LayoutPanelTop`,category:`content`,displayName:`Tabs`,description:"Horizontal tab strip + active panel below. Each `<Tab>` child is one panel; clickable pills at the top switch the active one. Active selection is ephemeral (resets on reload).",searchTerms:[`tabs`,`tabbed`,`panels`,`tabgroup`,`switcher`],exampleBody:`<Tab label="One">Body of the first tab panel.</Tab>
|
|
297
|
+
<Tab label="Two">Body of the second tab panel.</Tab>`,serialize:(e,t)=>T0(`Tabs`,e,t,B0)},{name:`Tab`,surface:`canonical`,hasChildren:!0,props:V0,icon:`PanelTop`,category:`content`,displayName:`Tab`,description:"A single tab panel inside a `<Tabs>` container — carries the strip label and the block-content body.",searchTerms:[`tab`,`panel`],exampleBody:"Panel content — must be nested inside a `<Tabs>` parent.",serialize:(e,t)=>T0(`Tab`,e,t,V0)},{name:`Math`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:H0,icon:`Sigma`,category:`content`,displayName:`Math`,description:`Block math equation rendered with KaTeX from a LaTeX source string`,searchTerms:[`math`,`latex`,`equation`,`formula`,`katex`,`tex`],serialize:(e,t)=>T0(`Math`,e,t,H0)},{name:`MermaidFence`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:G0,icon:`Workflow`,category:`content`,displayName:`Mermaid`,placeholder:{label:`Add a Mermaid diagram`},description:"Diagram rendered from Mermaid source (flowchart, sequence, class, state, ER, gantt, pie). Authored exclusively as ` ```mermaid ` fenced code.",searchTerms:[`mermaid`,`diagram`,`flowchart`,`graph`,`sequence`,`sequencediagram`,`class`,`state`,`er`,`erdiagram`,`gantt`,`pie`,`chart`],serialize:e=>({type:`code`,lang:`mermaid`,meta:null,value:e.attrs.props?.chart??``})},{name:`Mirror`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:X0,icon:`CopyPlus`,category:`content`,displayName:`Mirror`,description:"Render a read-only copy of a `<MirrorSource>` block from another doc. Use to keep the same content in sync across multiple docs without copy-paste — edits land at the source, every Mirror reflects the change.",searchTerms:[`mirror`,`sync`,`synced`,`transclude`,`embed`,`reference`,`shared block`],serialize:(e,t)=>T0(`Mirror`,e,t,X0)},{name:`MirrorSource`,surface:`canonical`,hasChildren:!0,props:Z0,icon:`GitBranch`,category:`content`,displayName:`Mirror Source`,description:'Mark a block as the source of truth for content that appears in multiple docs. Wrap any block content; `<Mirror src="…" name="…">` references render this verbatim read-only at every call-site. Edit here, propagate everywhere.',searchTerms:[`mirror source`,`sync source`,`source block`,`master block`,`shared`],exampleBody:"Authoritative content lives inside this block — edits here propagate to every `<Mirror>` that references this name.",serialize:(e,t)=>T0(`MirrorSource`,e,t,Z0)},{name:`GFMCallout`,surface:`compat`,hasChildren:!0,props:N0,icon:`MessageSquareWarning`,category:`content`,displayName:`GFM Callout`,description:"GFM blockquote alert (`> [!NOTE]`) — read-only compat. Preserves `> [!NOTE]` syntax on round-trip; insert a fresh Callout block for the full prop surface.",rendersAs:`Callout`,translateProps:e=>e,serialize:(e,t)=>{let n=e.attrs.props,r=new Set([`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`]),i=n?.type??`note`;return{type:`blockquote`,children:[{type:`html`,value:`[!${(r.has(i.toLowerCase())?i:`note`).toUpperCase()}]${n?.collapsible?n.defaultOpen===!1?`-`:`+`:``}${n?.title?` ${n.title}`:``}`},...t.all(e).filter(e=>{if(e.type!==`paragraph`)return!0;let t=e;return Array.isArray(t.children)&&t.children.length>0})]}}},{name:`CommonMarkImage`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:P0,icon:`Image`,category:`media`,displayName:`CommonMark Image`,description:'CommonMark image (``) — read-only compat. Preserves `` syntax on round-trip; insert a fresh Image block for the full HTML-native attribute surface (srcset, sizes, decoding, etc.).',rendersAs:`img`,translateProps:e=>e,serialize:e=>{let t=e.attrs.props;return{type:`paragraph`,children:[{type:`image`,url:ju(t?.src??``,t?.sourceUrl),alt:t?.alt??``,title:t?.title??null}]}}},{name:`WikiEmbedImage`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:L0,icon:`ZoomIn`,category:`media`,displayName:`Wiki Embed Image`,description:"`![[file.png]]` wiki-embed — read-only compat. Edit the alt-text via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`img`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,alt:t??n}},serialize:e2},{name:`WikiEmbedVideo`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:R0,icon:`Film`,category:`media`,displayName:`Wiki Embed Video`,description:"`![[clip.mp4]]` wiki-embed — read-only compat. Edit the title via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`video`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,title:t??n}},serialize:e2},{name:`WikiEmbedAudio`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:z0,icon:`Volume2`,category:`media`,displayName:`Wiki Embed Audio`,description:"`![[song.mp3]]` wiki-embed — read-only compat. Edit the title via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`audio`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,title:t??n}},serialize:e2},{name:`WikiEmbedFile`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:K0,icon:`Paperclip`,category:`media`,displayName:`Wiki Embed File`,description:"`![[file.zip]]` wiki-embed — read-only compat for arbitrary downloadable attachments. Renders through the `File` canonical (inline row with file-up icon + bold name + optional dim size). Edit the display name via the alias slot.",rendersAs:`File`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.size==`string`&&e.size.length>0?e.size:null;return{src:e.src,name:t??void 0,size:n??void 0}},serialize:e2},{name:`HtmlDetailsAccordion`,surface:`compat`,hasChildren:!0,props:F0,icon:`ChevronRight`,category:`content`,displayName:`HTML5 Details`,description:"HTML5 `<details><summary>` collapsible — read-only compat. Preserves `<details>` syntax on round-trip; insert a fresh Accordion block for icon / description / group-name props.",rendersAs:`Accordion`,translateProps:e=>e,serialize:(e,t)=>{let n=e.attrs.props,r=n?.defaultOpen?` open`:``,i=n?.name?` name="${Q0(n.name)}"`:``,a=n?.id?` id="${Q0(n.id)}"`:``,o=n?.title?.trim(),s=o?`<summary>${$0(o)}</summary>`:``;return{type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:[],children:t.all(e),data:{htmlBoundary:{opener:`<details${r}${i}${a}>\n${s}`,closer:`</details>`}}}}},{name:`HtmlAlignBlock`,surface:`canonical`,hasChildren:!0,props:I0,icon:`AlignCenter`,category:`content`,displayName:`Align block`,description:"GitHub-style `<div align>` wrapper. Children render as normal blocks with the alignment applied; the `<div align>` syntax is preserved on round-trip.",searchTerms:[`align`,`center`,`centered`,`div`],serialize:(e,t)=>{let n=e.attrs.props,r=n?.tag===`center`?`center`:`div`,i=typeof n?.align==`string`&&n.align?n.align:null,a=typeof n?.sourceAttrs==`string`?n.sourceAttrs:``,o=/(\balign\s*=\s*)(?:"[^"]*"|'[^']*'|[^\s"'<>]+)/i;return i!==null&&(r===`div`||i!==`center`)?a=o.test(a)?a.replace(o,`$1"${Q0(i)}"`):`${a} align="${Q0(i)}"`:(i===null||r===`center`&&i===`center`)&&(a=a.replace(RegExp(`\\s*${o.source}`,`i`),``)),{type:`mdxJsxFlowElement`,name:`HtmlAlignBlock`,attributes:[],children:t.all(e),data:{htmlBoundary:{opener:`<${r}${a}>`,closer:`</${r}>`}}}}},{name:`DollarMath`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:U0,icon:`Sigma`,category:`content`,displayName:`Dollar Math`,description:"Block math via `$$…$$` syntax — read-only compat. Preserves `$$…$$` form on round-trip; insert a fresh Math block for the full prop surface (id, language).",rendersAs:`Math`,translateProps:e=>e,serialize:e=>({type:`math`,value:e.attrs.props?.formula??``})},{name:`MathFence`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:W0,icon:`Sigma`,category:`content`,displayName:`Math Fence`,description:"Block math via ` ```math ` fenced code syntax — read-only compat. Preserves the fence form on round-trip; insert a fresh Math block for the full prop surface (id, language).",rendersAs:`Math`,translateProps:e=>e,serialize:e=>({type:`code`,lang:`math`,meta:null,value:e.attrs.props?.formula??``})}];function n2(e,t){if(e==null)return!0;if(typeof e==`string`){if(t?.type===`number`){let t=Number(e);return Number.isNaN(t)?e:t}return t?.type===`boolean`?e===`true`:e}try{return JSON.parse(e.value)}catch{return e.value}}function r2(e){let t=e.legacyNames??[];if(t.length===0)return e.description;let n=`Also read as ${t.map(e=>`\`${e}\``).join(` or `)}; write \`${e.name}\` instead.`;return e.description===void 0?n:`${e.description} ${n}`}const i2={name:`*`,surface:`canonical`,hasChildren:!0,props:[],description:`Unregistered component — children editable as markdown`,serialize:(e,t)=>T0(e.attrs.componentName||`*`,e,t)};function a2(){let e=new Map;e.set(`*`,i2);for(let t of t2)e.set(t.name,t);return{get(t){return e.get(t)},getOrWildcard(t){return e.get(t)??e.get(`*`)},set(t,n){e.set(t,n)},has(t){return e.has(t)},entries(){return e.entries()}}}function o2(){let e=globalThis;return e.__okYpsCounters||={block:0,inline:0},e.__okYpsCounters}const s2={parseFallback:{blockLevel:0,wholeDoc:0,wholeDocBudget:0},jsxRenderFailure:{},jsxAutoConvertFailed:{},jsxAutoConvertSucceeded:{},jsxActionAborted:{},jsxPropDropped:{},jsxMoveFailed:{},jsxStuckCopyFailed:{},jsxStuckDeleteFailed:{},jsxPopoverCloseRestoreFailed:{},jsxKeyboardDeleteFailed:{},jsxChromeDeleteFailed:{},blockGripClickSelectFailed:{},jsxArrowNodeSelectFailed:{}};function c2(){s2.parseFallback.blockLevel++}function l2(){s2.parseFallback.wholeDoc++}function u2(){s2.parseFallback.wholeDocBudget++}function d2(){let e=o2();return{parseFallback:{...s2.parseFallback},ypsMismatch:{block:e.block,inline:e.inline},jsxRenderFailure:{...s2.jsxRenderFailure},jsxAutoConvertFailed:{...s2.jsxAutoConvertFailed},jsxAutoConvertSucceeded:{...s2.jsxAutoConvertSucceeded},jsxActionAborted:{...s2.jsxActionAborted},jsxPropDropped:{...s2.jsxPropDropped},jsxMoveFailed:{...s2.jsxMoveFailed},jsxStuckCopyFailed:{...s2.jsxStuckCopyFailed},jsxStuckDeleteFailed:{...s2.jsxStuckDeleteFailed},jsxPopoverCloseRestoreFailed:{...s2.jsxPopoverCloseRestoreFailed},jsxKeyboardDeleteFailed:{...s2.jsxKeyboardDeleteFailed},jsxChromeDeleteFailed:{...s2.jsxChromeDeleteFailed},blockGripClickSelectFailed:{...s2.blockGripClickSelectFailed},jsxArrowNodeSelectFailed:{...s2.jsxArrowNodeSelectFailed}}}function f2(){return{enter:{mdxFlowExpression:m2,mdxTextExpression:h2},exit:{mdxFlowExpression:g2,mdxFlowExpressionChunk:_2,mdxTextExpression:g2,mdxTextExpressionChunk:_2}}}function p2(){return{handlers:{mdxFlowExpression:v2,mdxTextExpression:v2},unsafe:[{character:`{`,inConstruct:[`phrasing`]},{atBreak:!0,character:`{`}]}}function m2(e){this.enter({type:`mdxFlowExpression`,value:``},e),this.buffer()}function h2(e){this.enter({type:`mdxTextExpression`,value:``},e),this.buffer()}function g2(e){let t=this.resume(),n=e.estree,r=this.stack[this.stack.length-1];r.type===`mdxFlowExpression`||r.type,this.exit(e),r.value=t,n&&(r.data={estree:n})}function _2(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function v2(e,t,n){let r=e.value||``;return`{`+n.indentLines(r,function(e,t,n){return(t===0||n?``:` `)+e})+`}`}const y2=/["&'<>`]/g,b2=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,x2=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,S2=/[|\\{}()[\]^$+*?.]/g,C2=new WeakMap;function w2(e,t){if(e=e.replace(t.subset?T2(t.subset):y2,r),t.subset||t.escapeOnly)return e;return e.replace(b2,n).replace(x2,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function T2(e){let t=C2.get(e);return t||(t=E2(e),C2.set(e,t)),t}function E2(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(S2,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}function D2(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function O2(e,t){return w2(e,Object.assign({format:D2},t))}function qoe(){return{canContainEols:[`mdxJsxTextElement`],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:d,mdxJsxFlowTagExpressionAttribute:f,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:o,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:d,mdxJsxTextTagExpressionAttribute:f,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:o},exit:{mdxJsxFlowTagClosingMarker:s,mdxJsxFlowTagNamePrimary:c,mdxJsxFlowTagNameMember:l,mdxJsxFlowTagNameLocal:u,mdxJsxFlowTagExpressionAttribute:p,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:m,mdxJsxFlowTagAttributeNameLocal:h,mdxJsxFlowTagAttributeValueLiteral:g,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:_,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:v,mdxJsxFlowTag:y,mdxJsxTextTagClosingMarker:s,mdxJsxTextTagNamePrimary:c,mdxJsxTextTagNameMember:l,mdxJsxTextTagNameLocal:u,mdxJsxTextTagExpressionAttribute:p,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:m,mdxJsxTextTagAttributeNameLocal:h,mdxJsxTextTagAttributeValueLiteral:g,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:_,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:v,mdxJsxTextTag:y}};function e(){this.buffer()}function t(e){return{line:e.line,column:e.column,offset:e.offset}}function n(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function r(e){let t={name:void 0,attributes:[],close:!1,selfClosing:!1,start:e.start,end:e.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=t,this.buffer()}function i(e){if(this.data.mdxJsxTagStack.length===0)throw new Fw("Unexpected closing slash `/` in tag, expected an open tag first",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-closing-slash`)}function a(e){if(this.data.mdxJsxTag.close)throw new Fw(`Unexpected attribute in closing tag, expected the end of the tag`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-attribute`)}function o(e){if(this.data.mdxJsxTag.close)throw new Fw("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-self-closing-slash`)}function s(){let e=this.data.mdxJsxTag;e.close=!0}function c(e){let t=this.data.mdxJsxTag;t.name=this.sliceSerialize(e)}function l(e){let t=this.data.mdxJsxTag;t.name+=`.`+this.sliceSerialize(e)}function u(e){let t=this.data.mdxJsxTag;t.name+=`:`+this.sliceSerialize(e)}function d(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxAttribute`,name:``,value:null,position:{start:t(e.start),end:void 0}})}function f(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxExpressionAttribute`,value:``,position:{start:t(e.start),end:void 0}}),this.buffer()}function p(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i=e.estree;r.value=this.resume(),r.position,r.position.end=t(e.end),i&&(r.data={estree:i})}function m(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name=this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function h(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name+=`:`+this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function g(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.value=Lae(this.resume(),{nonTerminated:!1}),r.position,r.position.end=t(e.end)}function _(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i={type:`mdxJsxAttributeValueExpression`,value:this.resume()},a=e.estree;a&&(i.data={estree:a}),r.value=i,r.position,r.position.end=t(e.end)}function v(){let e=this.data.mdxJsxTag;e.selfClosing=!0}function y(e){let t=this.data.mdxJsxTag,n=this.data.mdxJsxTagStack,r=n[n.length-1];if(t.close&&r.name!==t.name)throw new Fw("Unexpected closing tag `"+S(t)+"`, expected corresponding closing tag for `"+S(r)+"` ("+jw(r)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`);this.resume(),t.close?n.pop():this.enter({type:e.type===`mdxJsxTextTag`?`mdxJsxTextElement`:`mdxJsxFlowElement`,name:t.name||null,attributes:t.attributes,children:[]},e,b),t.selfClosing||t.close?this.exit(e,x):n.push(t)}function b(e,t){let n=this.data.mdxJsxTagStack,r=n[n.length-1],i=e?" before the end of `"+e.type+"`":``,a=e?{start:e.start,end:e.end}:void 0;throw new Fw("Expected a closing tag for `"+S(r)+"` ("+jw({start:t.start,end:t.end})+`)`+i,a,`mdast-util-mdx-jsx:end-tag-mismatch`)}function x(e,t){let n=this.data.mdxJsxTag;throw new Fw("Expected the closing tag `"+S(n)+"` either after the end of `"+t.type+"` ("+jw(t.end)+") or another opening tag after the start of `"+t.type+"` ("+jw(t.start)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`)}function S(e){return`<`+(e.close?`/`:``)+(e.name||``)+`>`}}function k2(e){let t=e||{},n=t.quote||`"`,r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,a=t.printWidth||1/0,o=n===`"`?`'`:`"`;if(n!==`"`&&n!==`'`)throw Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return s.peek=N2,{handlers:{mdxJsxFlowElement:s,mdxJsxTextElement:s},unsafe:[{character:`<`,inConstruct:[`phrasing`]},{atBreak:!0,character:`<`}],fences:!0,resourceLink:!0};function s(e,t,s,c){let l=e.type===`mdxJsxFlowElement`,u=e.name?!e.children||e.children.length===0:!1,d=M2(j2(s)),f=s.createTracker(c),p=s.createTracker(c),m=[],h=(l?d:``)+`<`+(e.name||``),g=s.enter(e.type);if(f.move(h),p.move(h),e.attributes&&e.attributes.length>0){if(!e.name)throw Error(`Cannot serialize fragment w/ attributes`);let t=-1;for(;++t<e.attributes.length;){let i=e.attributes[t],a;if(i.type===`mdxJsxExpressionAttribute`)a=`{`+(i.value||``)+`}`;else{if(!i.name)throw Error(`Cannot serialize attribute w/o name`);let e=i.value,t=i.name,s=``;if(e!=null){if(typeof e==`object`)s=`{`+(e.value||``)+`}`;else{let t=r&&xv(e,n)>xv(e,o)?o:n;s=t+O2(e,{subset:[t]})+t}}a=t+(s?`=`:``)+s}m.push(a)}}let _=!1,v=m.join(` `);l&&(/\r?\n|\r/.test(v)||f.current().now.column+v.length+(u?i?2:3:1)>a)&&(_=!0);let y=f,b=h;if(_){y=p;let e=-1;for(;++e<m.length;)m[e]=d+` `+m[e];b+=y.move(`
|
|
298
298
|
`+m.join(`
|
|
299
299
|
`)+`
|
|
300
300
|
`+d)}else v&&(b+=y.move(` `+v));return u&&(b+=y.move((i||_?``:` `)+`/`)),b+=y.move(`>`),e.children&&e.children.length>0&&(e.type===`mdxJsxTextElement`?b+=y.move(s.containerPhrasing(e,{...y.current(),before:`>`,after:`<`})):(y.shift(2),b+=y.move(`
|
|
301
|
-
`),b+=y.move(
|
|
302
|
-
`))),u||(b+=y.move((l?d:``)+`</`+(e.name||``)+`>`)),g(),b}}function
|
|
301
|
+
`),b+=y.move(A2(e,s,y.current())),b+=y.move(`
|
|
302
|
+
`))),u||(b+=y.move((l?d:``)+`</`+(e.name||``)+`>`)),g(),b}}function A2(e,t,n){let r=t.indexStack,i=e.children,a=t.createTracker(n),o=M2(j2(t)),s=[],c=-1;for(r.push(-1);++c<i.length;){let n=i[c];r[r.length-1]=c;let l={before:`
|
|
303
303
|
`,after:`
|
|
304
304
|
`,...a.current()},u=t.handle(n,e,t,l),d=n.type===`mdxJsxFlowElement`?u:t.indentLines(u,function(e,t,n){return(n?``:o)+e});s.push(a.move(d)),n.type!==`list`&&(t.bulletLastUsed=void 0),c<i.length-1&&s.push(a.move(`
|
|
305
305
|
|
|
306
|
-
`))}return r.pop(),s.join(``)}function
|
|
306
|
+
`))}return r.pop(),s.join(``)}function j2(e){let t=0,n=e.stack.length;for(;--n>-1;){let r=e.stack[n];if(r===`blockquote`||r===`listItem`)break;r===`mdxJsxFlowElement`&&t++}return t}function M2(e){return` `.repeat(e)}function N2(){return`<`}function P2(){return{enter:{mdxjsEsm:I2},exit:{mdxjsEsm:L2,mdxjsEsmData:R2}}}function F2(){return{handlers:{mdxjsEsm:z2}}}function I2(e){this.enter({type:`mdxjsEsm`,value:``},e),this.buffer()}function L2(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e);let r=e.estree;n.value=t,r&&(n.data={estree:r})}function R2(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function z2(e){return e.value||``}function B2(){return[f2(),qoe(),P2()]}function V2(e){return{extensions:[p2(),k2(e),F2()]}}function H2(e){return`\x1B[33m`+e+`\x1B[39m`}const U2={}.hasOwnProperty,W2=Symbol(`continue`),G2=Symbol(`exit`),K2=Symbol(`skip`);function q2(e,t){let n,r;typeof t==`function`?n=t:t&&typeof t==`object`&&(t.enter&&(n=t.enter),t.leave&&(r=t.leave)),i(e,void 0,void 0,[])();function i(e,t,a,o){return Y2(e)&&(s.displayName=`node (`+H2(e.type)+`)`),s;function s(){let s=n?J2(n(e,t,a,o)):[];if(s[0]===G2)return s;if(s[0]!==K2){let t;for(t in e)if(U2.call(e,t)&&e[t]&&typeof e[t]==`object`&&t!==`data`&&t!==`position`){let n=o.concat(e),r=e[t];if(Array.isArray(r)){let e=r,a=0;for(;a>-1&&a<e.length;){let r=e[a];if(Y2(r)){let e=i(r,t,a,n)();if(e[0]===G2)return e;a=typeof e[1]==`number`?e[1]:a+1}else a++}}else if(Y2(r)){let e=i(r,t,void 0,n)();if(e[0]===G2)return e}}}return r?J2(r(e,t,a,o)):s}}}function J2(e){return Array.isArray(e)?e:typeof e==`number`?[W2,e]:[e]}function Y2(e){return!!(e&&typeof e==`object`&&`type`in e&&typeof e.type==`string`&&e.type.length>0)}function X2(e,t){let n=t.prefix||``,r=t.suffix||``,i=Object.assign({},t.acornOptions),a=[],o=[],s=i.onComment,c=i.onToken,l=!1,u,d,f=Object.assign({},i,{onComment:a,preserveParens:!0});c&&(f.onToken=o);let p=Q2(e,t.tokenTypes),m=p.value,h=n+m+r,g=t.expression&&Z2(m);if(g&&!t.allowEmpty)throw new Fw(`Unexpected empty expression`,{place:v(0),ruleId:`unexpected-empty-expression`,source:`micromark-extension-mdx-expression`});try{u=t.expression&&!g?t.acorn.parseExpressionAt(h,0,f):t.acorn.parse(h,f)}catch(e){let t=e,r=v(t.pos);t.message=String(t.message).replace(/ \(\d+:\d+\)$/,``),t.pos=r.offset,t.loc={line:r.line,column:r.column-1},d=t,l=t.raisedAt>=n.length+m.length||t.message===`Unterminated comment`}if(u&&t.expression&&!g){if(Z2(h.slice(u.end,h.length-r.length)))u={type:`Program`,start:0,end:n.length+m.length,body:[{type:`ExpressionStatement`,expression:u,start:0,end:n.length+m.length}],sourceType:`module`,comments:[]};else{let e=v(u.end),t=Error(`Unexpected content after expression`);t.pos=e.offset,t.loc={line:e.line,column:e.column-1},d=t,u=void 0}}if(u){if(u.comments=a,q2(u,function(e,t,n,r){let i=r[r.length-1],a=t;e.type===`ParenthesizedExpression`&&i&&a&&(typeof n==`number`&&(i=i[a],a=n),i[a]=e.expression),_(e)}),Array.isArray(s))s.push(...a);else if(typeof s==`function`)for(let e of a)s(e.type===`Block`,e.value,e.start,e.end,e.loc.start,e.loc.end);for(let e of o)e.end<=n.length||e.start-n.length>=m.length||(_(e),Array.isArray(c)?c.push(e):c(e))}return{estree:u,error:d,swallow:l};function _(e){let t=v(e.start),n=v(e.end);e.start=t.offset,e.end=n.offset,e.loc={start:{line:t.line,column:t.column-1,offset:t.offset},end:{line:n.line,column:n.column-1,offset:n.offset}},e.range=[e.start,e.end]}function v(e){let r=e-n.length;r<0?r=0:r>m.length&&(r=m.length);let i=$2(p.stops,r);return i||={line:t.start.line,column:t.start.column,offset:t.start.offset},i}}function Z2(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,``).replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,``))}function Q2(e,t){let n={value:``,stops:[]},r=-1;for(;++r<e.length;){let i=e[r];if(i[0]===`enter`){let e=i[1].type;if(e===`lineEnding`||t.includes(e)){let e=i[2].sliceStream(i[1]);for(;e.length>0&&e[0]===-1;)e.shift();let t=e4(e);n.stops.push([n.value.length,i[1].start]),n.value+=t,n.stops.push([n.value.length,i[1].end])}}}return n}function $2(e,t){let n=0;for(;n<e.length&&e[n][0]<=t;)n+=1;if(n===0)return;let[r,i]=e[n-1],a=t-r;return{line:i.line,column:i.column+a,offset:i.offset+a}}function e4(e){let t=-1,n=[],r;for(;++t<e.length;){let i=e[t],a;if(typeof i==`string`)a=i;else switch(i){case-5:a=`\r`;break;case-4:a=`
|
|
307
307
|
`;break;case-3:a=`\r
|
|
308
|
-
`;break;case-2:a=` `;break;case-1:if(r)continue;a=` `;break;default:a=String.fromCharCode(i)}r=i===-2,n.push(a)}return n.join(``)}function $2(e){let t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=e4(n.start,r[0]||t.start),a=e4(n.end,r[1]||t.end);if(i&&a)return{start:i,end:a}}function e4(e,t){if(e&&typeof e==`object`){let n=`line`in e?t4(e.line):void 0,r=`column`in e?t4(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:t4(t)}}}function t4(e){return typeof e==`number`&&e>-1?e:void 0}const n4=`https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression`,r4=`#unexpected-type-in-code-expected-an-object-spread-spread`;function i4(e,t,n,r,i,a,o,s,c,l,u){let d=this,f=this.events.length+3,p=0,m,h;return g;function g(t){return e.enter(n),e.enter(r),e.consume(t),e.exit(r),m=d.now(),_}function _(u){if(u===null){if(h)throw h;let e=new Fw("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:d.now(),ruleId:`unexpected-eof`,source:`micromark-extension-mdx-expression`});throw e.url=n4+`#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-`,e}if(B(u))return e.enter(`lineEnding`),e.consume(u),e.exit(`lineEnding`),y;if(u===125&&p===0){let p=a?a4.call(d,a,o,i,f,m,l||!1,c||!1):{type:`ok`,estree:void 0};if(p.type===`ok`){e.enter(r),e.consume(u),e.exit(r);let i=e.exit(n);return s&&p.estree&&Object.assign(i,{estree:p.estree}),t}return h=p.message,e.enter(i),e.consume(u),v}return e.enter(i),v(u)}function v(t){return t===125&&p===0||t===null||B(t)?(e.exit(i),_(t)):(t===123&&!a?p+=1:t===125&&--p,e.consume(t),v)}function y(t){let n=d.now();if(n.line!==m.line&&!u&&d.parser.lazy[n.line]){let e=new Fw("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:d.now(),ruleId:`unexpected-lazy`,source:`micromark-extension-mdx-expression`});throw e.url=n4+`#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed`,e}return Av(t)?CS(e,_,`linePrefix`,3)(t):_(t)}}function a4(e,t,n,r,i,a,o){let s=J2(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:a,prefix:o?`({`:``,suffix:o?`})`:``}),c=s.estree;if(o&&c){let e=c.body[0];if(e.type!==`ExpressionStatement`||e.expression.type!==`ObjectExpression`){let t=$2(e),n=new Fw("Unexpected `"+e.type+"` in code: expected an object spread (`{...spread}`)",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=n4+r4,n}if(e.expression.properties[1]){let t=new Fw(`Unexpected extra content in spread: only a single spread is supported`,{place:$2(e.expression.properties[1]).start,ruleId:`spread-extra`,source:`micromark-extension-mdx-expression`});throw t.url=n4+`#unexpected-extra-content-in-spread-only-a-single-spread-is-supported`,t}if(e.expression.properties[0]&&e.expression.properties[0].type!==`SpreadElement`){let t=$2(e.expression.properties[0]),n=new Fw("Unexpected `"+e.expression.properties[0].type+"` in code: only spread elements are supported",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=n4+r4,n}}if(s.error){let e=new Fw(`Could not parse expression with acorn`,{cause:s.error,place:{line:s.error.loc.line,column:s.error.loc.column+1,offset:s.error.pos},ruleId:`acorn`,source:`micromark-extension-mdx-expression`});return e.url=n4+`#could-not-parse-expression-with-acorn`,{type:`nok`,message:e}}return{type:`ok`,estree:c}}function o4(e){let t=e||{},n=t.addResult,r=t.acorn,i=t.spread,a=t.allowEmpty,o;if(a??=!0,r){if(!r.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");o=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions)}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{123:{name:`mdxFlowExpression`,tokenize:s,concrete:!0}},text:{123:{name:`mdxTextExpression`,tokenize:c}}};function s(e,t,s){let c=this;return l;function l(e){return u(e)}function u(t){return i4.call(c,e,d,`mdxFlowExpression`,`mdxFlowExpressionMarker`,`mdxFlowExpressionChunk`,r,o,n,i,a)(t)}function d(t){return Av(t)?CS(e,f,`whitespace`)(t):f(t)}function f(n){let r=c.parser.constructs.flow[60],i=(Array.isArray(r)?r:r?[r]:[]).find(function(e){return e.name===`mdxJsxFlowTag`});return n===60&&i?e.attempt(i,f,s)(n):n===null||B(n)?t(n):s(n)}}function c(e,t){let s=this;return c;function c(c){return i4.call(s,e,t,`mdxTextExpression`,`mdxTextExpressionMarker`,`mdxTextExpressionChunk`,r,o,n,i,a,!0)(c)}}}const Joe=/[$_\p{ID_Start}]/u,Yoe=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,Xoe=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,Zoe={};function s4(e){return e?Joe.test(String.fromCodePoint(e)):!1}function c4(e,t){let n=(t||Zoe).jsx?Xoe:Yoe;return e?n.test(String.fromCodePoint(e)):!1}const l4=`https://github.com/micromark/micromark-extension-mdx-jsx`;function u4(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,ee,te,ne,re,ie,ae){let oe=this,se,ce;return le;function le(t){return e.enter(s),e.enter(c),e.consume(t),e.exit(c),ue}function ue(e){return kv(e)?n(e):(se=E,Ae(e))}function E(t){if(t===47)return e.enter(l),e.consume(t),e.exit(l),se=de,Ae;if(t===62)return ke(t);if(t!==null&&t>=0&&s4(t))return e.enter(d),e.enter(f),e.consume(t),fe;Ne(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===33?" (note: to create a comment in MDX, use `{/* text */}`)":``))}function de(t){if(t===62)return ke(t);if(t!==null&&t>=0&&s4(t))return e.enter(d),e.enter(f),e.consume(t),fe;Ne(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===42||t===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function fe(t){if(t!==null&&t>=0&&c4(t,{jsx:!0}))return e.consume(t),fe;if(t===46||t===47||t===58||t===62||t===123||kv(t)||Mv(t))return e.exit(f),se=pe,Ae(t);Ne(t,`in name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function pe(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),se=D,Ae;if(t===58)return e.enter(h),e.consume(t),e.exit(h),se=he,Ae;if(t===47||t===62||t===123||t!==null&&t>=0&&s4(t))return e.exit(d),ve(t);Ne(t,`after name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function D(t){if(t!==null&&t>=0&&s4(t))return e.enter(m),e.consume(t),O;Ne(t,`before member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function O(t){if(t!==null&&t>=0&&c4(t,{jsx:!0}))return e.consume(t),O;if(t===46||t===47||t===62||t===123||kv(t)||Mv(t))return e.exit(m),se=me,Ae(t);Ne(t,`in member name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function me(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),se=D,Ae;if(t===47||t===62||t===123||t!==null&&t>=0&&s4(t))return e.exit(d),ve(t);Ne(t,`after member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function he(t){if(t!==null&&t>=0&&s4(t))return e.enter(g),e.consume(t),ge;Ne(t,`before local name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===43||t!==null&&t>46&&t<58?" (note: to create a link in MDX, use `[text](url)`)":``))}function ge(t){if(t!==null&&t>=0&&c4(t,{jsx:!0}))return e.consume(t),ge;if(t===47||t===62||t===123||kv(t)||Mv(t))return e.exit(g),se=_e,Ae(t);Ne(t,`in local name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function _e(t){if(t===47||t===62||t===123||t!==null&&t>=0&&s4(t))return e.exit(d),ve(t);Ne(t,`after local name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ve(t){if(t===47)return e.enter(u),e.consume(t),e.exit(u),se=Oe,Ae;if(t===62)return ke(t);if(t===123)return i4.call(oe,e,ye,_,v,y,r,i,a,!0,!1,o)(t);if(t!==null&&t>=0&&s4(t))return e.enter(b),e.enter(x),e.enter(S),e.consume(t),be;Ne(t,`before attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ye(e){return se=ve,Ae(e)}function be(t){if(t!==null&&t>=0&&c4(t,{jsx:!0}))return e.consume(t),be;if(t===47||t===58||t===61||t===62||t===123||kv(t)||Mv(t))return e.exit(S),se=xe,Ae(t);Ne(t,`in attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function xe(t){if(t===58)return e.enter(C),e.consume(t),e.exit(C),se=Se,Ae;if(t===61)return e.exit(x),e.enter(T),e.consume(t),e.exit(T),se=k,Ae;if(t===47||t===62||t===123||kv(t)||Mv(t)||t!==null&&t>=0&&s4(t))return e.exit(x),e.exit(b),se=ve,Ae(t);Ne(t,`after attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Se(t){if(t!==null&&t>=0&&s4(t))return e.enter(w),e.consume(t),Ce;Ne(t,`before local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Ce(t){if(t!==null&&t>=0&&c4(t,{jsx:!0}))return e.consume(t),Ce;if(t===47||t===61||t===62||t===123||kv(t)||Mv(t))return e.exit(w),e.exit(x),se=we,Ae(t);Ne(t,`in local attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function we(t){if(t===61)return e.enter(T),e.consume(t),e.exit(T),se=k,Ae;if(t===47||t===62||t===123||t!==null&&t>=0&&s4(t))return e.exit(b),ve(t);Ne(t,`after local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function k(t){if(t===34||t===39)return e.enter(ee),e.enter(te),e.consume(t),e.exit(te),ce=t,Ee;if(t===123)return i4.call(oe,e,Te,re,ie,ae,r,i,a,!1,!1,o)(t);Ne(t,`before attribute value`,"a character that can start an attribute value, such as `\"`, `'`, or `{`"+(t===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":``))}function Te(t){return e.exit(b),se=ve,Ae(t)}function Ee(t){return t===null&&Ne(t,`in attribute value`,"a corresponding closing quote `"+String.fromCodePoint(ce)+"`"),t===ce?(e.enter(te),e.consume(t),e.exit(te),e.exit(ee),e.exit(b),ce=void 0,se=ve,Ae):B(t)?(se=Ee,Ae(t)):(e.enter(ne),De(t))}function De(t){return t===null||t===ce||B(t)?(e.exit(ne),Ee(t)):(e.consume(t),De)}function Oe(e){if(e===62)return ke(e);Ne(e,`after self-closing slash`,"`>` to end the tag"+(e===42||e===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function ke(n){return e.enter(c),e.consume(n),e.exit(c),e.exit(s),t}function Ae(t){return B(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Me):Av(t)||Mv(t)?(e.enter(`esWhitespace`),je(t)):se(t)}function je(t){return B(t)?(e.exit(`esWhitespace`),Ae(t)):Av(t)||Mv(t)?(e.consume(t),je):(e.exit(`esWhitespace`),se(t))}function Me(e){if(!o&&oe.parser.lazy[oe.now().line]){let e=new Fw("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",oe.now(),`micromark-extension-mdx-jsx:unexpected-lazy`);throw e.url=l4+`#unexpected-lazy-line-in-container-expected-line-to-be`,e}return Ae(e)}function Ne(e,t,n){let r=new Fw(`Unexpected `+(e===null?`end of file`:"character `"+(e===96?"` ` `":String.fromCodePoint(e))+"` ("+Qoe(e)+`)`)+` `+t+`, expected `+n,oe.now(),`micromark-extension-mdx-jsx:unexpected-`+(e===null?`eof`:`character`));throw r.url=l4+(e===null?`#unexpected-end-of-file-at-expected-expect`:`#unexpected-character-at-expected-expect`),r}}function Qoe(e){return`U+`+e.toString(16).toUpperCase().padStart(4,`0`)}function $oe(e,t){return{name:`mdxJsxTextTag`,tokenize:n};function n(n,r,i){return u4.call(this,n,r,i,e,t.acornOptions,t.addResult,!0,`mdxJsxTextTag`,`mdxJsxTextTagMarker`,`mdxJsxTextTagClosingMarker`,`mdxJsxTextTagSelfClosingMarker`,`mdxJsxTextTagName`,`mdxJsxTextTagNamePrimary`,`mdxJsxTextTagNameMemberMarker`,`mdxJsxTextTagNameMember`,`mdxJsxTextTagNamePrefixMarker`,`mdxJsxTextTagNameLocal`,`mdxJsxTextTagExpressionAttribute`,`mdxJsxTextTagExpressionAttributeMarker`,`mdxJsxTextTagExpressionAttributeValue`,`mdxJsxTextTagAttribute`,`mdxJsxTextTagAttributeName`,`mdxJsxTextTagAttributeNamePrimary`,`mdxJsxTextTagAttributeNamePrefixMarker`,`mdxJsxTextTagAttributeNameLocal`,`mdxJsxTextTagAttributeInitializerMarker`,`mdxJsxTextTagAttributeValueLiteral`,`mdxJsxTextTagAttributeValueLiteralMarker`,`mdxJsxTextTagAttributeValueLiteralValue`,`mdxJsxTextTagAttributeValueExpression`,`mdxJsxTextTagAttributeValueExpressionMarker`,`mdxJsxTextTagAttributeValueExpressionValue`)}}function ese(e,t){return{concrete:!0,name:`mdxJsxFlowTag`,tokenize:n};function n(n,r,i){let a=this;return o;function o(e){return s(e)}function s(r){return u4.call(a,n,c,i,e,t.acornOptions,t.addResult,!1,`mdxJsxFlowTag`,`mdxJsxFlowTagMarker`,`mdxJsxFlowTagClosingMarker`,`mdxJsxFlowTagSelfClosingMarker`,`mdxJsxFlowTagName`,`mdxJsxFlowTagNamePrimary`,`mdxJsxFlowTagNameMemberMarker`,`mdxJsxFlowTagNameMember`,`mdxJsxFlowTagNamePrefixMarker`,`mdxJsxFlowTagNameLocal`,`mdxJsxFlowTagExpressionAttribute`,`mdxJsxFlowTagExpressionAttributeMarker`,`mdxJsxFlowTagExpressionAttributeValue`,`mdxJsxFlowTagAttribute`,`mdxJsxFlowTagAttributeName`,`mdxJsxFlowTagAttributeNamePrimary`,`mdxJsxFlowTagAttributeNamePrefixMarker`,`mdxJsxFlowTagAttributeNameLocal`,`mdxJsxFlowTagAttributeInitializerMarker`,`mdxJsxFlowTagAttributeValueLiteral`,`mdxJsxFlowTagAttributeValueLiteralMarker`,`mdxJsxFlowTagAttributeValueLiteralValue`,`mdxJsxFlowTagAttributeValueExpression`,`mdxJsxFlowTagAttributeValueExpressionMarker`,`mdxJsxFlowTagAttributeValueExpressionValue`)(r)}function c(e){return Av(e)?CS(n,l,`whitespace`)(e):l(e)}function l(e){let t=a.parser.constructs.flow[123],s=Array.isArray(t)?t:t?[t]:[],c;for(let e of s)if(e.name===`mdxFlowExpression`){c=e;break}return e===60?o(e):e===123&&c?n.attempt(c,l,i)(e):e===null||B(e)?r(e):i(e)}}}function tse(e){let t=e||{},n=t.acorn,r;if(n){if(!n.parse||!n.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:ese(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:$oe(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function nse(){return{disable:{null:[`autolink`,`codeIndented`,`htmlFlow`,`htmlText`]}}}function d4(){return Hx([o4(),tse(),nse()])}const rse=/^(`{3,}|~{3,})/gm;function f4(e){let t=[],n=null;for(let r of e.matchAll(rse)){let e=r[1],i=r.index;n?e[0]===n.marker[0]&&e.length>=n.marker.length&&(t.push([n.offset,i+r[0].length]),n=null):n={marker:e,offset:i}}return n&&t.push([n.offset,e.length]),t}function p4(e,t){return t.some(([t,n])=>e>=t&&e<n)}const m4=/`+/g;function ise(e){let t=[];m4.lastIndex=0;for(let n of e.matchAll(m4))t.push({offset:n.index,length:n[0].length});let n=[];for(let e=0;e<t.length;e++){let r=t[e];for(let i=e+1;i<t.length;i++){let a=t[i];if(a.length===r.length){n.push([r.offset,a.offset+a.length]),e=i;break}}}return n}const ase=/^[!-/:-@[-`{-~]$/;function h4(e){return e!==void 0&&ase.test(e)}function g4(e){return e===`<`||e===`>`}function _4(e){return e===void 0||h4(e)}function ose(e){return g4(e)||e===`\\`}const sse=[{from:`&`,to:``},{from:`;`,to:``}],cse=/&(?:[A-Za-z][A-Za-z0-9]*|#[0-9]+|#[xX][0-9A-Fa-f]+);/g;function lse(e,t){let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;r--)n++;return n}function v4(e,t,n){return t.lastIndex=0,e.replace(t,(t,r)=>typeof r!=`number`||lse(e,r)%2==1?t:n(t))}function use(e){return v4(e,cse,e=>`${e.slice(1,-1)}`)}const y4=RegExp(`([^]+)`,`g`);function b4(e){if(!e.includes(``))return{value:e,spans:[]};let t=[],n=``,r=0;y4.lastIndex=0;let i=y4.exec(e);for(;i!==null;){i.index>r&&(n+=e.slice(r,i.index));let a=`&${i[1]??``};`;t.push({offset:n.length,length:a.length,raw:a}),n+=a,r=i.index+i[0].length,i=y4.exec(e)}return r<e.length&&(n+=e.slice(r)),{value:n,spans:t}}function dse(){return e=>{ub(e,e=>{let t=e;if(typeof t.value==`string`&&t.value.includes(``)){let{value:n,spans:r}=b4(t.value);if(t.value=n,e.type===`text`&&r.length>0){let t=e;t.data??={},t.data.entityRefSpans=r}}for(let e of[`url`,`title`,`alt`,`lang`,`meta`]){let n=t[e];typeof n==`string`&&n.includes(``)&&(t[e]=b4(n).value)}})}}const fse=[{from:`\\`,to:``}],pse=/\\</g;function mse(e){return v4(e,pse,e=>`${e.slice(1)}`)}function hse(){return e=>{ub(e,e=>{let t=e;if(typeof t.value==`string`&&t.value.includes(``)){if(e.type===`text`){let t=e.value,n=Array(t.length+1),r=[],i=``;for(let e=0;e<t.length;e+=1)n[e]=i.length,t[e]===``?r.push({offset:i.length,char:t[e+1]??``}):i+=t[e];n[t.length]=i.length;let a=[...(e.data?.escapedChars??[]).map(e=>({...e,offset:n[e.offset]??e.offset})),...r].map(e=>({...e})).sort((e,t)=>e.offset-t.offset||e.char.localeCompare(t.char)).filter((e,t,n)=>t===0||e.offset!==n[t-1]?.offset||e.char!==n[t-1]?.char),o=e.data?.entityRefSpans?.map(e=>{let t=n[e.offset]??e.offset,r=n[e.offset+e.length]??e.offset+e.length;return{...e,offset:t,length:r-t}});e.value=i,e.data??={},e.data.escapedChars=a,o&&(e.data.entityRefSpans=o)}else t.value=t.value.split(``).join(``)}for(let e of[`url`,`title`,`alt`]){let n=t[e];typeof n==`string`&&n.includes(``)&&(t[e]=n.split(``).join(``))}})}}const x4=[[``,``],[``,``],[``,``],[``,``],[``,``]],S4=/[\uE000-\uE004]/,C4=/[\uE005-\uE009]/,gse=x4.map(([e,t])=>({from:e,to:t})),_se=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g,vse=/<!--[\s\S]*?-->/g,yse=/<\/([a-z][a-z0-9]*)\s*>/g,bse=/<([a-z][a-z0-9]*)(\s[^>]*)?\/?>/g,w4=new Set([`img`,`video`,`audio`]),T4=new Set([`mark`,`u`,`ins`]);function xse(e,t,n,r,i){let a=0,o=0,s=`<${t}`;for(;o<n;){let t=e.indexOf(s,o);if(t===-1||t>=n)break;if(o=t+s.length,O4(i,t))continue;let c=e[t+s.length];if(c!==void 0&&c!==`>`&&c!==`/`&&!/\s/.test(c)||p4(t,r))continue;let l=e.indexOf(`>`,t);(l===-1||e[l-1]!==`/`)&&a++}return a}const Sse=/<\/([A-Z][A-Za-z0-9.]*)>/g;function E4(e,t){let n=0,r=e.length;for(;n<r;){let i=n+r>>>1;e[i]<t?n=i+1:r=i}return n}function Cse(e,t){let n=new Map,r=new RegExp(Sse.source,`g`),i=r.exec(e);for(;i!==null;){if(O4(t,i.index)){i=r.exec(e);continue}let a=n.get(i[1]);a?a.push(i.index):n.set(i[1],[i.index]),i=r.exec(e)}return n}function wse(e){let t=[],n=/\n\s*\n/g,r=n.exec(e);for(;r!==null;)t.push(r.index),r=n.exec(e);return t}function Tse(e){let t=[],n=e.indexOf(`>`);for(;n!==-1;)t.push(n),n=e.indexOf(`>`,n+1);return t}function Ese(e){let t=[],n=e.indexOf(`
|
|
308
|
+
`;break;case-2:a=` `;break;case-1:if(r)continue;a=` `;break;default:a=String.fromCharCode(i)}r=i===-2,n.push(a)}return n.join(``)}function t4(e){let t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=n4(n.start,r[0]||t.start),a=n4(n.end,r[1]||t.end);if(i&&a)return{start:i,end:a}}function n4(e,t){if(e&&typeof e==`object`){let n=`line`in e?r4(e.line):void 0,r=`column`in e?r4(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:r4(t)}}}function r4(e){return typeof e==`number`&&e>-1?e:void 0}const i4=`https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression`,a4=`#unexpected-type-in-code-expected-an-object-spread-spread`;function o4(e,t,n,r,i,a,o,s,c,l,u){let d=this,f=this.events.length+3,p=0,m,h;return g;function g(t){return e.enter(n),e.enter(r),e.consume(t),e.exit(r),m=d.now(),_}function _(u){if(u===null){if(h)throw h;let e=new Fw("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:d.now(),ruleId:`unexpected-eof`,source:`micromark-extension-mdx-expression`});throw e.url=i4+`#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-`,e}if(B(u))return e.enter(`lineEnding`),e.consume(u),e.exit(`lineEnding`),y;if(u===125&&p===0){let p=a?Joe.call(d,a,o,i,f,m,l||!1,c||!1):{type:`ok`,estree:void 0};if(p.type===`ok`){e.enter(r),e.consume(u),e.exit(r);let i=e.exit(n);return s&&p.estree&&Object.assign(i,{estree:p.estree}),t}return h=p.message,e.enter(i),e.consume(u),v}return e.enter(i),v(u)}function v(t){return t===125&&p===0||t===null||B(t)?(e.exit(i),_(t)):(t===123&&!a?p+=1:t===125&&--p,e.consume(t),v)}function y(t){let n=d.now();if(n.line!==m.line&&!u&&d.parser.lazy[n.line]){let e=new Fw("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:d.now(),ruleId:`unexpected-lazy`,source:`micromark-extension-mdx-expression`});throw e.url=i4+`#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed`,e}return Av(t)?CS(e,_,`linePrefix`,3)(t):_(t)}}function Joe(e,t,n,r,i,a,o){let s=X2(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:a,prefix:o?`({`:``,suffix:o?`})`:``}),c=s.estree;if(o&&c){let e=c.body[0];if(e.type!==`ExpressionStatement`||e.expression.type!==`ObjectExpression`){let t=t4(e),n=new Fw("Unexpected `"+e.type+"` in code: expected an object spread (`{...spread}`)",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=i4+a4,n}if(e.expression.properties[1]){let t=new Fw(`Unexpected extra content in spread: only a single spread is supported`,{place:t4(e.expression.properties[1]).start,ruleId:`spread-extra`,source:`micromark-extension-mdx-expression`});throw t.url=i4+`#unexpected-extra-content-in-spread-only-a-single-spread-is-supported`,t}if(e.expression.properties[0]&&e.expression.properties[0].type!==`SpreadElement`){let t=t4(e.expression.properties[0]),n=new Fw("Unexpected `"+e.expression.properties[0].type+"` in code: only spread elements are supported",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=i4+a4,n}}if(s.error){let e=new Fw(`Could not parse expression with acorn`,{cause:s.error,place:{line:s.error.loc.line,column:s.error.loc.column+1,offset:s.error.pos},ruleId:`acorn`,source:`micromark-extension-mdx-expression`});return e.url=i4+`#could-not-parse-expression-with-acorn`,{type:`nok`,message:e}}return{type:`ok`,estree:c}}function Yoe(e){let t=e||{},n=t.addResult,r=t.acorn,i=t.spread,a=t.allowEmpty,o;if(a??=!0,r){if(!r.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");o=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions)}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{123:{name:`mdxFlowExpression`,tokenize:s,concrete:!0}},text:{123:{name:`mdxTextExpression`,tokenize:c}}};function s(e,t,s){let c=this;return l;function l(e){return u(e)}function u(t){return o4.call(c,e,d,`mdxFlowExpression`,`mdxFlowExpressionMarker`,`mdxFlowExpressionChunk`,r,o,n,i,a)(t)}function d(t){return Av(t)?CS(e,f,`whitespace`)(t):f(t)}function f(n){let r=c.parser.constructs.flow[60],i=(Array.isArray(r)?r:r?[r]:[]).find(function(e){return e.name===`mdxJsxFlowTag`});return n===60&&i?e.attempt(i,f,s)(n):n===null||B(n)?t(n):s(n)}}function c(e,t){let s=this;return c;function c(c){return o4.call(s,e,t,`mdxTextExpression`,`mdxTextExpressionMarker`,`mdxTextExpressionChunk`,r,o,n,i,a,!0)(c)}}}const Xoe=/[$_\p{ID_Start}]/u,Zoe=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,Qoe=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,$oe={};function s4(e){return e?Xoe.test(String.fromCodePoint(e)):!1}function c4(e,t){let n=(t||$oe).jsx?Qoe:Zoe;return e?n.test(String.fromCodePoint(e)):!1}const l4=`https://github.com/micromark/micromark-extension-mdx-jsx`;function u4(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,ee,te,ne,re,ie,ae){let oe=this,se,ce;return le;function le(t){return e.enter(s),e.enter(c),e.consume(t),e.exit(c),ue}function ue(e){return kv(e)?n(e):(se=E,Ae(e))}function E(t){if(t===47)return e.enter(l),e.consume(t),e.exit(l),se=de,Ae;if(t===62)return ke(t);if(t!==null&&t>=0&&s4(t))return e.enter(d),e.enter(f),e.consume(t),fe;Ne(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===33?" (note: to create a comment in MDX, use `{/* text */}`)":``))}function de(t){if(t===62)return ke(t);if(t!==null&&t>=0&&s4(t))return e.enter(d),e.enter(f),e.consume(t),fe;Ne(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===42||t===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function fe(t){if(t!==null&&t>=0&&c4(t,{jsx:!0}))return e.consume(t),fe;if(t===46||t===47||t===58||t===62||t===123||kv(t)||Mv(t))return e.exit(f),se=pe,Ae(t);Ne(t,`in name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function pe(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),se=D,Ae;if(t===58)return e.enter(h),e.consume(t),e.exit(h),se=he,Ae;if(t===47||t===62||t===123||t!==null&&t>=0&&s4(t))return e.exit(d),ve(t);Ne(t,`after name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function D(t){if(t!==null&&t>=0&&s4(t))return e.enter(m),e.consume(t),O;Ne(t,`before member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function O(t){if(t!==null&&t>=0&&c4(t,{jsx:!0}))return e.consume(t),O;if(t===46||t===47||t===62||t===123||kv(t)||Mv(t))return e.exit(m),se=me,Ae(t);Ne(t,`in member name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function me(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),se=D,Ae;if(t===47||t===62||t===123||t!==null&&t>=0&&s4(t))return e.exit(d),ve(t);Ne(t,`after member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function he(t){if(t!==null&&t>=0&&s4(t))return e.enter(g),e.consume(t),ge;Ne(t,`before local name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===43||t!==null&&t>46&&t<58?" (note: to create a link in MDX, use `[text](url)`)":``))}function ge(t){if(t!==null&&t>=0&&c4(t,{jsx:!0}))return e.consume(t),ge;if(t===47||t===62||t===123||kv(t)||Mv(t))return e.exit(g),se=_e,Ae(t);Ne(t,`in local name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function _e(t){if(t===47||t===62||t===123||t!==null&&t>=0&&s4(t))return e.exit(d),ve(t);Ne(t,`after local name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ve(t){if(t===47)return e.enter(u),e.consume(t),e.exit(u),se=Oe,Ae;if(t===62)return ke(t);if(t===123)return o4.call(oe,e,ye,_,v,y,r,i,a,!0,!1,o)(t);if(t!==null&&t>=0&&s4(t))return e.enter(b),e.enter(x),e.enter(S),e.consume(t),be;Ne(t,`before attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ye(e){return se=ve,Ae(e)}function be(t){if(t!==null&&t>=0&&c4(t,{jsx:!0}))return e.consume(t),be;if(t===47||t===58||t===61||t===62||t===123||kv(t)||Mv(t))return e.exit(S),se=xe,Ae(t);Ne(t,`in attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function xe(t){if(t===58)return e.enter(C),e.consume(t),e.exit(C),se=Se,Ae;if(t===61)return e.exit(x),e.enter(T),e.consume(t),e.exit(T),se=k,Ae;if(t===47||t===62||t===123||kv(t)||Mv(t)||t!==null&&t>=0&&s4(t))return e.exit(x),e.exit(b),se=ve,Ae(t);Ne(t,`after attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Se(t){if(t!==null&&t>=0&&s4(t))return e.enter(w),e.consume(t),Ce;Ne(t,`before local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Ce(t){if(t!==null&&t>=0&&c4(t,{jsx:!0}))return e.consume(t),Ce;if(t===47||t===61||t===62||t===123||kv(t)||Mv(t))return e.exit(w),e.exit(x),se=we,Ae(t);Ne(t,`in local attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function we(t){if(t===61)return e.enter(T),e.consume(t),e.exit(T),se=k,Ae;if(t===47||t===62||t===123||t!==null&&t>=0&&s4(t))return e.exit(b),ve(t);Ne(t,`after local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function k(t){if(t===34||t===39)return e.enter(ee),e.enter(te),e.consume(t),e.exit(te),ce=t,Ee;if(t===123)return o4.call(oe,e,Te,re,ie,ae,r,i,a,!1,!1,o)(t);Ne(t,`before attribute value`,"a character that can start an attribute value, such as `\"`, `'`, or `{`"+(t===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":``))}function Te(t){return e.exit(b),se=ve,Ae(t)}function Ee(t){return t===null&&Ne(t,`in attribute value`,"a corresponding closing quote `"+String.fromCodePoint(ce)+"`"),t===ce?(e.enter(te),e.consume(t),e.exit(te),e.exit(ee),e.exit(b),ce=void 0,se=ve,Ae):B(t)?(se=Ee,Ae(t)):(e.enter(ne),De(t))}function De(t){return t===null||t===ce||B(t)?(e.exit(ne),Ee(t)):(e.consume(t),De)}function Oe(e){if(e===62)return ke(e);Ne(e,`after self-closing slash`,"`>` to end the tag"+(e===42||e===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function ke(n){return e.enter(c),e.consume(n),e.exit(c),e.exit(s),t}function Ae(t){return B(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Me):Av(t)||Mv(t)?(e.enter(`esWhitespace`),je(t)):se(t)}function je(t){return B(t)?(e.exit(`esWhitespace`),Ae(t)):Av(t)||Mv(t)?(e.consume(t),je):(e.exit(`esWhitespace`),se(t))}function Me(e){if(!o&&oe.parser.lazy[oe.now().line]){let e=new Fw("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",oe.now(),`micromark-extension-mdx-jsx:unexpected-lazy`);throw e.url=l4+`#unexpected-lazy-line-in-container-expected-line-to-be`,e}return Ae(e)}function Ne(e,t,n){let r=new Fw(`Unexpected `+(e===null?`end of file`:"character `"+(e===96?"` ` `":String.fromCodePoint(e))+"` ("+ese(e)+`)`)+` `+t+`, expected `+n,oe.now(),`micromark-extension-mdx-jsx:unexpected-`+(e===null?`eof`:`character`));throw r.url=l4+(e===null?`#unexpected-end-of-file-at-expected-expect`:`#unexpected-character-at-expected-expect`),r}}function ese(e){return`U+`+e.toString(16).toUpperCase().padStart(4,`0`)}function tse(e,t){return{name:`mdxJsxTextTag`,tokenize:n};function n(n,r,i){return u4.call(this,n,r,i,e,t.acornOptions,t.addResult,!0,`mdxJsxTextTag`,`mdxJsxTextTagMarker`,`mdxJsxTextTagClosingMarker`,`mdxJsxTextTagSelfClosingMarker`,`mdxJsxTextTagName`,`mdxJsxTextTagNamePrimary`,`mdxJsxTextTagNameMemberMarker`,`mdxJsxTextTagNameMember`,`mdxJsxTextTagNamePrefixMarker`,`mdxJsxTextTagNameLocal`,`mdxJsxTextTagExpressionAttribute`,`mdxJsxTextTagExpressionAttributeMarker`,`mdxJsxTextTagExpressionAttributeValue`,`mdxJsxTextTagAttribute`,`mdxJsxTextTagAttributeName`,`mdxJsxTextTagAttributeNamePrimary`,`mdxJsxTextTagAttributeNamePrefixMarker`,`mdxJsxTextTagAttributeNameLocal`,`mdxJsxTextTagAttributeInitializerMarker`,`mdxJsxTextTagAttributeValueLiteral`,`mdxJsxTextTagAttributeValueLiteralMarker`,`mdxJsxTextTagAttributeValueLiteralValue`,`mdxJsxTextTagAttributeValueExpression`,`mdxJsxTextTagAttributeValueExpressionMarker`,`mdxJsxTextTagAttributeValueExpressionValue`)}}function nse(e,t){return{concrete:!0,name:`mdxJsxFlowTag`,tokenize:n};function n(n,r,i){let a=this;return o;function o(e){return s(e)}function s(r){return u4.call(a,n,c,i,e,t.acornOptions,t.addResult,!1,`mdxJsxFlowTag`,`mdxJsxFlowTagMarker`,`mdxJsxFlowTagClosingMarker`,`mdxJsxFlowTagSelfClosingMarker`,`mdxJsxFlowTagName`,`mdxJsxFlowTagNamePrimary`,`mdxJsxFlowTagNameMemberMarker`,`mdxJsxFlowTagNameMember`,`mdxJsxFlowTagNamePrefixMarker`,`mdxJsxFlowTagNameLocal`,`mdxJsxFlowTagExpressionAttribute`,`mdxJsxFlowTagExpressionAttributeMarker`,`mdxJsxFlowTagExpressionAttributeValue`,`mdxJsxFlowTagAttribute`,`mdxJsxFlowTagAttributeName`,`mdxJsxFlowTagAttributeNamePrimary`,`mdxJsxFlowTagAttributeNamePrefixMarker`,`mdxJsxFlowTagAttributeNameLocal`,`mdxJsxFlowTagAttributeInitializerMarker`,`mdxJsxFlowTagAttributeValueLiteral`,`mdxJsxFlowTagAttributeValueLiteralMarker`,`mdxJsxFlowTagAttributeValueLiteralValue`,`mdxJsxFlowTagAttributeValueExpression`,`mdxJsxFlowTagAttributeValueExpressionMarker`,`mdxJsxFlowTagAttributeValueExpressionValue`)(r)}function c(e){return Av(e)?CS(n,l,`whitespace`)(e):l(e)}function l(e){let t=a.parser.constructs.flow[123],s=Array.isArray(t)?t:t?[t]:[],c;for(let e of s)if(e.name===`mdxFlowExpression`){c=e;break}return e===60?o(e):e===123&&c?n.attempt(c,l,i)(e):e===null||B(e)?r(e):i(e)}}}function rse(e){let t=e||{},n=t.acorn,r;if(n){if(!n.parse||!n.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:nse(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:tse(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function ise(){return{disable:{null:[`autolink`,`codeIndented`,`htmlFlow`,`htmlText`]}}}function d4(){return Hx([Yoe(),rse(),ise()])}const ase=/^(`{3,}|~{3,})/gm;function f4(e){let t=[],n=null;for(let r of e.matchAll(ase)){let e=r[1],i=r.index;n?e[0]===n.marker[0]&&e.length>=n.marker.length&&(t.push([n.offset,i+r[0].length]),n=null):n={marker:e,offset:i}}return n&&t.push([n.offset,e.length]),t}function p4(e,t){return t.some(([t,n])=>e>=t&&e<n)}const m4=/`+/g;function ose(e){let t=[];m4.lastIndex=0;for(let n of e.matchAll(m4))t.push({offset:n.index,length:n[0].length});let n=[];for(let e=0;e<t.length;e++){let r=t[e];for(let i=e+1;i<t.length;i++){let a=t[i];if(a.length===r.length){n.push([r.offset,a.offset+a.length]),e=i;break}}}return n}const sse=/^[!-/:-@[-`{-~]$/;function h4(e){return e!==void 0&&sse.test(e)}function g4(e){return e===`<`||e===`>`}function _4(e){return e===void 0||h4(e)}function cse(e){return g4(e)||e===`\\`}const lse=[{from:`&`,to:``},{from:`;`,to:``}],use=/&(?:[A-Za-z][A-Za-z0-9]*|#[0-9]+|#[xX][0-9A-Fa-f]+);/g;function dse(e,t){let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;r--)n++;return n}function v4(e,t,n){return t.lastIndex=0,e.replace(t,(t,r)=>typeof r!=`number`||dse(e,r)%2==1?t:n(t))}function fse(e){return v4(e,use,e=>`${e.slice(1,-1)}`)}const y4=RegExp(`([^]+)`,`g`);function b4(e){if(!e.includes(``))return{value:e,spans:[]};let t=[],n=``,r=0;y4.lastIndex=0;let i=y4.exec(e);for(;i!==null;){i.index>r&&(n+=e.slice(r,i.index));let a=`&${i[1]??``};`;t.push({offset:n.length,length:a.length,raw:a}),n+=a,r=i.index+i[0].length,i=y4.exec(e)}return r<e.length&&(n+=e.slice(r)),{value:n,spans:t}}function pse(){return e=>{ub(e,e=>{let t=e;if(typeof t.value==`string`&&t.value.includes(``)){let{value:n,spans:r}=b4(t.value);if(t.value=n,e.type===`text`&&r.length>0){let t=e;t.data??={},t.data.entityRefSpans=r}}for(let e of[`url`,`title`,`alt`,`lang`,`meta`]){let n=t[e];typeof n==`string`&&n.includes(``)&&(t[e]=b4(n).value)}})}}const mse=[{from:`\\`,to:``}],hse=/\\</g;function gse(e){return v4(e,hse,e=>`${e.slice(1)}`)}function _se(){return e=>{ub(e,e=>{let t=e;if(typeof t.value==`string`&&t.value.includes(``)){if(e.type===`text`){let t=e.value,n=Array(t.length+1),r=[],i=``;for(let e=0;e<t.length;e+=1)n[e]=i.length,t[e]===``?r.push({offset:i.length,char:t[e+1]??``}):i+=t[e];n[t.length]=i.length;let a=[...(e.data?.escapedChars??[]).map(e=>({...e,offset:n[e.offset]??e.offset})),...r].map(e=>({...e})).sort((e,t)=>e.offset-t.offset||e.char.localeCompare(t.char)).filter((e,t,n)=>t===0||e.offset!==n[t-1]?.offset||e.char!==n[t-1]?.char),o=e.data?.entityRefSpans?.map(e=>{let t=n[e.offset]??e.offset,r=n[e.offset+e.length]??e.offset+e.length;return{...e,offset:t,length:r-t}});e.value=i,e.data??={},e.data.escapedChars=a,o&&(e.data.entityRefSpans=o)}else t.value=t.value.split(``).join(``)}for(let e of[`url`,`title`,`alt`]){let n=t[e];typeof n==`string`&&n.includes(``)&&(t[e]=n.split(``).join(``))}})}}const x4=[[``,``],[``,``],[``,``],[``,``],[``,``]],S4=/[\uE000-\uE004]/,C4=/[\uE005-\uE009]/,vse=x4.map(([e,t])=>({from:e,to:t})),yse=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g,bse=/<!--[\s\S]*?-->/g,xse=/<\/([a-z][a-z0-9]*)\s*>/g,Sse=/<([a-z][a-z0-9]*)(\s[^>]*)?\/?>/g,w4=new Set([`img`,`video`,`audio`]),T4=new Set([`mark`,`u`,`ins`]);function Cse(e,t,n,r,i){let a=0,o=0,s=`<${t}`;for(;o<n;){let t=e.indexOf(s,o);if(t===-1||t>=n)break;if(o=t+s.length,O4(i,t))continue;let c=e[t+s.length];if(c!==void 0&&c!==`>`&&c!==`/`&&!/\s/.test(c)||p4(t,r))continue;let l=e.indexOf(`>`,t);(l===-1||e[l-1]!==`/`)&&a++}return a}const wse=/<\/([A-Z][A-Za-z0-9.]*)>/g;function E4(e,t){let n=0,r=e.length;for(;n<r;){let i=n+r>>>1;e[i]<t?n=i+1:r=i}return n}function Tse(e,t){let n=new Map,r=new RegExp(wse.source,`g`),i=r.exec(e);for(;i!==null;){if(O4(t,i.index)){i=r.exec(e);continue}let a=n.get(i[1]);a?a.push(i.index):n.set(i[1],[i.index]),i=r.exec(e)}return n}function Ese(e){let t=[],n=/\n\s*\n/g,r=n.exec(e);for(;r!==null;)t.push(r.index),r=n.exec(e);return t}function Dse(e){let t=[],n=e.indexOf(`>`);for(;n!==-1;)t.push(n),n=e.indexOf(`>`,n+1);return t}function Ose(e){let t=[],n=e.indexOf(`
|
|
309
309
|
|
|
310
310
|
`);for(;n!==-1;)t.push(n),n=e.indexOf(`
|
|
311
311
|
|
|
312
|
-
`,n+1);return t}const D4=1024,
|
|
312
|
+
`,n+1);return t}const D4=1024,kse=/(?<![^\n\r]) {0,3}\[/g,Ase=/^[ \t]*\|?[ \t]*:?-+:?[ \t]*(?:\|[ \t]*:?-+:?[ \t]*)*\|?[ \t]*$/;function O4(e,t){return e.opens.has(t)||e.forced.has(t)}function jse(e){return e===``||e===``||e===``||e===``||e===``}function k4(e){return e===` `||e===` `}function A4(e){return e===`
|
|
313
313
|
`||e===`\r`}function j4(e,t){let n=e;for(;k4(t[n]);)n++;return n}function M4(e,t){return t[e]===`\r`&&t[e+1]===`
|
|
314
|
-
`?e+1:e}function
|
|
315
|
-
`;n--)if(!k4(t[n]))return!1;return!0}function
|
|
314
|
+
`?e+1:e}function Mse(e,t){let n=0;for(let r=e-1;r>=0&&t[r]===`\\`;r--)n++;if(n%2==1)return-1;let r=Math.max(0,e-D4);for(let n=e-1;n>=r;n--){let e=t[n];if(A4(e)||e==="`")return-1;if((e===`[`||e===`]`)&&!N4(n,t))return e===`]`||t[n+1]===`^`||t[n-1]===`]`?-1:n}return-1}function N4(e,t){let n=0;for(let r=e-1;r>=0&&t[r]===`\\`;r--)n++;return n%2==1}function Nse(e,t,n){for(let r=e;r<t;r++)if(n[r]===`|`&&!N4(r,n))return!0;return!1}function Pse(e,t){let n=e;for(;n<t.length&&!A4(t[n]);)n++;if(n>=t.length)return!1;n=M4(n,t)+1;let r=n;for(;r<t.length&&!A4(t[r]);)r++;let i=t.slice(n,r);return Ase.test(i)&&/[|:]/.test(i)}function Fse(e){return e===``||_4(e)}function P4(e,t,n){let r=Math.min(t.length,e+1+D4);for(let i=e+1;i<r;i++){let e=t[i];if(e===`>`)return i;if(e===``&&t[i+1]===`<`){n.push(i+1),i++;continue}if(e===`<`||A4(e)||jse(e))return-1;if(e===`\\`){let e=t[i+1];if(e===`\\`&&!Fse(t[i+2]))return-1;if(cse(e))i++;else if(h4(e))return-1}}return-1}function F4(e,t){let n=t[e],r=n===`(`?`)`:n===`"`||n===`'`?n:null;if(r===null)return-1;let i=Math.min(t.length,e+1+D4);for(let n=e+1;n<i;n++){let e=t[n];if(e===r)return n+1;if(A4(e)||r===`)`&&e===`(`)return-1;if(e===`\\`){let e=t[n+1];(e===r||e===`\\`||r===`)`&&e===`(`)&&n++}}return-1}function Ise(e,t){if(t[e]===`)`)return e;let n=j4(e,t);if(n===e)return-1;let r=F4(n,t);return r!==-1&&t[r]===`)`?r:-1}function Lse(e,t,n){let r=Mse(e-2,t);if(r===-1)return-1;let i=P4(e,t,n);if(i===-1)return-1;let a=Ise(i+1,t);return a===-1||Nse(r,a,t)?-1:i}function Rse(e,t){let n=e-2;for(t[n]===`\r`&&n--;n>=0&&t[n]!==`
|
|
315
|
+
`;n--)if(!k4(t[n]))return!1;return!0}function zse(e,t){if(t[e+1]===`^`)return-1;let n=!1,r=Math.min(t.length,e+2+999);for(let i=e+1;i<r;i++){let e=t[i];if(e===`]`)return n?i:-1;if(e===`[`||A4(e))return-1;if(e===`\\`){let e=t[i+1];(e===`[`||e===`]`||e===`\\`)&&i++,n=!0;continue}k4(e)||(n=!0)}return-1}function Bse(e,t){let n=F4(j4(e+1,t),t);if(n===-1)return e;let r=j4(n,t);return r>=t.length?t.length:A4(t[r])?M4(r,t):e}function Vse(e,t){let n=j4(e,t);if(n>=t.length)return t.length;if(A4(t[n]))return Bse(M4(n,t),t);if(n===e)return-1;let r=F4(n,t);return r===-1?-1:(n=j4(r,t),n>=t.length?t.length:A4(t[n])?M4(n,t):-1)}function Hse(e,t,n,r){let i=-1;for(let a of e.matchAll(kse)){let o=a.index;if(o!==0&&o!==i+1&&!Rse(o,e))continue;let s=zse(o+a[0].length-1,e);if(s===-1||e[s+1]!==`:`)continue;let c=j4(s+2,e);if(e[c]!==`<`)continue;let l=[],u=P4(c,e,l);if(u===-1)continue;let d=Vse(u+1,e);if(!(d===-1||Pse(u,e))){t.add(c),n.add(u);for(let e of l)r.add(e);i=d}}}function Use(e){let t=new Set,n=new Set,r=new Set,i=e.indexOf(`](<`);for(;i!==-1;){let a=[],o=Lse(i+2,e,a);if(o!==-1){t.add(i+2),n.add(o);for(let e of a)r.add(e)}i=e.indexOf(`](<`,i+3)}return Hse(e,t,n,r),{opens:t,closes:n,forced:r}}function Wse(e,t,n,r){let i=`</${t}>`,a=e.indexOf(i,n);for(;a!==-1;){if(!O4(r,a))return!0;a=e.indexOf(i,a+1)}return!1}function I4(e,t,n){let r=``;for(let i=0;i<e.length;i++){let a=e[i];r+=a===`<`?n.opens.has(t+i)?a:``:a===`>`?n.closes.has(t+i)?a:``:a}return r}function Gse(e,t,n,r){let i=E4(n,e);if(i>=n.length)return!1;let a=n[i],o=E4(r,e);return a>=(o<r.length?r[o]:t.length)?!1:t[a-1]===`/`}function L4(e,t,n){let r=new Int32Array(e.length+1),i=new Int32Array(e.length+1);r[e.length]=-1,i[e.length]=-1;let a=t===`all`?[`"`,`'`,"`"]:[`"`],o=a.map(()=>-1),s=a.map(()=>-1);for(let t=e.length-1;t>=0;t--){let c=e[t],l=a.indexOf(c),u=t+1;if(l!==-1||c===`{`){let n=l===-1?i[t+1]:o[l];u=n===-1?e.length:n+1}r[t]=c===`>`&&!n.has(t)?t:r[u],i[t]=c===`}`?t:i[u];for(let e=0;e<a.length;e++){let n=c===a[e]?t:c===`\\`?s[e]:o[e];s[e]=o[e],o[e]=n}}return r}function Kse(e,t){let n=[],r=Ose(e),i;for(let a of e.matchAll(/<\/?([A-Z][A-Za-z0-9.]*)/g)){let o=a.index;if(n.length>0){let[e,t]=n[n.length-1];if(o>e&&o<=t)continue}let s=o+a[0].length,c=E4(r,o),l=c<r.length?r[c]:e.length,u=E4(t,s);if(u>=t.length||t[u]>=l)continue;i??=L4(e,`all`,new Set);let d=i[s];d!==-1&&d<l&&n.push([o,d])}return n}function qse(e,t){if(t.length===0)return!1;let n=0,r=t.length-1;for(;n<=r;){let i=n+r>>>1,[a,o]=t[i];if(e<=a)r=i-1;else if(e>o)n=i+1;else return!0}return!1}function Jse(e,t,n,r){let i=Math.min(t.length,n),a=r[e];return a>0&&a<i&&t[a-1]===`/`}function R4(e,t){let n=Yse(e,t.escapeAware),r=new Set(n),i=[],a=[];return z4(e,t.escapeAware,{onFlush:()=>{a.length=0},onBrace:(e,t)=>{if(!r.has(e)){if(t===`{`)a.push(e);else if(a.length>0){let t=a.pop();a.length===0&&i.push({start:t,end:e+1})}}}}),{matched:i,unmatched:n}}function Yse(e,t){let n=[],r=[];return z4(e,t,{onFlush:()=>{n.push(...r),r.length=0},onBrace:(e,t)=>{t===`{`?r.push(e):r.length>0&&r.pop()}}),n.push(...r),n}function z4(e,t,n){for(let r=0;r<e.length;r++){if(e[r]===`
|
|
316
316
|
`){let t=e[r+1];if(t===`
|
|
317
317
|
`||t===`>`){if(n.onFlush(),t===`
|
|
318
318
|
`)for(;e[r+1]===`
|
|
319
|
-
`;)r++;continue}}let i=e[r];if(i===`{`||i===`}`){if(t){let t=0;for(let n=r-1;n>=0&&e[n]===`\\`;n--)t++;if(t%2==1)continue}n.onBrace(r,i)}}}function Jse(e){let t=e;if(S4.test(t))for(let[e,n]of x4)t=t.replaceAll(e,n);t=t.replace(vse,e=>e.replace(/</g,``).replace(/>/g,``));let n=Vse(t);t=t.replace(_se,(e,t,r)=>n.opens.has(r)?e:n.forced.has(r)?`${e.slice(1)}`:`${t.replaceAll(`:`,``).replaceAll(`@`,``)}`);let r=new Map,i=[...f4(t),...ise(t)];t=t.replace(yse,(e,a,o)=>{if(n.opens.has(o))return e;if(n.forced.has(o))return`${e.slice(1)}`;if(T4.has(a)){let s=r.get(a)??0;if(s<xse(t,a,o,i,n))return r.set(a,s+1),e}return e.replace(/</g,``).replace(/>/g,``)}),t=t.replace(bse,(e,t,r,i)=>n.opens.has(i)?e:n.forced.has(i)?I4(e,i,n):w4.has(t)&&e.endsWith(`/>`)||T4.has(t)?e:t[0]===t[0].toLowerCase()&&t[0]!==t[0].toUpperCase()?I4(e,i,n):e),t=t.replace(/<>/g,(e,t)=>n.opens.has(t)?e:I4(e,t,n));let a=Cse(t,n),o=wse(t),s=Tse(t),c=Wse(t,s),l;t=t.replace(/</g,(e,r)=>{if(n.opens.has(r))return e;if(n.forced.has(r))return``;if(Gse(r,c))return e;let i=t.slice(r,r+256);if(i[1]===`/`)return/^<\/[a-zA-Z][a-zA-Z0-9.]*[ \t]*>/.test(i)?e:``;let u=/^<([a-z][a-z0-9]*)/.exec(i);if(u&&w4.has(u[1])&&Use(r,t,s,o))return e;let d=/^<([a-z][a-z0-9]*)([\s/>])/.exec(i);if(d&&T4.has(d[1])){let a=d[1];return i.startsWith(`<${a}/>`)||Hse(t,a,r,n)?e:``}let f=/^<([A-Z][a-zA-Z0-9.]*)[\s/>]/.exec(i);if(!f)return``;let p=f[1],m=E4(o,r),h=m<o.length?o[m]:t.length,g=r+1+p.length;if(s.length>0&&(l??=L4(t,`double`,n.closes),Kse(g,t,h,l)))return e;let _=a.get(p);return _&&E4(_,r)<_.length?e:``});{let{unmatched:e}=R4(t,{escapeAware:!0});if(e.length>0){let n=t.split(``);for(let t of e)n[t]=``;t=n.join(``)}}return t}function B4(e){return S4.test(e)||C4.test(e)}function Yse(){return e=>{ub(e,e=>{let t=e;typeof t.value==`string`&&B4(t.value)&&(t.value=V4(t.value)),typeof t.url==`string`&&B4(t.url)&&(t.url.startsWith(``)&&Xse(e),t.url=V4(t.url)),typeof t.title==`string`&&B4(t.title)&&(t.title=V4(t.title)),typeof t.alt==`string`&&B4(t.alt)&&(t.alt=V4(t.alt)),typeof t.lang==`string`&&B4(t.lang)&&(t.lang=V4(t.lang)),typeof t.meta==`string`&&B4(t.meta)&&(t.meta=V4(t.meta))})}}function Xse(e){(e.type===`link`||e.type===`image`||e.type===`definition`)&&(e.data??={},e.data.sourceGuardedDestinationOpen=!0)}function V4(e){let t=e.replaceAll(``,`<`).replaceAll(``,`>`).replaceAll(``,`:`).replaceAll(``,`@`).replaceAll(``,`{`);if(C4.test(t))for(let[e,n]of x4)t=t.replaceAll(n,e);return t}const H4=d4(),U4=R2(),W4=z2();function G4(){let e=this.data();e.micromarkExtensions||=[],e.fromMarkdownExtensions||=[],e.toMarkdownExtensions||=[];let t=e.micromarkExtensions;t.some(e=>e===H4)||t.push(H4);let n=e.fromMarkdownExtensions;n.some(e=>e===U4)||n.push(U4);let r=e.toMarkdownExtensions;r.some(e=>e===W4)||r.push(W4)}const K4=/(?<!\uE102)<br[ \t]*\/?>/g,Zse=new Set([`mdxJsxTextElement`,`mdxJsxFlowElement`]);function Qse(e,t){let n=[],r=!1;for(let i of e.children){if(i.type!==`text`){n.push(i);continue}let e=i.value;K4.lastIndex=0;let a=[],o=0;for(;;){let n=K4.exec(e);if(n===null)break;let s=n.index;s>o&&a.push(yY(t,i,o,s));let c={type:`break`,data:{sourceStyle:`html`,sourceRaw:n[0]}},l=CY(t,i,s,s+n[0].length);l&&(c.position=l),a.push(c),o=s+n[0].length,r=!0}a.length===0?n.push(i):(o<e.length&&a.push(yY(t,i,o,e.length)),n.push(...a))}r&&(e.children=n)}function $se(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;ub(e,e=>{if(Zse.has(e.type))return Gv;let t=e;Array.isArray(t.children)&&Qse(e,n)})}}function q4(e){return e===-2?` `:e===-1?` `:String.fromCharCode(e)}const ece={name:`wikiLink`,tokenize:(e,t,n)=>{let r=0,i=0,a=``;return o;function o(t){return t===91?(e.enter(`wikiLink`),e.enter(`wikiLinkMarker`),e.consume(t),s):n(t)}function s(t){return t===91?(e.consume(t),e.exit(`wikiLinkMarker`),e.enter(`wikiLinkTarget`),c):n(t)}function c(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),d(t)):t===35?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),l):t===124?QU(a)?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),a+=q4(t),c)}function l(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?r===0?n(t):(e.exit(`wikiLinkAnchor`),d(t)):t===124?r===0?n(t):(e.exit(`wikiLinkAnchor`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),r++,l)}function u(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?i===0?n(t):(e.exit(`wikiLinkAlias`),d(t)):(e.consume(t),i++,u)}function d(t){return t===93?(e.enter(`wikiLinkMarker`),e.consume(t),f):n(t)}function f(r){return r===93?(e.consume(r),e.exit(`wikiLinkMarker`),e.exit(`wikiLink`),t):n(r)}}},tce={name:`wikiLinkEmbed`,tokenize:(e,t,n)=>{let r=0,i=0,a=``;return o;function o(t){return t===33?(e.enter(`wikiLinkEmbed`),e.enter(`wikiLinkEmbedBang`),e.consume(t),e.exit(`wikiLinkEmbedBang`),s):n(t)}function s(t){return t===91?(e.enter(`wikiLinkMarker`),e.consume(t),c):n(t)}function c(t){return t===91?(e.consume(t),e.exit(`wikiLinkMarker`),e.enter(`wikiLinkTarget`),l):n(t)}function l(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),f(t)):t===35?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),u):t===124?QU(a)?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),d):(e.consume(t),a+=q4(t),l)}function u(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?r===0?n(t):(e.exit(`wikiLinkAnchor`),f(t)):t===124?r===0?n(t):(e.exit(`wikiLinkAnchor`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),d):(e.consume(t),r++,u)}function d(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?i===0?n(t):(e.exit(`wikiLinkAlias`),f(t)):(e.consume(t),i++,d)}function f(t){return t===93?(e.enter(`wikiLinkMarker`),e.consume(t),p):n(t)}function p(r){return r===93?(e.consume(r),e.exit(`wikiLinkMarker`),e.exit(`wikiLinkEmbed`),t):n(r)}}};function nce(){return{text:{91:ece,33:tce}}}function rce(e){this.enter({type:`wikiLink`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function ice(e){this.enter({type:`wikiLinkEmbed`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function J4(e){return e.stack[e.stack.length-1]}function ace(e){let t=J4(this),n=this.sliceSerialize(e);t.data.target=n.trim(),n!==t.data.target&&(t.data.sourceTarget=n)}function oce(e){let t=J4(this),n=this.sliceSerialize(e),r=n.trim();t.data.anchor=r.length?r:null,t.data.anchor!==null&&n!==r&&(t.data.sourceAnchor=n)}function sce(e){let t=J4(this),n=this.sliceSerialize(e),r=n.trim();t.data.alias=r.length?r:null,n!==r&&(t.data.sourceAlias=n)}function cce(e){let t={target:e.data.target,anchor:e.data.anchor??null,alias:e.data.alias??null},n=YU(t,{separatorCrossed:t.alias!==null||e.data.sourceAlias!=null});n.target!==t.target&&(e.data.sourceTarget??=t.target,e.data.target=n.target),n.anchor!==t.anchor&&(e.data.sourceAnchor??=t.anchor,e.data.anchor=n.anchor),n.alias!==t.alias&&(e.data.sourceAlias??=t.alias,e.data.alias=n.alias)}function Y4(e){cce(e);let{target:t,anchor:n,alias:r}=e.data,i=r||(n?`${t}#${n}`:t);e.value=i,e.children=[{type:`text`,value:i}]}function lce(e){Y4(J4(this)),this.exit(e)}function uce(e){Y4(J4(this)),this.exit(e)}const X4={enter:{wikiLink:rce,wikiLinkEmbed:ice},exit:{wikiLinkTarget:ace,wikiLinkAnchor:oce,wikiLinkAlias:sce,wikiLink:lce,wikiLinkEmbed:uce}};function Z4(e){return(t,n,r,i)=>{let a=t.data,o=r.stack.includes(`tableCell`),s=e=>o?tW(e):e,c=a?.target??``,l=a?.anchor,u=a?.alias,d=`${e}${s(ZU(a?.sourceTarget,c,`separatorAdjacent`))}`;if(l)d+=`#${s(ZU(a?.sourceAnchor,l,`separatorAdjacent`))}`;else{let e=s(ZU(a?.sourceAnchor,``,`separatorAdjacent`));e.length>0&&(d+=`#${e}`)}let f=u?ZU(a?.sourceAlias,u,`alias`):ZU(a?.sourceAlias,``,`alias`);if(f.length>0){let e=o&&!d.endsWith(`\\`)?`\\|`:`|`;d+=`${e}${s(f)}`}return`${d}]]`}}const Q4={handlers:{wikiLink:Z4(`[[`),wikiLinkEmbed:Z4(`![[`)},unsafe:[{character:`[`,inConstruct:[`phrasing`]}]},$4=nce();function e3(){let e=this.data();e.micromarkExtensions||=[],e.micromarkExtensions.some(e=>e===$4)||e.micromarkExtensions.push($4),e.fromMarkdownExtensions||=[],e.fromMarkdownExtensions.some(e=>e===X4)||e.fromMarkdownExtensions.push(X4),e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===Q4)||e.toMarkdownExtensions.push(Q4)}function t3(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}function n3(){let e=!1,t=``,n=0;return r=>{let i=dce(r);return e?(i&&i.char===t&&i.len>=n&&!i.hasInfo&&(e=!1,t=``,n=0),!0):i?(e=!0,t=i.char,n=i.len,!0):!1}}function dce(e){let t=(e.endsWith(`\r`)?e.slice(0,-1):e).match(/^ {0,3}([`~])(\1{2,})(.*)$/);return t?{char:t[1],len:1+t[2].length,hasInfo:t[3].trim()!==``}:null}function r3(e){if(!Number.isFinite(e)||e<0)return``;if(e<1024)return`${e} B`;let t=[`KiB`,`MiB`,`GiB`,`TiB`],n=e/1024,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(1).replace(/\.0$/,``)} ${t[r]}`}function fce(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(i3(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(i3(t.slice(i),i>0,!1)),a.join(``)}function i3(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===9||t===32;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===9||t===32;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function pce(e,t,n,r){let i=new Map,a=new Map,o={all:c,definitionById:i,footnoteById:a,footnoteCounts:new Map,footnoteOrder:[],one:s};return ub(r,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?i:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),o;function s(r,i){return s3(e,t,n,r,i,o)}function c(t){let n=[];if(`children`in t){let r=t.children,i=-1;for(;++i<r.length;){let a=o.one(r[i],t);if(a){let t=i?r[i-1]:void 0;if(t?.type===`break`&&t.data?.sourceStyle!==`html`){if(!Array.isArray(a)&&a.type===e.nodes.text){let t=a3(a.text);a=t.length>0?e.text(t):void 0}else if(!Array.isArray(a)&&a.type!==e.nodes.text){let t=a.firstChild;if(t&&t.type===e.nodes.text){let n=a3(t.text),r=U.from(a.content);a=a.copy(n.length>0?r.replaceChild(0,e.text(n)):r.cut(t.nodeSize))}}}}a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}}function mce(e){return e.replaceAll(/\n([^\n])/g,` $1`)}function hce(e,t,n){let r=t.referenceType,i=`]`;if(r===`collapsed`?i+=`[]`:r===`full`&&(i+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[e.text(`![`+(t.alt??``)+i)];let a=n.all(t),o=a[0];o&&o.type===e.nodes.text?a[0]=o.copy(U.from(e.text(`[`+(o.text??``)))):a.unshift(e.text(`[`));let s=a[a.length-1];return s&&s.type===e.nodes.text?a[a.length-1]=s.copy(U.from(e.text((s.text??``)+i))):a.push(e.text(i)),a}function gce(e){throw Error(`unknown markdown node: ${e.type}`)}function a3(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function o3(){}function _ce(e){throw Error("Expected node, not `"+JSON.stringify(e)+"`")}function vce(e,t,n,r){return Vy(`tagName`,{handlers:e})(t,n,r)}function s3(e,t,n,r,i,a){return Vy(`type`,{invalid:_ce,unknown:gce,handlers:{toml:o3,yaml:o3,definition:o3,footnoteDefinition:o3,root(t,n,r){let i=r.all(t);return e.topNodeType.create(null,i)},html(t){let r=r0(t.value).children[0];if(r?.type!==`element`)return null;let[,i]=r.children;if(i?.type!==`element`)return null;let o=i.children[0];return o?.type===`element`?vce(n,o,void 0,a)||(t.value?e.text(t.value):null):null},text(t){let n=mce(fce(String(t.value)));return n?e.text(n):null},...t,linkReference(n,r,i){if(t.linkReference)return t.linkReference(n,r,i);let a=String(n.identifier).toUpperCase(),o=i.definitionById.get(a);if(!o)return hce(e,n,i);let s={type:`link`,url:o.url,title:o.title,children:n.children,data:{...o.data,...n.data}};return t.link?.(s,r,i)}}})(r,i,a)}function c3(e,t){return(n,r,i)=>{let a=i.all(n);return e.createAndFill(t?.(n)??null,a)}}function l3(e,t){return(n,r,i)=>{let a=i.all(n),o=e.create(t?.(n)??null);return a.map(e=>e.mark(o.addToSet(e.marks)))}}const yce=function(e,t){let n=s3(t.schema,t.handlers,t.htmlHandlers??{},e,void 0,pce(t.schema,t.handlers,t.htmlHandlers??{},e));return n.check(),n},bce=function(e){this.compiler=function(t){return yce(t,e)}};function xce(e,t){let n={one:r,all:u,nodeHandlers:e,markHandlers:t};function r(e,t){let r=e.type.schema,i=e.type.name,a=n.nodeHandlers[i];if(a)return a(e,t,n);if(e.type===r.topNodeType){let t=n.all(e);return t.some(e=>Fv(e,`root`)),{type:`root`,children:t}}return e.type===r.nodes.text?{type:`text`,value:e.text}:null}function i(e){if(e.length===0)return[];let t=e[0].marks,n=[];for(let r of t){let t=!0;for(let n=1;n<e.length;n++)if(!e[n].marks.some(e=>e.eq(r))){t=!1;break}t&&n.push(r)}return n}function a(e,t){let n=e.findIndex(e=>e.eq(t));return n===-1?e:e.slice(0,n).concat(e.slice(n+1))}function o(e,t){let n=[];for(let r of e)t.some(e=>e.eq(r))&&n.push(r);return n}function s(e,t,r){let i=n.markHandlers[e.type.name];if(!i)return r;let a=i(e,t,r,n);return(Array.isArray(a)?a:[a]).filter(e=>e!=null)}function c(e,t){let r=[];for(let i of e){let e=n.one(i.node,t);e!=null&&r.push(e)}return r}function l(e,t){if(e.length===0)return[];if(e.every(e=>e.marks.length===0))return c(e,t);let n=i(e);if(n.length>0){let r=n[0];return s(r,t,l(e.map(e=>({node:e.node,marks:a(e.marks,r)})),t))}let r=[],u=[e[0]],d=e[0].marks.slice();for(let t=1;t<e.length;t++){let n=e[t],i=o(d,n.marks),a=d.length===0&&n.marks.length===0;i.length>0||a?(u.push(n),d=a?[]:i):(r.push(u),u=[n],d=n.marks.slice())}if(r.push(u),r.length===1&&e.length>1){console.warn(`[mdast-util-from-prosemirror] degenerate mark partition; falling back to per-span rendering`,{spanCount:e.length,firstSpanMarks:e[0]?.marks.map(e=>e.type.name),lastSpanMarks:e[e.length-1]?.marks.map(e=>e.type.name)});let n=[];for(let r of e)for(let e of l([r],t))n.push(e);return n}let f=[];for(let e of r)for(let n of l(e,t))f.push(n);return f}function u(e){return l(e.children.map(e=>({node:e,marks:e.marks})),e)}return n}function Sce(e,t){return xce(t.nodeHandlers,t.markHandlers).one(e)}function u3(e,t){return(n,r,i)=>{let a=i.all(n);return{type:e,...t?.(n),children:a}}}function d3(e,t){return(n,r,i)=>({type:e,...t?.(n),children:i})}function Cce(e){return e.charAt(0).toUpperCase()+e.slice(1)}const wce={note:`<svg class="octicon octicon-info mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>`,tip:`<svg class="octicon octicon-light-bulb mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></svg>`,important:`<svg class="octicon octicon-report mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>`,warning:`<svg class="octicon octicon-alert mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>`,caution:`<svg class="octicon octicon-stop mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>`};function Tce(e){return e.replace(`<svg`,~e.indexOf(`xmlns`)?`<svg`:`<svg xmlns="http://www.w3.org/2000/svg"`).replaceAll(`"`,`'`).replaceAll(`%`,`%25`).replaceAll(`#`,`%23`).replaceAll(`{`,`%7B`).replaceAll(`}`,`%7D`).replaceAll(`<`,`%3C`).replaceAll(`>`,`%3E`)}const Ece=(e={})=>{let{markers:t=[`TIP`,`NOTE`,`IMPORTANT`,`WARNING`,`CAUTION`],icons:n=wce,matchCaseSensitive:r=!1,titles:i={},classPrefix:a=`markdown-alert`,ignoreSquareBracket:o=!1}=e,s=t===`*`?`\\w+`:t.join(`|`),c=RegExp(o?`^!(${s})([^\\n\\r]*)`:`^\\[\\!(${s})\\]([^\\n\\r]*)`,r?``:`i`);return e=>(ub(e,`blockquote`,(e,t,r)=>{let o=e.children[0];if(!o)return;let s=o.children?.[0];if(!s||(!(`value`in s)&&`children`in s&&s.children[0]&&(s=s.children[0]),s.type!==`text`))return;let l=s.value.match(c);if(!l)return;let u=l[1]?.toLowerCase(),d=l[2]?.trim()||(i[u]??Cce(u)),f=n[u],p=`data:image/svg+xml;utf8,${Tce(f)}`;t===void 0||!r||(s.value=s.value.slice(l[0].length).trimStart(),e.data={hName:`div`,hProperties:{class:`${a} ${a}-${u}`}},e.children=[{type:`paragraph`,data:{hName:`p`,hProperties:{class:`${a}-title`}},children:[{type:`span`,data:{hName:`span`,hProperties:{class:`octicon octicon-${u}`,style:`--oct-icon: url("${p}")`}}},{type:`text`,value:d}]},...e.children])}),e)};function Dce(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:a},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:s,mathText:o,mathTextData:s}};function e(e){this.enter({type:`math`,meta:null,value:``,data:{hName:`pre`,hChildren:[{type:`element`,tagName:`code`,properties:{className:[`language-math`,`math-display`]},children:[]}]}},e)}function t(){this.buffer()}function n(){let e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.meta=e}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(e){let t=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t;let r=n.data.hChildren[0];r.type,r.tagName,r.children.push({type:`text`,value:t}),this.data.mathFlowInside=void 0}function a(e){this.enter({type:`inlineMath`,value:``,data:{hName:`code`,hProperties:{className:[`language-math`,`math-inline`]},hChildren:[]}},e),this.buffer()}function o(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t,n.data.hChildren.push({type:`text`,value:t})}function s(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}}function Oce(e){let t=(e||{}).singleDollarTextMath;return t??=!0,r.peek=i,{unsafe:[{character:`\r`,inConstruct:`mathFlowMeta`},{character:`
|
|
319
|
+
`;)r++;continue}}let i=e[r];if(i===`{`||i===`}`){if(t){let t=0;for(let n=r-1;n>=0&&e[n]===`\\`;n--)t++;if(t%2==1)continue}n.onBrace(r,i)}}}function Xse(e){let t=e;if(S4.test(t))for(let[e,n]of x4)t=t.replaceAll(e,n);t=t.replace(bse,e=>e.replace(/</g,``).replace(/>/g,``));let n=Use(t);t=t.replace(yse,(e,t,r)=>n.opens.has(r)?e:n.forced.has(r)?`${e.slice(1)}`:`${t.replaceAll(`:`,``).replaceAll(`@`,``)}`);let r=new Map,i=[...f4(t),...ose(t)];t=t.replace(xse,(e,a,o)=>{if(n.opens.has(o))return e;if(n.forced.has(o))return`${e.slice(1)}`;if(T4.has(a)){let s=r.get(a)??0;if(s<Cse(t,a,o,i,n))return r.set(a,s+1),e}return e.replace(/</g,``).replace(/>/g,``)}),t=t.replace(Sse,(e,t,r,i)=>n.opens.has(i)?e:n.forced.has(i)?I4(e,i,n):w4.has(t)&&e.endsWith(`/>`)||T4.has(t)?e:t[0]===t[0].toLowerCase()&&t[0]!==t[0].toUpperCase()?I4(e,i,n):e),t=t.replace(/<>/g,(e,t)=>n.opens.has(t)?e:I4(e,t,n));let a=Tse(t,n),o=Ese(t),s=Dse(t),c=Kse(t,s),l;t=t.replace(/</g,(e,r)=>{if(n.opens.has(r))return e;if(n.forced.has(r))return``;if(qse(r,c))return e;let i=t.slice(r,r+256);if(i[1]===`/`)return/^<\/[a-zA-Z][a-zA-Z0-9.]*[ \t]*>/.test(i)?e:``;let u=/^<([a-z][a-z0-9]*)/.exec(i);if(u&&w4.has(u[1])&&Gse(r,t,s,o))return e;let d=/^<([a-z][a-z0-9]*)([\s/>])/.exec(i);if(d&&T4.has(d[1])){let a=d[1];return i.startsWith(`<${a}/>`)||Wse(t,a,r,n)?e:``}let f=/^<([A-Z][a-zA-Z0-9.]*)[\s/>]/.exec(i);if(!f)return``;let p=f[1],m=E4(o,r),h=m<o.length?o[m]:t.length,g=r+1+p.length;if(s.length>0&&(l??=L4(t,`double`,n.closes),Jse(g,t,h,l)))return e;let _=a.get(p);return _&&E4(_,r)<_.length?e:``});{let{unmatched:e}=R4(t,{escapeAware:!0});if(e.length>0){let n=t.split(``);for(let t of e)n[t]=``;t=n.join(``)}}return t}function B4(e){return S4.test(e)||C4.test(e)}function Zse(){return e=>{ub(e,e=>{let t=e;typeof t.value==`string`&&B4(t.value)&&(t.value=V4(t.value)),typeof t.url==`string`&&B4(t.url)&&(t.url.startsWith(``)&&Qse(e),t.url=V4(t.url)),typeof t.title==`string`&&B4(t.title)&&(t.title=V4(t.title)),typeof t.alt==`string`&&B4(t.alt)&&(t.alt=V4(t.alt)),typeof t.lang==`string`&&B4(t.lang)&&(t.lang=V4(t.lang)),typeof t.meta==`string`&&B4(t.meta)&&(t.meta=V4(t.meta))})}}function Qse(e){(e.type===`link`||e.type===`image`||e.type===`definition`)&&(e.data??={},e.data.sourceGuardedDestinationOpen=!0)}function V4(e){let t=e.replaceAll(``,`<`).replaceAll(``,`>`).replaceAll(``,`:`).replaceAll(``,`@`).replaceAll(``,`{`);if(C4.test(t))for(let[e,n]of x4)t=t.replaceAll(n,e);return t}const H4=d4(),U4=B2(),W4=V2();function G4(){let e=this.data();e.micromarkExtensions||=[],e.fromMarkdownExtensions||=[],e.toMarkdownExtensions||=[];let t=e.micromarkExtensions;t.some(e=>e===H4)||t.push(H4);let n=e.fromMarkdownExtensions;n.some(e=>e===U4)||n.push(U4);let r=e.toMarkdownExtensions;r.some(e=>e===W4)||r.push(W4)}const K4=/(?<!\uE102)<br[ \t]*\/?>/g,$se=new Set([`mdxJsxTextElement`,`mdxJsxFlowElement`]);function ece(e,t){let n=[],r=!1;for(let i of e.children){if(i.type!==`text`){n.push(i);continue}let e=i.value;K4.lastIndex=0;let a=[],o=0;for(;;){let n=K4.exec(e);if(n===null)break;let s=n.index;s>o&&a.push(yY(t,i,o,s));let c={type:`break`,data:{sourceStyle:`html`,sourceRaw:n[0]}},l=CY(t,i,s,s+n[0].length);l&&(c.position=l),a.push(c),o=s+n[0].length,r=!0}a.length===0?n.push(i):(o<e.length&&a.push(yY(t,i,o,e.length)),n.push(...a))}r&&(e.children=n)}function tce(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;ub(e,e=>{if($se.has(e.type))return Gv;let t=e;Array.isArray(t.children)&&ece(e,n)})}}function q4(e){return e===-2?` `:e===-1?` `:String.fromCharCode(e)}const nce={name:`wikiLink`,tokenize:(e,t,n)=>{let r=0,i=0,a=``;return o;function o(t){return t===91?(e.enter(`wikiLink`),e.enter(`wikiLinkMarker`),e.consume(t),s):n(t)}function s(t){return t===91?(e.consume(t),e.exit(`wikiLinkMarker`),e.enter(`wikiLinkTarget`),c):n(t)}function c(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),d(t)):t===35?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),l):t===124?QU(a)?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),a+=q4(t),c)}function l(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?r===0?n(t):(e.exit(`wikiLinkAnchor`),d(t)):t===124?r===0?n(t):(e.exit(`wikiLinkAnchor`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),r++,l)}function u(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?i===0?n(t):(e.exit(`wikiLinkAlias`),d(t)):(e.consume(t),i++,u)}function d(t){return t===93?(e.enter(`wikiLinkMarker`),e.consume(t),f):n(t)}function f(r){return r===93?(e.consume(r),e.exit(`wikiLinkMarker`),e.exit(`wikiLink`),t):n(r)}}},rce={name:`wikiLinkEmbed`,tokenize:(e,t,n)=>{let r=0,i=0,a=``;return o;function o(t){return t===33?(e.enter(`wikiLinkEmbed`),e.enter(`wikiLinkEmbedBang`),e.consume(t),e.exit(`wikiLinkEmbedBang`),s):n(t)}function s(t){return t===91?(e.enter(`wikiLinkMarker`),e.consume(t),c):n(t)}function c(t){return t===91?(e.consume(t),e.exit(`wikiLinkMarker`),e.enter(`wikiLinkTarget`),l):n(t)}function l(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),f(t)):t===35?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),u):t===124?QU(a)?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),d):(e.consume(t),a+=q4(t),l)}function u(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?r===0?n(t):(e.exit(`wikiLinkAnchor`),f(t)):t===124?r===0?n(t):(e.exit(`wikiLinkAnchor`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),d):(e.consume(t),r++,u)}function d(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?i===0?n(t):(e.exit(`wikiLinkAlias`),f(t)):(e.consume(t),i++,d)}function f(t){return t===93?(e.enter(`wikiLinkMarker`),e.consume(t),p):n(t)}function p(r){return r===93?(e.consume(r),e.exit(`wikiLinkMarker`),e.exit(`wikiLinkEmbed`),t):n(r)}}};function ice(){return{text:{91:nce,33:rce}}}function ace(e){this.enter({type:`wikiLink`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function oce(e){this.enter({type:`wikiLinkEmbed`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function J4(e){return e.stack[e.stack.length-1]}function sce(e){let t=J4(this),n=this.sliceSerialize(e);t.data.target=n.trim(),n!==t.data.target&&(t.data.sourceTarget=n)}function cce(e){let t=J4(this),n=this.sliceSerialize(e),r=n.trim();t.data.anchor=r.length?r:null,t.data.anchor!==null&&n!==r&&(t.data.sourceAnchor=n)}function lce(e){let t=J4(this),n=this.sliceSerialize(e),r=n.trim();t.data.alias=r.length?r:null,n!==r&&(t.data.sourceAlias=n)}function uce(e){let t={target:e.data.target,anchor:e.data.anchor??null,alias:e.data.alias??null},n=YU(t,{separatorCrossed:t.alias!==null||e.data.sourceAlias!=null});n.target!==t.target&&(e.data.sourceTarget??=t.target,e.data.target=n.target),n.anchor!==t.anchor&&(e.data.sourceAnchor??=t.anchor,e.data.anchor=n.anchor),n.alias!==t.alias&&(e.data.sourceAlias??=t.alias,e.data.alias=n.alias)}function Y4(e){uce(e);let{target:t,anchor:n,alias:r}=e.data,i=r||(n?`${t}#${n}`:t);e.value=i,e.children=[{type:`text`,value:i}]}function dce(e){Y4(J4(this)),this.exit(e)}function fce(e){Y4(J4(this)),this.exit(e)}const X4={enter:{wikiLink:ace,wikiLinkEmbed:oce},exit:{wikiLinkTarget:sce,wikiLinkAnchor:cce,wikiLinkAlias:lce,wikiLink:dce,wikiLinkEmbed:fce}};function Z4(e){return(t,n,r,i)=>{let a=t.data,o=r.stack.includes(`tableCell`),s=e=>o?tW(e):e,c=a?.target??``,l=a?.anchor,u=a?.alias,d=`${e}${s(ZU(a?.sourceTarget,c,`separatorAdjacent`))}`;if(l)d+=`#${s(ZU(a?.sourceAnchor,l,`separatorAdjacent`))}`;else{let e=s(ZU(a?.sourceAnchor,``,`separatorAdjacent`));e.length>0&&(d+=`#${e}`)}let f=u?ZU(a?.sourceAlias,u,`alias`):ZU(a?.sourceAlias,``,`alias`);if(f.length>0){let e=o&&!d.endsWith(`\\`)?`\\|`:`|`;d+=`${e}${s(f)}`}return`${d}]]`}}const Q4={handlers:{wikiLink:Z4(`[[`),wikiLinkEmbed:Z4(`![[`)},unsafe:[{character:`[`,inConstruct:[`phrasing`]}]},$4=ice();function e3(){let e=this.data();e.micromarkExtensions||=[],e.micromarkExtensions.some(e=>e===$4)||e.micromarkExtensions.push($4),e.fromMarkdownExtensions||=[],e.fromMarkdownExtensions.some(e=>e===X4)||e.fromMarkdownExtensions.push(X4),e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===Q4)||e.toMarkdownExtensions.push(Q4)}function t3(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}function n3(){let e=!1,t=``,n=0;return r=>{let i=pce(r);return e?(i&&i.char===t&&i.len>=n&&!i.hasInfo&&(e=!1,t=``,n=0),!0):i?(e=!0,t=i.char,n=i.len,!0):!1}}function pce(e){let t=(e.endsWith(`\r`)?e.slice(0,-1):e).match(/^ {0,3}([`~])(\1{2,})(.*)$/);return t?{char:t[1],len:1+t[2].length,hasInfo:t[3].trim()!==``}:null}function r3(e){if(!Number.isFinite(e)||e<0)return``;if(e<1024)return`${e} B`;let t=[`KiB`,`MiB`,`GiB`,`TiB`],n=e/1024,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(1).replace(/\.0$/,``)} ${t[r]}`}function mce(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(i3(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(i3(t.slice(i),i>0,!1)),a.join(``)}function i3(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===9||t===32;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===9||t===32;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function hce(e,t,n,r){let i=new Map,a=new Map,o={all:c,definitionById:i,footnoteById:a,footnoteCounts:new Map,footnoteOrder:[],one:s};return ub(r,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?i:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),o;function s(r,i){return s3(e,t,n,r,i,o)}function c(t){let n=[];if(`children`in t){let r=t.children,i=-1;for(;++i<r.length;){let a=o.one(r[i],t);if(a){let t=i?r[i-1]:void 0;if(t?.type===`break`&&t.data?.sourceStyle!==`html`){if(!Array.isArray(a)&&a.type===e.nodes.text){let t=a3(a.text);a=t.length>0?e.text(t):void 0}else if(!Array.isArray(a)&&a.type!==e.nodes.text){let t=a.firstChild;if(t&&t.type===e.nodes.text){let n=a3(t.text),r=U.from(a.content);a=a.copy(n.length>0?r.replaceChild(0,e.text(n)):r.cut(t.nodeSize))}}}}a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}}function gce(e){return e.replaceAll(/\n([^\n])/g,` $1`)}function _ce(e,t,n){let r=t.referenceType,i=`]`;if(r===`collapsed`?i+=`[]`:r===`full`&&(i+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[e.text(`![`+(t.alt??``)+i)];let a=n.all(t),o=a[0];o&&o.type===e.nodes.text?a[0]=o.copy(U.from(e.text(`[`+(o.text??``)))):a.unshift(e.text(`[`));let s=a[a.length-1];return s&&s.type===e.nodes.text?a[a.length-1]=s.copy(U.from(e.text((s.text??``)+i))):a.push(e.text(i)),a}function vce(e){throw Error(`unknown markdown node: ${e.type}`)}function a3(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function o3(){}function yce(e){throw Error("Expected node, not `"+JSON.stringify(e)+"`")}function bce(e,t,n,r){return Vy(`tagName`,{handlers:e})(t,n,r)}function s3(e,t,n,r,i,a){return Vy(`type`,{invalid:yce,unknown:vce,handlers:{toml:o3,yaml:o3,definition:o3,footnoteDefinition:o3,root(t,n,r){let i=r.all(t);return e.topNodeType.create(null,i)},html(t){let r=r0(t.value).children[0];if(r?.type!==`element`)return null;let[,i]=r.children;if(i?.type!==`element`)return null;let o=i.children[0];return o?.type===`element`?bce(n,o,void 0,a)||(t.value?e.text(t.value):null):null},text(t){let n=gce(mce(String(t.value)));return n?e.text(n):null},...t,linkReference(n,r,i){if(t.linkReference)return t.linkReference(n,r,i);let a=String(n.identifier).toUpperCase(),o=i.definitionById.get(a);if(!o)return _ce(e,n,i);let s={type:`link`,url:o.url,title:o.title,children:n.children,data:{...o.data,...n.data}};return t.link?.(s,r,i)}}})(r,i,a)}function c3(e,t){return(n,r,i)=>{let a=i.all(n);return e.createAndFill(t?.(n)??null,a)}}function l3(e,t){return(n,r,i)=>{let a=i.all(n),o=e.create(t?.(n)??null);return a.map(e=>e.mark(o.addToSet(e.marks)))}}const xce=function(e,t){let n=s3(t.schema,t.handlers,t.htmlHandlers??{},e,void 0,hce(t.schema,t.handlers,t.htmlHandlers??{},e));return n.check(),n},Sce=function(e){this.compiler=function(t){return xce(t,e)}};function Cce(e,t){let n={one:r,all:u,nodeHandlers:e,markHandlers:t};function r(e,t){let r=e.type.schema,i=e.type.name,a=n.nodeHandlers[i];if(a)return a(e,t,n);if(e.type===r.topNodeType){let t=n.all(e);return t.some(e=>Fv(e,`root`)),{type:`root`,children:t}}return e.type===r.nodes.text?{type:`text`,value:e.text}:null}function i(e){if(e.length===0)return[];let t=e[0].marks,n=[];for(let r of t){let t=!0;for(let n=1;n<e.length;n++)if(!e[n].marks.some(e=>e.eq(r))){t=!1;break}t&&n.push(r)}return n}function a(e,t){let n=e.findIndex(e=>e.eq(t));return n===-1?e:e.slice(0,n).concat(e.slice(n+1))}function o(e,t){let n=[];for(let r of e)t.some(e=>e.eq(r))&&n.push(r);return n}function s(e,t,r){let i=n.markHandlers[e.type.name];if(!i)return r;let a=i(e,t,r,n);return(Array.isArray(a)?a:[a]).filter(e=>e!=null)}function c(e,t){let r=[];for(let i of e){let e=n.one(i.node,t);e!=null&&r.push(e)}return r}function l(e,t){if(e.length===0)return[];if(e.every(e=>e.marks.length===0))return c(e,t);let n=i(e);if(n.length>0){let r=n[0];return s(r,t,l(e.map(e=>({node:e.node,marks:a(e.marks,r)})),t))}let r=[],u=[e[0]],d=e[0].marks.slice();for(let t=1;t<e.length;t++){let n=e[t],i=o(d,n.marks),a=d.length===0&&n.marks.length===0;i.length>0||a?(u.push(n),d=a?[]:i):(r.push(u),u=[n],d=n.marks.slice())}if(r.push(u),r.length===1&&e.length>1){console.warn(`[mdast-util-from-prosemirror] degenerate mark partition; falling back to per-span rendering`,{spanCount:e.length,firstSpanMarks:e[0]?.marks.map(e=>e.type.name),lastSpanMarks:e[e.length-1]?.marks.map(e=>e.type.name)});let n=[];for(let r of e)for(let e of l([r],t))n.push(e);return n}let f=[];for(let e of r)for(let n of l(e,t))f.push(n);return f}function u(e){return l(e.children.map(e=>({node:e,marks:e.marks})),e)}return n}function wce(e,t){return Cce(t.nodeHandlers,t.markHandlers).one(e)}function u3(e,t){return(n,r,i)=>{let a=i.all(n);return{type:e,...t?.(n),children:a}}}function d3(e,t){return(n,r,i)=>({type:e,...t?.(n),children:i})}function Tce(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Ece={note:`<svg class="octicon octicon-info mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>`,tip:`<svg class="octicon octicon-light-bulb mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></svg>`,important:`<svg class="octicon octicon-report mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>`,warning:`<svg class="octicon octicon-alert mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>`,caution:`<svg class="octicon octicon-stop mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>`};function Dce(e){return e.replace(`<svg`,~e.indexOf(`xmlns`)?`<svg`:`<svg xmlns="http://www.w3.org/2000/svg"`).replaceAll(`"`,`'`).replaceAll(`%`,`%25`).replaceAll(`#`,`%23`).replaceAll(`{`,`%7B`).replaceAll(`}`,`%7D`).replaceAll(`<`,`%3C`).replaceAll(`>`,`%3E`)}const Oce=(e={})=>{let{markers:t=[`TIP`,`NOTE`,`IMPORTANT`,`WARNING`,`CAUTION`],icons:n=Ece,matchCaseSensitive:r=!1,titles:i={},classPrefix:a=`markdown-alert`,ignoreSquareBracket:o=!1}=e,s=t===`*`?`\\w+`:t.join(`|`),c=RegExp(o?`^!(${s})([^\\n\\r]*)`:`^\\[\\!(${s})\\]([^\\n\\r]*)`,r?``:`i`);return e=>(ub(e,`blockquote`,(e,t,r)=>{let o=e.children[0];if(!o)return;let s=o.children?.[0];if(!s||(!(`value`in s)&&`children`in s&&s.children[0]&&(s=s.children[0]),s.type!==`text`))return;let l=s.value.match(c);if(!l)return;let u=l[1]?.toLowerCase(),d=l[2]?.trim()||(i[u]??Tce(u)),f=n[u],p=`data:image/svg+xml;utf8,${Dce(f)}`;t===void 0||!r||(s.value=s.value.slice(l[0].length).trimStart(),e.data={hName:`div`,hProperties:{class:`${a} ${a}-${u}`}},e.children=[{type:`paragraph`,data:{hName:`p`,hProperties:{class:`${a}-title`}},children:[{type:`span`,data:{hName:`span`,hProperties:{class:`octicon octicon-${u}`,style:`--oct-icon: url("${p}")`}}},{type:`text`,value:d}]},...e.children])}),e)};function kce(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:a},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:s,mathText:o,mathTextData:s}};function e(e){this.enter({type:`math`,meta:null,value:``,data:{hName:`pre`,hChildren:[{type:`element`,tagName:`code`,properties:{className:[`language-math`,`math-display`]},children:[]}]}},e)}function t(){this.buffer()}function n(){let e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.meta=e}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(e){let t=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t;let r=n.data.hChildren[0];r.type,r.tagName,r.children.push({type:`text`,value:t}),this.data.mathFlowInside=void 0}function a(e){this.enter({type:`inlineMath`,value:``,data:{hName:`code`,hProperties:{className:[`language-math`,`math-inline`]},hChildren:[]}},e),this.buffer()}function o(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t,n.data.hChildren.push({type:`text`,value:t})}function s(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}}function Ace(e){let t=(e||{}).singleDollarTextMath;return t??=!0,r.peek=i,{unsafe:[{character:`\r`,inConstruct:`mathFlowMeta`},{character:`
|
|
320
320
|
`,inConstruct:`mathFlowMeta`},{character:`$`,after:t?void 0:`\\$`,inConstruct:`phrasing`},{character:`$`,inConstruct:`mathFlowMeta`},{atBreak:!0,character:`$`,after:`\\$`}],handlers:{math:n,inlineMath:r}};function n(e,t,n,r){let i=e.value||``,a=n.createTracker(r),o=`$`.repeat(Math.max(Zy(i,`$`)+1,2)),s=n.enter(`mathFlow`),c=a.move(o);if(e.meta){let t=n.enter(`mathFlowMeta`);c+=a.move(n.safe(e.meta,{after:`
|
|
321
321
|
`,before:c,encode:[`$`],...a.current()})),t()}return c+=a.move(`
|
|
322
322
|
`),i&&(c+=a.move(i+`
|
|
323
|
-
`)),c+=a.move(o),s(),c}function r(e,n,r){let i=e.value||``,a=1;for(t||a++;RegExp(`(^|[^$])`+`\\$`.repeat(a)+`([^$]|$)`).test(i);)a++;let o=`$`.repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` `+i+` `);let s=-1;for(;++s<r.unsafe.length;){let e=r.unsafe[s];if(!e.atBreak)continue;let t=r.compilePattern(e),n;for(;n=t.exec(i);){let e=n.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=i.slice(0,e)+` `+i.slice(n.index+1)}}return o+i+o}function i(){return`$`}}const
|
|
324
|
-
`)}\n\n`:``}function
|
|
323
|
+
`)),c+=a.move(o),s(),c}function r(e,n,r){let i=e.value||``,a=1;for(t||a++;RegExp(`(^|[^$])`+`\\$`.repeat(a)+`([^$]|$)`).test(i);)a++;let o=`$`.repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` `+i+` `);let s=-1;for(;++s<r.unsafe.length;){let e=r.unsafe[s];if(!e.atBreak)continue;let t=r.compilePattern(e),n;for(;n=t.exec(i);){let e=n.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=i.slice(0,e)+` `+i.slice(n.index+1)}}return o+i+o}function i(){return`$`}}const jce={};function f3(e){let t=this,n=e||jce,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(FD(n)),a.push(kce()),o.push(Ace(n))}const Mce=/[\s/>{]/;function p3(e){return Zu(ld(e))}function m3(e,t){return e.type===`mdxJsxFlowElement`&&e.name===t&&!e.data?.htmlBoundary?e:null}function Nce(e,t){let n=e.indexOf(`<`);if(n<0||e.slice(0,n).trim()!==``)return null;let r=n+1+t.length;if(!e.startsWith(`<${t}`,n)||!Mce.test(e[r]??``))return null;let i=null,a=0;for(let o=r;o<e.length;o++){let r=e[o];if(i!==null)r===i&&(i=null);else if(a>0)r===`{`?a++:r===`}`&&a--;else if(r===`{`)a=1;else if(r===`"`||r===`'`)i=r;else if(r===`>`){if(e[o-1]===`/`)return null;let r=e.slice(o+1);return r.trimEnd().endsWith(`</${t}>`)?{leading:e.slice(0,n),afterOpenTag:r}:null}}return null}function Pce(e){let t=new Map,n=(t,n,r)=>{let i=e(t),a=i.childCount===1?i.firstChild:null;if(a?.type.name!==`jsxComponent`||a.attrs.kind!==`element`)return null;let o=m3(r(a),n);return o?{attributes:p3(o.attributes),children:p3(o.children)}:null},r=(e,r,i)=>{let a=t.get(e);if(a!==void 0)return a;let o=n(e,r,i);if(t.size>=256){let e=t.keys().next().value;e!==void 0&&t.delete(e)}return t.set(e,o),o};return{read(e,t,n){let{componentName:i,sourceRaw:a,kind:o}=e.attrs;if(o!==`element`||e.childCount===0||typeof i!=`string`||i===``||typeof a!=`string`||a===``)return null;let s=Nce(a,i);if(!s)return null;let c=r(a,i,n);return!c||p3(t.children)!==c.children?null:p3(t.attributes)===c.attributes?{kind:`verbatim`}:{kind:`body`,body:s}}}}const Fce=/^[ \t]{0,3}\[([^\]]+)\]:\s*(\S+)(\s+(?:"[^"]*"|'[^']*'|\([^)]*\)))?\s*$/gm;function h3(e){let t=f4(e),n=[];for(let r of e.matchAll(Fce))p4(r.index,t)||n.push(r[0].trimEnd());return n.length>0?`${n.join(`
|
|
324
|
+
`)}\n\n`:``}function Ice(e,t){let n={startMs:typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),calls:0};return v3(e,t.parse,0,n)}function g3(e){return e.calls>=1e3||(typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now())-e.startMs>=500}function _3(e){return e instanceof Error?{name:e.name,message:e.message.slice(0,500),stack:e.stack?.split(`
|
|
325
325
|
`).slice(0,4).join(`
|
|
326
|
-
`)}:{name:`UnknownError`,message:String(e??`unknown`).slice(0,500)}}function v3(e,t,n,r){if(n>20)return
|
|
327
|
-
`,t),r=(n===-1?e.slice(t):e.slice(t,n)).match(
|
|
326
|
+
`)}:{name:`UnknownError`,message:String(e??`unknown`).slice(0,500)}}function v3(e,t,n,r){if(n>20)return l2(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`MAX_SPLIT_DEPTH exceeded`})),b3(e);if(r){if(g3(r))return u2(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`parse budget exhausted`,calls:r.calls})),b3(e);r.calls+=1}try{return t(e)}catch(i){let a=Lce(i),o=_3(i);if(a===void 0){if(n===0){let n=Uce(e,t,i,r);if(n)return n}return l2(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:o.message,error:o})),b3(e)}c2(),console.warn(JSON.stringify({event:`mdx-block-fallback`,offset:a,reason:o.message,error:o}));try{let i=Vce(e,a),s=e.slice(i.start,i.end),c=e.slice(0,i.start).replace(/\n+$/,``),l=e.slice(i.end).replace(/^\n+/,``),u=c.trim()?v3(c,t,n+1,r):{type:`doc`,content:[]},d=l.trim()?v3(h3(c)+l,t,n+1,r):{type:`doc`,content:[]},f={type:`rawMdxFallback`,attrs:{reason:o.message,originalSpan:{start:i.start,end:i.end}},content:s?[{type:`text`,text:s}]:[]},p=[...u.content??[],f,...d.content??[]];return{type:`doc`,content:p.length>0?p:[{type:`paragraph`,content:[]}]}}catch(t){l2();let n=_3(t);return console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`Recovery failed: ${n.message}`,recoveryPath:`block-split-then-rejoin`,error:n,originalError:o})),b3(e)}}}function Lce(e){if(!e||typeof e!=`object`)return;let t=e;if(t.place&&typeof t.place.offset==`number`)return t.place.offset;if(t.place?.start&&typeof t.place.start.offset==`number`)return t.place.start.offset;if(t.position&&typeof t.position.offset==`number`)return t.position.offset;if(t.position?.start&&typeof t.position.start.offset==`number`)return t.position.start.offset}function Rce(e,t){let n=/\n\s*\n/g,r=null;for(let i of e.matchAll(n)){if(i.index>=t)break;r=i.index+i[0].length}return r}function y3(e,t){for(let n of e.matchAll(/\n\s*\n/g))if(n.index>=t)return n.index;return null}function zce(e,t){let n=[];for(let r of e.matchAll(/<(\/?)([A-Z][A-Za-z0-9.]*)/g)){let i=r.index;if(p4(i,t))continue;let a=r[1]===`/`,o=r[2],s=i+r[0].length,c=Math.min(e.length,s+32768),l=!1,u=0,d=-1,f=!1;for(let t=s;t<c;t++){let n=e[t];if(l){n===`"`&&(l=!1),n===`\\`&&t+1<c&&t++;continue}if(n===`"`){l=!0;continue}if(n===`{`){u++;continue}if(n===`}`&&u>0){u--;continue}if(!(u>0)&&n===`>`){d=t,t>0&&e[t-1]===`/`&&(f=!0);break}}if(d===-1)continue;let p=d+1;a?n.push({kind:`close`,name:o,start:i,end:p}):f?n.push({kind:`self-close`,name:o,start:i,end:p}):n.push({kind:`open`,name:o,start:i,end:p})}return n}function Bce(e){let t=zce(e,f4(e)),n=[],r=[];for(let i of t){if(i.kind===`self-close`)continue;if(i.kind===`open`){n.push(i);continue}let t=-1;for(let e=n.length-1;e>=0;e--)if(n[e].name===i.name){t=e;break}if(t!==-1){for(let a=n.length-1;a>t;a--){let t=n[a],o=y3(e,t.start)??e.length;r.push({start:t.start,end:Math.min(i.start,o),source:`unmatched`})}r.push({start:n[t].start,end:i.end,source:`pair`}),n.length=t}}for(let t of n){let n=y3(e,t.start)??e.length;r.push({start:t.start,end:Math.min(e.length,n),source:`unmatched`})}return r}function Vce(e,t){let n=Bce(e),r=null;for(let e of n)e.start<=t&&t<=e.end&&(!r||e.end-e.start<r.end-r.start)&&(r=e);return r?{start:r.start,end:r.end}:{start:Rce(e,t)??0,end:y3(e,t)??e.length}}function Hce(e){let t=f4(e),n=/\n[ \t]*\n/g,r=[0];for(let i of e.matchAll(n)){let e=i.index;p4(e,t)||r.push(e+i[0].length)}r.push(e.length);let i=[];for(let t=0;t<r.length-1;t++){let n=r[t],a=r[t+1];if(a<=n)continue;let o=e.slice(n,a);o.trim()&&i.push({src:o,start:n,end:a})}return i}function Uce(e,t,n,r){let i=Hce(e);if(i.length<2)return null;let a=[],o=!1,s=``;for(let e of i){if(r&&g3(r))break;r&&(r.calls+=1);let i=s+e.src;try{let n=t(i).content??[];s+=h3(e.src);let r=n.filter(e=>e.type!==`paragraph`||Array.isArray(e.content)&&e.content.length>0);if(r.length===0&&n.length>0){o=!0;continue}a.push(...r),o=!0}catch(t){c2();let r=t?.message?.slice(0,200)??`unknown block error`,i=n?.message?.slice(0,160)??`unknown`;console.warn(JSON.stringify({event:`mdx-block-fallback`,offset:e.start,reason:`Per-block recovery after position-less error: ${i}`,blockError:r,blockErrorName:t?.name})),a.push({type:`rawMdxFallback`,attrs:{reason:r,originalSpan:{start:e.start,end:e.end}},content:[{type:`text`,text:e.src}]})}}return o?{type:`doc`,content:a.length>0?a:[{type:`paragraph`,content:[]}]}:null}function b3(e){return{type:`doc`,content:[{type:`paragraph`,content:[{type:`text`,text:e}]}]}}const Wce=new Set([`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`]),Gce={note:`note`,tip:`tip`,important:`important`,warning:`warning`,caution:`caution`,abstract:`abstract`,info:`info`,todo:`todo`,success:`success`,question:`question`,failure:`failure`,danger:`danger`,bug:`bug`,example:`example`,quote:`quote`,summary:`abstract`,tldr:`abstract`,check:`success`,done:`success`,help:`question`,faq:`question`,fail:`failure`,missing:`failure`,error:`danger`,cite:`quote`,idea:`tip`,hint:`tip`,warn:`warning`,attention:`warning`},x3=`ok-alert`,Kce=RegExp(`(?:^|\\s)${x3}-(\\w+)(?:\\s|$)`),qce=/^>\s*\[!(\w+)\]([+-])?(?:\s+(.*?))?\s*$/i;function S3(e,t){if(t<0||t>=e.length)return null;let n=e.indexOf(`
|
|
327
|
+
`,t),r=(n===-1?e.slice(t):e.slice(t,n)).match(qce);return r?{rawType:r[1],foldableMarker:r[2]===`+`||r[2]===`-`?r[2]:null,title:r[3]?.trim()||null}:null}function Jce(e){if(e.data?.hName!==`div`)return null;let t=e.data?.hProperties?.class;if(typeof t!=`string`)return null;let n=t.match(Kce);return n?n[1].toLowerCase():null}function C3(e){let t=e.toLowerCase();return Gce[t]??null}function Yce(e,t,n,r,i=null){let a=[{type:`mdxJsxAttribute`,name:`type`,value:t}];n&&a.push({type:`mdxJsxAttribute`,name:`title`,value:n}),i&&a.push({type:`mdxJsxAttribute`,name:`data-authored-as`,value:i}),r!==null&&(a.push({type:`mdxJsxAttribute`,name:`collapsible`,value:null}),r===`+`?a.push({type:`mdxJsxAttribute`,name:`defaultOpen`,value:null}):a.push({type:`mdxJsxAttribute`,name:`defaultOpen`,value:{type:`mdxJsxAttributeValueExpression`,value:`false`}}));let o=e.children.slice(1),s=e.position?.start.line;return{type:`mdxJsxFlowElement`,name:`GFMCallout`,attributes:a,children:n&&o.length>0&&s!==void 0&&Xce(o[0],s)?o.slice(1):o,position:e.position}}function Xce(e,t){if(!e||typeof e!=`object`)return!1;let n=e;if(n.type!==`paragraph`)return!1;let r=n.position?.start?.line,i=n.position?.end?.line;return r===t&&i===t}function Zce(e){if(!e||typeof e!=`object`||e.type!==`paragraph`)return!1;let t=e.data?.hProperties?.class;return typeof t==`string`&&t.includes(`${x3}-title`)}function Qce(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;ub(e,`blockquote`,(e,t,r)=>{if(r===void 0||typeof t!=`number`)return;let i=Jce(e);if(!i)return;let a=C3(i),o=null,s=null;e.position?.start?.offset!==void 0&&(s=S3(n,e.position.start.offset),s&&(o=s.title,a||=C3(s.rawType)));let c=a??`note`,l=s&&Wce.has(c)?s.foldableMarker:null,u=(()=>{if(e.position?.start?.offset!==void 0){let t=S3(n,e.position.start.offset);if(t?.rawType)return t.rawType}return i})(),d=u.toLowerCase()===c?null:u;if(!Zce(e.children[0]))return;let f=Yce(e,c,o,l,d);r.children[t]=f})}}const $ce={markers:`*`,classPrefix:x3,matchCaseSensitive:!1,icons:new Proxy({},{get:()=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"></svg>`})},w3=/(?<!%)%%([^\n]*?[^\n%])%%(?!%)/g,T3=/<!--([\s\S]*?)-->/g;function ele(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;nle(e,n),ub(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`%%`)===-1&&i.indexOf(`<!--`)===-1)return;let a=tle(i,gY(e));if(a.length===0)return;let o=[],s=0;for(let t of a){t.start>s&&o.push(yY(n,e,s,t.start));let r=t.sourceForm===`html`?4:2,a=t.start+r,c=t.sourceForm===`html`?a+i.slice(a,t.end-3).indexOf(t.body):a,l={type:`comment`,children:[yY(n,e,c,c+t.body.length)],data:{sourceForm:t.sourceForm}},u=CY(n,e,t.start,t.end);u&&(l.position=u),o.push(l),s=t.end}return s<i.length&&o.push(yY(n,e,s,i.length)),r.children.splice(t,1,...o),[Gv,t+o.length]}),sle(e,n)}}function tle(e,t){let n=[];w3.lastIndex=0;let r;for(;(r=w3.exec(e))!==null;){if(bY(t,r.index,2)||bY(t,r.index+r[0].length-2,2)){w3.lastIndex=r.index+1;continue}r[1].trim().length!==0&&n.push({start:r.index,end:r.index+r[0].length,body:r[1],sourceForm:`percent`})}T3.lastIndex=0;let i;for(;(i=T3.exec(e))!==null;){if(bY(t,i.index,4)||bY(t,i.index+i[0].length-3,3)){T3.lastIndex=i.index+1;continue}let e=i[1].trim();e!==``&&n.push({start:i.index,end:i.index+i[0].length,body:e,sourceForm:`html`})}n.sort((e,t)=>e.start-t.start);let a=[],o=-1;for(let e of n)e.start<o||(a.push(e),o=e.end);return a}function nle(e,t){let n=e.children,r=0;for(;r<n.length;){let e=n[r];if(e.type===`paragraph`){let i=O3(e);if(i!==null){let t=e.children[0],a,o=()=>(a===void 0&&(a=gY(t)),a),s=rle(i);if(s!==null&&!bY(o(),0,2)&&!bY(o(),i.length-2,2)){let e={type:`commentBlock`,children:[{type:`paragraph`,children:[{type:`text`,value:s}]}],data:{sourceForm:`percent`,sourceLayout:`block`}};n.splice(r,1,e),r+=1;continue}let c=ile(i);if(c!==null&&!bY(o(),i.length-i.trimStart().length,4)&&!bY(o(),i.trimEnd().length-3,3)){let e={type:`commentBlock`,children:[{type:`paragraph`,children:[{type:`text`,value:c}]}],data:{sourceForm:`html`,sourceLayout:`inline`}};n.splice(r,1,e),r+=1;continue}}let a=ale(e,t);if(a!==null&&!D3(e,4,3)){let e={type:`commentBlock`,children:[a],data:{sourceForm:`html`,sourceLayout:`inline`}};n.splice(r,1,e),r+=1;continue}let o=ole(e,t);if(o!==null&&!D3(e,2,2)){let e={type:`commentBlock`,children:[o],data:{sourceForm:`percent`,sourceLayout:`inline`}};n.splice(r,1,e),r+=1;continue}}if(e.type===`paragraph`&&A3(e)){let e=r+1;for(;e<n.length;){let t=n[e];if(t.type===`paragraph`&&A3(t))break;e+=1}if(e<n.length&&e>r+1){let t={type:`commentBlock`,children:n.slice(r+1,e),data:{sourceForm:`percent`,sourceLayout:`block`}};n.splice(r,e-r+1,t),r+=1;continue}}r+=1}}function E3(e,t,n){return bY(gY(e),t,n)}function D3(e,t,n){let r=e.children[0],i=e.children[e.children.length-1];if(r.type!==`text`||i.type!==`text`)return!1;let a=r.value.length-r.value.trimStart().length,o=i.value.trimEnd().length-n,s=gY(r);return bY(s,a,t)?!0:bY(i===r?s:gY(i),o,n)}function O3(e){if(e.children.length!==1)return null;let t=e.children[0];return t.type===`text`?t.value:null}function rle(e){let t=e.match(/^%%\n((?:.|\n(?!\n))+?)\n%%$/);return t===null?null:t[1]}function ile(e){let t=e.trim();if(!t.startsWith(`<!--`)||!t.endsWith(`-->`))return null;let n=t.slice(4,-3);if(n.includes(`-->`)||n.includes(`<!--`))return null;let r=n.trim();return r===``?null:r}function ale(e,t){if(e.children.length<2)return null;let n=e.children[0],r=e.children[e.children.length-1];if(n.type!==`text`||r.type!==`text`)return null;let i=n.value.trimStart();if(!i.startsWith(`<!--`))return null;let a=r.value.trimEnd();if(!a.endsWith(`-->`))return null;for(let t=0;t<e.children.length;t++){let n=e.children[t];if(n.type!==`text`)continue;let r=n.value;if(t===0){if(k3(r,`<!--`)>1||k3(r,`-->`)>0)return null}else if(t===e.children.length-1){if(k3(r,`<!--`)>0||k3(r,`-->`)>1)return null}else if(r.includes(`<!--`)||r.includes(`-->`))return null}let o=n.value.length-i.length+4;n.value[o]===` `&&(o+=1);let s=a.length-3;r.value[s-1]===` `&&--s;let c=[];o<n.value.length&&c.push(yY(t,n,o,n.value.length));for(let t=1;t<e.children.length-1;t++)c.push(e.children[t]);return s>0&&c.push(yY(t,r,0,s)),c.length===0?null:{type:`paragraph`,children:c}}function ole(e,t){if(e.children.length<2)return null;let n=e.children[0],r=e.children[e.children.length-1];if(n.type!==`text`||r.type!==`text`)return null;let i=n.value.trimStart();if(!i.startsWith(`%%`)||i.startsWith(`%%%`))return null;let a=r.value.trimEnd();if(!a.endsWith(`%%`)||a.endsWith(`%%%`))return null;let o=n.value.length-i.length+2;n.value[o]===` `&&(o+=1);let s=a.length-2;r.value[s-1]===` `&&--s;let c=n.value.slice(o),l=r.value.slice(0,s);if(c.indexOf(`%%`)!==-1||l.indexOf(`%%`)!==-1)return null;for(let t=1;t<e.children.length-1;t++){let n=e.children[t];if(n.type===`text`&&n.value.indexOf(`%%`)!==-1)return null}if(!(e.children.slice(1,-1).some(e=>e.type!==`text`||e.value.trim().length>0)||c.trim().length>0||l.trim().length>0))return null;let u=[];c.length>0&&u.push(yY(t,n,o,n.value.length));for(let t=1;t<e.children.length-1;t++)u.push(e.children[t]);return l.length>0&&u.push(yY(t,r,0,s)),u.length===0?null:{type:`paragraph`,children:u}}function k3(e,t){if(!t)return 0;let n=0,r=0;for(;;){let i=e.indexOf(t,r);if(i===-1)break;n+=1,r=i+t.length}return n}function A3(e){let t=O3(e);return t===null||t.trim()!==`%%`?!1:!E3(e.children[0],t.indexOf(`%%`),2)}function sle(e,t){(t.indexOf(`%%`)!==-1||t.indexOf(`<!--`)!==-1)&&ub(e,e=>{if(!cle.has(e.type))return;let n=e.children;if(!(n===void 0||n.length<2)){for(let e of lle)if(ule(n,t,e))return}})}const cle=new Set([`paragraph`,`heading`,`tableCell`]),lle=[{sourceForm:`html`,open:`<!--`,close:`-->`},{sourceForm:`percent`,open:`%%`,close:`%%`}];function j3(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r];if(i.type!==`text`)continue;let a=0;for(;;){let e=i.value.indexOf(t,a);if(e===-1)break;n.push({index:r,offset:e}),a=e+t.length}}return n}function ule(e,t,n){let r,i;if(n.sourceForm===`percent`){let t=j3(e,`%%`);if(t.length!==2)return!1;[r,i]=t}else{let t=j3(e,`<!--`),n=j3(e,`-->`);if(t.length!==1||n.length!==1)return!1;r=t[0],i=n[0]}if(r.index>=i.index)return!1;let a=e[r.index],o=e[i.index];if(n.sourceForm===`percent`&&(a.value[r.offset-1]===`%`||a.value[r.offset+2]===`%`||o.value[i.offset-1]===`%`||o.value[i.offset+2]===`%`)||fle(e,n,r,i)||E3(a,r.offset,n.open.length)||E3(o,i.offset,n.close.length))return!1;for(let t=r.index+1;t<i.index;t++)if(N3(e[t]))return!1;if(r.offset===0&&N3(e[r.index-1])||i.offset+n.close.length===o.value.length&&N3(e[i.index+1]))return!1;let s=dle(e,n,r,i,t);if(s===null)return!1;let c=[];a.value.slice(0,r.offset).length>0&&c.push(yY(t,a,0,r.offset));let l={type:`comment`,children:s,data:{sourceForm:n.sourceForm}},u=CY(t,a,r.offset,a.value.length),d=CY(t,o,0,i.offset+n.close.length);u&&d&&(l.position={start:u.start,end:d.end}),c.push(l);let f=i.offset+n.close.length;return o.value.slice(f).length>0&&c.push(yY(t,o,f,o.value.length)),e.splice(r.index,i.index-r.index+1,...c),!0}function dle(e,t,n,r,i){let a=e[n.index],o=e[r.index],s=n.offset+t.open.length,c=a.value.length,l=r.offset;if(t.sourceForm===`html`){for(;s<c&&/\s/.test(a.value[s]);)s+=1;for(;l>0&&/\s/.test(o.value[l-1]);)--l}let u=[];s<c&&u.push(yY(i,a,s,c));for(let t=n.index+1;t<r.index;t++)u.push(e[t]);return 0<l&&u.push(yY(i,o,0,l)),u.length===0||!u.some(e=>e.type!==`text`||e.value.trim().length>0)||!u.some(e=>e.type===`text`)?null:u}function fle(e,t,n,r){let i=e[n.index],a=e[r.index];if(i.value.indexOf(`
|
|
328
328
|
`,n.offset+t.open.length)!==-1||a.value.lastIndexOf(`
|
|
329
329
|
`,r.offset)!==-1)return!0;for(let t=n.index+1;t<r.index;t++)if(M3(e[t]))return!0;return!1}function M3(e){let t=e;return t?.type===`break`?!0:t?.type===`text`?(t.value??``).indexOf(`
|
|
330
|
-
`)!==-1:Array.isArray(t?.children)&&t.children.some(M3)}function N3(e){if(e==null)return!1;if(e.type===`comment`)return!0;let t=e.children;return Array.isArray(t)&&t.some(N3)}const
|
|
331
|
-
`;)r--;let i=e.slice(r,n===t-1?n:n+1);if(i.trim().length===0){n=r-2;continue}return fle.test(i)}return!1}function P3(e){if(!e.includes(`</`))return e;let t=f4(e),n=!1,r=e.replace(dle,(r,i,a,o,s)=>p4(s,t)||!ple(e,s)?r:(n=!0,`${a}${o}`));return n?r:e}const mle=/^<details(\s[^>]*)?>\s*<summary>([\s\S]*?)<\/summary>([\s\S]*?)<\/details>\s*$/,hle=/^<details(\s[^>]*)?>(?:\s*<summary>([\s\S]*?)<\/summary>)?[\s\S]*$/,gle=/^\s*<\/details>\s*$/;function F3(e){let t=!1,n=null,r=null;if(!e)return{defaultOpen:t,name:n,id:r};let i=/(\w+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'<>]+)))?/g,a=i.exec(e);for(;a!==null;){let o=a[1].toLowerCase(),s=a[2]??a[3]??a[4]??null;o===`open`?t=!0:o===`name`?n=s:o===`id`&&(r=s),a=i.exec(e)}return{defaultOpen:t,name:n,id:r}}function I3(e){let t=[];return e.title!==null&&t.push({type:`mdxJsxAttribute`,name:`title`,value:e.title}),e.defaultOpen&&t.push({type:`mdxJsxAttribute`,name:`defaultOpen`,value:null}),e.name!==null&&t.push({type:`mdxJsxAttribute`,name:`name`,value:e.name}),e.id!==null&&t.push({type:`mdxJsxAttribute`,name:`id`,value:e.id}),t}function L3(e){if(e.type!==`paragraph`)return!1;let t=e.children;return t.length===1&&t[0].type===`text`}function R3(e){return e.children[0].value??``}function _le(e){if(!L3(e))return null;let t=R3(e).match(mle);if(!t)return null;let{defaultOpen:n,name:r,id:i}=F3(t[1]),a=t[2].trim()||null,o=t[3].trim(),s=o?[{type:`paragraph`,children:[{type:`text`,value:o}]}]:[];return{type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:I3({title:a,defaultOpen:n,name:r,id:i}),children:s,position:e.position}}function vle(e,t){let n=e[t];if(!L3(n))return null;let r=R3(n);if(!r.startsWith(`<details`)||r.includes(`</details>`))return null;let i=r.match(hle);if(!i)return null;let{defaultOpen:a,name:o,id:s}=F3(i[1]),c=i[2]?.trim()||null;for(let n=t+1;n<e.length;n++){let t=e[n];if(!L3(t))continue;let r=R3(t);if(gle.test(r))return{closerIdx:n,title:c,defaultOpen:a,name:o,id:s};if(r.includes(`</details>`))return null}return null}function yle(e){let t=e.children,n=0;for(;n<t.length;){let e=t[n];if(L3(e)){let r=_le(e);if(r){t[n]=r,n++;continue}let i=vle(t,n);if(i){let r=e,a=t[i.closerIdx],o=n+1,s=i.closerIdx,c=t.slice(o,s),l=r.position,u=a.position,d={type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:I3(i),children:c,position:l&&u?{start:l.start,end:u.end}:void 0},f=i.closerIdx-n+1;t.splice(n,f,d),n++;continue}}n++}}function ble(){return e=>{ub(e,e=>{`children`in e&&Array.isArray(e.children)&&yle(e)})}}const xle=/^<(div|center)(\s[^>]*?)?\s*>$/i,Sle=new Set([`center`,`left`,`right`,`justify`]);function Cle(e){if(!e)return null;let t=e.match(/\balign\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'<>]+))/i);if(!t)return null;let n=(t[1]??t[2]??t[3]??``).toLowerCase();return Sle.has(n)?n:null}function z3(e){if(e.type!==`paragraph`)return!1;let t=e.children;return t.length===1&&t[0].type===`text`}function B3(e){return e.children[0].value??``}function wle(e){if(!z3(e))return null;let t=B3(e).trim().match(xle);if(!t)return null;let n=t[1].toLowerCase(),r=t[2]??``;return{tag:n,align:Cle(r)??(n===`center`?`center`:null),sourceAttrs:r}}function Tle(e,t,n){let r=new RegExp(String.raw`^\s*</${n}>\s*$`,`i`);for(let i=t+1;i<e.length;i++){let t=e[i];if(!z3(t))continue;let a=B3(t);if(r.test(a))return i;let o=a.trimStart().toLowerCase();if(o.startsWith(`<div`)||o.startsWith(`<center`)||o.includes(`</${n}>`))return null}return null}function Ele(e){let t=e.children,n=0;for(;n<t.length;){let e=wle(t[n]);if(e!==null){let r=Tle(t,n,e.tag);if(r!==null){let i=t[n],a=t[r],o=t.slice(n+1,r),s=i.position,c=a.position,l={type:`mdxJsxFlowElement`,name:`HtmlAlignBlock`,attributes:[...e.align===null?[]:[{type:`mdxJsxAttribute`,name:`align`,value:e.align}],{type:`mdxJsxAttribute`,name:`tag`,value:e.tag},{type:`mdxJsxAttribute`,name:`sourceAttrs`,value:e.sourceAttrs}],children:o,position:s&&c?{start:s.start,end:c.end}:void 0};t.splice(n,r-n+1,l),n++;continue}}n++}}function Dle(){return e=>{ub(e,e=>{`children`in e&&Array.isArray(e.children)&&Ele(e)})}}const V3=` `;function H3(e){return e.type===`listItem`&&typeof e.checked==`boolean`}function Ole(e){let t=e.children??[];if(t.length!==1)return!1;let n=t[0];return n?.type===`paragraph`&&(n.children?.length??0)===0}function kle(e){let t=e.children??[];if(t.length!==1)return!1;let n=t[0];if(n?.type!==`paragraph`||(n.children?.length??0)!==1)return!1;let r=n.children[0];if(r?.type!==`text`||r.value!==V3)return!1;let i=r.data?.entityRefSpans;if(!Array.isArray(i)||i.length!==1)return!1;let a=i[0];return a?.offset===0&&a.length===6&&a.raw===V3}function Ale(e){ub(e,`listItem`,e=>{if(!H3(e)||!Ole(e))return;let t=e.children[0];t.children=[{type:`text`,value:` `,data:{sourceRaw:V3}}]})}function jle(e){ub(e,`listItem`,e=>{!H3(e)||!kle(e)||(e.children[0].children=[])})}function Mle(){return e=>{jle(e)}}const U3=57856,W3=63743,G3=/&(?:[A-Za-z][A-Za-z0-9]*|#[0-9]+|#[xX][0-9A-Fa-f]+);/g;function Nle(e){return G3.lastIndex=0,e.replace(G3,e=>{let t=e.slice(1,-1);if(t.startsWith(`#`)){let e=t[1]===`x`||t[1]===`X`;return tx(t.slice(e?2:1),e?16:10)}let n=ex(t);return n===!1?e:n})}function Ple(e){let t=new Set,n=0;for(let r of e){let e=0;for(let i of r){let r=i.codePointAt(0);r!==void 0&&(r>=U3&&r<=W3&&t.add(r),r===U3?(e+=1,n=Math.max(n,e)):e=0)}}return{occupied:t,longestStartRun:n}}function Fle(e){let{occupied:t,longestStartRun:n}=Ple([e,Nle(e)]);for(let e=U3;e<=W3;e+=1)if(!t.has(e))return String.fromCharCode(e);return``.repeat(n+1)+``}function Ile(e){return{exit:{characterEscapeValue(t){let n=this.stack.pop();n.value+=e+this.sliceSerialize(t),n.position&&(n.position.end={line:t.end.line,column:t.end.column,offset:t.end.offset})}},transforms:[t=>(ub(t,t=>{if(t.type===`text`){let n=[],r=``,i=0;for(;;){let a=t.value.indexOf(e,i);if(a===-1)break;r+=t.value.slice(i,a);let o=t.value.slice(a+e.length,a+e.length+1);n.push({offset:r.length,char:o}),i=a+e.length}r+=t.value.slice(i),t.value=r,t.data??={},t.data.escapedChars=n;return}let n=t;for(let[t,r]of Object.entries(n))typeof r==`string`&&(n[t]=r.replaceAll(e,``))}),t)]}}function Lle(e,t){let n;return(r,i)=>{let a=t.data();a.fromMarkdownExtensions??=[];let o=a.fromMarkdownExtensions,s=Ile(Fle(r)),c=n,l=c?o.lastIndexOf(c):-1;l>=0?o.splice(l,1,s):o.push(s),n=s;try{return e(r,i)}finally{let e=o.lastIndexOf(s);e>=0&&(c&&l>=0?o.splice(e,1,c):o.splice(e,1)),n=c}}}const Rle=function(){let e=this;e.parser=Lle(e.parser,e)},K3=/(?<!=)==(?=\S)([^\n]*?[^\s=])==(?!=)/g;function zle(e){return e.type===`strong`||e.type===`emphasis`||e.type===`delete`||e.type===`inlineCode`}function q3(e){return e.type===`text`||e.type===`inlineCode`?e.value.length>0?e.value.charAt(0):null:`children`in e&&Array.isArray(e.children)&&e.children.length>0?q3(e.children[0]):null}function J3(e){if(e.type===`text`||e.type===`inlineCode`)return e.value.length>0?e.value.slice(-1):null;if(`children`in e&&Array.isArray(e.children)&&e.children.length>0){let t=e.children;return J3(t[t.length-1])}return null}function Ble(e,t){let n=e.children,r=new Map,i=e=>{let t=r.get(e);if(t!==void 0)return t;let n=gY(e);return r.set(e,n),n},a=0;for(;a<n.length;){let e=n[a];if(e.type!==`text`){a++;continue}let r=e.value,o=-1;for(let t=0;t<=r.length-2;t++){if(r.charCodeAt(t)!==61||r.charCodeAt(t+1)!==61||t>0&&r.charCodeAt(t-1)===61||bY(i(e),t,2))continue;let s;if(t+2<r.length)s=r.charAt(t+2);else{let e=n[a+1];if(!e)continue;s=q3(e)}if(!(s===null||/\s/.test(s))){o=t;break}}if(o===-1){a++;continue}let s=-1,c=-1,l=!1;for(let t=o+3;t<=r.length-2;t++){if(r.charCodeAt(t)!==61||r.charCodeAt(t+1)!==61||bY(i(e),t,2))continue;let o=r.charAt(t-1);if(/[\s=]/.test(o))continue;let c;if(t+2<r.length)c=r.charAt(t+2);else{let e=n[a+1];c=e?e.type===`text`?e.value[0]??null:q3(e):null}if(c!==`=`){s=-2;break}}if(s===-2){a++;continue}for(let e=a+1;e<n.length;e++){let t=n[e];if(t.type===`text`){for(let r=0;r<=t.value.length-2;r++){if(t.value.charCodeAt(r)!==61||t.value.charCodeAt(r+1)!==61||bY(i(t),r,2))continue;let a;if(r>0)a=t.value.charAt(r-1);else{let t=n[e-1];a=J3(t)}if(a===null||/[\s=]/.test(a))continue;let o;if(r+2<t.value.length)o=t.value.charAt(r+2);else{let t=n[e+1];o=t?t.type===`text`?t.value[0]??null:q3(t):null}if(o!==`=`){s=e,c=r,l=!0;break}}if(s>=0)break}else if(!zle(t))break}if(s<0){a++;continue}let u=n[s],d=r.slice(0,o),f=r.slice(o+2),p=u.value.slice(0,c),m=u.value.slice(c+2),h=[];f.length>0&&h.push(yY(t,e,o+2,r.length));for(let e=a+1;e<s;e++)h.push(n[e]);if(p.length>0&&h.push(yY(t,u,0,c)),!l){a++;continue}let g={type:`mark`,children:h},_=[];d.length>0&&_.push(yY(t,e,0,o)),_.push(g),m.length>0&&_.push(yY(t,u,c+2,u.value.length)),n.splice(a,s-a+1,..._),a+=+(d.length>0)+1}}function Y3(e,t){if(`children`in e&&Array.isArray(e.children)){Ble(e,t);for(let n of e.children)Y3(n,t)}}function Vle(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;ub(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`==`)===-1)return;let a=gY(e);K3.lastIndex=0;let o=[],s;for(;(s=K3.exec(i))!==null;){let e=s.index,t=e+s[0].length;if(bY(a,e,2)||bY(a,t-2,2)){K3.lastIndex=e+1;continue}o.push(s)}if(o.length===0)return;let c=[],l=0;for(let t of o){let r=t.index,i=r+t[0].length;r>l&&c.push(yY(n,e,l,r));let a={type:`mark`,children:[yY(n,e,r+2,i-2)]},o=CY(n,e,r,i);o&&(a.position=o),c.push(a),l=i}return l<i.length&&c.push(yY(n,e,l,i.length)),r.children.splice(t,1,...c),[Gv,t+c.length]}),Y3(e,n),ub(e,`mdxJsxTextElement`,(e,t,n)=>{if(n===void 0||t==null||e.name!==`mark`)return;let r={type:`mark`,children:e.children??[]};return n.children.splice(t,1,r),t+1})}}function Hle(){return e=>{ub(e,`paragraph`,(e,t,n)=>{if(!n||t==null||e.children.length!==1)return;let r=e.children[0];if(r?.type!==`image`)return;let i=Ule(r,e);n.children[t]=i})}}function Ule(e,t){let n=[{type:`mdxJsxAttribute`,name:`src`,value:e.url}];typeof e.alt==`string`&&n.push({type:`mdxJsxAttribute`,name:`alt`,value:e.alt}),e.title&&n.push({type:`mdxJsxAttribute`,name:`title`,value:e.title});let r={type:`mdxJsxFlowElement`,name:`CommonMarkImage`,attributes:n,children:[]};return t.position&&(r.position=t.position),r}const X3=/^( {4}|\t)/;function Wle(e){let t=e.split(`
|
|
332
|
-
`),n=!1;for(let e of t)if(e.length!==0&&(n=!0,!X3.test(e)))return!1;return n}function
|
|
330
|
+
`)!==-1:Array.isArray(t?.children)&&t.children.some(M3)}function N3(e){if(e==null)return!1;if(e.type===`comment`)return!0;let t=e.children;return Array.isArray(t)&&t.some(N3)}const ple=/^([ ]{1,3})(<\/[A-Z][A-Za-z0-9_]*\s*>)([ \t]*)$/gm,mle=/^[ ]{0,3}([-*+]|\d{1,9}[.)])([ \t]|$)/;function hle(e,t){if(t===0)return!1;let n=t-1;for(;n>=0;){let r=n;for(;r>0&&e[r-1]!==`
|
|
331
|
+
`;)r--;let i=e.slice(r,n===t-1?n:n+1);if(i.trim().length===0){n=r-2;continue}return mle.test(i)}return!1}function P3(e){if(!e.includes(`</`))return e;let t=f4(e),n=!1,r=e.replace(ple,(r,i,a,o,s)=>p4(s,t)||!hle(e,s)?r:(n=!0,`${a}${o}`));return n?r:e}const gle=/^<details(\s[^>]*)?>\s*<summary>([\s\S]*?)<\/summary>([\s\S]*?)<\/details>\s*$/,_le=/^<details(\s[^>]*)?>(?:\s*<summary>([\s\S]*?)<\/summary>)?[\s\S]*$/,vle=/^\s*<\/details>\s*$/;function F3(e){let t=!1,n=null,r=null;if(!e)return{defaultOpen:t,name:n,id:r};let i=/(\w+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'<>]+)))?/g,a=i.exec(e);for(;a!==null;){let o=a[1].toLowerCase(),s=a[2]??a[3]??a[4]??null;o===`open`?t=!0:o===`name`?n=s:o===`id`&&(r=s),a=i.exec(e)}return{defaultOpen:t,name:n,id:r}}function I3(e){let t=[];return e.title!==null&&t.push({type:`mdxJsxAttribute`,name:`title`,value:e.title}),e.defaultOpen&&t.push({type:`mdxJsxAttribute`,name:`defaultOpen`,value:null}),e.name!==null&&t.push({type:`mdxJsxAttribute`,name:`name`,value:e.name}),e.id!==null&&t.push({type:`mdxJsxAttribute`,name:`id`,value:e.id}),t}function L3(e){if(e.type!==`paragraph`)return!1;let t=e.children;return t.length===1&&t[0].type===`text`}function R3(e){return e.children[0].value??``}function yle(e){if(!L3(e))return null;let t=R3(e).match(gle);if(!t)return null;let{defaultOpen:n,name:r,id:i}=F3(t[1]),a=t[2].trim()||null,o=t[3].trim(),s=o?[{type:`paragraph`,children:[{type:`text`,value:o}]}]:[];return{type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:I3({title:a,defaultOpen:n,name:r,id:i}),children:s,position:e.position}}function ble(e,t){let n=e[t];if(!L3(n))return null;let r=R3(n);if(!r.startsWith(`<details`)||r.includes(`</details>`))return null;let i=r.match(_le);if(!i)return null;let{defaultOpen:a,name:o,id:s}=F3(i[1]),c=i[2]?.trim()||null;for(let n=t+1;n<e.length;n++){let t=e[n];if(!L3(t))continue;let r=R3(t);if(vle.test(r))return{closerIdx:n,title:c,defaultOpen:a,name:o,id:s};if(r.includes(`</details>`))return null}return null}function xle(e){let t=e.children,n=0;for(;n<t.length;){let e=t[n];if(L3(e)){let r=yle(e);if(r){t[n]=r,n++;continue}let i=ble(t,n);if(i){let r=e,a=t[i.closerIdx],o=n+1,s=i.closerIdx,c=t.slice(o,s),l=r.position,u=a.position,d={type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:I3(i),children:c,position:l&&u?{start:l.start,end:u.end}:void 0},f=i.closerIdx-n+1;t.splice(n,f,d),n++;continue}}n++}}function Sle(){return e=>{ub(e,e=>{`children`in e&&Array.isArray(e.children)&&xle(e)})}}const Cle=/^<(div|center)(\s[^>]*?)?\s*>$/i,wle=new Set([`center`,`left`,`right`,`justify`]);function Tle(e){if(!e)return null;let t=e.match(/\balign\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'<>]+))/i);if(!t)return null;let n=(t[1]??t[2]??t[3]??``).toLowerCase();return wle.has(n)?n:null}function z3(e){if(e.type!==`paragraph`)return!1;let t=e.children;return t.length===1&&t[0].type===`text`}function B3(e){return e.children[0].value??``}function Ele(e){if(!z3(e))return null;let t=B3(e).trim().match(Cle);if(!t)return null;let n=t[1].toLowerCase(),r=t[2]??``;return{tag:n,align:Tle(r)??(n===`center`?`center`:null),sourceAttrs:r}}function Dle(e,t,n){let r=new RegExp(String.raw`^\s*</${n}>\s*$`,`i`);for(let i=t+1;i<e.length;i++){let t=e[i];if(!z3(t))continue;let a=B3(t);if(r.test(a))return i;let o=a.trimStart().toLowerCase();if(o.startsWith(`<div`)||o.startsWith(`<center`)||o.includes(`</${n}>`))return null}return null}function Ole(e){let t=e.children,n=0;for(;n<t.length;){let e=Ele(t[n]);if(e!==null){let r=Dle(t,n,e.tag);if(r!==null){let i=t[n],a=t[r],o=t.slice(n+1,r),s=i.position,c=a.position,l={type:`mdxJsxFlowElement`,name:`HtmlAlignBlock`,attributes:[...e.align===null?[]:[{type:`mdxJsxAttribute`,name:`align`,value:e.align}],{type:`mdxJsxAttribute`,name:`tag`,value:e.tag},{type:`mdxJsxAttribute`,name:`sourceAttrs`,value:e.sourceAttrs}],children:o,position:s&&c?{start:s.start,end:c.end}:void 0};t.splice(n,r-n+1,l),n++;continue}}n++}}function kle(){return e=>{ub(e,e=>{`children`in e&&Array.isArray(e.children)&&Ole(e)})}}const V3=` `;function H3(e){return e.type===`listItem`&&typeof e.checked==`boolean`}function Ale(e){let t=e.children??[];if(t.length!==1)return!1;let n=t[0];return n?.type===`paragraph`&&(n.children?.length??0)===0}function jle(e){let t=e.children??[];if(t.length!==1)return!1;let n=t[0];if(n?.type!==`paragraph`||(n.children?.length??0)!==1)return!1;let r=n.children[0];if(r?.type!==`text`||r.value!==V3)return!1;let i=r.data?.entityRefSpans;if(!Array.isArray(i)||i.length!==1)return!1;let a=i[0];return a?.offset===0&&a.length===6&&a.raw===V3}function Mle(e){ub(e,`listItem`,e=>{if(!H3(e)||!Ale(e))return;let t=e.children[0];t.children=[{type:`text`,value:` `,data:{sourceRaw:V3}}]})}function Nle(e){ub(e,`listItem`,e=>{!H3(e)||!jle(e)||(e.children[0].children=[])})}function Ple(){return e=>{Nle(e)}}const U3=57856,W3=63743,G3=/&(?:[A-Za-z][A-Za-z0-9]*|#[0-9]+|#[xX][0-9A-Fa-f]+);/g;function Fle(e){return G3.lastIndex=0,e.replace(G3,e=>{let t=e.slice(1,-1);if(t.startsWith(`#`)){let e=t[1]===`x`||t[1]===`X`;return tx(t.slice(e?2:1),e?16:10)}let n=ex(t);return n===!1?e:n})}function Ile(e){let t=new Set,n=0;for(let r of e){let e=0;for(let i of r){let r=i.codePointAt(0);r!==void 0&&(r>=U3&&r<=W3&&t.add(r),r===U3?(e+=1,n=Math.max(n,e)):e=0)}}return{occupied:t,longestStartRun:n}}function Lle(e){let{occupied:t,longestStartRun:n}=Ile([e,Fle(e)]);for(let e=U3;e<=W3;e+=1)if(!t.has(e))return String.fromCharCode(e);return``.repeat(n+1)+``}function Rle(e){return{exit:{characterEscapeValue(t){let n=this.stack.pop();n.value+=e+this.sliceSerialize(t),n.position&&(n.position.end={line:t.end.line,column:t.end.column,offset:t.end.offset})}},transforms:[t=>(ub(t,t=>{if(t.type===`text`){let n=[],r=``,i=0;for(;;){let a=t.value.indexOf(e,i);if(a===-1)break;r+=t.value.slice(i,a);let o=t.value.slice(a+e.length,a+e.length+1);n.push({offset:r.length,char:o}),i=a+e.length}r+=t.value.slice(i),t.value=r,t.data??={},t.data.escapedChars=n;return}let n=t;for(let[t,r]of Object.entries(n))typeof r==`string`&&(n[t]=r.replaceAll(e,``))}),t)]}}function zle(e,t){let n;return(r,i)=>{let a=t.data();a.fromMarkdownExtensions??=[];let o=a.fromMarkdownExtensions,s=Rle(Lle(r)),c=n,l=c?o.lastIndexOf(c):-1;l>=0?o.splice(l,1,s):o.push(s),n=s;try{return e(r,i)}finally{let e=o.lastIndexOf(s);e>=0&&(c&&l>=0?o.splice(e,1,c):o.splice(e,1)),n=c}}}const Ble=function(){let e=this;e.parser=zle(e.parser,e)},K3=/(?<!=)==(?=\S)([^\n]*?[^\s=])==(?!=)/g;function Vle(e){return e.type===`strong`||e.type===`emphasis`||e.type===`delete`||e.type===`inlineCode`}function q3(e){return e.type===`text`||e.type===`inlineCode`?e.value.length>0?e.value.charAt(0):null:`children`in e&&Array.isArray(e.children)&&e.children.length>0?q3(e.children[0]):null}function J3(e){if(e.type===`text`||e.type===`inlineCode`)return e.value.length>0?e.value.slice(-1):null;if(`children`in e&&Array.isArray(e.children)&&e.children.length>0){let t=e.children;return J3(t[t.length-1])}return null}function Hle(e,t){let n=e.children,r=new Map,i=e=>{let t=r.get(e);if(t!==void 0)return t;let n=gY(e);return r.set(e,n),n},a=0;for(;a<n.length;){let e=n[a];if(e.type!==`text`){a++;continue}let r=e.value,o=-1;for(let t=0;t<=r.length-2;t++){if(r.charCodeAt(t)!==61||r.charCodeAt(t+1)!==61||t>0&&r.charCodeAt(t-1)===61||bY(i(e),t,2))continue;let s;if(t+2<r.length)s=r.charAt(t+2);else{let e=n[a+1];if(!e)continue;s=q3(e)}if(!(s===null||/\s/.test(s))){o=t;break}}if(o===-1){a++;continue}let s=-1,c=-1,l=!1;for(let t=o+3;t<=r.length-2;t++){if(r.charCodeAt(t)!==61||r.charCodeAt(t+1)!==61||bY(i(e),t,2))continue;let o=r.charAt(t-1);if(/[\s=]/.test(o))continue;let c;if(t+2<r.length)c=r.charAt(t+2);else{let e=n[a+1];c=e?e.type===`text`?e.value[0]??null:q3(e):null}if(c!==`=`){s=-2;break}}if(s===-2){a++;continue}for(let e=a+1;e<n.length;e++){let t=n[e];if(t.type===`text`){for(let r=0;r<=t.value.length-2;r++){if(t.value.charCodeAt(r)!==61||t.value.charCodeAt(r+1)!==61||bY(i(t),r,2))continue;let a;if(r>0)a=t.value.charAt(r-1);else{let t=n[e-1];a=J3(t)}if(a===null||/[\s=]/.test(a))continue;let o;if(r+2<t.value.length)o=t.value.charAt(r+2);else{let t=n[e+1];o=t?t.type===`text`?t.value[0]??null:q3(t):null}if(o!==`=`){s=e,c=r,l=!0;break}}if(s>=0)break}else if(!Vle(t))break}if(s<0){a++;continue}let u=n[s],d=r.slice(0,o),f=r.slice(o+2),p=u.value.slice(0,c),m=u.value.slice(c+2),h=[];f.length>0&&h.push(yY(t,e,o+2,r.length));for(let e=a+1;e<s;e++)h.push(n[e]);if(p.length>0&&h.push(yY(t,u,0,c)),!l){a++;continue}let g={type:`mark`,children:h},_=[];d.length>0&&_.push(yY(t,e,0,o)),_.push(g),m.length>0&&_.push(yY(t,u,c+2,u.value.length)),n.splice(a,s-a+1,..._),a+=+(d.length>0)+1}}function Y3(e,t){if(`children`in e&&Array.isArray(e.children)){Hle(e,t);for(let n of e.children)Y3(n,t)}}function Ule(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;ub(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`==`)===-1)return;let a=gY(e);K3.lastIndex=0;let o=[],s;for(;(s=K3.exec(i))!==null;){let e=s.index,t=e+s[0].length;if(bY(a,e,2)||bY(a,t-2,2)){K3.lastIndex=e+1;continue}o.push(s)}if(o.length===0)return;let c=[],l=0;for(let t of o){let r=t.index,i=r+t[0].length;r>l&&c.push(yY(n,e,l,r));let a={type:`mark`,children:[yY(n,e,r+2,i-2)]},o=CY(n,e,r,i);o&&(a.position=o),c.push(a),l=i}return l<i.length&&c.push(yY(n,e,l,i.length)),r.children.splice(t,1,...c),[Gv,t+c.length]}),Y3(e,n),ub(e,`mdxJsxTextElement`,(e,t,n)=>{if(n===void 0||t==null||e.name!==`mark`)return;let r={type:`mark`,children:e.children??[]};return n.children.splice(t,1,r),t+1})}}function Wle(){return e=>{ub(e,`paragraph`,(e,t,n)=>{if(!n||t==null||e.children.length!==1)return;let r=e.children[0];if(r?.type!==`image`)return;let i=Gle(r,e);n.children[t]=i})}}function Gle(e,t){let n=[{type:`mdxJsxAttribute`,name:`src`,value:e.url}];typeof e.alt==`string`&&n.push({type:`mdxJsxAttribute`,name:`alt`,value:e.alt}),e.title&&n.push({type:`mdxJsxAttribute`,name:`title`,value:e.title});let r={type:`mdxJsxFlowElement`,name:`CommonMarkImage`,attributes:n,children:[]};return t.position&&(r.position=t.position),r}const X3=/^( {4}|\t)/;function Kle(e){let t=e.split(`
|
|
332
|
+
`),n=!1;for(let e of t)if(e.length!==0&&(n=!0,!X3.test(e)))return!1;return n}function qle(e){return e.split(`
|
|
333
333
|
`).map(e=>e.length===0?e:e.startsWith(` `)?e.slice(4):e.startsWith(` `)?e.slice(1):e).join(`
|
|
334
|
-
`)}function
|
|
335
|
-
`;)a--;if(a===r)return null;let o=t.slice(a,r);if(!X3.test(o))return null;let s=t.slice(a,i);if(!
|
|
334
|
+
`)}function Jle(e,t){let n=e.position;if(!n||typeof n.start.offset!=`number`||typeof n.end.offset!=`number`)return null;let r=n.start.offset,i=n.end.offset;if(r<0||i>t.length||r>=i)return null;let a=r;for(;a>0&&t[a-1]!==`
|
|
335
|
+
`;)a--;if(a===r)return null;let o=t.slice(a,r);if(!X3.test(o))return null;let s=t.slice(a,i);if(!Kle(s))return null;let c={start:{line:n.start.line,column:1,offset:a},end:n.end};return{type:`code`,lang:null,meta:null,value:qle(s).replace(/\n+$/,``),position:c,data:{sourceStyle:`indented`}}}const Yle=function(){return(e,t)=>{let n=String(t.value??``);n&&ub(e,`paragraph`,(e,t,r)=>{if(r?.type!==`root`||t==null)return;let i=r.children[t-1];if(i&&i.type===`list`)return;let a=Jle(e,n);a&&(r.children[t]=a)})}},Xle=/^\n+$/;function Zle(e){return e.length<3||!Xle.test(e)?0:e.length-2}function Qle(e,t){let n=[],r=e.children;for(let e=1;e<r.length;e++){let i=r[e-1],a=r[e],o=i?.position?.end?.offset,s=i?.position?.end?.line,c=a?.position?.start?.offset;if(typeof o!=`number`||typeof c!=`number`||typeof s!=`number`||c<o)continue;let l=Zle(t.slice(o,c));if(l===0)continue;let u=[],d=[];for(let e=0;e<l;e++)u.push(s+2+e),d.push(o+2+e);n.push({beforeChildIndex:e,lines:u,offsets:d})}return n}function Z3(e,t){let n=Qle(e,t);if(n.length===0)return;let r=[],i=0;for(let t=0;t<e.children.length;t++){let a=n[i];if(a&&a.beforeChildIndex===t){for(let e=0;e<a.lines.length;e++)r.push($le(a.lines[e],a.offsets[e]));i+=1}r.push(e.children[t])}e.children=r}function $le(e,t){let n={line:e,column:1,offset:t};return{type:`paragraph`,children:[],position:{start:n,end:{...n}}}}function Q3(e){let t=e.identifier??e.label;if(typeof t!=`string`)return null;let n=t3(t);return n.length>0?n:null}function eue(e){let t=new Map;return ub(e,`definition`,e=>{let n=Q3(e);n&&!t.has(n)&&t.set(n,e)}),t}function tue(){return e=>{let t=eue(e);t.size!==0&&ub(e,`linkReference`,e=>{let n=Q3(e);if(!n)return;let r=t.get(n);r&&(e.data={...e.data,resolvedUrl:r.url,resolvedTitle:r.title??null})})}}function $3(e,t,n){let r={type:`mdxJsxFlowElement`,name:e,attributes:[{type:`mdxJsxAttribute`,name:`formula`,value:t}],children:[]};return n&&(r.position=n),r}function nue(){return e=>{ub(e,`math`,(e,t,n)=>{if(!n||t==null)return;let r=$3(`DollarMath`,typeof e.value==`string`?e.value:``,e.position);n.children[t]=r}),ub(e,`code`,(e,t,n)=>{if(!n||t==null||e.lang!==`math`)return;let r=$3(`MathFence`,typeof e.value==`string`?e.value:``,e.position);n.children[t]=r})}}const e6=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g;function rue(e,t=``){let n=[],r=!1;for(let i of e.children){if(i.type!==`text`){n.push(i);continue}let e=i.value,a=gY(i);e6.lastIndex=0;let o=[],s=0;for(;;){let n=e6.exec(e);if(n===null)break;let c=n[0],l=n[1],u=n.index;if(bY(a,u,1))continue;u>s&&o.push(yY(t,i,s,u));let d={type:`link`,url:l,title:null,children:[yY(t,i,u+1,u+1+l.length)],data:{sourceStyle:`autolink`}},f=CY(t,i,u,u+c.length);f&&(d.position=f),o.push(d),s=u+c.length,r=!0}o.length===0?n.push(i):(s<e.length&&o.push(yY(t,i,s,e.length)),n.push(...o))}r&&(e.children=n)}const iue=new Set(`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`.split(``));function t6(e){let t=[],n=``;for(let r=0;r<e.length;r++){let i=e[r];if(i===`\\`&&r+1<e.length&&e[r+1]===`|`){n+=`${i}|`,r++;continue}if(i===`|`){t.push(n),n=``;continue}n+=i}return t.push(n),t}function aue(e,t,n=!1,r){if(!t)return;let i=e.position;if(!i||typeof i.start?.offset!=`number`){n&&console.warn(`[position-slice] node type=${e.type} has no position — fidelity defaults apply`);return}let a=i.start.offset,o=i.end?.offset??a;if(a<0||o>t.length){n&&console.warn(`[position-slice] node type=${e.type} position out of bounds: start=${a} end=${o} sourceLen=${t.length}`);return}switch(e.data??={},e.type){case`text`:{let n=t.slice(a,o),r=e.value??``;if(!dY(e.data)&&n.length>r.length&&n.includes(`\\`)){let t=[],i=0,a=0;for(;i<n.length&&a<r.length;)n[i]===`\\`&&i+1<n.length&&iue.has(n[i+1])&&r[a]===n[i+1]?(t.push({offset:a,char:n[i+1]}),i+=2,a+=1):(i++,a++);t.length>0&&(e.data.escapedChars=t)}n.endsWith(`\\`)&&r.endsWith(`\\`)&&(e.data.sourceRaw=n);break}case`emphasis`:{let n=t[a];(n===`*`||n===`_`)&&(e.data.sourceDelimiter=n);break}case`strong`:{let n=t.slice(a,a+2);(n===`**`||n===`__`)&&(e.data.sourceDelimiter=n);break}case`heading`:{let n=t[a],i=t.slice(a,o);if(n===`#`){if(e.data.sourceStyle=`atx`,r?.type===`root`){let n=a;for(;n>0&&t[n-1]!==`
|
|
336
336
|
`;)n--;let r=t.slice(n,a);r.length>=1&&r.length<=3&&/^ +$/.test(r)&&(e.data.sourceLeadingIndent=r.length)}let n=/^#+( {2,})[^ ]/.exec(i);n&&(e.data.sourceInteriorSpacing=n[1].length);let o=/^.*?[ \t](#+)[ \t]*$/.exec(i);o&&(e.data.sourceTrailingHashes=o[1].length)}else{let t=/\n(=+)[ \t]*$/.exec(i),n=/\n(-+)[ \t]*$/.exec(i),r=t??n;r?(e.data.sourceStyle=`setext`,e.data.sourceUnderlineLength=r[1].length):e.data.sourceStyle=`atx`}break}case`blockquote`:{let n=a;for(;n>0&&t[n-1]!==`
|
|
337
337
|
`;)n--;let r=!1;for(let e=n;e<a;e++)if(t[e]===`>`){r=!0;break}let i=t.slice(a,o).split(`
|
|
338
338
|
`),s=[];for(let e=0;e<i.length;e++){let t=i[e];if(t.trim().length===0)continue;if(r&&e>0)break;let n=t.replace(/^ {1,3}/,``);if(n[0]!==`>`){e>0&&t.trimStart()[0]!==`>`&&s.push(`lazy`);continue}if(n.slice(1).trimEnd()!==``){if(n[1]===` `)s.push(1);else{let e=0;for(;n[1+e]===` `;)e++;s.push(e)}}}s.length>0&&(e.data.sourceMarkerSpacings=s);break}case`list`:{let n=e.children?.[0];if(n?.position?.start?.offset!=null){let r=n.position.start.offset;if(r>=0&&r<t.length){let n=t[r];if(!e.ordered&&(n===`-`||n===`*`||n===`+`))e.data.bulletMarker=n;else if(e.ordered){let n=t.slice(r,Math.min(r+10,t.length)).match(/^\d+([.)])/);n&&(e.data.listMarkerDelimiter=n[1])}}}break}case`listItem`:{let n=t.slice(a,o),r=/^(?:([-+*])|(\d{1,9})[.)])( *)/.exec(n);if(!r)break;let s=r[1]?1:(r[2]?.length??0)+1,c=r[3].length;c>=2&&c<=4&&(e.data.sourceMarkerSpacing=c),r[2]&&(e.data.sourceOrdinal=Number.parseInt(r[2],10)),e.checked!=null&&/^\[([xX])\] /.exec(n.slice(s+Math.max(c,1)))?.[1]===`X`&&(e.data.sourceCheckboxChar=`X`);let l=s+(c>=2&&c<=4?c:1),u=a;for(;u>0&&t[u-1]!==`
|
|
@@ -346,17 +346,17 @@ ${t.slice(l+2)}`,d+=1;else break}t.push({indent:l,number:parseInt(s,10),content:
|
|
|
346
346
|
`).filter(e=>e.trim().length>0);if(t.length>=2){let n=t.map(e=>e.trimStart().startsWith(`|`)),r=t.map(e=>/(^|[^\\])\|$/.test(e.trimEnd())),i=n.every(e=>e===n[0]),a=r.every(e=>e===r[0]);if(i&&a){let t=n[0],i=r[0];(!t||!i)&&(e.data.sourceOuterPipes={leading:t,trailing:i})}}}for(let n of e.children??[]){if(n.type!==`tableRow`||!n.position)continue;let e=n.position.start.offset,r=n.position.end.offset;if(typeof e!=`number`||typeof r!=`number`)continue;let i=t.slice(e,r),a=i.indexOf(`
|
|
347
347
|
`);a!==-1&&(i=i.slice(0,a));let o=t6(i);o.length>0&&o[0]===``&&i.startsWith(`|`)&&o.shift(),o.length>0&&o[o.length-1]===``&&i.endsWith(`|`)&&o.pop();let s=n.children??[],c=Math.min(s.length,o.length);for(let e=0;e<c;e++){let t=s[e];if(t.type!==`tableCell`)continue;let n=o[e],r=0;for(;r<n.length&&n[r]===` `;)r++;let i=0;for(;i<n.length-r&&n[n.length-1-i]===` `;)i++;t.data||={},t.data.sourcePadding={left:r,right:i}}}break}case`link`:case`linkReference`:if(`children`in e&&e.children.length===0&&(e.data.sourceRaw=t.slice(a,o)),e.type===`link`){let n=t[a];if(n!==`[`&&n!==`<`&&!e.title)e.data.sourceStyle=`gfm-autolink`;else if(n===`[`){let n=t.slice(a,o),r=n.lastIndexOf(`](`);if(r!==-1){let t=r+2;for(;t<n.length&&(n[t]===` `||n[t]===` `);)t++;if(r6(n,t,e.data)&&(e.data.sourceUrlForm=`angle-bracketed`),e.title!==void 0&&e.title!==null&&n[n.length-1]===`)`){let t=n.length-2;for(;t>r+1&&(n[t]===` `||n[t]===` `||n[t]===`
|
|
348
348
|
`);)t--;n[t]===`"`?e.data.sourceTitleMarker=`double`:n[t]===`'`?e.data.sourceTitleMarker=`single`:n[t]===`)`&&(e.data.sourceTitleMarker=`paren`)}}}}break;case`image`:{let n=t.slice(a,o),r=n.lastIndexOf(`](`);r!==-1&&n6(n,r+2,e.data)&&(e.data.sourceUrlForm=`angle-bracketed`);break}case`definition`:{let n=t.slice(a,o);e.data.sourceLayout=n.includes(`
|
|
349
|
-
`)?`multiline`:`inline`;let r=
|
|
350
|
-
`)}function
|
|
349
|
+
`)?`multiline`:`inline`;let r=oue(n);if(r!==-1&&n6(n,r+2,e.data)&&(e.data.sourceUrlForm=`angle-bracketed`),typeof e.title==`string`&&n.length>0){let t=n[n.length-1];t===`"`?e.data.sourceTitleMarker=`double`:t===`'`?e.data.sourceTitleMarker=`single`:t===`)`&&(e.data.sourceTitleMarker=`paren`)}break}case`mdxJsxFlowElement`:case`mdxJsxTextElement`:case`mdxFlowExpression`:case`mdxTextExpression`:e.data.sourceRaw=t.slice(a,o);break;case`break`:if(e.data.sourceRaw)break;t.slice(a,o).includes(`\\`)?e.data.sourceStyle=`backslash`:e.data.sourceStyle=`spaces`}}function n6(e,t,n){let r=t;for(;r<e.length&&/[ \t\r\n]/.test(e[r]);)r++;return r6(e,r,n)}function r6(e,t,n){return e[t]===`<`&&n.sourceGuardedDestinationOpen!==!0}function oue(e){for(let t=1;t<e.length;t++){let n=e[t];if(n===`\\`){t++;continue}if(n===`]`)return e[t+1]===`:`?t:-1}return-1}const sue=new Set([`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxFlowExpression`,`mdxTextExpression`]),i6=/^(?:[-+*]|\d{1,9}[.)])/;function a6(e){return sue.has(e.type)}function cue(e){return e.type===`blockquote`||e.type===`listItem`||e.type===`footnoteDefinition`}function lue(e,t){if(t===void 0||t.type===`root`||!a6(e))return!1;if(e.type===`mdxJsxFlowElement`&&t.type===`mdxJsxFlowElement`)return!0;let n=e.data?.sourceRaw;return typeof n==`string`&&n.includes(`
|
|
350
|
+
`)}function uue(e){let t=[0];for(let n=e.indexOf(`
|
|
351
351
|
`);n!==-1;n=e.indexOf(`
|
|
352
352
|
`,n+1))t.push(n+1);return{source:e,lineStarts:t,widths:new Map,contentOffsets:new Map}}function o6(e,t){let{lineStarts:n}=e,r=0,i=n.length-1;for(;r<i;){let e=r+i+1>>1;n[e]<=t?r=e:i=e-1}return n[r]}function s6(e,t){let n=t;for(;e[n]===` `||e[n]===` `||e[n]===`\r`;)n++;return n>=e.length||e[n]===`
|
|
353
|
-
`}function
|
|
353
|
+
`}function due(e,t,n){for(let r=t;r<n;r++)if(e[r]!==` `)return!1;return!0}function fue(e,t,n){if(e.type===`footnoteDefinition`){let e=/\[\^[^\]\n]*\]:[ \t]*/y;e.lastIndex=n;let r=e.exec(t);return r?n+r[0].length:null}let r=i6.exec(t.slice(n,n+11));if(!r)return null;let i=n+r[0].length;for(;t[i]===` `;)i++;return i}function pue(e,t,n){let r=e.contentOffsets.get(t);if(r!==void 0)return r;let i=fue(t,e.source,n);return e.contentOffsets.set(t,i),i}function mue(e,t,n){let r=t[n],i=e.widths.get(r);if(i!==void 0)return i;let a=null;return r.type===`footnoteDefinition`?a=4:r.type===`listItem`&&(a=hue(e,r,t.slice(0,n))),e.widths.set(r,a),a}function hue(e,t,n){let{source:r}=e,i=t.position?.start?.offset;if(typeof i!=`number`)return null;let a=c6(e,o6(e,i),n);if(!a.complete||a.offset>i||!due(r,a.offset,i))return null;let o=i6.exec(r.slice(i,i+11));if(!o)return null;let s=i+o[0].length,c=0;for(;r[s+c]===` `;)c++;if(r[s+c]===` `)return null;let l=s6(r,s)?1:c;return i-a.offset+o[0].length+l}function gue(e,t,n,r,i){let{source:a}=e,o=r[i];if(o.type===`blockquote`){let e=t;for(;a[e]===` `;)e++;return a[e]===`>`?(e++,(a[e]===` `||a[e]===` `)&&e++,e):null}let s=o.position?.start?.offset;if(typeof s!=`number`)return null;if(s>=n)return pue(e,o,s);let c=mue(e,r,i);if(c===null)return null;let l=t;for(;l<t+c&&a[l]===` `;)l++;return l===t+c||s6(a,l)?l:null}function c6(e,t,n){let r=t;for(let i=0;i<n.length;i++){let a=gue(e,r,t,n,i);if(a===null)return{offset:r,complete:!1};r=a}return{offset:r,complete:!0}}function _ue(e,t,n,r){let{source:i}=n,a=e.data?.sourceRaw,o=e.position?.start?.offset;if(typeof a!=`string`||typeof o!=`number`||i.slice(o,o+a.length)!==a)return;let s=a.split(`
|
|
354
354
|
`),c=o+s[0].length+1;for(let e=1;e<s.length;e++){let t=s[e],n=r(c);s[e]=t.slice(Math.min(n.offset-c,t.length)),c+=t.length+1}let l=``;if(e.type===`mdxJsxFlowElement`&&t.type===`mdxJsxFlowElement`){let e=r(o6(n,o));e.complete&&e.contentStart===o&&(l=i.slice(e.offset,o))}let u=l+s.join(`
|
|
355
|
-
`);u!==a&&(e.data={...e.data,sourceRaw:u})}function
|
|
355
|
+
`);u!==a&&(e.data={...e.data,sourceRaw:u})}function vue(e,t){let n=uue(t),r=[],i=new Map,a=e=>{let a=i.get(e);if(a===void 0){let o=c6(n,e,r),s=o.offset;for(;t[s]===` `;)s++;a={...o,contentStart:s},i.set(e,a)}return a},o=(e,t)=>{if(t.type!==`root`&&a6(e)&&_ue(e,t,n,a),!(`children`in e))return;let s=cue(e);s&&(r.push(e),i=new Map);for(let t of e.children)o(t,e);s&&(r.pop(),i=new Map)};for(let t of e.children)o(t,e)}const yue=new Set(`root.paragraph.heading.text.emphasis.strong.blockquote.list.listItem.code.inlineCode.link.image.linkReference.imageReference.definition.html.thematicBreak.break.yaml.toml.table.tableRow.tableCell.delete.footnoteDefinition.footnoteReference.mdxFlowExpression.mdxJsxFlowElement.mdxJsxTextElement.mdxTextExpression.wikiLink.wikiLinkEmbed.tag.math.inlineMath.mark.underline.comment.commentBlock.rawMdxFallbackMdast`.split(`.`));function l6(e,t){if(!e||typeof e!=`object`)return null;if(typeof e.offset==`number`)return e.offset>=0&&e.offset<=t.length?e.offset:null;let{line:n,column:r}=e;if(typeof n!=`number`||typeof r!=`number`||n<1||r<1)return null;let i=0;for(let e=1;e<n;e++){let e=t.indexOf(`
|
|
356
356
|
`,i);if(e===-1)return null;i=e+1}let a=t.indexOf(`
|
|
357
|
-
`,i),o=a===-1?t.length:a,s=i+r-1;return s<=o?s:null}function
|
|
357
|
+
`,i),o=a===-1?t.length:a,s=i+r-1;return s<=o?s:null}function bue(e,t){if(!e)return null;let n=l6(e.start,t),r=l6(e.end,t);return n===null||r===null||r<n?null:t.slice(n,r)}function xue(e,t){let n=bue(e.position,t);return{type:`rawMdxFallbackMdast`,originalType:e.type??`unknown`,value:n??``,unresolvedPosition:n===null,position:e.position}}function Sue(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``,r=typeof process<`u`&&process.env?.OK_DEBUG_POSITION_SLICE===`1`,i=!1;ub(e,(e,t,a)=>{if(a!==void 0&&typeof t==`number`&&typeof e.type==`string`&&!yue.has(e.type)){let r=xue(e,n);return a.children[t]=r,Gv}if(`children`in e&&Array.isArray(e.children)){let t=e;t.children.some(e=>e.type===`text`)&&(rue(t,n),AY(t,n))}if(aue(e,n,r,a),lue(e,a)&&(i=!0),e.type===`heading`&&a!==void 0&&typeof t==`number`){let n=e.position?.end?.line,r=a.children[t+1],i=r?.position?.start?.line;if(r?.type===`paragraph`&&typeof n==`number`&&typeof i==`number`&&i===n+1){let t=e;t.data??={},t.data.sourceContiguousNext=!0}}}),i&&vue(e,n)}}function Cue(e,t){let n={type:`mdxJsxFlowElement`,name:`MermaidFence`,attributes:[{type:`mdxJsxAttribute`,name:`chart`,value:e}],children:[]};return t&&(n.position=t),n}function wue(){return e=>{ub(e,`code`,(e,t,n)=>{if(!n||t==null||e.lang!==`mermaid`)return;let r=Cue(typeof e.value==`string`?e.value:``,e.position);n.children[t]=r})}}function u6(e,t,n){for(let r=t;r<n;r++)e[r]=` `}function Tue(e,t){if(e[t]!==`<`)return null;let n=e.slice(t).toLowerCase();for(let r of[`pre`,`code`]){if(!n.startsWith(`<${r}`))continue;let i=e[t+r.length+1];if(i===`>`||i===`/`||i===` `||i===` `)return r}return null}function Eue(e,t){let n=null;for(let r=t;r<e.length;r++){let t=e[r];if(n!==null)t===n&&(n=null);else if(t===`"`||t===`'`)n=t;else if(t===`>`)return r+1}return null}function d6(e,t,n){let r=RegExp(`</${n}\\s*>`,`i`).exec(e.slice(t));return r?.index===void 0?null:t+r.index+r[0].length}function f6(e,t){let n=0;for(;e[t+n]==="`";)n+=1;if(n===0)return null;let r=t+n,i=r;for(;i<e.length;){if(e[i]!=="`"){i+=1;continue}let t=0;for(;e[i+t]==="`";)t+=1;if(t===n)return i+n;i+=t}return r}function p6(e){let t=n3(),n=!1,r=null;return e.map(({text:e,start:i})=>{if(r===null&&!n&&t(e))return{text:` `.repeat(e.length),start:i};let a=e.split(``),o=0;for(;o<e.length;){if(n){let t=e.indexOf(`-->`,o),r=t<0?e.length:t+3;if(u6(a,o,r),o=r,t<0)break;n=!1;continue}if(r!==null){let t=d6(e,o,r);if(u6(a,o,t??e.length),t===null)break;o=t,r=null;continue}let t=e.indexOf(`<!--`,o),i=-1,s=null;for(let t=o;t<e.length;t++){let n=Tue(e,t);if(n!==null){i=t,s=n;break}}let c=e.indexOf("`",o),l=t<0?i:i<0?t:Math.min(t,i);if(c>=0&&(l<0||c<l)){o=f6(e,c)??c+1;continue}if(t<0&&i<0)break;if(t>=0&&(i<0||t<i)){let r=e.indexOf(`-->`,t+4),i=r<0?e.length:r+3;if(u6(a,t,i),o=i,n=r<0,n)break;continue}let u=Eue(e,i);if(u===null||s===null)break;let d=d6(e,u,s),f=d??e.length;if(u6(a,i,f),o=f,r=d===null?s:null,r!==null)break}return{text:a.join(``),start:i}})}function Due(e){let t=[],n=0;for(let r=0;r<e.length;r++){let i=e[r];i===`
|
|
358
358
|
`?(t.push({text:e.slice(n,r),start:n}),n=r+1):i===`\r`&&(t.push({text:e.slice(n,r),start:n}),e[r+1]===`
|
|
359
|
-
`&&(r+=1),n=r+1)}t.push({text:e.slice(n),start:n});let r=p6(t),i=e.split(``);for(let e of r)for(let t=0;t<e.text.length;t++)i[e.start+t]=e.text[t];return i.join(``)}function
|
|
359
|
+
`&&(r+=1),n=r+1)}t.push({text:e.slice(n),start:n});let r=p6(t),i=e.split(``);for(let e of r)for(let t=0;t<e.text.length;t++)i[e.start+t]=e.text[t];return i.join(``)}function Oue(e,t,n,r){return r<=n||e.slice(n,r).trim().length===0?!1:t.slice(n,r).trim().length===0}function kue(e){return e.type===`link`||e.type===`linkReference`}function Aue(e,t,n,r){let i=n.position?.start.offset,a=n.position?.end.offset;if(i===void 0||a===void 0)return;let o=r.slice(i,a),s={type:`text`,value:o,data:{sourceRaw:o},position:n.position};e.children.splice(t,1,s)}function jue(){return(e,t)=>{let n=typeof t.value==`string`?t.value:String(t.value??``);if(n.length===0||!n.includes(`<!--`)&&!/<(pre|code)[\s/>]/i.test(n))return;let r=Due(n),i=e=>{for(let t=e.children.length-1;t>=0;t--){let a=e.children[t];if(!a||(`children`in a&&Array.isArray(a.children)&&i(a),!kue(a)))continue;let o=a.position?.start.offset,s=a.position?.end.offset;o!==void 0&&s!==void 0&&Oue(n,r,o,s)&&Aue(e,t,a,n)}};i(e)}}const Mue=Object.assign(sde,{peek:()=>`$`}),Nue=Object.assign(cde,{peek:()=>`~`}),Pue=(()=>{for(let e of W4.extensions??[]){let t=e?.handlers?.mdxJsxFlowElement;if(typeof t==`function`)return t}throw Error(`mdast-util-mdx-jsx mdxJsxFlowElement to-markdown handler not found — the dirty MDX JSX serialize path cannot bind. Likely a breaking change in mdast-util-mdx-jsx (pinned in the root overrides); re-run the markdown-pipeline upgrade protocol (test:fidelity).`)})(),Fue=/^[ \t]*(?:$|#{1,6}(?:[ \t]|[ \t]*$)|>|(?:[-+*]|\d{1,9}[.)])[ \t]|`{3,}|~{3,}|=+[ \t]*$|-+[ \t]*$|(?:\*[ \t]*){3,}$|(?:_[ \t]*){3,}$)/;function Iue(e){let t=e;return t.type===`rawMdxFallback`?{type:`mdxJsxFlowElement`,name:null,attributes:[],children:[],data:{sourceRaw:t.value??``}}:e}const Lue={text(e,t,n,r){if(typeof e.data?.sourceRaw==`string`&&KU(e.data.sourceRaw,e.value??``))return e.data.sourceRaw;let i=uY(e.data);if(i.kind===`malformed`&&typeof process<`u`&&process.env?.OK_DEBUG_POSITION_SLICE===`1`&&console.warn(`[escape-provenance] malformed escapedChars metadata: CommonMark-safe serialization applies`),i.kind===`valid`&&i.data.escapedChars.length>0){let t=e.value??``,a=i.data.escapedChars,o=``,s=0,c,l=(e,t)=>{if(!e)return;let i=c===`<`?e.indexOf(`>`):-1;i>=0&&(o+=x6(n,e.slice(0,i+1),{...r,before:r.before+o,after:e.slice(i+1,i+2)||t},!0),e=e.slice(i+1)),e&&(o+=x6(n,e,{...r,before:r.before+o,after:t}))};for(let{offset:e,char:n}of a)e>s&&l(t.slice(s,e),`\\`),o+=`\\${n}`,s=e+1,c=n;return s<t.length&&l(t.slice(s),r.after),o}return x6(n,e.value??``,r)},emphasis(e,t,n,r){let i=e.data?.sourceDelimiter??`*`,a=n.createTracker(r),o=n.enter(`emphasis`),s=a.move(i);return s+=w6(n.containerPhrasing(e,{before:s,after:i,...a.current()}),r,i),s+=a.move(i),o(),s},strong(e,t,n,r){let i=e.data?.sourceDelimiter??`**`,a=n.createTracker(r),o=n.enter(`strong`),s=a.move(i);return s+=w6(n.containerPhrasing(e,{before:s,after:i,...a.current()}),r,i),s+=a.move(i),o(),s},link(e,t,n,r){if(e.data?.sourceStyle===`autolink`&&Wue(e))return`<${e.url}>`;if(e.data?.sourceStyle===`gfm-autolink`){let i=e.children?.length===1?e.children[0]:null;if(i?.type===`text`&&typeof i.value==`string`){let a=i.value,o=Uue(a,e.url);if(o===void 0||Yue(o,que(a,e,t,n,r)))return a;if(o===`protocol`&&Xue(a))return`<${a}>`}}let i=n.createTracker(r),a=n.enter(`link`),o=n.enter(`label`),s=i.move(`[`);if(s+=i.move(n.containerPhrasing(e,{before:s,after:`](`,...i.current()})),s+=i.move(`](`),o(),s+=b6(n,i,e),e.title){let t=e.data?.sourceTitleMarker??`double`;s+=i.move(y6(e.title,t))}return s+=i.move(`)`),a(),s},image(e,t,n,r){let i=n.createTracker(r),a=n.enter(`image`),o=n.enter(`label`),s=i.move(`})),s+=i.move(`](`),o(),s+=b6(n,i,e),e.title){let t=n.enter(`titleQuote`);s+=i.move(` "`),s+=i.move(n.safe(e.title,{before:s,after:`"`,...i.current()})),s+=i.move(`"`),t()}return s+=i.move(`)`),a(),s},definition(e,t,n,r){let i=e.data?.sourceLayout??`inline`,a=e.data?.sourceTitleMarker??`double`,o=n.enter(`definition`),s=n.createTracker(r),c=n.enter(`label`),l=s.move(`[`);l+=s.move(n.safe(n.associationId(e),{before:l,after:`]`,...s.current()})),l+=s.move(`]:`),c();let u=i===`multiline`?`
|
|
360
360
|
`:` `;l+=s.move(u);let d=String(e.url??``);if(l+=b6(n,s,e,!d||/[\0- ]/.test(d)),e.title){let t=i===`multiline`?`
|
|
361
361
|
`:` `;l+=s.move(y6(e.title,a,t))}return o(),l},thematicBreak(e){return e.data?.sourceRaw??`---`},break(e,t,n){let r=e.data?.sourceRaw;return typeof r==`string`&&r.length>0?r:n.stack.includes(`tableCell`)||n.stack.includes(`okAtxHeading`)?`<br />`:e.data?.sourceStyle===`backslash`?`\\
|
|
362
362
|
`:`
|
|
@@ -367,7 +367,7 @@ ${t.slice(l+2)}`,d+=1;else break}t.push({indent:l,number:parseInt(s,10),content:
|
|
|
367
367
|
`).map(e=>e.length>0?`${c}${e}`:e).join(`
|
|
368
368
|
`):e}let m=`${u}${f}${d}${p}\n${n}\n${r.repeat(o)}`;return c?m.split(`
|
|
369
369
|
`).map(e=>e.length>0?`${c}${e}`:e).join(`
|
|
370
|
-
`):m},inlineCode(e,t,n){let r=e.value??``,i=e.data?.sourceFenceChar===`~`?`~`:"`",a=typeof e.data?.sourceFenceLength==`number`&&e.data.sourceFenceLength>0?e.data.sourceFenceLength:1,o=i==="`"?"`":`~`,s=a;for(;RegExp(`(^|[^${o}])${o.repeat(s)}([^${o}]|$)`).test(r);)s+=1;let c=i.repeat(s);/[^ \r\n]/.test(r)&&(e.data?.sourcePadded===!0||/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||r.startsWith(i)||r.endsWith(i))&&(r=` ${r} `);let l=`${c}${r}${c}`;return n.stack.includes(`tableCell`)?nW(l):l},inlineMath:
|
|
370
|
+
`):m},inlineCode(e,t,n){let r=e.value??``,i=e.data?.sourceFenceChar===`~`?`~`:"`",a=typeof e.data?.sourceFenceLength==`number`&&e.data.sourceFenceLength>0?e.data.sourceFenceLength:1,o=i==="`"?"`":`~`,s=a;for(;RegExp(`(^|[^${o}])${o.repeat(s)}([^${o}]|$)`).test(r);)s+=1;let c=i.repeat(s);/[^ \r\n]/.test(r)&&(e.data?.sourcePadded===!0||/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||r.startsWith(i)||r.endsWith(i))&&(r=` ${r} `);let l=`${c}${r}${c}`;return n.stack.includes(`tableCell`)?nW(l):l},inlineMath:Mue,delete:Nue,heading(e,t,n,r){let i=e.data?.sourceStyle??`atx`,a=e.depth;if(i===`setext`&&(a===1||a===2)){let t=n.containerPhrasing(e,{...r,before:`
|
|
371
371
|
`,after:`
|
|
372
372
|
`}),i=e.data?.sourceUnderlineLength,o=typeof i==`number`&&i>=1?i:Math.max(t.length,3);return`${t}\n${(a===1?`=`:`-`).repeat(o)}`}let o=e.data?.sourceLeadingIndent,s=typeof o==`number`&&o>=1&&o<=3?` `.repeat(o):``,c=e.data?.sourceInteriorSpacing,l=typeof c==`number`&&c>=2?` `.repeat(c):` `,u=`#`.repeat(a),d=n.enter(`okAtxHeading`),f=n.containerPhrasing(e,{...r,before:`${u} `,after:`
|
|
373
373
|
`});d();let p=e.data?.sourceTrailingHashes;if(typeof p==`number`&&p>0){let e=`#`.repeat(p);return f?`${s}${u}${l}${f} ${e}`:`${s}${u} ${e}`}return f?`${s}${u}${l}${f}`:`${s}${u}`},list(e,t,n,r){let i=n.options.bullet||`-`,a=!!e.ordered,o=n.bulletCurrent,s=n.bulletLastUsed;if(!a){let t=e.data?.bulletMarker;(t===`-`||t===`*`||t===`+`)&&(n.bulletCurrent=t)}let c=e.children||[],l=[],u=a?e.data?.listMarkerDelimiter??`.`:null,d=e.start??1;for(let t=0;t<c.length;t++){let o=c[t],s=o.data?.sourceOrdinal,f=typeof s==`number`&&s>=0?s:d+t,p=a?`${f}${u}`:e.data?.bulletMarker??i,m=o.data?.sourceMarkerSpacing,h=typeof m==`number`&&m>=2&&m<=4?m:1,g=` `.repeat(h),_=p;o.checked===!0?_+=`${g}[${o.data?.sourceCheckboxChar===`X`?`X`:`x`}]`:o.checked===!1&&(_+=`${g}[ ]`);let v=o.data?.sourceContinuationIndent,y=p.length+h,b=typeof v==`number`&&v>=y&&v<=y+3?v:y,x=` `.repeat(b),S=o.checked===null||o.checked===void 0?g:` `,C=o.children??[],w=C[0]?.type===`list`,T;if(w){let e=o.checked!==null&&o.checked!==void 0,t=n.containerFlow({...o,children:[C[0]]},r),i=C.slice(1),a=i.length?n.containerFlow({...o,children:i},r):``,s=t.split(`
|
|
@@ -382,10 +382,10 @@ ${t.slice(l+2)}`,d+=1;else break}t.push({indent:l,number:parseInt(s,10),content:
|
|
|
382
382
|
`:`
|
|
383
383
|
`;return l.join(f)},table(e,t,n,r){let i=n.enter(`table`),a=[],o=[],s=e.children??[];for(let e of s){let t=e.children??[],i=[],s=[];for(let e of t){let t=n.enter(`tableCell`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,{...r,before:` `,after:` `});a(),t(),i.push(o);let c=e.data?.sourcePadding;s.push(c&&typeof c.left==`number`&&typeof c.right==`number`?{left:c.left,right:c.right}:null)}a.push(i),o.push(s)}i();let c=e.align??[],l=e.data?.sourceDashCounts,u=a[0]?.length??0,d=a.slice(1).reduce((e,t)=>Math.max(e,t.length),0),f=Math.max(u,d,c.length);if(f===0)return console.warn(JSON.stringify({event:`table-serialize-dropped-empty`,rows:s.length})),``;let p=[];for(let e=0;e<f;e++){let t=c[e],n=``,r=``;t===`center`?(n=`:`,r=`:`):t===`left`?n=`:`:t===`right`&&(r=`:`);let i=l?.[e],a=typeof i==`number`&&i>=1?i:1;p.push(n+`-`.repeat(a)+r)}let m=(e,t)=>{let n=[];for(let r=0;r<f;r++){let i=e[r]??``,a=t[r]??{left:1,right:1};n.push(` `.repeat(a.left)+i+` `.repeat(a.right))}let r=v&&!v.leading?``:`|`,i=v&&!v.trailing?``:`|`;return`${r}${n.join(`|`)}${i}`},h=e.data?.sourceAlignmentPadding,g=Array.from({length:f},(e,t)=>{let n=h?.[t];return n&&typeof n.left==`number`&&typeof n.right==`number`?n:null}),_=e.data?.sourceOuterPipes,v=_&&f>=2&&a.every(e=>{let t=(e[0]??``).trim(),n=(e[f-1]??``).trim();return(_.leading||t.length>0)&&(_.trailing||n.length>0&&!n.endsWith(`\\`))})?_:null;if(a.length===0)return m(p,g);let y=[];y.push(m(a[0],o[0]??[])),y.push(m(p,g));for(let e=1;e<a.length;e++)y.push(m(a[e],o[e]??[]));return y.join(`
|
|
384
384
|
`)},mdxJsxFlowElement(e,t,n,r){let i=e,a=i.data?.sourceRaw;if(typeof a==`string`)return a;let o=i.data?.htmlBoundary;if(o&&typeof o.opener==`string`&&typeof o.closer==`string`){let e=n.containerFlow({type:`root`,children:i.children??[]},r);return`${o.opener}\n\n${e}\n\n${o.closer}`}let s=i.name??``,c=m6(i.attributes??[]),l=i.data?.sourceBody;if(l&&s&&!c.includes(`
|
|
385
|
-
`))return`${l.leading}<${s}${c?` ${c}`:``}>${l.afterOpenTag}`;if(!i.children||i.children.length===0)return s?c?`<${s} ${c} />`:`<${s} />`:``;let u={...i,attributes:(i.attributes??[]).map(
|
|
386
|
-
`?`
`:i===`\r`?`
`:i===`\\`?_4(e[r+1])?`\\\\`:`\\`:i}return`${n}>`}function
|
|
387
|
-
]|$)`};return delete t._compiled,t});let a;try{a=e.safe(
|
|
388
|
-
`||e[r]===`\r`;let i=n.after.charCodeAt(0);return Number.isNaN(i)||i===10||i===13}function ide(e,t){let n=``,r=0;for(;r<e.length;){let i=e.charAt(r);if(i===`\\`){n+=e.slice(r,r+2),r+=2;continue}if(i===`*`||i===`_`||i===`~`||i===`=`){let a=r+1;for(;a<e.length&&e.charAt(a)===i;)a++;let o=r===0?t.before.charCodeAt(t.before.length-1):e.charCodeAt(r-1);if(i===`=`)n+=(Number.isNaN(o)||o===10||o===13)&&rde(e,a,t)?`\\${e.slice(r,a)}`:e.slice(r,a);else{let s=a<e.length?e.charCodeAt(a):t.after.charCodeAt(0);n+=nde(i,o,s)?`\\${i}`.repeat(a-r):e.slice(r,a)}r=a;continue}n+=i,r+=1}return n}function w6(e,t,n){let r=n.startsWith(`_`)?`_`:`*`,i=t.before??``,a=t.after??``,o=e,s=o.charCodeAt(0);T6(i.charCodeAt(i.length-1),s,r)&&(o=E6(s)+o.slice(1));let c=o.charCodeAt(o.length-1);return T6(a.charCodeAt(0),c,r)&&(o=o.slice(0,-1)+E6(c)),o}function T6(e,t,n){return!(ob(t)!==1||n===`_`&&ob(e)===void 0)}function E6(e){return`&#x${e.toString(16).toUpperCase()};`}function ade(e,t,n,r){let i=e.value??``,a=e.data?.sourceDelimiter,o=typeof a==`string`&&/^\$+$/.test(a)?a.length:2;for(o===1&&!sde(i,r)&&(o=2);RegExp(`(^|[^$])${`\\$`.repeat(o)}([^$]|$)`).test(i);)o++;let s=`$`.repeat(o);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` ${i} `);let c=-1;for(;++c<n.unsafe.length;){let e=n.unsafe[c];if(!e.atBreak)continue;let t=n.compilePattern(e),r;for(;(r=t.exec(i))!==null;){let e=r.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=`${i.slice(0,e)} ${i.slice(r.index+1)}`}}return s+i+s}function ode(e,t,n,r){let i=e.data?.sourceDelimiter===`~`?`~`:`~~`,a=n.createTracker(r),o=n.enter(`strikethrough`),s=a.move(i);return s+=w6(n.containerPhrasing(e,{...a.current(),before:s,after:`~`}),r,i),s+=a.move(i),o(),s}function sde(e,t){return!(e.length===0||!/^\S/.test(e)||!/\S$/.test(e)||/[$\r\n]/.test(e)||e.endsWith(`\\`)||/\\[!-/:-@[-`{-~]/.test(e)||/^\d/.test(t.after)||t.before.endsWith(`\\`))}const D6=[{mode:`protecting`,protect:mse,reservations:fse},{mode:`protecting`,protect:Jse,reservations:gse},{mode:`protecting`,protect:use,reservations:sse},{mode:`serializer-only`,reservations:[{to:``}]}],cde=new Set(D6.flatMap(({reservations:e})=>e.map(({to:e})=>e)));function lde(e,t){switch(t.mode){case`protecting`:return t.protect(e);case`serializer-only`:return e}}function O6(e){return D6.reduce(lde,e)}function ude(e){return cde.has(e)}function k6(e){return e.data?.sourceRaw}function dde(e){return e.type===`text`?e.value===``:e.type===`mdxJsxTextElement`&&k6(e)===``}function A6(e){return e.type===`paragraph`&&(e.children??[]).every(dde)}function j6(e){let t=e.children??[],n=t[0]?.children?.length??0,r=0;for(let e=1;e<t.length;e++)r=Math.max(r,t[e]?.children?.length??0);let i=e.align??[];return Math.max(n,r,i.length)}function fde(e){switch(e.type){case`table`:return j6(e)===0;case`code`:return e.data?.sourceStyle===`indented`&&/^\n*$/.test(e.value??``);case`thematicBreak`:return k6(e)===``;case`html`:return(e.value??``)===``;case`mdxJsxFlowElement`:return k6(e)===void 0&&e.data?.htmlBoundary===void 0&&(e.children??[]).length===0&&!e.name;case`list`:return(e.children??[]).length===0;default:return!1}}function pde(e){let t=[];for(let n of e.children){if(n.type===`table`&&j6(n)===0){console.warn(JSON.stringify({event:`table-serialize-dropped-empty`,rows:(n.children??[]).length}));continue}fde(n)||(n.type===`paragraph`&&n.children.length>0&&A6(n)&&(n.children=[]),t.push(n))}e.children=t}function mde(e,t){let n=e,r=t;return n.type===`heading`&&n.data?.sourceContiguousNext===!0&&r.type===`paragraph`}const hde=(e,t)=>{if(A6(e)||mde(e,t))return 0;let n=e.position,r=t.position;if(!n||!r)return;let i=r.start.line-n.end.line-1;return i>=1?i:void 0},M6=/(?<!\\)\$(?=\S)([^$\n]*?[^\s$])\$(?!\d)/g;function gde(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;ub(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`$`)===-1)return;let a=gY(e);M6.lastIndex=0;let o=[],s;for(;(s=M6.exec(i))!==null;){let e=s.index,t=e+s[0].length;if(bY(a,e,1)||bY(a,t-1,1)){M6.lastIndex=e+1;continue}o.push(s)}if(o.length===0)return;let c=[],l=0;for(let t of o){let r=t.index,i=r+t[0].length;r>l&&c.push(yY(n,e,l,r));let a={type:`inlineMath`,value:t[1]},o=CY(n,e,r,i);o&&(a.position=o),c.push(a),l=i}return l<i.length&&c.push(yY(n,e,l,i.length)),r.children.splice(t,1,...c),[Gv,t+c.length]})}}const _de=new Set([`strong`,`emphasis`,`delete`,`link`,`mark`,`comment`]);function vde(e){if(e?.type!==`break`)return!1;let t=e.data?.sourceRaw;return typeof t!=`string`||t.length===0}function yde(e){e.data??={},e.data.sourceRaw=`<br />`,e.data.sourceStyle=`html`}function N6(e){if(e?.type!==`text`)return!1;let t=e.data?.sourceRaw;return typeof t!=`string`||t.length===0}const P6=/[ \t]+$/,F6=/^[ \t]*$/;function bde(e){return e.some(e=>!(N6(e)&&F6.test(e.value)))}function I6(e,t=!1){for(;e.length>0;){let n=e[e.length-1];if(vde(n)){yde(n);break}if(n&&_de.has(n.type)&&`children`in n){let t=n.children;if(I6(t,!0),t.length===0){e.pop();continue}}if(!t&&N6(n)&&P6.test(n.value)){let t=n.value.replace(P6,``);if(t.length>0){n.value=t;continue}if(bde(e.slice(0,-1))){e.pop();continue}if(e.every(e=>N6(e)&&F6.test(e.value))){let t=e[0];t.value=t.value.charAt(0),e.splice(1)}}break}}const xde=new Set([`paragraph`,`heading`,`tableCell`]);function Sde(e){let t=e=>{if(xde.has(e.type)&&`children`in e&&I6(e.children),`children`in e)for(let n of e.children)t(n)};t(e)}const L6={handlers:{tag:e=>`#${e.value}`},unsafe:[{character:`#`,inConstruct:[`phrasing`],before:`\\s`,after:`[A-Za-z]|[^\\x00-\\x7F]`}]};function Cde(){let e=this.data();e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===L6)||e.toMarkdownExtensions.push(L6)}const wde=new Set([`u`,`ins`]);function Tde(){return e=>{ub(e,`mdxJsxTextElement`,(e,t,n)=>{if(n===void 0||t==null||e.name===null||!wde.has(e.name)||(e.attributes??[]).length>0)return;let r={type:`underline`,children:e.children??[],data:{sourceForm:e.name===`ins`?`ins`:`u`}};return e.position&&(r.position=e.position),n.children.splice(t,1,r),t+1})}}function Ede(e){return e.children.some(e=>{let t=e.type;return t!==`yaml`&&t!==`toml`})?e:{...e,children:[...e.children,{type:`paragraph`,children:[]}]}}const Dde=[{name:`remark-parse`,plugin:aE},{name:`escape-provenance`,plugin:Rle},{name:`remark-mdx-agnostic`,plugin:G4},{name:`remark-gfm`,plugin:Tw},{name:`remark-math`,plugin:f3,options:{singleDollarTextMath:!1}},{name:`remark-wiki-link`,plugin:e3},{name:`remark-github-alerts`,plugin:Ece,options:Zce},{name:`callout-transformer`,plugin:Xce},{name:`restore-from-mdx`,plugin:Yse},{name:`void-br-promoter`,plugin:$se},{name:`restore-entity-refs`,plugin:dse},{name:`restore-backslash-escapes`,plugin:hse},{name:`details-accordion-promoter`,plugin:ble},{name:`div-align-promoter`,plugin:Dle},{name:`image-promoter`,plugin:Hle},{name:`indented-code-promoter`,plugin:qle},{name:`math-promoter`,plugin:eue},{name:`single-dollar-math-promoter`,plugin:gde},{name:`highlight-promoter`,plugin:Vle},{name:`underline-promoter`,plugin:Tde},{name:`mermaid-promoter`,plugin:Sue},{name:`comment-promoter`,plugin:Qce},{name:`merged-post-parse-walker`,plugin:bue},{name:`empty-task-item-unmint`,plugin:Mle},{name:`link-reference-destination`,plugin:$le},{name:`non-rendering-context-demote`,plugin:kue},{name:`ensure-non-empty-doc`,plugin:()=>Ede}];function Ode(e){let t=Gw();for(let e of Dde)t=`options`in e&&e.options!==void 0?t.use(e.plugin,e.options):t.use(e.plugin);return t=t.use(bce,{schema:e.schema,handlers:e.handlers}),t.freeze(),t}function kde(e){let t=Gw().use(bT,[`yaml`]).use(Tw,{tablePipeAlign:!1}).use(f3,{singleDollarTextMath:!1}).use(G4).use(e3).use(Cde).use(c0,{bullet:`-`,fences:!0,rule:`-`,join:[hde],...e.toMarkdownHandlers?{handlers:e.toMarkdownHandlers}:{}});return t.freeze(),t}function R6(e){return e.charCodeAt(0)===65279?{source:e.slice(1),hadBom:!0}:{source:e,hadBom:!1}}const z6=/^\n+$/,B6=/^\n{2,}$/;function V6(e,t,n){let r,i,a=e.children;if(a.length>0){let e=a[0]?.position?.start?.offset;if(typeof e==`number`&&e>0){let n=t.slice(0,e);z6.test(n)&&(r=n)}let n=a[a.length-1]?.position?.end?.offset;if(typeof n==`number`&&n<=t.length){let e=t.slice(n);B6.test(e)&&(i=e)}}if(!n&&r===void 0&&i===void 0)return;let o={...n?{bom:!0}:{},...r===void 0?{}:{leading:r},...i===void 0?{}:{trailing:i}};return e.data??={},e.data.sourceDocBoundary=o,o}function Ade(e){if(typeof e!=`object`||!e)return;let t=e,n={};return t.bom===!0&&(n.bom=!0),typeof t.leading==`string`&&z6.test(t.leading)&&(n.leading=t.leading),typeof t.trailing==`string`&&B6.test(t.trailing)&&(n.trailing=t.trailing),n.bom||n.leading||n.trailing?n:void 0}function jde(e,t){let{source:n,hadBom:r}=R6(e),i=P3(n),a=new Rw(O6(i)),o=t.parse(a);a.value=i;let s=t.runSync(o,a);Z3(s,i);let c=V6(s,i,r),l=c?Iu(s,c):void 0,u=t.stringify(s);return l?u.type.create({...u.attrs,sourceDocBoundary:l},u.content,u.marks):u}function Mde(e,t){return H6(e,t,!1)}function Nde(e,t){return H6(e,t,!0)}function H6(e,t,n){let{source:r,hadBom:i}=R6(e),a=P3(r),o=new Rw(O6(a)),s=t.parse(o);o.value=a;let c=t.runSync(s,o);n&&Z3(c,a);let l=V6(c,a,i);return n&&l&&Iu(c,l),c}function Pde(e,t,n){let r=Sce(e,{schema:n.schema,nodeHandlers:n.pmNodeHandlers,markHandlers:n.pmMarkHandlers});U6(r),Ale(r),Sde(r),pde(r);let i=Ade(e.attrs?.sourceDocBoundary),a=String(t.stringify(r));return i?.leading&&(a=i.leading+a),i?.trailing&&(a=a.replace(/\n+$/,``)+i.trailing),i?.bom&&(a=`\uFEFF${a}`),a}function U6(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)U6(t);for(let t=0;t+1<e.children.length;){let n=e.children[t],r=e.children[t+1],i=n?.data,a=r?.data,o=dY(i)?i.escapedChars:null,s=dY(a)?a.escapedChars:null;if(n?.type!==`text`||r?.type!==`text`||typeof n.data?.sourceRaw==`string`||typeof r.data?.sourceRaw==`string`||o===null&&s===null){t+=1;continue}let c=n.value.length;n.value+=r.value,n.data??={},n.data.escapedChars=[...o??[],...(s??[]).map(e=>({...e,offset:e.offset+c}))],r.data?.entityRefSpans?.length&&(n.data.entityRefSpans=[...n.data.entityRefSpans??[],...r.data.entityRefSpans.map(e=>({...e,offset:e.offset+c}))]),e.children.splice(t+1,1)}}}var Fde=class{schema;handlers;pmNodeHandlers;pmMarkHandlers;parseProcessor;serializeProcessor;parseCtx={current:{}};freshnessHolder={checker:void 0};authoredJsxSource=Mce(e=>this.schema.nodeFromJSON(this.parseWithFallback(e)));constructor(e){this.schema=UV(e.extensions),this.handlers=zde(this.schema,this.parseCtx),this.freshnessHolder.checker=e.deriveStructuralFreshness?dd({parse:e=>this.parseWithFallback(e)}):void 0;let{nodeHandlers:t,markHandlers:n}=Bde(this.schema,this.freshnessHolder,this.authoredJsxSource);this.pmNodeHandlers=t,this.pmMarkHandlers=n,this.parseProcessor=Ode({schema:this.schema,handlers:this.handlers,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers}),this.serializeProcessor=kde({toMarkdownHandlers:Fue})}parse(e,t){if(!e.trim())return{type:`doc`,content:[{type:`paragraph`,content:[]}]};this.parseCtx.current=t??{};try{return jde(e,this.parseProcessor).toJSON()}finally{this.parseCtx.current={}}}parseToMdast(e){return e.trim()?Mde(e,this.parseProcessor):{type:`root`,children:[]}}parseToEditorMdast(e){return e.trim()?Nde(e,this.parseProcessor):{type:`root`,children:[]}}parseWithFallback(e,t){return e.trim()?Pce(e,{parse:e=>this.parse(e,t)}):{type:`doc`,content:[{type:`paragraph`,content:[]}]}}serialize(e,t){let n;try{n=this.schema.nodeFromJSON(e)}catch(t){let n=`MarkdownManager.serialize() failed: schema rejected JSONContent (type=${e.type}, childCount=${e.content?.length??0})`;throw Error(n,{cause:t})}let r=this.freshnessHolder.checker;t?.skipFreshnessDerive&&(this.freshnessHolder.checker=void 0);try{return Pde(n,this.serializeProcessor,{schema:this.schema,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers})}finally{this.freshnessHolder.checker=r}}};const W6=r2();function G6(e,t){let n=new Map;for(let e of t)n.set(e.name,e);let r={};for(let t of e){if(t.type===`mdxJsxExpressionAttribute`)continue;let e=t.name,i=n.get(e);if(t.value===null||t.value===void 0){r[e]=!0;continue}if(typeof t.value==`string`){if(i?.type===`number`){let n=Number(t.value);r[e]=Number.isNaN(n)?t.value:n}else r[e]=i?.type===`boolean`?t.value===`true`:t.value;continue}let a=t.value.value;try{r[e]=JSON.parse(a)}catch{r[e]=a}}return r}function K6(e){let t=!1;return e.descendants(e=>t?!1:e.type.name===`jsxInline`?(e.attrs.sourceDirty&&(t=!0),!1):e.type.name===`jsxComponent`&&e.attrs.sourceDirty?(t=!0,!1):!0),t}function Ide(e,t){return e.attrs.sourceDirty||K6(e)?!0:t?t.isDiverged(e.toJSON()):!1}function Lde(e){if(e.type!==`paragraph`)return!1;let t=e.children??[];return t.length===0||t.every(e=>e.type===`text`&&e.value===``)}function q6(e,t){if(!t)return e;let n={};return t.sourceFenceChar&&(n.sourceFenceChar=t.sourceFenceChar),typeof t.sourceFenceLength==`number`&&(n.sourceFenceLength=t.sourceFenceLength),t.sourcePadded===!0&&(n.sourcePadded=!0),Object.keys(n).length===0?e:{...e,data:n}}function J6(e,t){if(e.length===0)return q6({type:`inlineCode`,value:``},t);if(e.every(e=>e.type===`text`))return q6({type:`inlineCode`,value:e.map(e=>e.value).join(``)},t);if(e.length===1&&`children`in e[0]){let n=e[0];return{...n,children:[J6(n.children,t)]}}return q6({type:`inlineCode`,value:Y6(e)},t)}function Y6(e){let t=``;for(let n of e)n.type===`text`?t+=n.value:`children`in n&&Array.isArray(n.children)?t+=Y6(n.children):`value`in n&&typeof n.value==`string`&&(t+=n.value);return t}const Rde=vp;function zde(e,t){let n=e.nodes,r=e.marks,i={};n.paragraph&&(i.paragraph=(e,t,r)=>{let i=r.all(e).flat(),a=i.some(e=>e?.isBlock&&!e?.isInline),o=i.some(e=>e?.isInline||e?.isText||e?.isTextblock);if(a&&!o)return i.length===1?i[0]:i;if(a&&o){let e=i.filter(e=>!e?.isBlock||e?.isInline),t=i.filter(e=>e?.isBlock&&!e?.isInline),r=[],a=n.paragraph.createAndFill(null,e.length>0?e:null);return a&&r.push(a),r.push(...t),r.length===1?r[0]:r}return n.paragraph.createAndFill(null,i.length>0?i:null)}),n.blockquote&&(i.blockquote=c3(n.blockquote,e=>({sourceMarkerSpacings:e.data?.sourceMarkerSpacings??null}))),n.tableCell&&(i.tableCell=(e=>(t,r,i)=>{let a=i.all(t).flat();if(a.length>0&&n.paragraph){let t=n.paragraph.create(null,a);return e.createAndFill(null,[t])}return e.createAndFill(null,null)})(n.tableCell)),n.tableRow&&(i.tableRow=c3(n.tableRow)),n.table&&n.tableRow&&n.tableCell&&(i.table=(e,t,r)=>{let i=e.align??[],a=e.children??[],o=[];for(let e=0;e<a.length;e++){let t=a[e];if(t.type!==`tableRow`)continue;let s=t.children??[],c=[];for(let t=0;t<s.length;t++){let a=s[t];if(a.type!==`tableCell`)continue;let o=r.all(a).flat(),l=o.length>0&&n.paragraph?[n.paragraph.create(null,o)]:null,u=i[t]??null,d=e===0&&n.tableHeader?n.tableHeader:n.tableCell,f=a.data?.sourcePadding??null,p=d.createAndFill({align:u,sourcePadding:f},l);p&&c.push(p)}let l=n.tableRow.createAndFill(null,c.length>0?c:null);l&&o.push(l)}let s=e.data?.sourceDashCounts??null,c=e.data?.sourceOuterPipes??null,l=e.data?.sourceAlignmentPadding??null;return n.table.createAndFill({sourceDashCounts:s,sourceOuterPipes:c,sourceAlignmentPadding:l},o.length>0?o:null)}),n.image&&(i.image=e=>{let r=e.url??``,i=Mu(r,t.current.sourcePath);return n.image.createAndFill({src:i,alt:e.alt??null,title:e.title??null,sourceUrl:i===r?null:r,sourceUrlForm:e.data?.sourceUrlForm??null})},i.imageReference=n.imageReference?e=>n.imageReference.createAndFill({alt:e.alt??``,label:e.label??e.identifier??``,identifier:e.identifier??``,referenceType:e.referenceType??`shortcut`}):e=>n.image.createAndFill({src:``,alt:e.alt??null,title:null})),r.escapeMark&&(i.text=t=>{let n=t.value??``,i=typeof t.data?.sourceRaw==`string`?t.data.sourceRaw:null;if(!n&&!i)return null;if(i)return r.sourceLiteral?e.text(n,[r.sourceLiteral.create({sourceRaw:i})]):e.text(n);let a=t.data?.escapedChars,o=t.data?.entityRefSpans;if(!a?.length&&!o?.length)return e.text(n);let s=[...(a??[]).map(e=>({kind:`escape`,offset:e.offset,length:1})),...(o??[]).map(e=>({kind:`entity`,offset:e.offset,length:e.length,raw:e.raw}))];s.sort((e,t)=>e.offset-t.offset);let c=[];for(let e of s){let t=c[c.length-1];e.kind===`entity`&&t?.kind===`entity`&&t.offset+t.length===e.offset&&op(t.raw)!==null&&rp(e.raw)?c[c.length-1]={kind:`entity`,offset:t.offset,length:t.length+e.length,raw:t.raw+e.raw}:c.push(e)}let l=[],u=0;for(let t of c){if(t.offset>u){let r=n.slice(u,t.offset);r&&l.push(e.text(r))}if(t.offset<n.length){let i=n.slice(t.offset,t.offset+t.length);if(i){if(t.kind===`escape`)l.push(e.text(i,[r.escapeMark.create()]));else if(r.sourceLiteral){let n=op(t.raw);l.push(e.text(n??i,[r.sourceLiteral.create({sourceRaw:t.raw})]))}else l.push(e.text(i))}u=t.offset+t.length}}if(u<n.length){let t=n.slice(u);t&&l.push(e.text(t))}return l.length===1?l[0]:l}),r.code&&(i.inlineCode=t=>e.text(t.value,[r.code.create({sourceFenceChar:t.data?.sourceFenceChar??"`",sourceFenceLength:typeof t.data?.sourceFenceLength==`number`?t.data.sourceFenceLength:1,sourcePadded:t.data?.sourcePadded===!0})]));let a=r.strike??r.delete;if(a&&(i.delete=l3(a,e=>({sourceDelimiter:e.data?.sourceDelimiter===`~`?`~`:`~~`}))),r.highlight&&(i.mark=l3(r.highlight)),r.underline&&(i.underline=l3(r.underline,e=>({sourceForm:e.data?.sourceForm===`ins`?`ins`:`u`}))),r.comment&&(i.comment=l3(r.comment,e=>({sourceForm:e.data?.sourceForm??`percent`}))),n.commentBlock&&(i.commentBlock=c3(n.commentBlock,e=>({sourceForm:e.data?.sourceForm??`percent`,sourceLayout:e.data?.sourceLayout??`block`}))),r.emphasis&&(i.emphasis=l3(r.emphasis,e=>({sourceDelimiter:e.data?.sourceDelimiter??`*`}))),r.strong&&(i.strong=l3(r.strong,e=>({sourceDelimiter:e.data?.sourceDelimiter??`**`}))),n.heading&&(i.heading=c3(n.heading,e=>({level:e.depth,headingStyle:e.data?.sourceStyle??`atx`,sourceTrailingHashes:e.data?.sourceTrailingHashes??null,sourceUnderlineLength:e.data?.sourceUnderlineLength??null,sourceContiguousNext:e.data?.sourceContiguousNext??!1,sourceLeadingIndent:e.data?.sourceLeadingIndent??null,sourceInteriorSpacing:e.data?.sourceInteriorSpacing??null}))),n.codeBlock&&(i.code=t=>{let r=t.value?[e.text(t.value)]:[];return n.codeBlock.createAndFill({language:t.lang??null,meta:t.meta??null,fenceDelimiter:t.data?.sourceFenceChar??"`",fenceLength:t.data?.sourceFenceLength??3,sourceStyle:t.data?.sourceStyle??`fenced`,sourceClosingFenceLength:t.data?.sourceClosingFenceLength??null,sourceUnclosedFence:t.data?.sourceUnclosedFence??!1,sourceFenceIndent:t.data?.sourceFenceIndent??null,sourceInfoPadding:t.data?.sourceInfoPadding??null,sourceIndents:t.data?.sourceIndents??null},r)}),n.thematicBreak&&(i.thematicBreak=e=>n.thematicBreak.createAndFill({sourceRaw:e.data?.sourceRaw??`---`})),n.hardBreak&&(i.break=e=>n.hardBreak.createAndFill({hardBreakStyle:e.data?.sourceStyle??`spaces`,sourceRaw:e.data?.sourceRaw??null})),n.list&&(i.list=c3(n.list,e=>({ordered:!!e.ordered,start:e.start??1,spread:!!e.spread,bulletMarker:e.data?.bulletMarker??null,listMarkerDelimiter:e.data?.listMarkerDelimiter??null}))),n.listItem&&(i.listItem=c3(n.listItem,e=>({checked:e.checked??null,spread:!!e.spread,sourceMarkerSpacing:e.data?.sourceMarkerSpacing??null,sourceOrdinal:e.data?.sourceOrdinal??null,sourceCheckboxChar:e.data?.sourceCheckboxChar??null,sourceContinuationIndent:e.data?.sourceContinuationIndent??null}))),r.link){let t=r.sourceLiteral;i.link=(n,i,a)=>{if((n.children??[]).length===0){let r=typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:`[](${n.url??``})`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let o=a.all(n).flat(),s=r.link.create({href:n.url??``,title:n.title??null,linkStyle:n.data?.sourceStyle??`inline`,refLabel:null,sourceUrlForm:n.data?.sourceUrlForm??null,sourceTitleMarker:n.data?.sourceTitleMarker??null});return o.map(e=>e.mark(s.addToSet(e.marks)))},i.linkReference=(n,i,a)=>{if((n.children??[]).length===0){let r=typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:`[${n.label??``}][${n.identifier??``}]`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let o=a.all(n).flat(),s=r.link.create({href:n.data?.resolvedUrl??``,title:n.data?.resolvedTitle??null,linkStyle:n.referenceType??`shortcut`,refLabel:n.label??n.identifier??null});return o.map(e=>e.mark(s.addToSet(e.marks)))}}n.htmlBlock&&(i.html=e=>n.htmlBlock.createAndFill({content:e.value??``}));let o=n.linkDefinition??n.linkRefDef;if(o){let e=!!o.spec.attrs?.url,t=!!o.spec.attrs?.href,n=!!o.spec.attrs?.identifier,r=!!o.spec.attrs?.sourceLayout,a=!!o.spec.attrs?.sourceTitleMarker,s=!!o.spec.attrs?.sourceUrlForm;i.definition=i=>{let c={title:i.title??null};return n&&(c.identifier=i.identifier??``),c.label=i.label??i.identifier??``,e?c.url=i.url??``:t&&(c.href=i.url??``),r&&(c.sourceLayout=i.data?.sourceLayout??null),a&&(c.sourceTitleMarker=i.data?.sourceTitleMarker??null),s&&(c.sourceUrlForm=i.data?.sourceUrlForm??null),o.createAndFill(c)}}if(n.jsxComponent){let r=e=>{if(e&&typeof e==`object`&&`sourceRaw`in e){let t=e.sourceRaw;if(typeof t==`string`)return t}};i.mdxJsxFlowElement=(e,i,a)=>{let o=e.name??``,s=W6.getOrWildcard(o),c=G6(e.attributes,s.props);if(o===`CommonMarkImage`&&typeof c.src==`string`){let e=c.src,n=Mu(e,t.current.sourcePath);n!==e&&(c.src=n,c.sourceUrl=e)}let l=a.all(e).flat();return n.jsxComponent.createAndFill({componentName:o,kind:`element`,attributes:e.attributes,sourceRaw:r(e.data)??``,sourceDirty:!1,props:c},l.length?l:void 0)};let a=(e,t)=>{let n=e.attributes?.find(e=>e.type===`mdxJsxAttribute`&&e.name===t);return n&&typeof n.value==`string`?n.value:null};i.mdxJsxTextElement=t=>{if(t.name===`InlineMath`&&n.mathInline){let e=a(t,`formula`)??``,r=a(t,`id`);return n.mathInline.create({formula:e,id:r??null})}if(t.name===`Tag`&&n.tag){let e=a(t,`value`)??``;return n.tag.create({value:e})}let i=t.name??``,o=i?W6.get(i):void 0;if(o&&n.jsxInline){let e=G6(t.attributes,o.props),a=r(t.data)??``,s=(t.children??[]).map(e=>e&&typeof e==`object`&&`value`in e?String(e.value??``):``).join(``);return s&&(e.children=s),n.jsxInline.createAndFill({componentName:i,attributes:t.attributes,sourceRaw:a,sourceDirty:!1,props:e})}if(n.jsxInline){let i=r(t.data)??``;return n.jsxInline.createAndFill({},i?[e.text(i)]:null)}return n.jsxComponent.createAndFill({sourceRaw:r(t.data)??``})},i.mdxFlowExpression=e=>{let t=r(e.data)??`{${e.value??``}}`;return n.jsxComponent.createAndFill({kind:`expression`,sourceRaw:t,sourceDirty:!1})},i.mdxTextExpression=t=>{let n=r(t.data)??`{${t.value??``}}`;return e.text(n)}}return n.wikiLink&&(i.wikiLink=e=>n.wikiLink.createAndFill({target:e.data?.target??``,alias:e.data?.alias??null,anchor:e.data?.anchor??null,sourceTarget:e.data?.sourceTarget??null,sourceAnchor:e.data?.sourceAnchor??null,sourceAlias:e.data?.sourceAlias??null})),n.tag&&(i.tag=e=>n.tag.createAndFill({value:e.value})),n.wikiLinkEmbed&&(i.wikiLinkEmbed=(i,a)=>{let o=i.data?.target??``,s=i.data?.alias??null,c=i.data?.anchor??null,l=i.data?.sourceTarget??null,u=i.data?.sourceAnchor??null,d=i.data?.sourceAlias??null,f=oW(o),{resolveEmbed:p,sourcePath:m}=t.current,h=p&&m?p(o,m)??null:null,g=h?`/${h}`:o,_=a?.type===`paragraph`&&Array.isArray(a.children)&&a.children.length===1;if(_&&Rde.has(f)&&n.jsxComponent&&W6.has(`WikiEmbedImage`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedImage`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:g,alt:s??o,target:o,anchor:c,alias:s,sourceTarget:l,sourceAnchor:u,sourceAlias:d}});if(_&&yp.has(f)&&n.jsxComponent&&W6.has(`WikiEmbedVideo`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedVideo`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:g,title:s??o,target:o,anchor:c,alias:s,sourceTarget:l,sourceAnchor:u,sourceAlias:d}});if(_&&bp.has(f)&&n.jsxComponent&&W6.has(`WikiEmbedAudio`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedAudio`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:g,title:s??o,target:o,anchor:c,alias:s,sourceTarget:l,sourceAnchor:u,sourceAlias:d}});if(_&&xp.has(f)&&n.jsxComponent&&W6.has(`WikiEmbedFile`)){let{resolveSize:e}=t.current,r=e&&m?e(o,m)??null:null,i=r===null?null:r3(r);return n.jsxComponent.createAndFill({componentName:`WikiEmbedFile`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:g,target:o,anchor:c,alias:s,size:i,sourceTarget:l,sourceAnchor:u,sourceAlias:d}})}let v=s||(c?`${o}#${c}`:o);if(r.link){let t=r.link.create({href:g,title:null,linkStyle:`inline`,refLabel:null,sourceForm:`wikiembed`,target:o,anchor:c,alias:s,sourceTarget:l,sourceAnchor:u,sourceAlias:d});return e.text(v,[t])}throw Error("[wikiLinkEmbed handler] schema lacks `link` mark — cannot dispatch without violating the STOP rule against emitting PM wikiLinkEmbed server-side")}),n.mathInline&&(i.inlineMath=e=>n.mathInline.create({formula:e.value??``,sourceDelimiter:e.data?.sourceDelimiter??null})),i.math||=t=>{let r=t.value==null?`«unknown:${t.type}»`:t.value;return n.rawMdxFallback?(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled block mdast: ${t.type}`})),n.rawMdxFallback.createAndFill({reason:`Unhandled block mdast: ${t.type}`},r?[e.text(r)]:null)):null},i.inlineMath||=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled inline mdast: ${t.type}`})),t.value==null?e.text(`«unknown:${t.type}»`):e.text(t.value)),n.footnoteReference?i.footnoteReference=e=>n.footnoteReference.create({identifier:e.identifier,label:e.label??e.identifier}):i.footnoteReference||=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:`footnoteReference`,reason:`FootnoteReference extension missing — recovering [^id] source`})),e.text(`[^${t.label??t.identifier}]`)),n.footnoteDefinition?i.footnoteDefinition=c3(n.footnoteDefinition,e=>{let t=e;return{identifier:t.identifier,label:t.label??t.identifier}}):i.footnoteDefinition||=t=>{console.warn(JSON.stringify({event:`unknown-mdast-type`,type:`footnoteDefinition`,reason:`FootnoteDefinition extension missing — recovering [^id]: marker`}));let r=`[^${t.label??t.identifier}]: `;return n.paragraph?n.paragraph.create(null,e.text(r)):null},i.rawMdxFallbackMdast=t=>{if(!n.rawMdxFallback)return null;let r=t.position?{start:t.position.start?.offset??0,end:t.position.end?.offset??0}:{start:0,end:0};return console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.originalType,reason:`Unhandled mdast: ${t.originalType}`,unresolvedPosition:t.unresolvedPosition??!1})),n.rawMdxFallback.createAndFill({reason:`Unhandled mdast: ${t.originalType}`,originalSpan:r},t.value?[e.text(t.value)]:null)},i}function Bde(e,t,n){let r={},i={},a=e.nodes,o=e.marks;a.paragraph&&(r.paragraph=u3(`paragraph`)),a.blockquote&&(r.blockquote=u3(`blockquote`,e=>{let t=e.attrs.sourceMarkerSpacings,n={};return Array.isArray(t)&&t.length>0&&(n.sourceMarkerSpacings=t),Object.keys(n).length>0?{data:n}:{}})),a.heading&&(r.heading=u3(`heading`,e=>({depth:e.attrs.level,data:{sourceStyle:e.attrs.headingStyle,sourceTrailingHashes:e.attrs.sourceTrailingHashes??void 0,sourceUnderlineLength:e.attrs.sourceUnderlineLength??void 0,sourceContiguousNext:e.attrs.sourceContiguousNext===!0||void 0,sourceLeadingIndent:e.attrs.sourceLeadingIndent??void 0,sourceInteriorSpacing:e.attrs.sourceInteriorSpacing??void 0}}))),a.codeBlock&&(r.codeBlock=e=>{let t=e.attrs.sourceStyle===`indented`?`indented`:`fenced`;return{type:`code`,lang:t===`indented`?null:e.attrs.language??null,meta:t===`indented`?null:e.attrs.meta??null,value:e.textContent??``,data:{sourceFenceChar:e.attrs.fenceDelimiter,sourceFenceLength:e.attrs.fenceLength,sourceStyle:t,sourceClosingFenceLength:e.attrs.sourceClosingFenceLength??void 0,sourceUnclosedFence:e.attrs.sourceUnclosedFence===!0||void 0,sourceFenceIndent:e.attrs.sourceFenceIndent??void 0,sourceInfoPadding:e.attrs.sourceInfoPadding??void 0,sourceIndents:e.attrs.sourceIndents??void 0}}}),a.thematicBreak&&(r.thematicBreak=e=>({type:`thematicBreak`,data:{sourceRaw:e.attrs.sourceRaw}})),a.hardBreak&&(r.hardBreak=e=>({type:`break`,data:{sourceStyle:e.attrs.hardBreakStyle,...typeof e.attrs.sourceRaw==`string`&&e.attrs.sourceRaw.length>0?{sourceRaw:e.attrs.sourceRaw}:{}}})),a.list&&(r.list=u3(`list`,e=>({ordered:e.attrs.ordered??!1,start:e.attrs.ordered?e.attrs.start??1:null,spread:e.attrs.spread??!1,data:{bulletMarker:e.attrs.bulletMarker,listMarkerDelimiter:e.attrs.listMarkerDelimiter}}))),a.listItem&&(r.listItem=(e,t,n)=>{let r=n.all(e),i=r.length>1&&Lde(r[0])?r.slice(1):r,a={};return typeof e.attrs.sourceMarkerSpacing==`number`&&(a.sourceMarkerSpacing=e.attrs.sourceMarkerSpacing),typeof e.attrs.sourceOrdinal==`number`&&(a.sourceOrdinal=e.attrs.sourceOrdinal),e.attrs.sourceCheckboxChar===`X`&&(a.sourceCheckboxChar=`X`),typeof e.attrs.sourceContinuationIndent==`number`&&(a.sourceContinuationIndent=e.attrs.sourceContinuationIndent),{type:`listItem`,checked:e.attrs.checked??null,spread:e.attrs.spread??!1,...Object.keys(a).length>0?{data:a}:{},children:i}}),a.table&&(r.table=(e,t,n)=>{let r=n.all(e),i=[],a=e.firstChild;a&&a.forEach(e=>{let t=e.attrs.align;i.push(t===`left`||t===`right`||t===`center`?t:null)});let o=r.filter(e=>e.type===`tableRow`),s=e.attrs.sourceDashCounts,c={};Array.isArray(s)&&s.length>0&&(c.sourceDashCounts=s);let l=e.attrs.sourceOuterPipes;typeof l==`object`&&l&&typeof l.leading==`boolean`&&typeof l.trailing==`boolean`&&(c.sourceOuterPipes=l);let u=e.attrs.sourceAlignmentPadding;Array.isArray(u)&&u.length>0&&(c.sourceAlignmentPadding=u);let d=Object.keys(c).length>0?c:void 0,f={type:`table`,align:i,children:o};return d&&(f.data=d),f}),a.tableRow&&(r.tableRow=u3(`tableRow`));let s=(e,t)=>{let n={type:`tableCell`,children:qY(t)},r=e.attrs.sourcePadding;return typeof r==`object`&&r&&typeof r.left==`number`&&typeof r.right==`number`&&(n.data={sourcePadding:r}),n};if(a.tableCell&&(r.tableCell=(e,t,n)=>s(e,n.all(e))),a.tableHeader&&(r.tableHeader=(e,t,n)=>s(e,n.all(e))),a.image&&(r.image=e=>{let t={type:`image`,url:ju(e.attrs.src,e.attrs.sourceUrl),alt:e.attrs.alt,title:e.attrs.title};return e.attrs.sourceUrlForm===`angle-bracketed`&&(t.data={sourceUrlForm:`angle-bracketed`}),t}),a.imageReference&&(r.imageReference=e=>{let t=e.attrs.label??``,n=e.attrs.identifier??t;return{type:`imageReference`,alt:e.attrs.alt??``,identifier:n,label:t||n,referenceType:e.attrs.referenceType??`shortcut`}}),a.htmlBlock&&(r.htmlBlock=e=>({type:`html`,value:e.attrs.content})),a.linkDefinition??a.linkRefDef){let e=a.linkDefinition?`linkDefinition`:`linkRefDef`;r[e]=e=>{let t={},n=e.attrs.sourceLayout;(n===`multiline`||n===`inline`)&&(t.sourceLayout=n);let r=e.attrs.sourceTitleMarker;(r===`single`||r===`double`||r===`paren`)&&(t.sourceTitleMarker=r),e.attrs.sourceUrlForm===`angle-bracketed`&&(t.sourceUrlForm=`angle-bracketed`);let i={type:`definition`,identifier:e.attrs.identifier??e.attrs.label??``,label:e.attrs.label??e.attrs.identifier??``,url:e.attrs.url??e.attrs.href??``,title:e.attrs.title};return Object.keys(t).length>0&&(i.data=t),i}}if(a.jsxComponent&&(r.jsxComponent=(e,r,i)=>{if(e.attrs.kind===`expression`)return{type:`html`,value:e.attrs.sourceRaw??``};let a=e.attrs.componentName||null,o=Array.isArray(e.attrs.attributes)?e.attrs.attributes:[],s=()=>({type:`mdxJsxFlowElement`,name:a,attributes:o,children:[],data:{sourceRaw:String(e.attrs.sourceRaw)}});if(!Ide(e,t.checker)&&e.attrs.sourceRaw)return s();let c=W6.getOrWildcard(a??`*`),l={all:e=>i.all(e),registry:W6,serializeChildren:()=>{throw Error(`SerializeContext.serializeChildren is not available in the PM→mdast handler. Compat descriptors that need markdown-byte body rendering must emit a marker mdast node and let the to-markdown handler render the body via state.containerFlow.`)}},u=c.serialize(e,l),d=m3(u,a);if(!d||K6(e))return u;let f=n.read(e,d,e=>c.serialize(e,l));return f?f.kind===`verbatim`?s():{...d,data:{...d.data,sourceBody:f.body}}:d}),a.rawMdxFallback&&(r.rawMdxFallback=e=>{let t=e.textContent??``,n=typeof e.attrs.reason==`string`?e.attrs.reason:``,r=e.attrs.originalSpan;return{type:`rawMdxFallback`,value:t,data:{reason:n,originalSpan:r&&typeof r==`object`&&`start`in r&&`end`in r?{start:Number(r.start)||0,end:Number(r.end)||0}:{start:0,end:0}}}}),a.jsxInline&&(r.jsxInline=e=>{let t=e.attrs.componentName||``;if(t&&e.attrs.sourceDirty)return E0(t,e,W6.get(t)?.props);let n=e.attrs.attributes,r=e.attrs.sourceRaw||e.textContent||``;return{type:`mdxJsxTextElement`,name:t||null,attributes:Array.isArray(n)?n:[],children:[],data:{sourceRaw:String(r)}}}),a.mathInline&&(r.mathInline=e=>{let t=e.attrs.formula??``,n=e.attrs.id;if(typeof n==`string`&&n.length>0)return{type:`mdxJsxTextElement`,name:`InlineMath`,attributes:[{type:`mdxJsxAttribute`,name:`formula`,value:t},{type:`mdxJsxAttribute`,name:`id`,value:n}],children:[]};let r=e.attrs.sourceDelimiter;return{type:`inlineMath`,value:t,...typeof r==`string`&&r.length>0?{data:{sourceDelimiter:r}}:{}}}),a.wikiLink&&(r.wikiLink=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLink`,value:i,data:{target:t,anchor:n,alias:r,sourceTarget:typeof e.attrs.sourceTarget==`string`?e.attrs.sourceTarget:null,sourceAnchor:typeof e.attrs.sourceAnchor==`string`?e.attrs.sourceAnchor:null,sourceAlias:typeof e.attrs.sourceAlias==`string`?e.attrs.sourceAlias:null},children:[{type:`text`,value:i}]}}),a.tag&&(r.tag=e=>({type:`tag`,value:String(e.attrs.value??``)})),a.wikiLinkEmbed&&(r.wikiLinkEmbed=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLinkEmbed`,value:i,data:{target:t,anchor:n,alias:r},children:[{type:`text`,value:i}]}}),o.emphasis&&(i.emphasis=d3(`emphasis`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),o.strong&&(i.strong=d3(`strong`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),o.code&&(i.code=(e,t,n)=>{let r=e.attrs.sourceFenceChar,i=e.attrs.sourceFenceLength;return J6(n,{sourceFenceChar:r,sourceFenceLength:i,sourcePadded:e.attrs.sourcePadded===!0||void 0})}),o.strike??o.delete){let e=o.strike?`strike`:`delete`;i[e]=d3(`delete`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter===`~`?`~`:`~~`}}))}return o.highlight&&(i.highlight=d3(`mark`)),o.underline&&(i.underline=d3(`underline`,e=>({data:{sourceForm:e.attrs.sourceForm===`ins`?`ins`:`u`}}))),o.comment&&(i.comment=d3(`comment`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`}}))),a.commentBlock&&(r.commentBlock=u3(`commentBlock`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`,sourceLayout:e.attrs.sourceLayout===`inline`?`inline`:`block`}}))),a.footnoteReference&&(r.footnoteReference=e=>{let t=String(e.attrs.identifier??``);return{type:`footnoteReference`,identifier:t,label:e.attrs.label?String(e.attrs.label):t}}),a.footnoteDefinition&&(r.footnoteDefinition=u3(`footnoteDefinition`,e=>({identifier:String(e.attrs.identifier??``),label:e.attrs.label?String(e.attrs.label):String(e.attrs.identifier??``)}))),o.link&&(i.link=(e,t,n)=>{if(e.attrs.sourceForm===`wikiembed`){let t=typeof e.attrs.target==`string`&&e.attrs.target.length>0?e.attrs.target:e.attrs.href??``,r=typeof e.attrs.anchor==`string`&&e.attrs.anchor.length>0?e.attrs.anchor:null,i=typeof e.attrs.alias==`string`&&e.attrs.alias.length>0?e.attrs.alias:null,a=typeof e.attrs.sourceTarget==`string`?e.attrs.sourceTarget:null,o=typeof e.attrs.sourceAnchor==`string`?e.attrs.sourceAnchor:null,s=typeof e.attrs.sourceAlias==`string`?e.attrs.sourceAlias:null,c=i||(r?`${t}#${r}`:t),l=n.map(e=>`value`in e&&typeof e.value==`string`?e.value:``).join(``);return l!==c&&l.trim().length>0&&!l.includes(`]]`)&&(i=l,c=l),{type:`wikiLinkEmbed`,value:c,data:{target:t,anchor:r,alias:i,sourceTarget:a,sourceAnchor:o,sourceAlias:s},children:[{type:`text`,value:c}]}}let r=e.attrs.linkStyle;if(r===`autolink`)return{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`autolink`}};if(r===`gfm-autolink`)return{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`gfm-autolink`}};if(r===`inline`||!r){let t={};e.attrs.sourceUrlForm===`angle-bracketed`&&(t.sourceUrlForm=`angle-bracketed`);let r=e.attrs.sourceTitleMarker;return(r===`single`||r===`double`||r===`paren`)&&(t.sourceTitleMarker=r),{type:`link`,url:e.attrs.href??``,title:e.attrs.title??null,children:n,...Object.keys(t).length>0?{data:t}:{}}}return{type:`linkReference`,identifier:(e.attrs.refLabel??``).toLowerCase(),label:e.attrs.refLabel,referenceType:r,children:n}}),o.escapeMark&&(i.escapeMark=(e,t,n)=>{for(let e of n)if(e.type===`text`&&e.value){let t=e;t.data??={},t.data.escapedChars??=[];for(let e=0;e<t.value.length;e++)t.data.escapedChars.push({offset:e,char:t.value[e]})}return n.length===1?n[0]:n}),o.sourceLiteral&&(i.sourceLiteral=(e,t,n)=>{let r=typeof e.attrs.sourceRaw==`string`?e.attrs.sourceRaw:``;if(n.length===1&&n[0]?.type===`text`){let e=n[0],t=r||e.value;return KU(t,e.value)&&(e.data??={},e.data.sourceRaw=t),e}return{type:`text`,value:n.filter(e=>e.type===`text`).map(e=>e.value??``).join(``)||r}}),{nodeHandlers:r,markHandlers:i}}const Vde=/(^|\P{M})(\p{M}+)/gu,Hde=/^(?![\p{Script_Extensions=Latin}\p{Script_Extensions=Greek}\p{Script_Extensions=Cyrillic}\p{Script_Extensions=Arabic}\p{Script_Extensions=Hebrew}])\p{L}$/u,Ude=/\p{DI}/gu,Wde=/[^\p{L}\p{M}\p{N}]+/gu,Gde=/^-+|-+$/g;function Kde(e,t,n){return Hde.test(t)?t+n.replace(Ude,``):t}function X6(e){return e.trim().normalize(`NFKD`).replace(Vde,Kde).normalize(`NFC`).toLowerCase().replace(Wde,`-`).replace(Gde,``)}function qde(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function Jde(e,t){let n=X6(e);return n?qde(n,t):``}const Yde=new Set([`img`,`video`,`audio`,`mark`,`u`,`ins`]);new Map(t2.flatMap(e=>e.surface===`compat`&&Yde.has(e.rendersAs)?[[e.name,e]]:[])),hS(`<>`);var Z6={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100};Z6.SINGLE_TILDE,Z6.COMPARISON_OPERATORS,Z6.HTML_TAGS,Z6.SETEXT_HEADINGS,Z6.LINKS,Z6.BOLD_ITALIC,Z6.BOLD,Z6.ITALIC_DOUBLE_UNDERSCORE,Z6.ITALIC_SINGLE_ASTERISK,Z6.ITALIC_SINGLE_UNDERSCORE,Z6.INLINE_CODE,Z6.STRIKETHROUGH,Z6.KATEX,Z6.INLINE_KATEX,Gw().use(aE).use(Tw);const Q6=I(le),Xde=I(ue);function Zde(e){return e===`agents`||ue.includes(e)}const Qde=F({alwaysOn:M().int().nonnegative(),onTrigger:M().int().nonnegative(),onDemand:M().int().nonnegative()}).strict(),$de=[`.md`,`.mdx`,`.txt`];function $6(e){return Math.round(e/4)}function efe(e){let t=e.lastIndexOf(`.`);return t!==-1&&$de.includes(e.slice(t).toLowerCase())}function tfe(e){let t=$6((e.name??``).length+(e.description??``).length),n=$6(iu(e.skillMd).body.length),r=e.files.some(e=>e.relPath===`overlay.yaml`),i=0;for(let t of e.files)t.content!==null&&t.relPath!==`SKILL.md`&&(r&&t.relPath.startsWith(`upstream/`)||efe(t.relPath)&&(i+=t.content.length));return{alwaysOn:t,onTrigger:n,onDemand:$6(i)}}const nfe=F({intents:P(F({satisfierId:j().min(1),desired:I([`present`,`absent`])}).loose()),...A_,summary:j_}).loose(),rfe=F({satisfierId:j(),agentId:j(),piece:j(),scope:j(),kind:j(),pathId:j().optional(),desired:I([`present`,`absent`]),action:I(_s),errorId:j().optional()}).loose(),ife=F({kind:j(),satisfierIds:P(j()),agentIds:P(j()),pathId:j().optional(),blockedReason:j().optional()}).loose(),afe=F({state:j(),strictness:P(I(ps)).optional()}).loose(),ofe=F({probes:F({env:I([`desktop`,`local-web`,`remote-web`]),satisfiers:ko(j(),afe)}).loose(),detection:F({detected:P(j()),probed:N()}).loose()}).loose(),sfe=F({actions:P(rfe),conflicts:P(ife),withheld:P(j()),snapshot:ofe}).loose(),cfe=F({entries:P(F({level:I([`info`,`warn`,`error`]),message:j().max(8192),event:j().optional(),fields:ko(j(),po()).optional(),ts:M().optional(),sourceId:j().optional(),lineNumber:M().optional()}).loose()).max(100),droppedSinceLastFlush:M().int().min(0).optional()}).loose(),lfe=F({accepted:M().int().min(0)}).loose(),ufe=F({exact:j().min(1),prefix:j(),suffix:j(),start:M().int().nonnegative(),end:M().int().nonnegative()}),dfe=P(xo([j(),M().int().nonnegative()])),ffe=Co(`kind`,[F({kind:L(`body`)}),F({kind:L(`property`),key:j().min(1),path:dfe.default([])})]).default({kind:`body`}),pfe=I([`anchored`,`orphaned`,`resolved`]),e8=F({threadId:j().min(1),docName:j().min(1),target:ffe,anchor:ufe.nullable(),state:pfe,queued:N(),latestComment:j(),createdBy:j().min(1),createdAt:M(),updatedAt:M().optional()}),t8=F({docName:j(),instruction:j(),property:j().nullable(),passage:F({exact:j(),prefix:j(),suffix:j()}).nullable(),anchorLost:N(),passageRepeats:N()}).loose(),n8=F({threadId:j(),ok:L(!0)}),r8=F({threadId:j(),ok:L(!1),error:L(`not-found`)}),mfe=F({threads:P(e8)}).loose(),hfe=F({meta:e8,orphaned:N()}).loose(),gfe=F({threadId:j()}).loose(),_fe=F({meta:e8,payload:t8}).loose(),vfe=F({results:P(xo([n8.extend({meta:e8,payload:t8}),r8]))}).loose(),yfe=F({results:P(xo([n8.extend({meta:e8}),r8]))}).loose(),i8=[`ours`,`theirs`],a8=[`check-failed`,`too-large`,`conflict-markers`,`no-base`,`no-merge-engine`,`outside-settings-applied`,`outside-settings-invalid`],bfe=[`no-history-or-backup`,`keeps-changing`,`not-utf8`,`unreadable`],xfe=F({duplicated:M().int().nonnegative(),restoredDeletedHere:M().int().nonnegative(),restoredDeletedOutside:M().int().nonnegative()}),o8={id:j().min(1),docName:j().min(1),file:j().min(1),firstAt:j().min(1),lastAt:j().min(1),events:M().int().positive(),entries:P(j().min(1))},s8=Co(`kind`,[F({...o8,kind:L(`both-kept`),kept:xfe}).loose(),F({...o8,kind:L(`moved-to-history`),side:I(i8),reason:I(a8)}).loose(),F({...o8,kind:L(`moved-to-backup`),side:I(i8),reason:I(a8),backup:j().min(1)}).loose(),F({...o8,kind:L(`save-held`),cause:I(bfe)}).loose()]),Sfe=F({notices:P(s8)}).loose(),Cfe=F({docName:j().min(1),id:j().min(1)}).loose(),wfe=F({dismissed:N()}).loose(),Tfe=F({status:j().min(1),reason:j()}).loose(),Efe=F({docName:j().min(1),content:j(),lifecycle:Tfe.nullable()}).loose(),Dfe=F({documents:P(F({kind:I([`document`,`asset`,`folder`,`file`]).default(`document`),docName:j().min(1).optional(),docExt:j().min(1).default(`.md`),size:M().int().nonnegative(),modified:j().min(1),isSymlink:N().default(!1),canonicalDocName:j().nullable().default(null),targetPath:j().nullable().default(null),path:j().min(1).optional(),assetExt:j().min(1).optional(),mediaKind:I([`image`,`video`,`audio`,`pdf`,`text`,`mermaid`,`excalidraw`]).nullable().optional(),referencedBy:P(j().min(1)).optional(),hasChildren:N().optional()}).loose().refine(e=>e.kind===`document`?e.docName!==void 0&&e.path===void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.kind===`folder`?e.docName===void 0&&e.path!==void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0:e.kind===`file`?e.path!==void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.path!==void 0&&e.assetExt!==void 0&&e.referencedBy!==void 0&&e.hasChildren===void 0,{message:`document/asset/folder/file kind must match its required fields (document → docName; asset → path+assetExt+referencedBy; folder → path only, no docName; file → path, no mediaKind/referencedBy/hasChildren)`})),truncated:N().optional()}).loose(),Ofe=F({source:j().min(1),anchor:j().nullable(),title:j(),snippet:j().nullable()}).loose(),kfe=F({docName:j().min(1),backlinks:P(Ofe)}).loose(),Afe=F({counts:ko(j().min(1),M().int().nonnegative())}).loose(),jfe=F({counts:ko(j().min(1),M().int().nonnegative())}).loose(),Mfe=Co(`kind`,[F({kind:L(`doc`),docName:j().min(1),anchor:j().nullable(),title:j(),snippet:j().nullable()}).loose(),F({kind:L(`external`),url:j().min(1),title:j(),snippet:j().nullable()}).loose()]),Nfe=F({role:j().min(1),sourceForm:j().min(1),targetKind:j().min(1),href:j(),resolvedTarget:j().nullable(),status:j().min(1),reason:j().nullable(),resolutionMethod:j().min(1),fallbackTarget:j().nullable().default(null),range:F({start:M().int().nonnegative(),end:M().int().nonnegative()}),line:M().int().nonnegative(),column:M().int().nonnegative(),definition:F({label:j(),line:M().int().nonnegative()}).nullable().default(null)}).loose(),Pfe=F({docName:j().min(1),forwardLinks:P(Mfe),localTargets:P(Nfe).optional()}).loose(),Ffe=Co(`kind`,[F({id:j().min(1),kind:L(`doc`),docName:j().min(1),anchor:j().nullable(),label:j(),cluster:j().nullable(),category:j().nullable(),tags:P(j()).nullable(),managed:N().optional()}).loose(),F({id:j().min(1),kind:L(`external`),url:j().min(1),label:j()}).loose()]),Ife=F({source:j().min(1),target:j().min(1)}).loose(),Lfe=F({nodes:P(Ffe),links:P(Ife)}).loose(),Rfe=F({docNames:P(j().min(1).max(1024)).min(1).max(64)}).loose(),zfe=F({checked:M().int().nonnegative(),found:M().int().nonnegative()}).loose(),Bfe=F({ts:M().int().min(0),url:j(),method:j(),ua:j().optional(),origin:j().optional(),referer:j().optional(),host:j().optional(),remote:j().optional(),secChUa:j().optional(),secChUaMobile:j().optional(),secChUaPlatform:j().optional(),secFetchSite:j().optional(),secFetchDest:j().optional(),secFetchMode:j().optional(),secFetchUser:j().optional()}).loose(),Vfe=F({app:xo([L(`cursor`),L(`codex`),L(`claude`),co()]),signals_fired:P(j())}).loose(),Hfe=F({entries:P(Bfe),count:M().int().min(0),detection:Vfe}).loose(),c8=[`M`,`A`,`D`,`R`,`C`,`U`,`T`,`?`,`!`,` `],l8=F({path:j().min(1),code:I(c8),origPath:j().min(1).optional(),syncScoped:N(),open:Co(`kind`,[F({kind:L(`doc`),docName:j().min(1)}),F({kind:L(`asset`),path:j().min(1)})]).optional()}).loose(),Ufe=F({branch:j().nullable(),detached:N(),upstream:j().nullable(),staged:P(l8),notStaged:P(l8),untracked:P(l8),incoming:P(l8),truncated:N(),readable:N().default(!0)}).loose(),Wfe=I([`AWAITING_CHECKS`,`LOCKED`,`MERGEABLE`,`QUEUED`,`UNMERGEABLE`]),Gfe=I([`BEHIND`,`BLOCKED`,`CLEAN`,`DIRTY`,`DRAFT`,`HAS_HOOKS`,`UNKNOWN`,`UNSTABLE`]),Kfe=I([`APPROVED`,`CHANGES_REQUESTED`,`REVIEW_REQUIRED`]),qfe=I([`ERROR`,`EXPECTED`,`FAILURE`,`PENDING`,`SUCCESS`]),Jfe=F({mergeQueue:F({position:M().int().nonnegative(),state:Wfe.nullable().catch(null)}).nullable().catch(null),autoMerge:N(),mergeState:Gfe.nullable().catch(null),reviewDecision:Kfe.nullable().catch(null),checks:qfe.nullable().catch(null)}).loose(),u8=F({kind:I([`pull`,`issue`]),repo:j().min(1),number:M().int().positive(),title:j(),author:j().nullable(),createdAt:j(),lifecycle:I([`open`,`draft`,`merged`,`closed`,`completed`,`not-planned`]),additions:M().int().nonnegative().optional(),deletions:M().int().nonnegative().optional(),status:Jfe.optional()}).loose(),Yfe=F({url:j()}).loose(),Xfe=Co(`ok`,[F({ok:L(!0),preview:u8}).loose(),F({ok:L(!1),reason:j()}).loose()]),Zfe=F({writers:P(F({id:j().min(1),name:j().optional(),email:j().optional()}).loose()).optional(),summary:j_,...A_}).loose(),Qfe=F({checkpointRef:j().min(1)}).loose(),$fe=F({v:M().int().optional(),id:j().min(1),name:j().min(1),colorSeed:j().optional(),docs:P(j()),summaries:P(j()).optional()}).loose(),epe=F({entries:P(F({sha:j().min(1),timestamp:j().min(1),author:j(),authorEmail:j(),type:I([`checkpoint`,`wip`,`upstream`,`park`]),message:j(),contributors:P($fe),checkpoint:po().nullable(),parentSha:j().nullable().optional()}).loose()),total:M().int().nonnegative().optional(),truncated:N().optional(),hasMore:N().optional()}).loose(),tpe=F({sha:j().regex(/^[0-9a-f]{40}$/i),content:j(),timestamp:j(),author:j()}).loose(),npe=F({contentDir:j().min(1),pathSeparator:I([`/`,`\\`]),symlinkResolved:N()}).loose(),rpe=P(Co(`source`,[F({docName:j().min(1),timestamp:j().min(1),size:M().int().nonnegative(),source:L(`flat`)}).loose(),F({docName:j().min(1),timestamp:j().min(1),source:L(`timeline`),sha:j().min(1)}).loose()])).meta({description:"Flat array of rescue buffer entries; discriminated via `source`."}),d8=F({domain:j().min(1),title:j().optional(),description:j().optional(),siteName:j().optional(),faviconDataUri:j().optional()}).loose(),ipe=F({url:j()}).loose(),ape=Co(`ok`,[F({ok:L(!0),metadata:d8}).loose(),F({ok:L(!1),reason:j()}).loose()]),ope=F({orphans:P(F({docName:j().min(1),title:j()}).loose())}).loose(),spe=F({hubs:P(F({docName:j().min(1),title:j(),count:M().int().nonnegative()}).loose())}).loose(),cpe=F({source:j().min(1),title:j(),snippet:j().nullable()}).loose(),lpe=F({deadLinks:P(F({target:j().min(1),sources:P(cpe)}).loose())}).loose(),upe=F({target:F({docName:j().min(1),title:j(),aliases:P(j())}).loose(),mentions:P(F({source:j().min(1),excerpt:j(),offset:M().int().nonnegative()}).loose()),truncated:N()}).loose(),dpe=F({projectPath:j().min(1)}).loose(),fpe=I([`not-a-git-worktree`,`init-failed`]),ppe=Co(`ok`,[F({ok:L(!0),projectPath:j().min(1)}).loose(),F({ok:L(!1),reason:fpe,message:j().min(1)}).loose()]),mpe=F({host:j().min(1).optional()}).loose(),hpe=F({host:j().min(1).optional(),token:j().min(1)}).loose(),gpe=F({host:j(),login:j()}).loose(),_pe=F({host:j().refine(f,{message:`Host must be a hostname with an optional :port, with no scheme or path`}),username:j().min(1),token:j().min(1)}).loose(),vpe=F({host:j(),login:j()}).loose(),ype=F({key:j().min(1)}).loose(),bpe=F({keyPresent:N()}).loose(),xpe=I([`no_key`,`invalid_endpoint`,`rate_limit`,`timeout`,`http_error`,`network`,`dims_mismatch`,`malformed_response`]),Spe=Co(`ok`,[F({ok:L(!0),endpoint:j().min(1),model:j().min(1),dimensions:M().int().positive()}).loose(),F({ok:L(!1),endpoint:j().min(1),model:j().min(1),reason:xpe,status:M().int().optional()}).loose()]),Cpe=F({name:j().refine(e=>e.trim().length>0,{message:`name must be non-empty`}),email:j().refine(e=>e.trim().length>0,{message:`email must be non-empty`})}).loose(),wpe=F({authenticated:N()}).loose(),Tpe=F({channel:I([`login`,`gh-login`]).default(`login`)}).loose(),Epe=F({}).loose(),Dpe=F({stackIndex:M().int().min(0),ts:M().int().min(0),additions:M().int().min(0),deletions:M().int().min(0)}).loose(),Ope=F({docName:j().min(1),additionsTotal:M().int().min(0),deletionsTotal:M().int().min(0),lastTs:M().int().min(0),bursts:P(Dpe)}).loose(),kpe=F({displayName:j().min(1),color:j().min(1),icon:j().optional(),connectionId:j().min(1)}).loose(),Ape=F({sessionAlive:N(),agent:kpe.nullable(),files:P(Ope)}).loose(),jpe=F({diff:j(),before:j(),after:j(),properties:FY,generatedAt:M().int().min(0)}).loose(),Mpe=F({}).loose(),Npe=F({}).loose(),Ppe=F({}).loose(),Fpe=F({}).loose(),Ipe=F({}).loose(),Lpe=F({}).loose(),Rpe=F({displayName:j().min(1),icon:j(),color:j().min(1),currentDoc:j().nullable(),mode:I([`idle`,`writing`]),ts:M().int().min(0)}).loose(),zpe=F({presence:ko(j().min(1),Rpe)}).loose(),Bpe=F({sessionId:j().min(1),agentType:j().min(1),ts:M().int().min(0),insertedChars:M().int().min(0),deletedChars:M().int().min(0)}).loose(),Vpe=F({effects:P(F({"doc.name":j().min(1),entries:P(Bpe)}).loose())}).loose(),Hpe=F({decisions:P(F({ts:M().int().min(0),decision:j().min(1),kind:j().min(1),"doc.name":j().min(1),pathRole:j().min(1)}).loose())}).loose(),Upe=ko(j().min(1),N()).meta({description:`Flat boolean record keyed by agent-scheme name (claude / codex / cursor). True = installed.`});F({path:j().min(1,`path must be non-empty`)}).loose();const Wpe=F({}).loose(),Gpe=F({fromDocName:j().min(1),toDocName:j().min(1)}).loose(),Kpe=F({fromPath:j().min(1),toPath:j().min(1)}).loose(),qpe=F({}).loose(),Jpe=F({path:j().min(1),...A_,summary:j_}).loose(),Ype=F({docName:j().min(1)}).loose(),Xpe=F({path:j().min(1),...A_,summary:j_}).loose(),Zpe=F({path:j().min(1)}).loose(),Qpe=F({kind:I([`file`,`folder`]),path:j().min(1),...A_,summary:j_}).loose(),$pe=F({kind:I([`file`,`folder`]),path:j().min(1),duplicatedDocNames:P(j().min(1))}).loose(),eme=F({pages:P(F({docName:j().min(1),title:j(),docExt:j().min(1),size:M().int().nonnegative(),modified:j().min(1),icon:j().min(1).max(2048).optional()}).loose())}).loose(),tme=F({level:M().int().min(1).max(6),text:j(),slug:j()}).loose(),nme=F({docName:j().min(1),headings:P(tme)}).loose(),rme=F({docName:j().min(1),rewrites:M().int().nonnegative()}).loose(),ime=F({kind:I([`file`,`folder`,`asset`]),fromPath:j().min(1),toPath:j().min(1),...A_,summary:j_}).loose(),ame=F({renamed:P(Gpe),renamedAssets:P(Kpe),rewrittenDocs:P(rme).optional(),summary:q_.optional()}).loose(),ome=F({kind:I([`file`,`folder`,`asset`]),path:j().min(1),...A_}).loose(),sme=F({deletedDocNames:P(j().min(1))}).loose(),cme=F({kind:I([`file`,`folder`,`asset`]),path:j().min(1),...A_,summary:j_}).loose(),lme=F({deletedDocNames:P(j().min(1))}).loose(),ume=F({docName:j().min(1),commitSha:j().regex(/^[0-9a-f]{40}$/i,{message:`commitSha must be a 40-char git SHA`}),summary:j_,...A_}).loose(),dme=F({...B_,restoredFrom:j().min(1),timestamp:j().min(1),summary:q_.optional(),warnings:ov.optional()}).loose(),fme=/^#[0-9a-fA-F]{6}$/,pme=F(Object.fromEntries(Lp.map(e=>[e,j().regex(fme,`must be a #rrggbb hex color`)]))),f8=j().min(1).refine(Bp,{message:`must contain a non-whitespace character`}),p8=F({name:f8,author:f8.optional(),variant:I([`dark`,`light`]),palette:pme}).loose(),mme=F({name:j().min(1),scheme:p8,stem:j().min(1).optional(),extension:I([`.yaml`,`.yml`]).optional()}).loose(),hme=F({id:j().min(1),filename:j().min(1)}).loose(),gme=F({id:j().min(1),scheme:p8}).loose(),_me=F({id:j().min(1),filename:j().min(1)}).loose(),vme=Co(`existed`,[F({existed:L(!1)}).loose(),F({existed:L(!0),filename:j().min(1),scheme:p8}).loose()]),yme=F({themes:P(Co(`ok`,[F({ok:L(!0),id:j().min(1),filename:j().min(1),scheme:p8}),F({ok:L(!1),filename:j().min(1),id:j().min(1).optional(),code:j().min(1),conflictingFilenames:P(j().min(1)).min(2).optional()})])),truncated:N()}).loose();function m8(e){return e.replace(/\\/g,`/`).split(`/`).filter(e=>e!==``&&e!==`.`)}function h8(e){let t=m8(e).at(-1);return t!==void 0&&hp.some(e=>t.toLowerCase().endsWith(e))}const bme=F({tags:P(F({name:j().min(1),count:M().int().nonnegative(),isLeaf:N()}).loose())}).loose(),xme=F({docName:j().min(1),title:j(),matchingTags:P(j().min(1)),snippet:j().nullable()}).loose(),Sme=F({name:j().min(1),docs:P(xme)}).loose(),Cme=F({folder:po(),frontmatter_local:ko(j(),po()).nullable(),warnings:P(j()).optional().meta({description:"Non-fatal degradations of this response, one per entry; the field each affects is absent, null, or incomplete — the aligned `warningCodes` entry names which field and how."}),warningCodes:P(I([`symlink-refused`,`malformed-yaml`,`unverifiable`,`templates-symlink-refused`,`templates-unverifiable`])).optional().meta({description:"Machine-readable codes aligned 1:1 with `warnings`; switch on these, never on the English. `symlink-refused` / `malformed-yaml` / `unverifiable`: this folder's own `.ok/frontmatter.yml` (a symlink, malformed YAML, or an lstat failure) — `frontmatter_local` is null. `templates-symlink-refused` / `templates-unverifiable`: the `.ok/templates` directory on this folder, or a `.ok` or `.ok/templates` directory on an ancestor it inherits from — a symlink (wherever it points, dangling included), or a non-ENOTDIR `lstat` failure — `folder.templates_available` omits that directory's templates and may still list others. A non-directory `.ok` / `.ok/templates` (ENOTDIR) is treated as empty and yields no `templates-*` code. This folder's own symlinked `.ok` is a 400, never a warning."})}).loose(),wme=F({path:j(),frontmatter:Yl(po()).optional()}).loose(),Tme=F({applied:po()}).loose(),g8=ko(j(),po()).meta({description:`Free-form frontmatter map embedded in template payloads.`}),Eme=F({template:F({name:j().min(1),folder:j(),scope:I([`local`,`inherited`]),path:j().min(1),frontmatter:g8,body:j()}).strict()}).strict(),Dme=F({templates:P(F({name:j().min(1),title:j().optional(),description:j().optional(),path:j().min(1),source_folder:j()}).strict()),truncated:N()}).strict(),Ome=F({folder:j(),name:j(),body:D_.optional(),frontmatter:g8.optional(),...A_,summary:j_}).strict(),kme=F({...B_,path:j().min(1),created:N(),warnings:P(j())}).strict(),Ame=F({sourcePath:j().min(1),targetFolder:j(),name:j().optional(),title:j().optional(),deleteSource:N().optional(),...A_,summary:j_}).strict(),jme=F({...B_,path:j().min(1),created:N(),warnings:P(j())}).strict(),Mme=F({existed:N(),path:j().min(1)}).strict(),Nme=F({fromFolder:j(),fromName:j(),toFolder:j(),toName:j(),body:D_.optional(),frontmatter:g8.optional(),...A_,summary:j_}).strict(),Pme=F({from:j().min(1),to:j().min(1),committed:N()}).strict(),_8=I(ug),Fme=/^[a-z0-9-]+$/,Ime=/<\/?[A-Za-z][^>]*>/;function Lme(e){return Ime.test(e)}const Rme=/^(?:(?!\p{DI})[\p{L}\p{M}\p{N}_-])+$/u,zme="letters and digits in any script, `_` or `-` only (no spaces, dots, slashes or invisible characters)";function v8(e){return e.normalize(`NFC`)}function Bme(e,t){let n=v8(t);return e.find(e=>e.name===t)??e.find(e=>v8(e.name)===n)}const y8=F({name:j(),description:j(),metadata:F({pack:j()}).strict().optional()}).strict(),Vme=F({skill:F({name:j().min(1),scope:_8,path:j().min(1),frontmatter:y8,body:j(),files:P(F({path:j().min(1),text:j().nullable()})).optional(),managed:N().optional()}).strict()}).strict(),Hme=F({source:j().min(1),publisher:j().optional(),skill:j().optional(),marketplaceUrl:j().optional(),importedAt:j().min(1),autoUpdate:N().optional()}).strict(),Ume=F({name:j().min(1),description:j().optional(),scope:_8,path:j().min(1),canonicalPath:j().min(1).optional(),filePaths:P(j()).optional(),absolutePath:j().min(1).optional(),installed:N(),hosts:P(j()),hostQualifier:j().optional().meta({description:"Set on a GLOBAL entry that shares its name with a distinct-content bundle in another host dir AND is not the by-name default: the host id whose root holds THIS bundle. Doc-name builders append it (`__skill__/global/<name>@<host>`) so each same-named bundle keeps its own tab and its own write-back path; the default bundle keeps the stable unqualified name."}),driftPaths:P(j()).optional().meta({description:`Recorded locations whose on-disk form (copy vs symlink) no longer matches what OK last wrote there — evidence another tool rewrote the path.`}),hostAliases:ko(j(),j()).optional().meta({description:`Host skills roots that are symlink ALIASES of another location (host id → base-relative target root). An aliased folder is a derived view — no menu row, never a write target; the host's icon rides the target root's row.`}),conflictHosts:P(j()).optional().meta({description:`Hosts whose dir holds a DIFFERENT same-name skill (fork/conflict) — occupied, not this skill.`}),symlinkedHosts:P(j()).optional(),installableEditors:P(j()).optional(),hubOffered:N().optional().meta({description:"Whether the vendor-neutral `.agents/skills` hub is a live destination at this scope on THIS machine — server-computed via the same predicate that filters the Folders surface, so the install menu and Settings cannot disagree. True when the project already uses the hub OR a host that reads it is installed (`HUB_READER_EDITORS`)."}),linkMode:N().optional(),customPlacements:P(F({path:j(),mode:I([`copy`,`link`])}).strict()).optional(),plugin:F({name:j().min(1),marketplace:j().min(1),provider:j().min(1),url:j().optional()}).strict().optional(),managed:N().optional(),origin:Hme.optional(),pack:j().optional(),modified:N().optional(),revertable:N().optional(),ignored:N().optional(),size:Qde.optional()}).strict(),Wme=F({name:j().min(1),scope:_8,apply:N().optional()}).strict(),Gme=F({line:j().min(1),gitignorePath:j().min(1),applied:N(),alreadyTracked:N().optional()}).strict(),Kme=F({skills:P(Ume),truncated:N()}).strict(),qme=F({scope:_8.default(`project`),name:j().meta({description:`Managed skill name to create or update.`}),body:D_.optional(),frontmatter:y8,...A_,summary:j_}).strict(),b8=[`skill-name-vendor-word`,`skill-body-too-long`],x8=P(I(b8)).meta({description:"Machine-readable codes aligned 1:1 with `warnings` (`warnings[i]` is the display text for `warningCodes[i]`)."}),Jme=F({...B_,path:j().min(1),created:N(),warnings:P(j()),warningCodes:x8}).strict(),Yme=F({scope:_8.default(`project`),name:j(),dryRun:N().optional(),setAutoUpdate:N().optional(),...A_,summary:j_}).strict(),Xme=F({name:j().min(1),updated:N(),source:j().min(1),localBody:j().optional(),upstreamBody:j().optional(),gitTracked:N().optional(),warnings:P(j()),warningCodes:x8}).strict(),Zme=F({scope:_8.default(`project`),name:j(),...A_,summary:j_}).strict(),Qme=F({name:j().min(1),baselineRef:j().min(1),restoredFiles:P(j()),warnings:P(j())}).strict(),S8=`This member also carries the one bookkeeping failure that does not undo the operation: the content change landed, but a state file this server keeps beside it refused to be rewritten because it could not be read, so the install or import records still describe the old state until an operator repairs that file. Absent when there is nothing to report; a server that predates this member omits it, so treat its absence as no warning rather than as an error.`,$me=F({existed:N(),path:j().min(1),warnings:P(j()).optional().meta({description:`Present when this delete removed a directory a retention record ties to a recovery copy an earlier failed move kept, whose source was never verified unchanged — either because this server verified the deleted directory against the copy that record describes, or because it could not read the directory and so could not confirm either way. Each entry says which of the two it is; neither claims more than the check established. ${S8}`})}).strict(),ehe=F({scope:_8.default(`project`),fromName:j(),toName:j(),body:D_.optional(),frontmatter:y8.optional(),...A_,summary:j_}).strict(),the=F({from:j().min(1),to:j().min(1),committed:N(),warnings:P(j()).optional().meta({description:`Present when the rename itself completed but something beside it did not. ${S8}`})}).strict(),nhe=F({name:j(),toName:j().optional().meta({description:"Name for the skill at the destination scope; defaults to `name`. The SKILL.md `name` frontmatter is rewritten to match."}),fromScope:_8,toScope:_8,...A_,summary:j_}).strict(),C8=[`nothing-written`,`destination-removed`,`destination-stray`,`destination-retained`,`destination-retained-blocking`,`destination-unreadable`,`partially-applied`];function rhe(e){return typeof e==`string`&&C8.includes(e)}const w8=[`intact`,`lossy`,`unknown`];function T8(e){return typeof e==`string`&&w8.includes(e)}const E8=[`unreadable`,`occupant-unverifiable`];function ihe(e){return typeof e==`string`&&E8.includes(e)}const ahe={"nothing-written":!1,"destination-removed":!1,"destination-stray":!1,"destination-retained":!0,"destination-retained-blocking":!0,"destination-unreadable":!1,"partially-applied":!1};function ohe(e){return ahe[e]}function she(e){let t=typeof e==`object`&&e?e:{},n=t.moveState,r=t.sourceState,i=t.retentionLedger;if(n===void 0&&r===void 0&&i===void 0)return{kind:`coherent`};let a=rhe(n)?n:void 0,o=T8(r)?r:void 0,s=ihe(i)?i:void 0,c={...a===void 0?{}:{moveState:a},...o===void 0?{}:{sourceState:o},...s===void 0?{}:{retentionLedger:s}};return n!==void 0&&a===void 0||r!==void 0&&o===void 0||i!==void 0&&s===void 0||a===void 0?{kind:`unverified`,...c}:(ohe(a)?o!==void 0&&s===void 0:a===`nothing-written`?o===void 0:o===void 0&&s===void 0)?{kind:`coherent`,...c}:{kind:`unverified`,...c}}const D8=`The server reported warnings in a shape this build does not recognise; treat this result as unverified.`;function che(e){if(e===void 0)return[];let t=D8;if(!Array.isArray(e))return[t];let n=e.filter(e=>typeof e==`string`);return n.length===e.length?n:[...n,t]}const lhe=F({scope:_8,path:j().optional(),droppedLocations:P(j()).default([]).meta({description:"Locations the skill occupied at the source that were removed and not re-created at the destination: the `agents` hub and custom roots, which projection does not cover. Entries are install location ids, so they can be passed straight back as an install `add` list with `scope` set to the destination scope; custom roots resolve against that scope's base."}),warnings:P(j()).optional().meta({description:`Present when the move itself completed but something beside it did not. ${S8}`})}).strict().meta({description:"Scope-move result. Rename paths deliberately do not emit authoring warnings, consistent with same-scope rename and duplicate. Content-authoring and import responses carry those warnings and their codes. The Skills Studio client parses `droppedLocations` off the wire but deliberately does not render it yet; how a human is told what was removed is an open product decision."}),uhe=F({scope:_8,name:j(),toName:j(),...A_,summary:j_}).strict(),dhe=F({name:j().min(1)}).strict(),fhe=F({name:j(),home:j().min(1)}).strict(),phe=F({docName:j().min(1)}).strict(),O8=I([`reference`,`script`,`file`]),mhe=F({scope:_8.default(`project`),name:j(),path:j().min(1),content:j(),...A_,summary:j_}).strict().superRefine((e,t)=>{h8(e.path)&&E_(e.content,t,[`content`])}),hhe=F({...B_,path:j().min(1),created:N(),kind:O8,content:N()}).strict(),ghe=F({scope:_8.default(`project`),name:j(),from:j().min(1),to:j().min(1),...A_,summary:j_}).strict(),_he=F({from:j().min(1),to:j().min(1),fromDocName:j().optional(),toDocName:j().optional()}).strict(),vhe=F({path:j().min(1),kind:O8,text:j()}).strict(),yhe=F({path:j().min(1),existed:N(),kind:O8}).strict(),k8=xo([Xde,L(`agents`)]),A8=j().min(1).refine(e=>!e.startsWith(`/`)&&!e.startsWith(`~`)&&!/^[A-Za-z]:/.test(e),{error:`a custom root is base-relative (e.g. ".tim/skills"), not absolute or ~-prefixed`}).refine(e=>e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`),{error:`a custom root may not contain "..", "." or empty path segments`}).refine(e=>e.includes(`/`),{error:`a custom root is a path (e.g. ".tim/skills") — bare editor names are host ids`}),j8=xo([k8,A8]),bhe=F({scope:_8.default(`project`),name:j(),targets:P(k8).optional().meta({description:'SET-EXACT install targets (editor ids, plus "agents" for the .agents hub — in-place skills only): the COMPLETE resulting host set. Omit to use project-configured editors; pass [] to uninstall everywhere. Stateless callers should prefer `add`/`remove`.'}),add:P(j8).optional().meta({description:`Locations to ADD the skill to (everything else untouched). Editor ids fan out a managed copy/symlink; a custom root path (".tim/skills") places the bundle there.`}),remove:P(j8).optional().meta({description:"Locations to REMOVE the skill from (lossless only — a hand-edited fork is refused, never deleted). The source cannot be removed; move it first with `source`."}),mode:I([`copy`,`link`]).optional().meta({description:`"link": one real folder (the source); every other location becomes a symlink to it. "copy": independent real folders, refreshed from the source until hand-edited (a hand-edit forks that copy). Converts existing locations losslessly. Omit to follow the form the skill already uses.`}),source:j8.optional().meta({description:`Move the skill's REAL folder to this location (the old source becomes a symlink to it — never a removal). Sticky across rescans.`}),linkMode:N().optional(),setSource:j().min(1).optional(),place:F({dir:j().min(1).meta({description:`Project-relative directory the bundle dir is created under (e.g. ".windsurf/skills").`}),mode:I([`copy`,`link`])}).strict().optional(),convert:F({target:j8.meta({description:`The installed location to convert — an editor id, "agents", or a recorded custom placement path.`}),mode:I([`copy`,`link`]).meta({description:`"link": replace this location with a symlink to the source. "copy": replace it with an independent real folder.`})}).strict().optional(),unplace:F({path:j().min(1).meta({description:`The recorded placement bundle path (e.g. ".windsurf/skills/my-skill").`})}).strict().optional(),...A_,summary:j_,fork:F({editor:j().min(1),action:I([`align`,`make-source`,`rename`]),toName:j().optional()}).strict().optional()}).strict().refine(e=>e.targets===void 0||e.add===void 0&&e.remove===void 0,{error:"`targets` is set-exact; `add`/`remove` are additive — use one style per call"}).refine(e=>e.fork===void 0||e.targets===void 0&&e.add===void 0&&e.remove===void 0&&e.source===void 0&&e.setSource===void 0,{error:"`fork` is its own operation — run it in a separate call"}).refine(e=>e.fork?.action!==`rename`||e.fork.toName!==void 0,{error:"`fork.rename` requires `toName`"}).refine(e=>e.source===void 0||e.add===void 0&&e.remove===void 0,{error:"a `source` move is its own operation — run it in a separate call from `add`/`remove`"}).refine(e=>[e.targets!==void 0||e.add!==void 0||e.remove!==void 0,e.place!==void 0,e.unplace!==void 0,e.convert!==void 0,e.source!==void 0||e.setSource!==void 0,e.fork!==void 0].filter(Boolean).length<=1,{error:"one operation per call — membership (`targets`/`add`/`remove`), `place`, `unplace`, `convert`, `source`, and `fork` are mutually exclusive"}),M8=[`no-targets`,`scripts-present`,`name-conflict`,`no-description`,`skill-fork-name-unpatched`,`place-path-invalid`,`place-fork-refused`,`links-not-permitted`],xhe=F({name:j().min(1).meta({description:`Managed skill name installed or uninstalled.`}),hosts:P(j()).meta({description:`Editor ids the skill is projected into after the operation; [] is expected after uninstall.`}),scripts:N().meta({description:`True when the skill ships executable scripts, projected but never run.`}),warnings:P(j()).meta({description:`Non-fatal install/uninstall warnings from target projection.`}),warningCodes:P(I(M8)).meta({description:"Machine-readable warning codes aligned with `warnings`."}),placedAt:j().optional(),sourceMovedTo:j().optional()}).strict(),She=F({scope:_8.default(`project`),name:j().meta({description:`Managed skill name to uninstall without deleting source.`})}).strict(),Che=F({name:j().min(1).meta({description:`Managed skill name requested for uninstall.`}),uninstalled:N().meta({description:`True when an install marker existed and was removed; false for an idempotent no-op.`})}).strict(),whe=F({targets:P(Q6),configured:N(),folders:P(F({scope:_8,host:j(),root:j(),state:I([`own`,`linked`,`linked-parent`,`absent`]),target:j().optional(),drift:L(!0).optional(),expected:j().optional()}).strict()).optional()}).strict(),N8=F({action:L(`link`),scope:_8,root:j().min(1).meta({description:`The folder to link (e.g. ".codex/skills").`}),target:j().min(1).meta({description:`The root it merges into (e.g. ".agents/skills"). Required.`})}),P8=F({action:L(`unlink`),scope:_8,root:j().min(1).meta({description:`The linked folder to materialize back.`}),exclude:P(j().min(1)).optional().meta({description:`Skill names to LEAVE OUT when materializing — the folder keeps every other skill it currently sees (as per-skill links) and stops auto-following the target root.`})}).strict(),F8=F({action:L(`add-root`),scope:_8,root:A8.meta({description:`New custom skills root to declare (base-relative, e.g. ".team/skills").`})}).strict(),The=Co(`action`,[N8.extend({preview:N().optional().meta({description:`Return the merge plan only (moves, drops, removes, conflicts, strays) — nothing is written.`})}).strict(),P8,F8]),Ehe=Co(`action`,[N8.strict(),P8,F8]),Dhe=F({folderAction:The}).strict(),Ohe=F({moves:P(j()),drops:P(j()),removes:P(j()),replaces:P(j()),conflicts:P(j()),strays:P(j())}).strict(),khe=F({targets:P(Q6),reprojected:P(F({name:j(),hosts:P(j())}).strict()),bundleHosts:P(j()),removedFrom:P(j()),folder:F({moved:P(j()),dropped:P(j()),linked:P(j())}).strict().optional(),preview:Ohe.optional()}).strict(),Ahe=F({scope:_8.default(`project`),name:j(),version:j().regex(/^[0-9a-f]{40}$/i),...A_,summary:j_}).strict(),jhe=F({name:j().min(1),version:j(),restoredFiles:P(j()),warnings:P(j())}).strict(),Mhe=F({query:j().optional(),intent:I([`autocomplete`,`full_text`,`omnibar`]).optional(),ranking:I([`navigation`,`relevance`]).optional(),scopes:P(I([`page`,`folder`,`content`,`file`])).optional(),scope:j().optional(),limit:M().int().nonnegative().optional(),semantic:N().optional(),source:I([`omnibar`,`mcp`,`http`]).optional()}).loose(),Nhe=F({kind:I([`page`,`folder`,`content`,`file`]),path:j().min(1),title:j(),score:M(),signals:ko(j(),po()),snippet:j().optional()}).loose(),I8=I([`applied`,`no_match`,`warming`,`incapable`,`provider_error`,`restart_required`,`query_too_short`]),L8=I([`warm`,`corpus`,`query`,`dimensions`,`configured_dimensions`]);function Phe(e){return e?.providerErrorReason===`dimensions`?`restart_required`:e?.providerErrorReason===`configured_dimensions`?`incapable`:e?.providerError||e?.providerErrorReason?`provider_error`:null}function Fhe(e){throw Error(`Unhandled SemanticProviderErrorReason variant: ${JSON.stringify(e)}`)}function Ihe(e,t){let n=e?.providerErrorReason;switch(n){case null:case void 0:return e?.providerError===!0;case`corpus`:return!1;case`query`:return t===`query`;case`warm`:case`dimensions`:case`configured_dimensions`:return!0;default:return Fhe(n)}}function Lhe(e){throw Error(`Unhandled SemanticQueryOutcome variant: ${JSON.stringify(e)}`)}const R8=F({capable:N(),applied:N(),outcome:I8,providerErrorReason:L8.nullable().optional().catch(null),coverage:F({embedded:M().int().nonnegative(),total:M().int().nonnegative()})}).loose(),Rhe=F({enabled:N(),keyPresent:N(),keyNotRequired:N(),keySource:I([`project`,`file`,`env`]).nullable(),keyHint:j().nullable(),ready:N(),capable:N(),providerError:N().optional(),providerErrorReason:L8.nullable().optional().catch(null),embedded:M().int().nonnegative(),total:M().int().nonnegative()}).loose();function zhe(e){return!!(e?.enabled&&(e.keyPresent||e.keyNotRequired))}const Bhe=F({query:j(),intent:I([`autocomplete`,`full_text`,`omnibar`]),results:P(Nhe),elapsedMs:M().nonnegative(),semantic:R8.optional(),truncated:N().optional(),ready:N().optional()}).loose(),Vhe=F({version:j().min(1),recordedAt:j().min(1)}).loose(),Hhe=F({currentVersion:j().min(1),targets:ko(j(),Vhe.nullable())}).loose(),Uhe=F({scope:_8.default(`project`),source:j().min(1).meta({description:`External skill source: full skills.sh skill-page URL (https://www.skills.sh/<owner>/<repo>/<skill>, or https://www.skills.sh/site/<hostname>/<skill> for a website catalog), GitHub owner/repo[/subpath], git URL, or local/file path.`}),skill:j().min(1).optional().meta({description:`Specific skill name to import from a multi-skill source.`}),install:N().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection (the caller installs explicitly afterwards). Default true.`}),marketplace:N().optional().meta({description:"The source came from a skills.sh listing the user chose (the Explore tab), so the install is reported to skills.sh and counts toward that listing. Off by default: a hand-typed repo must not be announced to skills.sh. Honors the `telemetry.skillInstallReports.enabled` setting and DO_NOT_TRACK."}),...A_,summary:j_}).strict(),Whe=F({scope:_8.default(`project`),source:j().min(1).meta({description:`External skill source: full skills.sh skill-page URL, GitHub owner/repo[/subpath], git URL, or local/file path.`}),skills:P(j().min(1)).min(1).max(100).meta({description:`Skill names to import from the source.`}),install:N().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection. Default true.`}),marketplace:N().optional().meta({description:"The source came from a skills.sh listing the user chose (a marketplace plugin bundle), so the import is reported to skills.sh as one batched install event and counts toward that listing. Off by default: a hand-typed repo must not be announced to skills.sh. Honors the `telemetry.skillInstallReports.enabled` setting and DO_NOT_TRACK."}),...A_,summary:j_}).strict(),Ghe=F({results:P(F({requested:j(),status:I([`imported`,`already-imported`,`not-found`,`failed`]),name:j().optional(),collisionRenamedFrom:j().optional(),warnings:P(j()),warningCodes:x8,error:j().optional()}).loose()),imported:M(),alreadyImported:M(),failed:M()}).loose(),Khe=F({scope:_8.default(`project`),names:P(j().min(1)).min(1).max(100).meta({description:`Managed skill names to refresh from their recorded upstreams.`}),...A_,summary:j_}).strict(),qhe=F({results:P(F({requested:j(),status:I([`updated`,`up-to-date`,`not-found`,`failed`]),source:j().optional(),warnings:P(j()),warningCodes:x8,error:j().optional()}).loose()),updated:M(),upToDate:M(),failed:M()}).loose(),Jhe=F({source:j(),ref:j().optional(),contentHash:j(),publisher:j().optional()}).loose(),Yhe=F({name:j().min(1).meta({description:`Managed skill name created or matched.`}),path:j().min(1).meta({description:`Store-relative path to the imported skill source.`}),created:N().meta({description:`True when this request created new source files.`}),alreadyImported:N().meta({description:`True when identical content was already present and no files changed.`}),collisionRenamedFrom:j().optional().meta({description:`Original source name when collision handling renamed the import.`}),provenance:Jhe,warnings:P(j()).meta({description:`Non-fatal import warnings, such as skipped unsupported files.`}),warningCodes:x8}).loose(),z8=`server-info`,B8=`branch-switched`,V8=`disk-ack`,H8=`config-validation-rejected`,U8=`config-ignore-nested-error`,Xhe=I([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`,`comments`,`lint-config`,`local-targets`]),Zhe=F({v:L(1),ch:L(z8),seq:M(),serverInstanceId:j().min(1),currentBranch:j().min(1).optional()}).loose(),Qhe=F({v:L(1),ch:L(B8),seq:M(),branch:j().min(1)}).loose(),$he=F({v:L(1),ch:Xhe,seq:M()}).loose(),ege=F({v:L(1),ch:L(V8),seq:M(),docName:j().min(1),sv:j().min(1)}).loose(),tge=F({v:L(1),ch:L(H8),seq:M(),docName:j().min(1),error:Gh}).loose(),nge=F({v:L(1),ch:L(U8),seq:M(),path:j().min(1),error:j().min(1)}).loose(),W8={arabic:`ar`,armenian:`am`,bulgarian:`bg`,czech:`cz`,danish:`dk`,dutch:`nl`,english:`en`,finnish:`fi`,french:`fr`,german:`de`,greek:`gr`,hungarian:`hu`,indian:`in`,indonesian:`id`,irish:`ie`,italian:`it`,lithuanian:`lt`,nepali:`np`,norwegian:`no`,portuguese:`pt`,romanian:`ro`,russian:`ru`,serbian:`rs`,slovenian:`ru`,spanish:`es`,swedish:`se`,tamil:`ta`,turkish:`tr`,ukrainian:`uk`,sanskrit:`sk`},rge={dutch:/[^A-Za-zàèéìòóù0-9_'-]+/gim,english:/[^A-Za-zàèéìòóù0-9_'-]+/gim,french:/[^a-z0-9äâàéèëêïîöôùüûœç-]+/gim,italian:/[^A-Za-zàèéìòóù0-9_'-]+/gim,norwegian:/[^a-z0-9_æøåÆØÅäÄöÖüÜ]+/gim,portuguese:/[^a-z0-9à-úÀ-Ú]/gim,russian:/[^a-z0-9а-яА-ЯёЁ]+/gim,spanish:/[^a-z0-9A-Zá-úÁ-ÚñÑüÜ]+/gim,swedish:/[^a-z0-9_åÅäÄöÖüÜ-]+/gim,german:/[^a-z0-9A-ZäöüÄÖÜß]+/gim,finnish:/[^a-z0-9äöÄÖ]+/gim,danish:/[^a-z0-9æøåÆØÅ]+/gim,hungarian:/[^a-z0-9áéíóöőúüűÁÉÍÓÖŐÚÜŰ]+/gim,romanian:/[^a-z0-9ăâîșțĂÂÎȘȚ]+/gim,serbian:/[^a-z0-9čćžšđČĆŽŠĐ]+/gim,turkish:/[^a-z0-9çÇğĞıİöÖşŞüÜ]+/gim,lithuanian:/[^a-z0-9ąčęėįšųūžĄČĘĖĮŠŲŪŽ]+/gim,arabic:/[^a-z0-9أ-ي]+/gim,nepali:/[^a-z0-9अ-ह]+/gim,irish:/[^a-z0-9áéíóúÁÉÍÓÚ]+/gim,indian:/[^a-z0-9अ-ह]+/gim,armenian:/[^a-z0-9ա-ֆ]+/gim,greek:/[^a-z0-9α-ωά-ώ]+/gim,indonesian:/[^a-z0-9]+/gim,ukrainian:/[^a-z0-9а-яА-ЯіїєІЇЄ]+/gim,slovenian:/[^a-z0-9螚ȎŠ]+/gim,bulgarian:/[^a-z0-9а-яА-Я]+/gim,tamil:/[^a-z0-9அ-ஹ]+/gim,sanskrit:/[^a-z0-9A-Zāīūṛḷṃṁḥśṣṭḍṇṅñḻḹṝ]+/gim,czech:/[^A-Z0-9a-zěščřžýáíéúůóťďĚŠČŘŽÝÁÍÉÓÚŮŤĎ-]+/gim},G8=Object.keys(W8);function ige(e){return e!==void 0&&G8.includes(e)?W8[e]:void 0}const age=Date.now().toString().slice(5);let oge=0;const K8=BigInt(1e3),q8=BigInt(1e6),J8=BigInt(1e9),Y8=65535;function X8(e,t){if(t.length<65535)Array.prototype.push.apply(e,t);else{let n=t.length;for(let r=0;r<n;r+=Y8)Array.prototype.push.apply(e,t.slice(r,r+Y8))}}function sge(e,...t){return e.replace(/%(?:(?<position>\d+)\$)?(?<width>-?\d*\.?\d*)(?<type>[dfs])/g,function(...e){let{width:n,type:r,position:i}=e[e.length-1],a=i?t[Number.parseInt(i)-1]:t.shift(),o=n===``?0:Number.parseInt(n);switch(r){case`d`:return a.toString().padStart(o,`0`);case`f`:{let e=a,[t,r]=n.split(`.`).map(e=>Number.parseFloat(e));return typeof r==`number`&&r>=0&&(e=e.toFixed(r)),typeof t==`number`&&t>=0?e.toString().padStart(o,`0`):e.toString()}case`s`:return o<0?a.toString().padEnd(-o,` `):a.toString().padStart(o,` `);default:return a}})}function cge(){return typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope}function lge(){return typeof process<`u`&&process.release&&process.release.name===`node`}function Z8(){return BigInt(Math.floor(performance.now()*1e6))}function Q8(e){return typeof e==`number`&&(e=BigInt(e)),e<K8?`${e}ns`:e<q8?`${e/K8}μs`:e<J8?`${e/q8}ms`:`${e/J8}s`}function $8(){return cge()?Z8():lge()||typeof process<`u`&&typeof process?.hrtime?.bigint==`function`?process.hrtime.bigint():typeof performance<`u`?Z8():BigInt(0)}function e5(){return`${age}-${oge++}`}function t5(e,t){return Object.hasOwn===void 0?Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0:Object.hasOwn(e,t)?e[t]:void 0}function n5(e,t){return t[1]===e[1]?e[0]-t[0]:t[1]-e[1]}function uge(e){if(e.length===0)return[];if(e.length===1)return e[0];for(let t=1;t<e.length;t++)if(e[t].length<e[0].length){let n=e[0];e[0]=e[t],e[t]=n}let t=new Map;for(let n of e[0])t.set(n,1);for(let n=1;n<e.length;n++){let r=0;for(let i of e[n]){let e=t.get(i);e===n&&(t.set(i,e+1),r++)}if(r===0)return[]}return e[0].filter(n=>{let r=t.get(n);return r!==void 0&&t.set(n,0),r===e.length})}function r5(e,t){let n={},r=t.length;for(let i=0;i<r;i++){let r=t[i],a=r.split(`.`),o=e,s=a.length;for(let e=0;e<s;e++)if(o=o[a[e]],typeof o==`object`){if(o!==null&&`lat`in o&&`lon`in o&&typeof o.lat==`number`&&typeof o.lon==`number`){o=n[r]=o;break}if(!Array.isArray(o)&&o!==null&&e===s-1){o=void 0;break}}else if((typeof o!=`object`||!o)&&e<s-1){o=void 0;break}o!==void 0&&(n[r]=o)}return n}function i5(e,t){return r5(e,[t])[t]}const dge={cm:.01,m:1,km:1e3,ft:.3048,yd:.9144,mi:1609.344};function a5(e,t){let n=dge[t];if(n===void 0)throw Error(f5(`INVALID_DISTANCE_SUFFIX`,e).message);return e*n}function o5(e,t){e.hits=e.hits.map(e=>({...e,document:{...e.document,...t.reduce((e,t)=>{let n=t.split(`.`),r=n.pop(),i=e;for(let e of n)i[e]=i[e]??{},i=i[e];return i[r]=null,e},e.document)}}))}function s5(e){return Array.isArray(e)?e.some(e=>s5(e)):e?.constructor?.name===`AsyncFunction`}const c5=`intersection`in new Set;function l5(...e){if(e.length===0)return new Set;if(e.length===1)return e[0];if(e.length===2){let t=e[0],n=e[1];if(c5)return t.intersection(n);let r=new Set,i=t.size<n.size?t:n,a=i===t?n:t;for(let e of i)a.has(e)&&r.add(e);return r}let t={index:0,size:e[0].size};for(let n=1;n<e.length;n++)e[n].size<t.size&&(t.index=n,t.size=e[n].size);if(c5){let n=e[t.index];for(let r=0;r<e.length;r++)r!==t.index&&(n=n.intersection(e[r]));return n}let n=e[t.index];for(let r=0;r<e.length;r++){if(r===t.index)continue;let i=e[r];for(let e of n)i.has(e)||n.delete(e)}return n}const fge=`union`in new Set;function u5(e,t){return fge?e?e.union(t):t:e?new Set([...e,...t]):new Set(t)}function pge(e,t){let n=new Set;for(let r of e)t.has(r)||n.add(r);return n}function d5(e){if(typeof SharedArrayBuffer<`u`&&typeof Atomics<`u`){let t=new Int32Array(new SharedArrayBuffer(4));if(!(e>0&&e<1/0))throw typeof e!=`number`&&typeof e!=`bigint`?TypeError(`sleep: ms must be a number`):RangeError(`sleep: ms must be a number that is greater than 0 but less than Infinity`);Atomics.wait(t,0,0,Number(e))}else{if(!(e>0&&e<1/0))throw typeof e!=`number`&&typeof e!=`bigint`?TypeError(`sleep: ms must be a number`):RangeError(`sleep: ms must be a number that is greater than 0 but less than Infinity`);let t=Date.now()+Number(e);for(;t>Date.now(););}}const mge={NO_LANGUAGE_WITH_CUSTOM_TOKENIZER:`Do not pass the language option to create when using a custom tokenizer.`,LANGUAGE_NOT_SUPPORTED:`Language "%s" is not supported.\nSupported languages are:\n - ${G8.join(`
|
|
385
|
+
`))return`${l.leading}<${s}${c?` ${c}`:``}>${l.afterOpenTag}`;if(!i.children||i.children.length===0)return s?c?`<${s} ${c} />`:`<${s} />`:``;let u={...i,attributes:(i.attributes??[]).map(Rue),children:(i.children??[]).map(Iue)};return Pue(u,t,n,r)},mark(e,t,n,r){let i=n.createTracker(r),a=n.enter(`mark`),o=i.move(`==`);return o+=w6(n.containerPhrasing(e,{before:o,after:`==`,...i.current()}),r,`==`),o+=i.move(`==`),a(),o},underline(e,t,n,r){let i=e.data?.sourceForm===`ins`?`<ins>`:`<u>`,a=e.data?.sourceForm===`ins`?`</ins>`:`</u>`,o=n.createTracker(r),s=n.enter(`underline`),c=o.move(i);return c+=n.containerPhrasing(e,{before:c,after:a,...o.current()}),c+=o.move(a),s(),c},comment(e,t,n,r){let i=e.data?.sourceForm,a=i===`html`?`<!-- `:`%%`,o=i===`html`?` -->`:`%%`,s=n.createTracker(r),c=n.enter(`comment`),l=s.move(a);return l+=n.containerPhrasing(e,{before:l,after:o,...s.current()}),l+=s.move(o),c(),l},commentBlock(e,t,n,r){let i=n.createTracker(r),a=n.enter(`commentBlock`),o=e.children??[],s=e.data?.sourceForm,c=e.data?.sourceLayout,l=o.length===1&&o[0]?.type===`paragraph`;if(s===`html`&&l){let e=o[0],t=n.containerPhrasing(e,{before:`<!-- `,after:` -->`,...i.current()});return a(),`<!-- ${t} -->`}if(c===`inline`&&l){let e=o[0],t=n.containerPhrasing(e,{before:`%% `,after:` %%`,...i.current()});return a(),`%% ${t} %%`}let u=n.containerFlow(e,i.current());return a(),`%%\n\n${u}\n\n%%`},mdxJsxTextElement(e){let t=e.data?.sourceRaw;if(typeof t==`string`)return t;let n=e.name??``,r=m6(e.attributes??[]),i=(e.children??[]).map(e=>e&&typeof e==`object`&&`value`in e?String(e.value??``):``).join(``);return i?r?`<${n} ${r}>${i}</${n}>`:`<${n}>${i}</${n}>`:r?`<${n} ${r} />`:`<${n}/>`},rawMdxFallback(e){return e.value??``},blockquote(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.containerFlow(e,a.current());i();let s=e.data?.sourceMarkerSpacings,c=0;return n.indentLines(o,(e,t,n)=>{if(n)return`>`;let r=c++,i=s?.[r];return i===`lazy`&&r>0&&!Fue.test(e)?e:i===`none`||i===0?`>${e}`:typeof i==`number`&&i>=2&&!e.startsWith(` `)?`>${` `.repeat(i)}${e}`:`> ${e}`})}};function m6(e){let t=[];for(let n of e){if(n.type===`mdxJsxExpressionAttribute`){t.push(`{${n.value}}`);continue}let e=n.name;if(n.value===null||n.value===void 0){t.push(e);continue}if(typeof n.value==`string`){n.value.includes(`"`)?t.push(`${e}={${h6(n.value)}}`):t.push(`${e}="${n.value}"`);continue}t.push(`${e}={${n.value.value}}`)}return t.join(` `)}function h6(e){return`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`}function Rue(e){return e.type===`mdxJsxAttribute`&&typeof e.value==`string`&&e.value.includes(`"`)?{type:`mdxJsxAttribute`,name:e.name,value:{type:`mdxJsxAttributeValueExpression`,value:h6(e.value)}}:e}const zue=/^https?:\/\//i,Bue=/^www\./i,Vue=/^https?:\/\/[A-Za-z0-9./:?#@+,;()!'-]*$/i,Hue=/www\./i;function Uue(e,t){if(e===t&&zue.test(e))return`protocol`;if(t===`http://${e}`&&Bue.test(e))return`www`;if(t===`mailto:${e}`)return`email`}function Wue(e){let t=``;for(let n of e.children){if(n.type!==`text`)return!1;t+=n.value}return t===e.url}function g6(e){return e>=65&&e<=90||e>=97&&e<=122}function _6(e){return g6(e)||e>=48&&e<=57}function v6(e){return e===45||e===95||_6(e)}function Gue(e){return e===43||e===46||v6(e)}function Kue(e){return e!==47&&!Gue(e)}function que(e,t,n,r,i){let a=n?.children??[],o=a.indexOf(t),s=o>0?a[o-1]:void 0,c=o>=0?a[o+1]:void 0,l=s?.type===`text`?s.value:i.before,u=c===void 0?i.after:r.handle(c,n,r,{...r.createTracker(i).current(),before:e,after:``});return{before:l.charCodeAt(l.length-1),after:u.charCodeAt(0),afterNext:u.charCodeAt(1)}}function Jue(e,t){return v6(e)||e===46&&_6(t)}function Yue(e,{before:t,after:n,afterNext:r}){return e===`email`?Kue(t)&&!Jue(n,r):(e===`protocol`?!g6(t):C6(t)!==`other`)&&C6(n)!==`other`}function Xue(e){return Vue.test(e)&&!Hue.test(e)}function y6(e,t,n=` `){return t===`single`?`${n}'${e.replace(/'/g,`\\'`)}'`:t===`paren`?`${n}(${e.replace(/[()]/g,`\\$&`)})`:`${n}"${e.replace(/"/g,`\\"`)}"`}function b6(e,t,n,r=!1){let i=String(n.url??``),a=i.startsWith(`<`)&&i.endsWith(`>`);if(n.data?.sourceUrlForm===`angle-bracketed`&&!a||r){let n=e.enter(`destinationLiteral`),r=t.move(Zue(i,e.stack.includes(`tableCell`)));return n(),r}let o=e.enter(`destinationRaw`),s=t.move(Que(i));return o(),s}function Zue(e,t=!1){let n=`<`;for(let r=0;r<e.length;r++){let i=e[r];g4(i)||t&&i===`|`?n+=`\\${i}`:n+=i===`
|
|
386
|
+
`?`
`:i===`\r`?`
`:i===`\\`?_4(e[r+1])?`\\\\`:`\\`:i}return`${n}>`}function Que(e){if(!e)return``;let t=0,n=!0;for(let r of e)r===`(`?t++:r===`)`&&(t--,t<0&&(n=!1));return t!==0&&(n=!1),n?e:e.replace(/[\\()]/g,`\\$&`)}function $ue(e){return e.replace(/(?<!\\)&(?=(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z][A-Za-z0-9]*);)/g,(e,t)=>ede(t)?e:`\\${e}`)}function ede(e){if(e.charCodeAt(0)!==35)return!1;let t=e[1]===`x`||e[1]===`X`?Number.parseInt(e.slice(2),16):Number.parseInt(e.slice(1),10);return t===9||t===10||t===11||t===12||t===13||t===32||t===160}const tde=/&#(?:x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);/g;function nde(e){return e.replace(tde,e=>rp(e)?``+e.slice(1):e)}function rde(e){return/[\r\n][\t ]*$/.test(e)}function x6(e,t,n,r=!1){let{matched:i}=R4(t,{escapeAware:!1});if(i.length===0)return S6(e,t,n,r);let a=``,o=0,s=i=>{i>o&&(a+=S6(e,t.slice(o,i),{...n,before:n.before+a,after:t.slice(i,i+1)||n.after},r)),o=i};for(let e of i)s(e.start),!rde(n.before+a)&&(a+=t.slice(e.start,e.end),o=e.end);return s(t.length),a}function S6(e,t,n,r=!1){let i=e.unsafe;e.unsafe=i.filter(e=>!(e.character===`&`&&e.after===`[#A-Za-z]`||e.character===`<`||e.character===`[`||e.character===`(`||e.character===`!`&&e.after===`\\[`&&e.inConstruct===`phrasing`||e.character===`@`&&e.before===`[+\\-.\\w]`||r&&e.character===`:`&&e.before===`[ps]`&&e.after===`\\/`||e.character===`{`&&Array.isArray(e.inConstruct)&&e.inConstruct.includes(`phrasing`)||e.character==="`"||(e.character===`*`||e.character===`_`||e.character===`~`)&&e.inConstruct===`phrasing`||e.character===`=`&&e.atBreak===!0||e.character===` `&&e.inConstruct===`phrasing`&&e.after===`[\\r\\n]`||e.character===` `&&e.inConstruct===`phrasing`&&e.after===`[\\r\\n]`)),e.unsafe=e.unsafe.map(e=>{if(e.character!==`)`||e.atBreak!==!0||e.before!==`\\d+`||e.after!==void 0)return e;let t={...e,after:`(?:[ \r
|
|
387
|
+
]|$)`};return delete t._compiled,t});let a;try{a=e.safe(nde(t),n)}finally{e.unsafe=i}return a=a.replaceAll(``,`\\&`),$ue(ode(a,n))}function C6(e){if(Number.isNaN(e))return`ws`;let t=ob(e);return t===1?`ws`:t===2?`punct`:`other`}function ide(e,t,n){let r=C6(t),i=C6(n),a=i!==`ws`&&(i===`other`||r!==`other`),o=r!==`ws`&&(r===`other`||i!==`other`);return e===`_`?a&&(!o||r===`punct`)||o&&(!a||i===`punct`):a||o}function ade(e,t,n){let r=t;for(;r<e.length&&(e[r]===` `||e[r]===` `);)r++;if(r<e.length)return e[r]===`
|
|
388
|
+
`||e[r]===`\r`;let i=n.after.charCodeAt(0);return Number.isNaN(i)||i===10||i===13}function ode(e,t){let n=``,r=0;for(;r<e.length;){let i=e.charAt(r);if(i===`\\`){n+=e.slice(r,r+2),r+=2;continue}if(i===`*`||i===`_`||i===`~`||i===`=`){let a=r+1;for(;a<e.length&&e.charAt(a)===i;)a++;let o=r===0?t.before.charCodeAt(t.before.length-1):e.charCodeAt(r-1);if(i===`=`)n+=(Number.isNaN(o)||o===10||o===13)&&ade(e,a,t)?`\\${e.slice(r,a)}`:e.slice(r,a);else{let s=a<e.length?e.charCodeAt(a):t.after.charCodeAt(0);n+=ide(i,o,s)?`\\${i}`.repeat(a-r):e.slice(r,a)}r=a;continue}n+=i,r+=1}return n}function w6(e,t,n){let r=n.startsWith(`_`)?`_`:`*`,i=t.before??``,a=t.after??``,o=e,s=o.charCodeAt(0);T6(i.charCodeAt(i.length-1),s,r)&&(o=E6(s)+o.slice(1));let c=o.charCodeAt(o.length-1);return T6(a.charCodeAt(0),c,r)&&(o=o.slice(0,-1)+E6(c)),o}function T6(e,t,n){return!(ob(t)!==1||n===`_`&&ob(e)===void 0)}function E6(e){return`&#x${e.toString(16).toUpperCase()};`}function sde(e,t,n,r){let i=e.value??``,a=e.data?.sourceDelimiter,o=typeof a==`string`&&/^\$+$/.test(a)?a.length:2;for(o===1&&!lde(i,r)&&(o=2);RegExp(`(^|[^$])${`\\$`.repeat(o)}([^$]|$)`).test(i);)o++;let s=`$`.repeat(o);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` ${i} `);let c=-1;for(;++c<n.unsafe.length;){let e=n.unsafe[c];if(!e.atBreak)continue;let t=n.compilePattern(e),r;for(;(r=t.exec(i))!==null;){let e=r.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=`${i.slice(0,e)} ${i.slice(r.index+1)}`}}return s+i+s}function cde(e,t,n,r){let i=e.data?.sourceDelimiter===`~`?`~`:`~~`,a=n.createTracker(r),o=n.enter(`strikethrough`),s=a.move(i);return s+=w6(n.containerPhrasing(e,{...a.current(),before:s,after:`~`}),r,i),s+=a.move(i),o(),s}function lde(e,t){return!(e.length===0||!/^\S/.test(e)||!/\S$/.test(e)||/[$\r\n]/.test(e)||e.endsWith(`\\`)||/\\[!-/:-@[-`{-~]/.test(e)||/^\d/.test(t.after)||t.before.endsWith(`\\`))}const D6=[{mode:`protecting`,protect:gse,reservations:mse},{mode:`protecting`,protect:Xse,reservations:vse},{mode:`protecting`,protect:fse,reservations:lse},{mode:`serializer-only`,reservations:[{to:``}]}],ude=new Set(D6.flatMap(({reservations:e})=>e.map(({to:e})=>e)));function dde(e,t){switch(t.mode){case`protecting`:return t.protect(e);case`serializer-only`:return e}}function O6(e){return D6.reduce(dde,e)}function fde(e){return ude.has(e)}function k6(e){return e.data?.sourceRaw}function pde(e){return e.type===`text`?e.value===``:e.type===`mdxJsxTextElement`&&k6(e)===``}function A6(e){return e.type===`paragraph`&&(e.children??[]).every(pde)}function j6(e){let t=e.children??[],n=t[0]?.children?.length??0,r=0;for(let e=1;e<t.length;e++)r=Math.max(r,t[e]?.children?.length??0);let i=e.align??[];return Math.max(n,r,i.length)}function mde(e){switch(e.type){case`table`:return j6(e)===0;case`code`:return e.data?.sourceStyle===`indented`&&/^\n*$/.test(e.value??``);case`thematicBreak`:return k6(e)===``;case`html`:return(e.value??``)===``;case`mdxJsxFlowElement`:return k6(e)===void 0&&e.data?.htmlBoundary===void 0&&(e.children??[]).length===0&&!e.name;case`list`:return(e.children??[]).length===0;default:return!1}}function hde(e){let t=[];for(let n of e.children){if(n.type===`table`&&j6(n)===0){console.warn(JSON.stringify({event:`table-serialize-dropped-empty`,rows:(n.children??[]).length}));continue}mde(n)||(n.type===`paragraph`&&n.children.length>0&&A6(n)&&(n.children=[]),t.push(n))}e.children=t}function gde(e,t){let n=e,r=t;return n.type===`heading`&&n.data?.sourceContiguousNext===!0&&r.type===`paragraph`}const _de=(e,t)=>{if(A6(e)||gde(e,t))return 0;let n=e.position,r=t.position;if(!n||!r)return;let i=r.start.line-n.end.line-1;return i>=1?i:void 0},M6=/(?<!\\)\$(?=\S)([^$\n]*?[^\s$])\$(?!\d)/g;function vde(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;ub(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`$`)===-1)return;let a=gY(e);M6.lastIndex=0;let o=[],s;for(;(s=M6.exec(i))!==null;){let e=s.index,t=e+s[0].length;if(bY(a,e,1)||bY(a,t-1,1)){M6.lastIndex=e+1;continue}o.push(s)}if(o.length===0)return;let c=[],l=0;for(let t of o){let r=t.index,i=r+t[0].length;r>l&&c.push(yY(n,e,l,r));let a={type:`inlineMath`,value:t[1]},o=CY(n,e,r,i);o&&(a.position=o),c.push(a),l=i}return l<i.length&&c.push(yY(n,e,l,i.length)),r.children.splice(t,1,...c),[Gv,t+c.length]})}}const yde=new Set([`strong`,`emphasis`,`delete`,`link`,`mark`,`comment`]);function bde(e){if(e?.type!==`break`)return!1;let t=e.data?.sourceRaw;return typeof t!=`string`||t.length===0}function xde(e){e.data??={},e.data.sourceRaw=`<br />`,e.data.sourceStyle=`html`}function N6(e){if(e?.type!==`text`)return!1;let t=e.data?.sourceRaw;return typeof t!=`string`||t.length===0}const P6=/[ \t]+$/,F6=/^[ \t]*$/;function Sde(e){return e.some(e=>!(N6(e)&&F6.test(e.value)))}function I6(e,t=!1){for(;e.length>0;){let n=e[e.length-1];if(bde(n)){xde(n);break}if(n&&yde.has(n.type)&&`children`in n){let t=n.children;if(I6(t,!0),t.length===0){e.pop();continue}}if(!t&&N6(n)&&P6.test(n.value)){let t=n.value.replace(P6,``);if(t.length>0){n.value=t;continue}if(Sde(e.slice(0,-1))){e.pop();continue}if(e.every(e=>N6(e)&&F6.test(e.value))){let t=e[0];t.value=t.value.charAt(0),e.splice(1)}}break}}const Cde=new Set([`paragraph`,`heading`,`tableCell`]);function wde(e){let t=e=>{if(Cde.has(e.type)&&`children`in e&&I6(e.children),`children`in e)for(let n of e.children)t(n)};t(e)}const L6={handlers:{tag:e=>`#${e.value}`},unsafe:[{character:`#`,inConstruct:[`phrasing`],before:`\\s`,after:`[A-Za-z]|[^\\x00-\\x7F]`}]};function Tde(){let e=this.data();e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===L6)||e.toMarkdownExtensions.push(L6)}const Ede=new Set([`u`,`ins`]);function Dde(){return e=>{ub(e,`mdxJsxTextElement`,(e,t,n)=>{if(n===void 0||t==null||e.name===null||!Ede.has(e.name)||(e.attributes??[]).length>0)return;let r={type:`underline`,children:e.children??[],data:{sourceForm:e.name===`ins`?`ins`:`u`}};return e.position&&(r.position=e.position),n.children.splice(t,1,r),t+1})}}function Ode(e){return e.children.some(e=>{let t=e.type;return t!==`yaml`&&t!==`toml`})?e:{...e,children:[...e.children,{type:`paragraph`,children:[]}]}}const kde=[{name:`remark-parse`,plugin:aE},{name:`escape-provenance`,plugin:Ble},{name:`remark-mdx-agnostic`,plugin:G4},{name:`remark-gfm`,plugin:Tw},{name:`remark-math`,plugin:f3,options:{singleDollarTextMath:!1}},{name:`remark-wiki-link`,plugin:e3},{name:`remark-github-alerts`,plugin:Oce,options:$ce},{name:`callout-transformer`,plugin:Qce},{name:`restore-from-mdx`,plugin:Zse},{name:`void-br-promoter`,plugin:tce},{name:`restore-entity-refs`,plugin:pse},{name:`restore-backslash-escapes`,plugin:_se},{name:`details-accordion-promoter`,plugin:Sle},{name:`div-align-promoter`,plugin:kle},{name:`image-promoter`,plugin:Wle},{name:`indented-code-promoter`,plugin:Yle},{name:`math-promoter`,plugin:nue},{name:`single-dollar-math-promoter`,plugin:vde},{name:`highlight-promoter`,plugin:Ule},{name:`underline-promoter`,plugin:Dde},{name:`mermaid-promoter`,plugin:wue},{name:`comment-promoter`,plugin:ele},{name:`merged-post-parse-walker`,plugin:Sue},{name:`empty-task-item-unmint`,plugin:Ple},{name:`link-reference-destination`,plugin:tue},{name:`non-rendering-context-demote`,plugin:jue},{name:`ensure-non-empty-doc`,plugin:()=>Ode}];function Ade(e){let t=Gw();for(let e of kde)t=`options`in e&&e.options!==void 0?t.use(e.plugin,e.options):t.use(e.plugin);return t=t.use(Sce,{schema:e.schema,handlers:e.handlers}),t.freeze(),t}function jde(e){let t=Gw().use(bT,[`yaml`]).use(Tw,{tablePipeAlign:!1}).use(f3,{singleDollarTextMath:!1}).use(G4).use(e3).use(Tde).use(c0,{bullet:`-`,fences:!0,rule:`-`,join:[_de],...e.toMarkdownHandlers?{handlers:e.toMarkdownHandlers}:{}});return t.freeze(),t}function R6(e){return e.charCodeAt(0)===65279?{source:e.slice(1),hadBom:!0}:{source:e,hadBom:!1}}const z6=/^\n+$/,B6=/^\n{2,}$/;function V6(e,t,n){let r,i,a=e.children;if(a.length>0){let e=a[0]?.position?.start?.offset;if(typeof e==`number`&&e>0){let n=t.slice(0,e);z6.test(n)&&(r=n)}let n=a[a.length-1]?.position?.end?.offset;if(typeof n==`number`&&n<=t.length){let e=t.slice(n);B6.test(e)&&(i=e)}}if(!n&&r===void 0&&i===void 0)return;let o={...n?{bom:!0}:{},...r===void 0?{}:{leading:r},...i===void 0?{}:{trailing:i}};return e.data??={},e.data.sourceDocBoundary=o,o}function Mde(e){if(typeof e!=`object`||!e)return;let t=e,n={};return t.bom===!0&&(n.bom=!0),typeof t.leading==`string`&&z6.test(t.leading)&&(n.leading=t.leading),typeof t.trailing==`string`&&B6.test(t.trailing)&&(n.trailing=t.trailing),n.bom||n.leading||n.trailing?n:void 0}function Nde(e,t){let{source:n,hadBom:r}=R6(e),i=P3(n),a=new Rw(O6(i)),o=t.parse(a);a.value=i;let s=t.runSync(o,a);Z3(s,i);let c=V6(s,i,r),l=c?Iu(s,c):void 0,u=t.stringify(s);return l?u.type.create({...u.attrs,sourceDocBoundary:l},u.content,u.marks):u}function Pde(e,t){return H6(e,t,!1)}function Fde(e,t){return H6(e,t,!0)}function H6(e,t,n){let{source:r,hadBom:i}=R6(e),a=P3(r),o=new Rw(O6(a)),s=t.parse(o);o.value=a;let c=t.runSync(s,o);n&&Z3(c,a);let l=V6(c,a,i);return n&&l&&Iu(c,l),c}function Ide(e,t,n){let r=wce(e,{schema:n.schema,nodeHandlers:n.pmNodeHandlers,markHandlers:n.pmMarkHandlers});U6(r),Mle(r),wde(r),hde(r);let i=Mde(e.attrs?.sourceDocBoundary),a=String(t.stringify(r));return i?.leading&&(a=i.leading+a),i?.trailing&&(a=a.replace(/\n+$/,``)+i.trailing),i?.bom&&(a=`\uFEFF${a}`),a}function U6(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)U6(t);for(let t=0;t+1<e.children.length;){let n=e.children[t],r=e.children[t+1],i=n?.data,a=r?.data,o=dY(i)?i.escapedChars:null,s=dY(a)?a.escapedChars:null;if(n?.type!==`text`||r?.type!==`text`||typeof n.data?.sourceRaw==`string`||typeof r.data?.sourceRaw==`string`||o===null&&s===null){t+=1;continue}let c=n.value.length;n.value+=r.value,n.data??={},n.data.escapedChars=[...o??[],...(s??[]).map(e=>({...e,offset:e.offset+c}))],r.data?.entityRefSpans?.length&&(n.data.entityRefSpans=[...n.data.entityRefSpans??[],...r.data.entityRefSpans.map(e=>({...e,offset:e.offset+c}))]),e.children.splice(t+1,1)}}}var Lde=class{schema;handlers;pmNodeHandlers;pmMarkHandlers;parseProcessor;serializeProcessor;parseCtx={current:{}};freshnessHolder={checker:void 0};authoredJsxSource=Pce(e=>this.schema.nodeFromJSON(this.parseWithFallback(e)));constructor(e){this.schema=UV(e.extensions),this.handlers=Vde(this.schema,this.parseCtx),this.freshnessHolder.checker=e.deriveStructuralFreshness?dd({parse:e=>this.parseWithFallback(e)}):void 0;let{nodeHandlers:t,markHandlers:n}=Hde(this.schema,this.freshnessHolder,this.authoredJsxSource);this.pmNodeHandlers=t,this.pmMarkHandlers=n,this.parseProcessor=Ade({schema:this.schema,handlers:this.handlers,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers}),this.serializeProcessor=jde({toMarkdownHandlers:Lue})}parse(e,t){if(!e.trim())return{type:`doc`,content:[{type:`paragraph`,content:[]}]};this.parseCtx.current=t??{};try{return Nde(e,this.parseProcessor).toJSON()}finally{this.parseCtx.current={}}}parseToMdast(e){return e.trim()?Pde(e,this.parseProcessor):{type:`root`,children:[]}}parseToEditorMdast(e){return e.trim()?Fde(e,this.parseProcessor):{type:`root`,children:[]}}parseWithFallback(e,t){return e.trim()?Ice(e,{parse:e=>this.parse(e,t)}):{type:`doc`,content:[{type:`paragraph`,content:[]}]}}serialize(e,t){let n;try{n=this.schema.nodeFromJSON(e)}catch(t){let n=`MarkdownManager.serialize() failed: schema rejected JSONContent (type=${e.type}, childCount=${e.content?.length??0})`;throw Error(n,{cause:t})}let r=this.freshnessHolder.checker;t?.skipFreshnessDerive&&(this.freshnessHolder.checker=void 0);try{return Ide(n,this.serializeProcessor,{schema:this.schema,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers})}finally{this.freshnessHolder.checker=r}}};const W6=a2();function G6(e,t){let n=new Map;for(let e of t)n.set(e.name,e);let r={};for(let t of e)t.type!==`mdxJsxExpressionAttribute`&&(r[t.name]=n2(t.value,n.get(t.name)));return r}function K6(e){let t=!1;return e.descendants(e=>t?!1:e.type.name===`jsxInline`?(e.attrs.sourceDirty&&(t=!0),!1):e.type.name===`jsxComponent`&&e.attrs.sourceDirty?(t=!0,!1):!0),t}function Rde(e,t){return e.attrs.sourceDirty||K6(e)?!0:t?t.isDiverged(e.toJSON()):!1}function zde(e){if(e.type!==`paragraph`)return!1;let t=e.children??[];return t.length===0||t.every(e=>e.type===`text`&&e.value===``)}function q6(e,t){if(!t)return e;let n={};return t.sourceFenceChar&&(n.sourceFenceChar=t.sourceFenceChar),typeof t.sourceFenceLength==`number`&&(n.sourceFenceLength=t.sourceFenceLength),t.sourcePadded===!0&&(n.sourcePadded=!0),Object.keys(n).length===0?e:{...e,data:n}}function J6(e,t){if(e.length===0)return q6({type:`inlineCode`,value:``},t);if(e.every(e=>e.type===`text`))return q6({type:`inlineCode`,value:e.map(e=>e.value).join(``)},t);if(e.length===1&&`children`in e[0]){let n=e[0];return{...n,children:[J6(n.children,t)]}}return q6({type:`inlineCode`,value:Y6(e)},t)}function Y6(e){let t=``;for(let n of e)n.type===`text`?t+=n.value:`children`in n&&Array.isArray(n.children)?t+=Y6(n.children):`value`in n&&typeof n.value==`string`&&(t+=n.value);return t}const Bde=vp;function Vde(e,t){let n=e.nodes,r=e.marks,i={};n.paragraph&&(i.paragraph=(e,t,r)=>{let i=r.all(e).flat(),a=i.some(e=>e?.isBlock&&!e?.isInline),o=i.some(e=>e?.isInline||e?.isText||e?.isTextblock);if(a&&!o)return i.length===1?i[0]:i;if(a&&o){let e=i.filter(e=>!e?.isBlock||e?.isInline),t=i.filter(e=>e?.isBlock&&!e?.isInline),r=[],a=n.paragraph.createAndFill(null,e.length>0?e:null);return a&&r.push(a),r.push(...t),r.length===1?r[0]:r}return n.paragraph.createAndFill(null,i.length>0?i:null)}),n.blockquote&&(i.blockquote=c3(n.blockquote,e=>({sourceMarkerSpacings:e.data?.sourceMarkerSpacings??null}))),n.tableCell&&(i.tableCell=(e=>(t,r,i)=>{let a=i.all(t).flat();if(a.length>0&&n.paragraph){let t=n.paragraph.create(null,a);return e.createAndFill(null,[t])}return e.createAndFill(null,null)})(n.tableCell)),n.tableRow&&(i.tableRow=c3(n.tableRow)),n.table&&n.tableRow&&n.tableCell&&(i.table=(e,t,r)=>{let i=e.align??[],a=e.children??[],o=[];for(let e=0;e<a.length;e++){let t=a[e];if(t.type!==`tableRow`)continue;let s=t.children??[],c=[];for(let t=0;t<s.length;t++){let a=s[t];if(a.type!==`tableCell`)continue;let o=r.all(a).flat(),l=o.length>0&&n.paragraph?[n.paragraph.create(null,o)]:null,u=i[t]??null,d=e===0&&n.tableHeader?n.tableHeader:n.tableCell,f=a.data?.sourcePadding??null,p=d.createAndFill({align:u,sourcePadding:f},l);p&&c.push(p)}let l=n.tableRow.createAndFill(null,c.length>0?c:null);l&&o.push(l)}let s=e.data?.sourceDashCounts??null,c=e.data?.sourceOuterPipes??null,l=e.data?.sourceAlignmentPadding??null;return n.table.createAndFill({sourceDashCounts:s,sourceOuterPipes:c,sourceAlignmentPadding:l},o.length>0?o:null)}),n.image&&(i.image=e=>{let r=e.url??``,i=Mu(r,t.current.sourcePath);return n.image.createAndFill({src:i,alt:e.alt??null,title:e.title??null,sourceUrl:i===r?null:r,sourceUrlForm:e.data?.sourceUrlForm??null})},i.imageReference=n.imageReference?e=>n.imageReference.createAndFill({alt:e.alt??``,label:e.label??e.identifier??``,identifier:e.identifier??``,referenceType:e.referenceType??`shortcut`}):e=>n.image.createAndFill({src:``,alt:e.alt??null,title:null})),r.escapeMark&&(i.text=t=>{let n=t.value??``,i=typeof t.data?.sourceRaw==`string`?t.data.sourceRaw:null;if(!n&&!i)return null;if(i)return r.sourceLiteral?e.text(n,[r.sourceLiteral.create({sourceRaw:i})]):e.text(n);let a=t.data?.escapedChars,o=t.data?.entityRefSpans;if(!a?.length&&!o?.length)return e.text(n);let s=[...(a??[]).map(e=>({kind:`escape`,offset:e.offset,length:1})),...(o??[]).map(e=>({kind:`entity`,offset:e.offset,length:e.length,raw:e.raw}))];s.sort((e,t)=>e.offset-t.offset);let c=[];for(let e of s){let t=c[c.length-1];e.kind===`entity`&&t?.kind===`entity`&&t.offset+t.length===e.offset&&op(t.raw)!==null&&rp(e.raw)?c[c.length-1]={kind:`entity`,offset:t.offset,length:t.length+e.length,raw:t.raw+e.raw}:c.push(e)}let l=[],u=0;for(let t of c){if(t.offset>u){let r=n.slice(u,t.offset);r&&l.push(e.text(r))}if(t.offset<n.length){let i=n.slice(t.offset,t.offset+t.length);if(i){if(t.kind===`escape`)l.push(e.text(i,[r.escapeMark.create()]));else if(r.sourceLiteral){let n=op(t.raw);l.push(e.text(n??i,[r.sourceLiteral.create({sourceRaw:t.raw})]))}else l.push(e.text(i))}u=t.offset+t.length}}if(u<n.length){let t=n.slice(u);t&&l.push(e.text(t))}return l.length===1?l[0]:l}),r.code&&(i.inlineCode=t=>e.text(t.value,[r.code.create({sourceFenceChar:t.data?.sourceFenceChar??"`",sourceFenceLength:typeof t.data?.sourceFenceLength==`number`?t.data.sourceFenceLength:1,sourcePadded:t.data?.sourcePadded===!0})]));let a=r.strike??r.delete;if(a&&(i.delete=l3(a,e=>({sourceDelimiter:e.data?.sourceDelimiter===`~`?`~`:`~~`}))),r.highlight&&(i.mark=l3(r.highlight)),r.underline&&(i.underline=l3(r.underline,e=>({sourceForm:e.data?.sourceForm===`ins`?`ins`:`u`}))),r.comment&&(i.comment=l3(r.comment,e=>({sourceForm:e.data?.sourceForm??`percent`}))),n.commentBlock&&(i.commentBlock=c3(n.commentBlock,e=>({sourceForm:e.data?.sourceForm??`percent`,sourceLayout:e.data?.sourceLayout??`block`}))),r.emphasis&&(i.emphasis=l3(r.emphasis,e=>({sourceDelimiter:e.data?.sourceDelimiter??`*`}))),r.strong&&(i.strong=l3(r.strong,e=>({sourceDelimiter:e.data?.sourceDelimiter??`**`}))),n.heading&&(i.heading=c3(n.heading,e=>({level:e.depth,headingStyle:e.data?.sourceStyle??`atx`,sourceTrailingHashes:e.data?.sourceTrailingHashes??null,sourceUnderlineLength:e.data?.sourceUnderlineLength??null,sourceContiguousNext:e.data?.sourceContiguousNext??!1,sourceLeadingIndent:e.data?.sourceLeadingIndent??null,sourceInteriorSpacing:e.data?.sourceInteriorSpacing??null}))),n.codeBlock&&(i.code=t=>{let r=t.value?[e.text(t.value)]:[];return n.codeBlock.createAndFill({language:t.lang??null,meta:t.meta??null,fenceDelimiter:t.data?.sourceFenceChar??"`",fenceLength:t.data?.sourceFenceLength??3,sourceStyle:t.data?.sourceStyle??`fenced`,sourceClosingFenceLength:t.data?.sourceClosingFenceLength??null,sourceUnclosedFence:t.data?.sourceUnclosedFence??!1,sourceFenceIndent:t.data?.sourceFenceIndent??null,sourceInfoPadding:t.data?.sourceInfoPadding??null,sourceIndents:t.data?.sourceIndents??null},r)}),n.thematicBreak&&(i.thematicBreak=e=>n.thematicBreak.createAndFill({sourceRaw:e.data?.sourceRaw??`---`})),n.hardBreak&&(i.break=e=>n.hardBreak.createAndFill({hardBreakStyle:e.data?.sourceStyle??`spaces`,sourceRaw:e.data?.sourceRaw??null})),n.list&&(i.list=c3(n.list,e=>({ordered:!!e.ordered,start:e.start??1,spread:!!e.spread,bulletMarker:e.data?.bulletMarker??null,listMarkerDelimiter:e.data?.listMarkerDelimiter??null}))),n.listItem&&(i.listItem=c3(n.listItem,e=>({checked:e.checked??null,spread:!!e.spread,sourceMarkerSpacing:e.data?.sourceMarkerSpacing??null,sourceOrdinal:e.data?.sourceOrdinal??null,sourceCheckboxChar:e.data?.sourceCheckboxChar??null,sourceContinuationIndent:e.data?.sourceContinuationIndent??null}))),r.link){let t=r.sourceLiteral;i.link=(n,i,a)=>{if((n.children??[]).length===0){let r=typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:`[](${n.url??``})`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let o=a.all(n).flat(),s=r.link.create({href:n.url??``,title:n.title??null,linkStyle:n.data?.sourceStyle??`inline`,refLabel:null,sourceUrlForm:n.data?.sourceUrlForm??null,sourceTitleMarker:n.data?.sourceTitleMarker??null});return o.map(e=>e.mark(s.addToSet(e.marks)))},i.linkReference=(n,i,a)=>{if((n.children??[]).length===0){let r=typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:`[${n.label??``}][${n.identifier??``}]`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let o=a.all(n).flat(),s=r.link.create({href:n.data?.resolvedUrl??``,title:n.data?.resolvedTitle??null,linkStyle:n.referenceType??`shortcut`,refLabel:n.label??n.identifier??null});return o.map(e=>e.mark(s.addToSet(e.marks)))}}n.htmlBlock&&(i.html=e=>n.htmlBlock.createAndFill({content:e.value??``}));let o=n.linkDefinition??n.linkRefDef;if(o){let e=!!o.spec.attrs?.url,t=!!o.spec.attrs?.href,n=!!o.spec.attrs?.identifier,r=!!o.spec.attrs?.sourceLayout,a=!!o.spec.attrs?.sourceTitleMarker,s=!!o.spec.attrs?.sourceUrlForm;i.definition=i=>{let c={title:i.title??null};return n&&(c.identifier=i.identifier??``),c.label=i.label??i.identifier??``,e?c.url=i.url??``:t&&(c.href=i.url??``),r&&(c.sourceLayout=i.data?.sourceLayout??null),a&&(c.sourceTitleMarker=i.data?.sourceTitleMarker??null),s&&(c.sourceUrlForm=i.data?.sourceUrlForm??null),o.createAndFill(c)}}if(n.jsxComponent){let r=e=>{if(e&&typeof e==`object`&&`sourceRaw`in e){let t=e.sourceRaw;if(typeof t==`string`)return t}};i.mdxJsxFlowElement=(e,i,a)=>{let o=e.name??``,s=W6.getOrWildcard(o),c=G6(e.attributes,s.props);if(o===`CommonMarkImage`&&typeof c.src==`string`){let e=c.src,n=Mu(e,t.current.sourcePath);n!==e&&(c.src=n,c.sourceUrl=e)}let l=a.all(e).flat();return n.jsxComponent.createAndFill({componentName:o,kind:`element`,attributes:e.attributes,sourceRaw:r(e.data)??``,sourceDirty:!1,props:c},l.length?l:void 0)};let a=(e,t)=>{let n=e.attributes?.find(e=>e.type===`mdxJsxAttribute`&&e.name===t);return n&&typeof n.value==`string`?n.value:null};i.mdxJsxTextElement=t=>{if(t.name===`InlineMath`&&n.mathInline){let e=a(t,`formula`)??``,r=a(t,`id`);return n.mathInline.create({formula:e,id:r??null})}if(t.name===`Tag`&&n.tag){let e=a(t,`value`)??``;return n.tag.create({value:e})}let i=t.name??``,o=i?W6.get(i):void 0;if(o&&n.jsxInline){let e=G6(t.attributes,o.props),a=r(t.data)??``,s=(t.children??[]).map(e=>e&&typeof e==`object`&&`value`in e?String(e.value??``):``).join(``);return s&&(e.children=s),n.jsxInline.createAndFill({componentName:i,attributes:t.attributes,sourceRaw:a,sourceDirty:!1,props:e})}if(n.jsxInline){let i=r(t.data)??``;return n.jsxInline.createAndFill({},i?[e.text(i)]:null)}return n.jsxComponent.createAndFill({sourceRaw:r(t.data)??``})},i.mdxFlowExpression=e=>{let t=r(e.data)??`{${e.value??``}}`;return n.jsxComponent.createAndFill({kind:`expression`,sourceRaw:t,sourceDirty:!1})},i.mdxTextExpression=t=>{let n=r(t.data)??`{${t.value??``}}`;return e.text(n)}}return n.wikiLink&&(i.wikiLink=e=>n.wikiLink.createAndFill({target:e.data?.target??``,alias:e.data?.alias??null,anchor:e.data?.anchor??null,sourceTarget:e.data?.sourceTarget??null,sourceAnchor:e.data?.sourceAnchor??null,sourceAlias:e.data?.sourceAlias??null})),n.tag&&(i.tag=e=>n.tag.createAndFill({value:e.value})),n.wikiLinkEmbed&&(i.wikiLinkEmbed=(i,a)=>{let o=i.data?.target??``,s=i.data?.alias??null,c=i.data?.anchor??null,l=i.data?.sourceTarget??null,u=i.data?.sourceAnchor??null,d=i.data?.sourceAlias??null,f=oW(o),{resolveEmbed:p,sourcePath:m}=t.current,h=p&&m?p(o,m)??null:null,g=h?`/${h}`:o,_=a?.type===`paragraph`&&Array.isArray(a.children)&&a.children.length===1;if(_&&Bde.has(f)&&n.jsxComponent&&W6.has(`WikiEmbedImage`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedImage`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:g,alt:s??o,target:o,anchor:c,alias:s,sourceTarget:l,sourceAnchor:u,sourceAlias:d}});if(_&&yp.has(f)&&n.jsxComponent&&W6.has(`WikiEmbedVideo`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedVideo`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:g,title:s??o,target:o,anchor:c,alias:s,sourceTarget:l,sourceAnchor:u,sourceAlias:d}});if(_&&bp.has(f)&&n.jsxComponent&&W6.has(`WikiEmbedAudio`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedAudio`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:g,title:s??o,target:o,anchor:c,alias:s,sourceTarget:l,sourceAnchor:u,sourceAlias:d}});if(_&&xp.has(f)&&n.jsxComponent&&W6.has(`WikiEmbedFile`)){let{resolveSize:e}=t.current,r=e&&m?e(o,m)??null:null,i=r===null?null:r3(r);return n.jsxComponent.createAndFill({componentName:`WikiEmbedFile`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:g,target:o,anchor:c,alias:s,size:i,sourceTarget:l,sourceAnchor:u,sourceAlias:d}})}let v=s||(c?`${o}#${c}`:o);if(r.link){let t=r.link.create({href:g,title:null,linkStyle:`inline`,refLabel:null,sourceForm:`wikiembed`,target:o,anchor:c,alias:s,sourceTarget:l,sourceAnchor:u,sourceAlias:d});return e.text(v,[t])}throw Error("[wikiLinkEmbed handler] schema lacks `link` mark — cannot dispatch without violating the STOP rule against emitting PM wikiLinkEmbed server-side")}),n.mathInline&&(i.inlineMath=e=>n.mathInline.create({formula:e.value??``,sourceDelimiter:e.data?.sourceDelimiter??null})),i.math||=t=>{let r=t.value==null?`«unknown:${t.type}»`:t.value;return n.rawMdxFallback?(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled block mdast: ${t.type}`})),n.rawMdxFallback.createAndFill({reason:`Unhandled block mdast: ${t.type}`},r?[e.text(r)]:null)):null},i.inlineMath||=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled inline mdast: ${t.type}`})),t.value==null?e.text(`«unknown:${t.type}»`):e.text(t.value)),n.footnoteReference?i.footnoteReference=e=>n.footnoteReference.create({identifier:e.identifier,label:e.label??e.identifier}):i.footnoteReference||=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:`footnoteReference`,reason:`FootnoteReference extension missing — recovering [^id] source`})),e.text(`[^${t.label??t.identifier}]`)),n.footnoteDefinition?i.footnoteDefinition=c3(n.footnoteDefinition,e=>{let t=e;return{identifier:t.identifier,label:t.label??t.identifier}}):i.footnoteDefinition||=t=>{console.warn(JSON.stringify({event:`unknown-mdast-type`,type:`footnoteDefinition`,reason:`FootnoteDefinition extension missing — recovering [^id]: marker`}));let r=`[^${t.label??t.identifier}]: `;return n.paragraph?n.paragraph.create(null,e.text(r)):null},i.rawMdxFallbackMdast=t=>{if(!n.rawMdxFallback)return null;let r=t.position?{start:t.position.start?.offset??0,end:t.position.end?.offset??0}:{start:0,end:0};return console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.originalType,reason:`Unhandled mdast: ${t.originalType}`,unresolvedPosition:t.unresolvedPosition??!1})),n.rawMdxFallback.createAndFill({reason:`Unhandled mdast: ${t.originalType}`,originalSpan:r},t.value?[e.text(t.value)]:null)},i}function Hde(e,t,n){let r={},i={},a=e.nodes,o=e.marks;a.paragraph&&(r.paragraph=u3(`paragraph`)),a.blockquote&&(r.blockquote=u3(`blockquote`,e=>{let t=e.attrs.sourceMarkerSpacings,n={};return Array.isArray(t)&&t.length>0&&(n.sourceMarkerSpacings=t),Object.keys(n).length>0?{data:n}:{}})),a.heading&&(r.heading=u3(`heading`,e=>({depth:e.attrs.level,data:{sourceStyle:e.attrs.headingStyle,sourceTrailingHashes:e.attrs.sourceTrailingHashes??void 0,sourceUnderlineLength:e.attrs.sourceUnderlineLength??void 0,sourceContiguousNext:e.attrs.sourceContiguousNext===!0||void 0,sourceLeadingIndent:e.attrs.sourceLeadingIndent??void 0,sourceInteriorSpacing:e.attrs.sourceInteriorSpacing??void 0}}))),a.codeBlock&&(r.codeBlock=e=>{let t=e.attrs.sourceStyle===`indented`?`indented`:`fenced`;return{type:`code`,lang:t===`indented`?null:e.attrs.language??null,meta:t===`indented`?null:e.attrs.meta??null,value:e.textContent??``,data:{sourceFenceChar:e.attrs.fenceDelimiter,sourceFenceLength:e.attrs.fenceLength,sourceStyle:t,sourceClosingFenceLength:e.attrs.sourceClosingFenceLength??void 0,sourceUnclosedFence:e.attrs.sourceUnclosedFence===!0||void 0,sourceFenceIndent:e.attrs.sourceFenceIndent??void 0,sourceInfoPadding:e.attrs.sourceInfoPadding??void 0,sourceIndents:e.attrs.sourceIndents??void 0}}}),a.thematicBreak&&(r.thematicBreak=e=>({type:`thematicBreak`,data:{sourceRaw:e.attrs.sourceRaw}})),a.hardBreak&&(r.hardBreak=e=>({type:`break`,data:{sourceStyle:e.attrs.hardBreakStyle,...typeof e.attrs.sourceRaw==`string`&&e.attrs.sourceRaw.length>0?{sourceRaw:e.attrs.sourceRaw}:{}}})),a.list&&(r.list=u3(`list`,e=>({ordered:e.attrs.ordered??!1,start:e.attrs.ordered?e.attrs.start??1:null,spread:e.attrs.spread??!1,data:{bulletMarker:e.attrs.bulletMarker,listMarkerDelimiter:e.attrs.listMarkerDelimiter}}))),a.listItem&&(r.listItem=(e,t,n)=>{let r=n.all(e),i=r.length>1&&zde(r[0])?r.slice(1):r,a={};return typeof e.attrs.sourceMarkerSpacing==`number`&&(a.sourceMarkerSpacing=e.attrs.sourceMarkerSpacing),typeof e.attrs.sourceOrdinal==`number`&&(a.sourceOrdinal=e.attrs.sourceOrdinal),e.attrs.sourceCheckboxChar===`X`&&(a.sourceCheckboxChar=`X`),typeof e.attrs.sourceContinuationIndent==`number`&&(a.sourceContinuationIndent=e.attrs.sourceContinuationIndent),{type:`listItem`,checked:e.attrs.checked??null,spread:e.attrs.spread??!1,...Object.keys(a).length>0?{data:a}:{},children:i}}),a.table&&(r.table=(e,t,n)=>{let r=n.all(e),i=[],a=e.firstChild;a&&a.forEach(e=>{let t=e.attrs.align;i.push(t===`left`||t===`right`||t===`center`?t:null)});let o=r.filter(e=>e.type===`tableRow`),s=e.attrs.sourceDashCounts,c={};Array.isArray(s)&&s.length>0&&(c.sourceDashCounts=s);let l=e.attrs.sourceOuterPipes;typeof l==`object`&&l&&typeof l.leading==`boolean`&&typeof l.trailing==`boolean`&&(c.sourceOuterPipes=l);let u=e.attrs.sourceAlignmentPadding;Array.isArray(u)&&u.length>0&&(c.sourceAlignmentPadding=u);let d=Object.keys(c).length>0?c:void 0,f={type:`table`,align:i,children:o};return d&&(f.data=d),f}),a.tableRow&&(r.tableRow=u3(`tableRow`));let s=(e,t)=>{let n={type:`tableCell`,children:qY(t)},r=e.attrs.sourcePadding;return typeof r==`object`&&r&&typeof r.left==`number`&&typeof r.right==`number`&&(n.data={sourcePadding:r}),n};if(a.tableCell&&(r.tableCell=(e,t,n)=>s(e,n.all(e))),a.tableHeader&&(r.tableHeader=(e,t,n)=>s(e,n.all(e))),a.image&&(r.image=e=>{let t={type:`image`,url:ju(e.attrs.src,e.attrs.sourceUrl),alt:e.attrs.alt,title:e.attrs.title};return e.attrs.sourceUrlForm===`angle-bracketed`&&(t.data={sourceUrlForm:`angle-bracketed`}),t}),a.imageReference&&(r.imageReference=e=>{let t=e.attrs.label??``,n=e.attrs.identifier??t;return{type:`imageReference`,alt:e.attrs.alt??``,identifier:n,label:t||n,referenceType:e.attrs.referenceType??`shortcut`}}),a.htmlBlock&&(r.htmlBlock=e=>({type:`html`,value:e.attrs.content})),a.linkDefinition??a.linkRefDef){let e=a.linkDefinition?`linkDefinition`:`linkRefDef`;r[e]=e=>{let t={},n=e.attrs.sourceLayout;(n===`multiline`||n===`inline`)&&(t.sourceLayout=n);let r=e.attrs.sourceTitleMarker;(r===`single`||r===`double`||r===`paren`)&&(t.sourceTitleMarker=r),e.attrs.sourceUrlForm===`angle-bracketed`&&(t.sourceUrlForm=`angle-bracketed`);let i={type:`definition`,identifier:e.attrs.identifier??e.attrs.label??``,label:e.attrs.label??e.attrs.identifier??``,url:e.attrs.url??e.attrs.href??``,title:e.attrs.title};return Object.keys(t).length>0&&(i.data=t),i}}if(a.jsxComponent&&(r.jsxComponent=(e,r,i)=>{if(e.attrs.kind===`expression`)return{type:`html`,value:e.attrs.sourceRaw??``};let a=e.attrs.componentName||null,o=Array.isArray(e.attrs.attributes)?e.attrs.attributes:[],s=()=>({type:`mdxJsxFlowElement`,name:a,attributes:o,children:[],data:{sourceRaw:String(e.attrs.sourceRaw)}});if(!Rde(e,t.checker)&&e.attrs.sourceRaw)return s();let c=W6.getOrWildcard(a??`*`),l={all:e=>i.all(e),registry:W6,serializeChildren:()=>{throw Error(`SerializeContext.serializeChildren is not available in the PM→mdast handler. Compat descriptors that need markdown-byte body rendering must emit a marker mdast node and let the to-markdown handler render the body via state.containerFlow.`)}},u=c.serialize(e,l),d=m3(u,a);if(!d||K6(e))return u;let f=n.read(e,d,e=>c.serialize(e,l));return f?f.kind===`verbatim`?s():{...d,data:{...d.data,sourceBody:f.body}}:d}),a.rawMdxFallback&&(r.rawMdxFallback=e=>{let t=e.textContent??``,n=typeof e.attrs.reason==`string`?e.attrs.reason:``,r=e.attrs.originalSpan;return{type:`rawMdxFallback`,value:t,data:{reason:n,originalSpan:r&&typeof r==`object`&&`start`in r&&`end`in r?{start:Number(r.start)||0,end:Number(r.end)||0}:{start:0,end:0}}}}),a.jsxInline&&(r.jsxInline=e=>{let t=e.attrs.componentName||``;if(t&&e.attrs.sourceDirty)return E0(t,e,W6.get(t)?.props);let n=e.attrs.attributes,r=e.attrs.sourceRaw||e.textContent||``;return{type:`mdxJsxTextElement`,name:t||null,attributes:Array.isArray(n)?n:[],children:[],data:{sourceRaw:String(r)}}}),a.mathInline&&(r.mathInline=e=>{let t=e.attrs.formula??``,n=e.attrs.id;if(typeof n==`string`&&n.length>0)return{type:`mdxJsxTextElement`,name:`InlineMath`,attributes:[{type:`mdxJsxAttribute`,name:`formula`,value:t},{type:`mdxJsxAttribute`,name:`id`,value:n}],children:[]};let r=e.attrs.sourceDelimiter;return{type:`inlineMath`,value:t,...typeof r==`string`&&r.length>0?{data:{sourceDelimiter:r}}:{}}}),a.wikiLink&&(r.wikiLink=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLink`,value:i,data:{target:t,anchor:n,alias:r,sourceTarget:typeof e.attrs.sourceTarget==`string`?e.attrs.sourceTarget:null,sourceAnchor:typeof e.attrs.sourceAnchor==`string`?e.attrs.sourceAnchor:null,sourceAlias:typeof e.attrs.sourceAlias==`string`?e.attrs.sourceAlias:null},children:[{type:`text`,value:i}]}}),a.tag&&(r.tag=e=>({type:`tag`,value:String(e.attrs.value??``)})),a.wikiLinkEmbed&&(r.wikiLinkEmbed=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLinkEmbed`,value:i,data:{target:t,anchor:n,alias:r},children:[{type:`text`,value:i}]}}),o.emphasis&&(i.emphasis=d3(`emphasis`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),o.strong&&(i.strong=d3(`strong`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),o.code&&(i.code=(e,t,n)=>{let r=e.attrs.sourceFenceChar,i=e.attrs.sourceFenceLength;return J6(n,{sourceFenceChar:r,sourceFenceLength:i,sourcePadded:e.attrs.sourcePadded===!0||void 0})}),o.strike??o.delete){let e=o.strike?`strike`:`delete`;i[e]=d3(`delete`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter===`~`?`~`:`~~`}}))}return o.highlight&&(i.highlight=d3(`mark`)),o.underline&&(i.underline=d3(`underline`,e=>({data:{sourceForm:e.attrs.sourceForm===`ins`?`ins`:`u`}}))),o.comment&&(i.comment=d3(`comment`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`}}))),a.commentBlock&&(r.commentBlock=u3(`commentBlock`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`,sourceLayout:e.attrs.sourceLayout===`inline`?`inline`:`block`}}))),a.footnoteReference&&(r.footnoteReference=e=>{let t=String(e.attrs.identifier??``);return{type:`footnoteReference`,identifier:t,label:e.attrs.label?String(e.attrs.label):t}}),a.footnoteDefinition&&(r.footnoteDefinition=u3(`footnoteDefinition`,e=>({identifier:String(e.attrs.identifier??``),label:e.attrs.label?String(e.attrs.label):String(e.attrs.identifier??``)}))),o.link&&(i.link=(e,t,n)=>{if(e.attrs.sourceForm===`wikiembed`){let t=typeof e.attrs.target==`string`&&e.attrs.target.length>0?e.attrs.target:e.attrs.href??``,r=typeof e.attrs.anchor==`string`&&e.attrs.anchor.length>0?e.attrs.anchor:null,i=typeof e.attrs.alias==`string`&&e.attrs.alias.length>0?e.attrs.alias:null,a=typeof e.attrs.sourceTarget==`string`?e.attrs.sourceTarget:null,o=typeof e.attrs.sourceAnchor==`string`?e.attrs.sourceAnchor:null,s=typeof e.attrs.sourceAlias==`string`?e.attrs.sourceAlias:null,c=i||(r?`${t}#${r}`:t),l=n.map(e=>`value`in e&&typeof e.value==`string`?e.value:``).join(``);return l!==c&&l.trim().length>0&&!l.includes(`]]`)&&(i=l,c=l),{type:`wikiLinkEmbed`,value:c,data:{target:t,anchor:r,alias:i,sourceTarget:a,sourceAnchor:o,sourceAlias:s},children:[{type:`text`,value:c}]}}let r=e.attrs.linkStyle;if(r===`autolink`)return{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`autolink`}};if(r===`gfm-autolink`)return{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`gfm-autolink`}};if(r===`inline`||!r){let t={};e.attrs.sourceUrlForm===`angle-bracketed`&&(t.sourceUrlForm=`angle-bracketed`);let r=e.attrs.sourceTitleMarker;return(r===`single`||r===`double`||r===`paren`)&&(t.sourceTitleMarker=r),{type:`link`,url:e.attrs.href??``,title:e.attrs.title??null,children:n,...Object.keys(t).length>0?{data:t}:{}}}return{type:`linkReference`,identifier:(e.attrs.refLabel??``).toLowerCase(),label:e.attrs.refLabel,referenceType:r,children:n}}),o.escapeMark&&(i.escapeMark=(e,t,n)=>{for(let e of n)if(e.type===`text`&&e.value){let t=e;t.data??={},t.data.escapedChars??=[];for(let e=0;e<t.value.length;e++)t.data.escapedChars.push({offset:e,char:t.value[e]})}return n.length===1?n[0]:n}),o.sourceLiteral&&(i.sourceLiteral=(e,t,n)=>{let r=typeof e.attrs.sourceRaw==`string`?e.attrs.sourceRaw:``;if(n.length===1&&n[0]?.type===`text`){let e=n[0],t=r||e.value;return KU(t,e.value)&&(e.data??={},e.data.sourceRaw=t),e}return{type:`text`,value:n.filter(e=>e.type===`text`).map(e=>e.value??``).join(``)||r}}),{nodeHandlers:r,markHandlers:i}}const Ude=/(^|\P{M})(\p{M}+)/gu,Wde=/^(?![\p{Script_Extensions=Latin}\p{Script_Extensions=Greek}\p{Script_Extensions=Cyrillic}\p{Script_Extensions=Arabic}\p{Script_Extensions=Hebrew}])\p{L}$/u,Gde=/\p{DI}/gu,Kde=/[^\p{L}\p{M}\p{N}]+/gu,qde=/^-+|-+$/g;function Jde(e,t,n){return Wde.test(t)?t+n.replace(Gde,``):t}function X6(e){return e.trim().normalize(`NFKD`).replace(Ude,Jde).normalize(`NFC`).toLowerCase().replace(Kde,`-`).replace(qde,``)}function Yde(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function Xde(e,t){let n=X6(e);return n?Yde(n,t):``}const Zde=new Set([`img`,`video`,`audio`,`mark`,`u`,`ins`]);new Map(t2.flatMap(e=>e.surface===`compat`&&Zde.has(e.rendersAs)?[[e.name,e]]:[])),hS(`<>`);var Z6={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100};Z6.SINGLE_TILDE,Z6.COMPARISON_OPERATORS,Z6.HTML_TAGS,Z6.SETEXT_HEADINGS,Z6.LINKS,Z6.BOLD_ITALIC,Z6.BOLD,Z6.ITALIC_DOUBLE_UNDERSCORE,Z6.ITALIC_SINGLE_ASTERISK,Z6.ITALIC_SINGLE_UNDERSCORE,Z6.INLINE_CODE,Z6.STRIKETHROUGH,Z6.KATEX,Z6.INLINE_KATEX,Gw().use(aE).use(Tw);const Q6=I(le),Qde=I(ue);function $de(e){return e===`agents`||ue.includes(e)}const efe=F({alwaysOn:M().int().nonnegative(),onTrigger:M().int().nonnegative(),onDemand:M().int().nonnegative()}).strict(),tfe=[`.md`,`.mdx`,`.txt`];function $6(e){return Math.round(e/4)}function nfe(e){let t=e.lastIndexOf(`.`);return t!==-1&&tfe.includes(e.slice(t).toLowerCase())}function rfe(e){let t=$6((e.name??``).length+(e.description??``).length),n=$6(iu(e.skillMd).body.length),r=e.files.some(e=>e.relPath===`overlay.yaml`),i=0;for(let t of e.files)t.content!==null&&t.relPath!==`SKILL.md`&&(r&&t.relPath.startsWith(`upstream/`)||nfe(t.relPath)&&(i+=t.content.length));return{alwaysOn:t,onTrigger:n,onDemand:$6(i)}}const ife=F({intents:P(F({satisfierId:j().min(1),desired:I([`present`,`absent`])}).loose()),...A_,summary:j_}).loose(),afe=F({satisfierId:j(),agentId:j(),piece:j(),scope:j(),kind:j(),pathId:j().optional(),desired:I([`present`,`absent`]),action:I(_s),errorId:j().optional()}).loose(),ofe=F({kind:j(),satisfierIds:P(j()),agentIds:P(j()),pathId:j().optional(),blockedReason:j().optional()}).loose(),sfe=F({state:j(),strictness:P(I(ps)).optional()}).loose(),cfe=F({probes:F({env:I([`desktop`,`local-web`,`remote-web`]),satisfiers:ko(j(),sfe)}).loose(),detection:F({detected:P(j()),probed:N()}).loose()}).loose(),lfe=F({actions:P(afe),conflicts:P(ofe),withheld:P(j()),snapshot:cfe}).loose(),ufe=F({entries:P(F({level:I([`info`,`warn`,`error`]),message:j().max(8192),event:j().optional(),fields:ko(j(),po()).optional(),ts:M().optional(),sourceId:j().optional(),lineNumber:M().optional()}).loose()).max(100),droppedSinceLastFlush:M().int().min(0).optional()}).loose(),dfe=F({accepted:M().int().min(0)}).loose(),ffe=F({exact:j().min(1),prefix:j(),suffix:j(),start:M().int().nonnegative(),end:M().int().nonnegative()}),pfe=P(xo([j(),M().int().nonnegative()])),mfe=Co(`kind`,[F({kind:L(`body`)}),F({kind:L(`property`),key:j().min(1),path:pfe.default([])})]).default({kind:`body`}),hfe=I([`anchored`,`orphaned`,`resolved`]),e8=F({threadId:j().min(1),docName:j().min(1),target:mfe,anchor:ffe.nullable(),state:hfe,queued:N(),latestComment:j(),createdBy:j().min(1),createdAt:M(),updatedAt:M().optional()}),t8=F({docName:j(),instruction:j(),property:j().nullable(),passage:F({exact:j(),prefix:j(),suffix:j()}).nullable(),anchorLost:N(),passageRepeats:N()}).loose(),n8=F({threadId:j(),ok:L(!0)}),r8=F({threadId:j(),ok:L(!1),error:L(`not-found`)}),gfe=F({threads:P(e8)}).loose(),_fe=F({meta:e8,orphaned:N()}).loose(),vfe=F({threadId:j()}).loose(),yfe=F({meta:e8,payload:t8}).loose(),bfe=F({results:P(xo([n8.extend({meta:e8,payload:t8}),r8]))}).loose(),xfe=F({results:P(xo([n8.extend({meta:e8}),r8]))}).loose(),i8=[`ours`,`theirs`],a8=[`check-failed`,`too-large`,`conflict-markers`,`no-base`,`no-merge-engine`,`outside-settings-applied`,`outside-settings-invalid`],Sfe=[`no-history-or-backup`,`keeps-changing`,`not-utf8`,`unreadable`],Cfe=F({duplicated:M().int().nonnegative(),restoredDeletedHere:M().int().nonnegative(),restoredDeletedOutside:M().int().nonnegative()}),o8={id:j().min(1),docName:j().min(1),file:j().min(1),firstAt:j().min(1),lastAt:j().min(1),events:M().int().positive(),entries:P(j().min(1))},s8=Co(`kind`,[F({...o8,kind:L(`both-kept`),kept:Cfe}).loose(),F({...o8,kind:L(`moved-to-history`),side:I(i8),reason:I(a8)}).loose(),F({...o8,kind:L(`moved-to-backup`),side:I(i8),reason:I(a8),backup:j().min(1)}).loose(),F({...o8,kind:L(`save-held`),cause:I(Sfe)}).loose()]),wfe=F({notices:P(s8)}).loose(),Tfe=F({docName:j().min(1),id:j().min(1)}).loose(),Efe=F({dismissed:N()}).loose(),Dfe=F({status:j().min(1),reason:j()}).loose(),Ofe=F({docName:j().min(1),content:j(),lifecycle:Dfe.nullable()}).loose(),kfe=F({documents:P(F({kind:I([`document`,`asset`,`folder`,`file`]).default(`document`),docName:j().min(1).optional(),docExt:j().min(1).default(`.md`),size:M().int().nonnegative(),modified:j().min(1),isSymlink:N().default(!1),canonicalDocName:j().nullable().default(null),targetPath:j().nullable().default(null),path:j().min(1).optional(),assetExt:j().min(1).optional(),mediaKind:I([`image`,`video`,`audio`,`pdf`,`text`,`mermaid`,`excalidraw`]).nullable().optional(),referencedBy:P(j().min(1)).optional(),hasChildren:N().optional()}).loose().refine(e=>e.kind===`document`?e.docName!==void 0&&e.path===void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.kind===`folder`?e.docName===void 0&&e.path!==void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0:e.kind===`file`?e.path!==void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.path!==void 0&&e.assetExt!==void 0&&e.referencedBy!==void 0&&e.hasChildren===void 0,{message:`document/asset/folder/file kind must match its required fields (document → docName; asset → path+assetExt+referencedBy; folder → path only, no docName; file → path, no mediaKind/referencedBy/hasChildren)`})),truncated:N().optional()}).loose(),Afe=F({source:j().min(1),anchor:j().nullable(),title:j(),snippet:j().nullable()}).loose(),jfe=F({docName:j().min(1),backlinks:P(Afe)}).loose(),Mfe=F({counts:ko(j().min(1),M().int().nonnegative())}).loose(),Nfe=F({counts:ko(j().min(1),M().int().nonnegative())}).loose(),Pfe=Co(`kind`,[F({kind:L(`doc`),docName:j().min(1),anchor:j().nullable(),title:j(),snippet:j().nullable()}).loose(),F({kind:L(`external`),url:j().min(1),title:j(),snippet:j().nullable()}).loose()]),Ffe=F({role:j().min(1),sourceForm:j().min(1),targetKind:j().min(1),href:j(),resolvedTarget:j().nullable(),status:j().min(1),reason:j().nullable(),resolutionMethod:j().min(1),fallbackTarget:j().nullable().default(null),range:F({start:M().int().nonnegative(),end:M().int().nonnegative()}),line:M().int().nonnegative(),column:M().int().nonnegative(),definition:F({label:j(),line:M().int().nonnegative()}).nullable().default(null)}).loose(),Ife=F({docName:j().min(1),forwardLinks:P(Pfe),localTargets:P(Ffe).optional()}).loose(),Lfe=Co(`kind`,[F({id:j().min(1),kind:L(`doc`),docName:j().min(1),anchor:j().nullable(),label:j(),cluster:j().nullable(),category:j().nullable(),tags:P(j()).nullable(),managed:N().optional()}).loose(),F({id:j().min(1),kind:L(`external`),url:j().min(1),label:j()}).loose()]),Rfe=F({source:j().min(1),target:j().min(1)}).loose(),zfe=F({nodes:P(Lfe),links:P(Rfe)}).loose(),Bfe=F({docNames:P(j().min(1).max(1024)).min(1).max(64)}).loose(),Vfe=F({checked:M().int().nonnegative(),found:M().int().nonnegative()}).loose(),Hfe=F({ts:M().int().min(0),url:j(),method:j(),ua:j().optional(),origin:j().optional(),referer:j().optional(),host:j().optional(),remote:j().optional(),secChUa:j().optional(),secChUaMobile:j().optional(),secChUaPlatform:j().optional(),secFetchSite:j().optional(),secFetchDest:j().optional(),secFetchMode:j().optional(),secFetchUser:j().optional()}).loose(),Ufe=F({app:xo([L(`cursor`),L(`codex`),L(`claude`),co()]),signals_fired:P(j())}).loose(),Wfe=F({entries:P(Hfe),count:M().int().min(0),detection:Ufe}).loose(),c8=[`M`,`A`,`D`,`R`,`C`,`U`,`T`,`?`,`!`,` `],l8=F({path:j().min(1),code:I(c8),origPath:j().min(1).optional(),syncScoped:N(),open:Co(`kind`,[F({kind:L(`doc`),docName:j().min(1)}),F({kind:L(`asset`),path:j().min(1)})]).optional()}).loose(),Gfe=F({branch:j().nullable(),detached:N(),upstream:j().nullable(),staged:P(l8),notStaged:P(l8),untracked:P(l8),incoming:P(l8),truncated:N(),readable:N().default(!0)}).loose(),Kfe=I([`AWAITING_CHECKS`,`LOCKED`,`MERGEABLE`,`QUEUED`,`UNMERGEABLE`]),qfe=I([`BEHIND`,`BLOCKED`,`CLEAN`,`DIRTY`,`DRAFT`,`HAS_HOOKS`,`UNKNOWN`,`UNSTABLE`]),Jfe=I([`APPROVED`,`CHANGES_REQUESTED`,`REVIEW_REQUIRED`]),Yfe=I([`ERROR`,`EXPECTED`,`FAILURE`,`PENDING`,`SUCCESS`]),Xfe=F({mergeQueue:F({position:M().int().nonnegative(),state:Kfe.nullable().catch(null)}).nullable().catch(null),autoMerge:N(),mergeState:qfe.nullable().catch(null),reviewDecision:Jfe.nullable().catch(null),checks:Yfe.nullable().catch(null)}).loose(),u8=F({kind:I([`pull`,`issue`]),repo:j().min(1),number:M().int().positive(),title:j(),author:j().nullable(),createdAt:j(),lifecycle:I([`open`,`draft`,`merged`,`closed`,`completed`,`not-planned`]),additions:M().int().nonnegative().optional(),deletions:M().int().nonnegative().optional(),status:Xfe.optional()}).loose(),Zfe=F({url:j()}).loose(),Qfe=Co(`ok`,[F({ok:L(!0),preview:u8}).loose(),F({ok:L(!1),reason:j()}).loose()]),$fe=F({writers:P(F({id:j().min(1),name:j().optional(),email:j().optional()}).loose()).optional(),summary:j_,...A_}).loose(),epe=F({checkpointRef:j().min(1)}).loose(),tpe=F({v:M().int().optional(),id:j().min(1),name:j().min(1),colorSeed:j().optional(),docs:P(j()),summaries:P(j()).optional()}).loose(),npe=F({entries:P(F({sha:j().min(1),timestamp:j().min(1),author:j(),authorEmail:j(),type:I([`checkpoint`,`wip`,`upstream`,`park`]),message:j(),contributors:P(tpe),checkpoint:po().nullable(),parentSha:j().nullable().optional()}).loose()),total:M().int().nonnegative().optional(),truncated:N().optional(),hasMore:N().optional()}).loose(),rpe=F({sha:j().regex(/^[0-9a-f]{40}$/i),content:j(),timestamp:j(),author:j()}).loose(),ipe=F({contentDir:j().min(1),pathSeparator:I([`/`,`\\`]),symlinkResolved:N()}).loose(),ape=P(Co(`source`,[F({docName:j().min(1),timestamp:j().min(1),size:M().int().nonnegative(),source:L(`flat`)}).loose(),F({docName:j().min(1),timestamp:j().min(1),source:L(`timeline`),sha:j().min(1)}).loose()])).meta({description:"Flat array of rescue buffer entries; discriminated via `source`."}),d8=F({domain:j().min(1),title:j().optional(),description:j().optional(),siteName:j().optional(),faviconDataUri:j().optional()}).loose(),ope=F({url:j()}).loose(),spe=Co(`ok`,[F({ok:L(!0),metadata:d8}).loose(),F({ok:L(!1),reason:j()}).loose()]),cpe=F({orphans:P(F({docName:j().min(1),title:j()}).loose())}).loose(),lpe=F({hubs:P(F({docName:j().min(1),title:j(),count:M().int().nonnegative()}).loose())}).loose(),upe=F({source:j().min(1),title:j(),snippet:j().nullable()}).loose(),dpe=F({deadLinks:P(F({target:j().min(1),sources:P(upe)}).loose())}).loose(),fpe=F({target:F({docName:j().min(1),title:j(),aliases:P(j())}).loose(),mentions:P(F({source:j().min(1),excerpt:j(),offset:M().int().nonnegative()}).loose()),truncated:N()}).loose(),ppe=F({projectPath:j().min(1)}).loose(),mpe=I([`not-a-git-worktree`,`init-failed`]),hpe=Co(`ok`,[F({ok:L(!0),projectPath:j().min(1)}).loose(),F({ok:L(!1),reason:mpe,message:j().min(1)}).loose()]),gpe=F({host:j().min(1).optional()}).loose(),_pe=F({host:j().min(1).optional(),token:j().min(1)}).loose(),vpe=F({host:j(),login:j()}).loose(),ype=F({host:j().refine(f,{message:`Host must be a hostname with an optional :port, with no scheme or path`}),username:j().min(1),token:j().min(1)}).loose(),bpe=F({host:j(),login:j()}).loose(),xpe=F({key:j().min(1)}).loose(),Spe=F({keyPresent:N()}).loose(),Cpe=I([`no_key`,`invalid_endpoint`,`rate_limit`,`timeout`,`http_error`,`network`,`dims_mismatch`,`malformed_response`]),wpe=Co(`ok`,[F({ok:L(!0),endpoint:j().min(1),model:j().min(1),dimensions:M().int().positive()}).loose(),F({ok:L(!1),endpoint:j().min(1),model:j().min(1),reason:Cpe,status:M().int().optional()}).loose()]),Tpe=F({name:j().refine(e=>e.trim().length>0,{message:`name must be non-empty`}),email:j().refine(e=>e.trim().length>0,{message:`email must be non-empty`})}).loose(),Epe=F({authenticated:N()}).loose(),Dpe=F({channel:I([`login`,`gh-login`]).default(`login`)}).loose(),Ope=F({}).loose(),kpe=F({stackIndex:M().int().min(0),ts:M().int().min(0),additions:M().int().min(0),deletions:M().int().min(0)}).loose(),Ape=F({docName:j().min(1),additionsTotal:M().int().min(0),deletionsTotal:M().int().min(0),lastTs:M().int().min(0),bursts:P(kpe)}).loose(),jpe=F({displayName:j().min(1),color:j().min(1),icon:j().optional(),connectionId:j().min(1)}).loose(),Mpe=F({sessionAlive:N(),agent:jpe.nullable(),files:P(Ape)}).loose(),Npe=F({diff:j(),before:j(),after:j(),properties:FY,generatedAt:M().int().min(0)}).loose(),Ppe=F({}).loose(),Fpe=F({}).loose(),Ipe=F({}).loose(),Lpe=F({}).loose(),Rpe=F({}).loose(),zpe=F({}).loose(),Bpe=F({displayName:j().min(1),icon:j(),color:j().min(1),currentDoc:j().nullable(),mode:I([`idle`,`writing`]),ts:M().int().min(0)}).loose(),Vpe=F({presence:ko(j().min(1),Bpe)}).loose(),Hpe=F({sessionId:j().min(1),agentType:j().min(1),ts:M().int().min(0),insertedChars:M().int().min(0),deletedChars:M().int().min(0)}).loose(),Upe=F({effects:P(F({"doc.name":j().min(1),entries:P(Hpe)}).loose())}).loose(),Wpe=F({decisions:P(F({ts:M().int().min(0),decision:j().min(1),kind:j().min(1),"doc.name":j().min(1),pathRole:j().min(1)}).loose())}).loose(),Gpe=ko(j().min(1),N()).meta({description:`Flat boolean record keyed by agent-scheme name (claude / codex / cursor). True = installed.`});F({path:j().min(1,`path must be non-empty`)}).loose();const Kpe=F({}).loose(),qpe=F({fromDocName:j().min(1),toDocName:j().min(1)}).loose(),Jpe=F({fromPath:j().min(1),toPath:j().min(1)}).loose(),Ype=F({}).loose(),Xpe=F({path:j().min(1),...A_,summary:j_}).loose(),Zpe=F({docName:j().min(1)}).loose(),Qpe=F({path:j().min(1),...A_,summary:j_}).loose(),$pe=F({path:j().min(1)}).loose(),eme=F({kind:I([`file`,`folder`]),path:j().min(1),...A_,summary:j_}).loose(),tme=F({kind:I([`file`,`folder`]),path:j().min(1),duplicatedDocNames:P(j().min(1))}).loose(),nme=F({pages:P(F({docName:j().min(1),title:j(),docExt:j().min(1),size:M().int().nonnegative(),modified:j().min(1),icon:j().min(1).max(2048).optional()}).loose())}).loose(),rme=F({level:M().int().min(1).max(6),text:j(),slug:j()}).loose(),ime=F({docName:j().min(1),headings:P(rme)}).loose(),ame=F({docName:j().min(1),rewrites:M().int().nonnegative()}).loose(),ome=F({kind:I([`file`,`folder`,`asset`]),fromPath:j().min(1),toPath:j().min(1),...A_,summary:j_}).loose(),sme=F({renamed:P(qpe),renamedAssets:P(Jpe),rewrittenDocs:P(ame).optional(),summary:q_.optional()}).loose(),cme=F({kind:I([`file`,`folder`,`asset`]),path:j().min(1),...A_}).loose(),lme=F({deletedDocNames:P(j().min(1))}).loose(),ume=F({kind:I([`file`,`folder`,`asset`]),path:j().min(1),...A_,summary:j_}).loose(),dme=F({deletedDocNames:P(j().min(1))}).loose(),fme=F({docName:j().min(1),commitSha:j().regex(/^[0-9a-f]{40}$/i,{message:`commitSha must be a 40-char git SHA`}),summary:j_,...A_}).loose(),pme=F({...B_,restoredFrom:j().min(1),timestamp:j().min(1),summary:q_.optional(),warnings:ov.optional()}).loose(),mme=/^#[0-9a-fA-F]{6}$/,hme=F(Object.fromEntries(Lp.map(e=>[e,j().regex(mme,`must be a #rrggbb hex color`)]))),f8=j().min(1).refine(Bp,{message:`must contain a non-whitespace character`}),p8=F({name:f8,author:f8.optional(),variant:I([`dark`,`light`]),palette:hme}).loose(),gme=F({name:j().min(1),scheme:p8,stem:j().min(1).optional(),extension:I([`.yaml`,`.yml`]).optional()}).loose(),_me=F({id:j().min(1),filename:j().min(1)}).loose(),vme=F({id:j().min(1),scheme:p8}).loose(),yme=F({id:j().min(1),filename:j().min(1)}).loose(),bme=Co(`existed`,[F({existed:L(!1)}).loose(),F({existed:L(!0),filename:j().min(1),scheme:p8}).loose()]),xme=F({themes:P(Co(`ok`,[F({ok:L(!0),id:j().min(1),filename:j().min(1),scheme:p8}),F({ok:L(!1),filename:j().min(1),id:j().min(1).optional(),code:j().min(1),conflictingFilenames:P(j().min(1)).min(2).optional()})])),truncated:N()}).loose();function m8(e){return e.replace(/\\/g,`/`).split(`/`).filter(e=>e!==``&&e!==`.`)}function h8(e){let t=m8(e).at(-1);return t!==void 0&&hp.some(e=>t.toLowerCase().endsWith(e))}const Sme=F({tags:P(F({name:j().min(1),count:M().int().nonnegative(),isLeaf:N()}).loose())}).loose(),Cme=F({docName:j().min(1),title:j(),matchingTags:P(j().min(1)),snippet:j().nullable()}).loose(),wme=F({name:j().min(1),docs:P(Cme)}).loose(),Tme=F({folder:po(),frontmatter_local:ko(j(),po()).nullable(),warnings:P(j()).optional().meta({description:"Non-fatal degradations of this response, one per entry; the field each affects is absent, null, or incomplete — the aligned `warningCodes` entry names which field and how."}),warningCodes:P(I([`symlink-refused`,`malformed-yaml`,`unverifiable`,`templates-symlink-refused`,`templates-unverifiable`])).optional().meta({description:"Machine-readable codes aligned 1:1 with `warnings`; switch on these, never on the English. `symlink-refused` / `malformed-yaml` / `unverifiable`: this folder's own `.ok/frontmatter.yml` (a symlink, malformed YAML, or an lstat failure) — `frontmatter_local` is null. `templates-symlink-refused` / `templates-unverifiable`: the `.ok/templates` directory on this folder, or a `.ok` or `.ok/templates` directory on an ancestor it inherits from — a symlink (wherever it points, dangling included), or a non-ENOTDIR `lstat` failure — `folder.templates_available` omits that directory's templates and may still list others. A non-directory `.ok` / `.ok/templates` (ENOTDIR) is treated as empty and yields no `templates-*` code. This folder's own symlinked `.ok` is a 400, never a warning."})}).loose(),Eme=F({path:j(),frontmatter:Yl(po()).optional()}).loose(),Dme=F({applied:po()}).loose(),g8=ko(j(),po()).meta({description:`Free-form frontmatter map embedded in template payloads.`}),Ome=F({template:F({name:j().min(1),folder:j(),scope:I([`local`,`inherited`]),path:j().min(1),frontmatter:g8,body:j()}).strict()}).strict(),kme=F({templates:P(F({name:j().min(1),title:j().optional(),description:j().optional(),path:j().min(1),source_folder:j()}).strict()),truncated:N()}).strict(),Ame=F({folder:j(),name:j(),body:D_.optional(),frontmatter:g8.optional(),...A_,summary:j_}).strict(),jme=F({...B_,path:j().min(1),created:N(),warnings:P(j())}).strict(),Mme=F({sourcePath:j().min(1),targetFolder:j(),name:j().optional(),title:j().optional(),deleteSource:N().optional(),...A_,summary:j_}).strict(),Nme=F({...B_,path:j().min(1),created:N(),warnings:P(j())}).strict(),Pme=F({existed:N(),path:j().min(1)}).strict(),Fme=F({fromFolder:j(),fromName:j(),toFolder:j(),toName:j(),body:D_.optional(),frontmatter:g8.optional(),...A_,summary:j_}).strict(),Ime=F({from:j().min(1),to:j().min(1),committed:N()}).strict(),_8=I(ug),Lme=/^[a-z0-9-]+$/,Rme=/<\/?[A-Za-z][^>]*>/;function zme(e){return Rme.test(e)}const Bme=/^(?:(?!\p{DI})[\p{L}\p{M}\p{N}_-])+$/u,Vme="letters and digits in any script, `_` or `-` only (no spaces, dots, slashes or invisible characters)";function v8(e){return e.normalize(`NFC`)}function Hme(e,t){let n=v8(t);return e.find(e=>e.name===t)??e.find(e=>v8(e.name)===n)}const y8=F({name:j(),description:j(),metadata:F({pack:j()}).strict().optional()}).strict(),Ume=F({skill:F({name:j().min(1),scope:_8,path:j().min(1),frontmatter:y8,body:j(),files:P(F({path:j().min(1),text:j().nullable()})).optional(),managed:N().optional()}).strict()}).strict(),Wme=F({source:j().min(1),publisher:j().optional(),skill:j().optional(),marketplaceUrl:j().optional(),importedAt:j().min(1),autoUpdate:N().optional()}).strict(),Gme=F({name:j().min(1),description:j().optional(),scope:_8,path:j().min(1),canonicalPath:j().min(1).optional(),filePaths:P(j()).optional(),absolutePath:j().min(1).optional(),installed:N(),hosts:P(j()),hostQualifier:j().optional().meta({description:"Set on a GLOBAL entry that shares its name with a distinct-content bundle in another host dir AND is not the by-name default: the host id whose root holds THIS bundle. Doc-name builders append it (`__skill__/global/<name>@<host>`) so each same-named bundle keeps its own tab and its own write-back path; the default bundle keeps the stable unqualified name."}),driftPaths:P(j()).optional().meta({description:`Recorded locations whose on-disk form (copy vs symlink) no longer matches what OK last wrote there — evidence another tool rewrote the path.`}),hostAliases:ko(j(),j()).optional().meta({description:`Host skills roots that are symlink ALIASES of another location (host id → base-relative target root). An aliased folder is a derived view — no menu row, never a write target; the host's icon rides the target root's row.`}),conflictHosts:P(j()).optional().meta({description:`Hosts whose dir holds a DIFFERENT same-name skill (fork/conflict) — occupied, not this skill.`}),symlinkedHosts:P(j()).optional(),installableEditors:P(j()).optional(),hubOffered:N().optional().meta({description:"Whether the vendor-neutral `.agents/skills` hub is a live destination at this scope on THIS machine — server-computed via the same predicate that filters the Folders surface, so the install menu and Settings cannot disagree. True when the project already uses the hub OR a host that reads it is installed (`HUB_READER_EDITORS`)."}),linkMode:N().optional(),customPlacements:P(F({path:j(),mode:I([`copy`,`link`])}).strict()).optional(),plugin:F({name:j().min(1),marketplace:j().min(1),provider:j().min(1),url:j().optional()}).strict().optional(),managed:N().optional(),origin:Wme.optional(),pack:j().optional(),modified:N().optional(),revertable:N().optional(),ignored:N().optional(),size:efe.optional()}).strict(),Kme=F({name:j().min(1),scope:_8,apply:N().optional()}).strict(),qme=F({line:j().min(1),gitignorePath:j().min(1),applied:N(),alreadyTracked:N().optional()}).strict(),Jme=F({skills:P(Gme),truncated:N()}).strict(),Yme=F({scope:_8.default(`project`),name:j().meta({description:`Managed skill name to create or update.`}),body:D_.optional(),frontmatter:y8,...A_,summary:j_}).strict(),b8=[`skill-name-vendor-word`,`skill-body-too-long`],x8=P(I(b8)).meta({description:"Machine-readable codes aligned 1:1 with `warnings` (`warnings[i]` is the display text for `warningCodes[i]`)."}),Xme=F({...B_,path:j().min(1),created:N(),warnings:P(j()),warningCodes:x8}).strict(),Zme=F({scope:_8.default(`project`),name:j(),dryRun:N().optional(),setAutoUpdate:N().optional(),...A_,summary:j_}).strict(),Qme=F({name:j().min(1),updated:N(),source:j().min(1),localBody:j().optional(),upstreamBody:j().optional(),gitTracked:N().optional(),warnings:P(j()),warningCodes:x8}).strict(),$me=F({scope:_8.default(`project`),name:j(),...A_,summary:j_}).strict(),ehe=F({name:j().min(1),baselineRef:j().min(1),restoredFiles:P(j()),warnings:P(j())}).strict(),S8=`This member also carries the one bookkeeping failure that does not undo the operation: the content change landed, but a state file this server keeps beside it refused to be rewritten because it could not be read, so the install or import records still describe the old state until an operator repairs that file. Absent when there is nothing to report; a server that predates this member omits it, so treat its absence as no warning rather than as an error.`,the=F({existed:N(),path:j().min(1),warnings:P(j()).optional().meta({description:`Present when this delete removed a directory a retention record ties to a recovery copy an earlier failed move kept, whose source was never verified unchanged — either because this server verified the deleted directory against the copy that record describes, or because it could not read the directory and so could not confirm either way. Each entry says which of the two it is; neither claims more than the check established. ${S8}`})}).strict(),nhe=F({scope:_8.default(`project`),fromName:j(),toName:j(),body:D_.optional(),frontmatter:y8.optional(),...A_,summary:j_}).strict(),rhe=F({from:j().min(1),to:j().min(1),committed:N(),warnings:P(j()).optional().meta({description:`Present when the rename itself completed but something beside it did not. ${S8}`})}).strict(),ihe=F({name:j(),toName:j().optional().meta({description:"Name for the skill at the destination scope; defaults to `name`. The SKILL.md `name` frontmatter is rewritten to match."}),fromScope:_8,toScope:_8,...A_,summary:j_}).strict(),C8=[`nothing-written`,`destination-removed`,`destination-stray`,`destination-retained`,`destination-retained-blocking`,`destination-unreadable`,`partially-applied`];function ahe(e){return typeof e==`string`&&C8.includes(e)}const w8=[`intact`,`lossy`,`unknown`];function T8(e){return typeof e==`string`&&w8.includes(e)}const E8=[`unreadable`,`occupant-unverifiable`];function ohe(e){return typeof e==`string`&&E8.includes(e)}const she={"nothing-written":!1,"destination-removed":!1,"destination-stray":!1,"destination-retained":!0,"destination-retained-blocking":!0,"destination-unreadable":!1,"partially-applied":!1};function che(e){return she[e]}function lhe(e){let t=typeof e==`object`&&e?e:{},n=t.moveState,r=t.sourceState,i=t.retentionLedger;if(n===void 0&&r===void 0&&i===void 0)return{kind:`coherent`};let a=ahe(n)?n:void 0,o=T8(r)?r:void 0,s=ohe(i)?i:void 0,c={...a===void 0?{}:{moveState:a},...o===void 0?{}:{sourceState:o},...s===void 0?{}:{retentionLedger:s}};return n!==void 0&&a===void 0||r!==void 0&&o===void 0||i!==void 0&&s===void 0||a===void 0?{kind:`unverified`,...c}:(che(a)?o!==void 0&&s===void 0:a===`nothing-written`?o===void 0:o===void 0&&s===void 0)?{kind:`coherent`,...c}:{kind:`unverified`,...c}}const D8=`The server reported warnings in a shape this build does not recognise; treat this result as unverified.`;function uhe(e){if(e===void 0)return[];let t=D8;if(!Array.isArray(e))return[t];let n=e.filter(e=>typeof e==`string`);return n.length===e.length?n:[...n,t]}const dhe=F({scope:_8,path:j().optional(),droppedLocations:P(j()).default([]).meta({description:"Locations the skill occupied at the source that were removed and not re-created at the destination: the `agents` hub and custom roots, which projection does not cover. Entries are install location ids, so they can be passed straight back as an install `add` list with `scope` set to the destination scope; custom roots resolve against that scope's base."}),warnings:P(j()).optional().meta({description:`Present when the move itself completed but something beside it did not. ${S8}`})}).strict().meta({description:"Scope-move result. Rename paths deliberately do not emit authoring warnings, consistent with same-scope rename and duplicate. Content-authoring and import responses carry those warnings and their codes. The Skills Studio client parses `droppedLocations` off the wire but deliberately does not render it yet; how a human is told what was removed is an open product decision."}),fhe=F({scope:_8,name:j(),toName:j(),...A_,summary:j_}).strict(),phe=F({name:j().min(1)}).strict(),mhe=F({name:j(),home:j().min(1)}).strict(),hhe=F({docName:j().min(1)}).strict(),O8=I([`reference`,`script`,`file`]),ghe=F({scope:_8.default(`project`),name:j(),path:j().min(1),content:j(),...A_,summary:j_}).strict().superRefine((e,t)=>{h8(e.path)&&E_(e.content,t,[`content`])}),_he=F({...B_,path:j().min(1),created:N(),kind:O8,content:N()}).strict(),vhe=F({scope:_8.default(`project`),name:j(),from:j().min(1),to:j().min(1),...A_,summary:j_}).strict(),yhe=F({from:j().min(1),to:j().min(1),fromDocName:j().optional(),toDocName:j().optional()}).strict(),bhe=F({path:j().min(1),kind:O8,text:j()}).strict(),xhe=F({path:j().min(1),existed:N(),kind:O8}).strict(),k8=xo([Qde,L(`agents`)]),A8=j().min(1).refine(e=>!e.startsWith(`/`)&&!e.startsWith(`~`)&&!/^[A-Za-z]:/.test(e),{error:`a custom root is base-relative (e.g. ".tim/skills"), not absolute or ~-prefixed`}).refine(e=>e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`),{error:`a custom root may not contain "..", "." or empty path segments`}).refine(e=>e.includes(`/`),{error:`a custom root is a path (e.g. ".tim/skills") — bare editor names are host ids`}),j8=xo([k8,A8]),She=F({scope:_8.default(`project`),name:j(),targets:P(k8).optional().meta({description:'SET-EXACT install targets (editor ids, plus "agents" for the .agents hub — in-place skills only): the COMPLETE resulting host set. Omit to use project-configured editors; pass [] to uninstall everywhere. Stateless callers should prefer `add`/`remove`.'}),add:P(j8).optional().meta({description:`Locations to ADD the skill to (everything else untouched). Editor ids fan out a managed copy/symlink; a custom root path (".tim/skills") places the bundle there.`}),remove:P(j8).optional().meta({description:"Locations to REMOVE the skill from (lossless only — a hand-edited fork is refused, never deleted). The source cannot be removed; move it first with `source`."}),mode:I([`copy`,`link`]).optional().meta({description:`"link": one real folder (the source); every other location becomes a symlink to it. "copy": independent real folders, refreshed from the source until hand-edited (a hand-edit forks that copy). Converts existing locations losslessly. Omit to follow the form the skill already uses.`}),source:j8.optional().meta({description:`Move the skill's REAL folder to this location (the old source becomes a symlink to it — never a removal). Sticky across rescans.`}),linkMode:N().optional(),setSource:j().min(1).optional(),place:F({dir:j().min(1).meta({description:`Project-relative directory the bundle dir is created under (e.g. ".windsurf/skills").`}),mode:I([`copy`,`link`])}).strict().optional(),convert:F({target:j8.meta({description:`The installed location to convert — an editor id, "agents", or a recorded custom placement path.`}),mode:I([`copy`,`link`]).meta({description:`"link": replace this location with a symlink to the source. "copy": replace it with an independent real folder.`})}).strict().optional(),unplace:F({path:j().min(1).meta({description:`The recorded placement bundle path (e.g. ".windsurf/skills/my-skill").`})}).strict().optional(),...A_,summary:j_,fork:F({editor:j().min(1),action:I([`align`,`make-source`,`rename`]),toName:j().optional()}).strict().optional()}).strict().refine(e=>e.targets===void 0||e.add===void 0&&e.remove===void 0,{error:"`targets` is set-exact; `add`/`remove` are additive — use one style per call"}).refine(e=>e.fork===void 0||e.targets===void 0&&e.add===void 0&&e.remove===void 0&&e.source===void 0&&e.setSource===void 0,{error:"`fork` is its own operation — run it in a separate call"}).refine(e=>e.fork?.action!==`rename`||e.fork.toName!==void 0,{error:"`fork.rename` requires `toName`"}).refine(e=>e.source===void 0||e.add===void 0&&e.remove===void 0,{error:"a `source` move is its own operation — run it in a separate call from `add`/`remove`"}).refine(e=>[e.targets!==void 0||e.add!==void 0||e.remove!==void 0,e.place!==void 0,e.unplace!==void 0,e.convert!==void 0,e.source!==void 0||e.setSource!==void 0,e.fork!==void 0].filter(Boolean).length<=1,{error:"one operation per call — membership (`targets`/`add`/`remove`), `place`, `unplace`, `convert`, `source`, and `fork` are mutually exclusive"}),M8=[`no-targets`,`scripts-present`,`name-conflict`,`no-description`,`skill-fork-name-unpatched`,`place-path-invalid`,`place-fork-refused`,`links-not-permitted`],Che=F({name:j().min(1).meta({description:`Managed skill name installed or uninstalled.`}),hosts:P(j()).meta({description:`Editor ids the skill is projected into after the operation; [] is expected after uninstall.`}),scripts:N().meta({description:`True when the skill ships executable scripts, projected but never run.`}),warnings:P(j()).meta({description:`Non-fatal install/uninstall warnings from target projection.`}),warningCodes:P(I(M8)).meta({description:"Machine-readable warning codes aligned with `warnings`."}),placedAt:j().optional(),sourceMovedTo:j().optional()}).strict(),whe=F({scope:_8.default(`project`),name:j().meta({description:`Managed skill name to uninstall without deleting source.`})}).strict(),The=F({name:j().min(1).meta({description:`Managed skill name requested for uninstall.`}),uninstalled:N().meta({description:`True when an install marker existed and was removed; false for an idempotent no-op.`})}).strict(),Ehe=F({targets:P(Q6),configured:N(),folders:P(F({scope:_8,host:j(),root:j(),state:I([`own`,`linked`,`linked-parent`,`absent`]),target:j().optional(),drift:L(!0).optional(),expected:j().optional()}).strict()).optional()}).strict(),N8=F({action:L(`link`),scope:_8,root:j().min(1).meta({description:`The folder to link (e.g. ".codex/skills").`}),target:j().min(1).meta({description:`The root it merges into (e.g. ".agents/skills"). Required.`})}),P8=F({action:L(`unlink`),scope:_8,root:j().min(1).meta({description:`The linked folder to materialize back.`}),exclude:P(j().min(1)).optional().meta({description:`Skill names to LEAVE OUT when materializing — the folder keeps every other skill it currently sees (as per-skill links) and stops auto-following the target root.`})}).strict(),F8=F({action:L(`add-root`),scope:_8,root:A8.meta({description:`New custom skills root to declare (base-relative, e.g. ".team/skills").`})}).strict(),Dhe=Co(`action`,[N8.extend({preview:N().optional().meta({description:`Return the merge plan only (moves, drops, removes, conflicts, strays) — nothing is written.`})}).strict(),P8,F8]),Ohe=Co(`action`,[N8.strict(),P8,F8]),khe=F({folderAction:Dhe}).strict(),Ahe=F({moves:P(j()),drops:P(j()),removes:P(j()),replaces:P(j()),conflicts:P(j()),strays:P(j())}).strict(),jhe=F({targets:P(Q6),reprojected:P(F({name:j(),hosts:P(j())}).strict()),bundleHosts:P(j()),removedFrom:P(j()),folder:F({moved:P(j()),dropped:P(j()),linked:P(j())}).strict().optional(),preview:Ahe.optional()}).strict(),Mhe=F({scope:_8.default(`project`),name:j(),version:j().regex(/^[0-9a-f]{40}$/i),...A_,summary:j_}).strict(),Nhe=F({name:j().min(1),version:j(),restoredFiles:P(j()),warnings:P(j())}).strict(),Phe=F({query:j().optional(),intent:I([`autocomplete`,`full_text`,`omnibar`]).optional(),ranking:I([`navigation`,`relevance`]).optional(),scopes:P(I([`page`,`folder`,`content`,`file`])).optional(),scope:j().optional(),limit:M().int().nonnegative().optional(),semantic:N().optional(),source:I([`omnibar`,`mcp`,`http`]).optional()}).loose(),Fhe=F({kind:I([`page`,`folder`,`content`,`file`]),path:j().min(1),title:j(),score:M(),signals:ko(j(),po()),snippet:j().optional()}).loose(),I8=I([`applied`,`no_match`,`warming`,`incapable`,`provider_error`,`restart_required`,`query_too_short`]),L8=I([`warm`,`corpus`,`query`,`dimensions`,`configured_dimensions`]);function Ihe(e){return e?.providerErrorReason===`dimensions`?`restart_required`:e?.providerErrorReason===`configured_dimensions`?`incapable`:e?.providerError||e?.providerErrorReason?`provider_error`:null}function Lhe(e){throw Error(`Unhandled SemanticProviderErrorReason variant: ${JSON.stringify(e)}`)}function Rhe(e,t){let n=e?.providerErrorReason;switch(n){case null:case void 0:return e?.providerError===!0;case`corpus`:return!1;case`query`:return t===`query`;case`warm`:case`dimensions`:case`configured_dimensions`:return!0;default:return Lhe(n)}}function zhe(e){throw Error(`Unhandled SemanticQueryOutcome variant: ${JSON.stringify(e)}`)}const R8=F({capable:N(),applied:N(),outcome:I8,providerErrorReason:L8.nullable().optional().catch(null),coverage:F({embedded:M().int().nonnegative(),total:M().int().nonnegative()})}).loose(),Bhe=F({enabled:N(),keyPresent:N(),keyNotRequired:N(),keySource:I([`project`,`file`,`env`]).nullable(),keyHint:j().nullable(),ready:N(),capable:N(),providerError:N().optional(),providerErrorReason:L8.nullable().optional().catch(null),embedded:M().int().nonnegative(),total:M().int().nonnegative()}).loose();function Vhe(e){return!!(e?.enabled&&(e.keyPresent||e.keyNotRequired))}const Hhe=F({query:j(),intent:I([`autocomplete`,`full_text`,`omnibar`]),results:P(Fhe),elapsedMs:M().nonnegative(),semantic:R8.optional(),truncated:N().optional(),ready:N().optional()}).loose(),Uhe=F({version:j().min(1),recordedAt:j().min(1)}).loose(),Whe=F({currentVersion:j().min(1),targets:ko(j(),Uhe.nullable())}).loose(),Ghe=F({scope:_8.default(`project`),source:j().min(1).meta({description:`External skill source: full skills.sh skill-page URL (https://www.skills.sh/<owner>/<repo>/<skill>, or https://www.skills.sh/site/<hostname>/<skill> for a website catalog), GitHub owner/repo[/subpath], git URL, or local/file path.`}),skill:j().min(1).optional().meta({description:`Specific skill name to import from a multi-skill source.`}),install:N().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection (the caller installs explicitly afterwards). Default true.`}),marketplace:N().optional().meta({description:"The source came from a skills.sh listing the user chose (the Explore tab), so the install is reported to skills.sh and counts toward that listing. Off by default: a hand-typed repo must not be announced to skills.sh. Honors the `telemetry.skillInstallReports.enabled` setting and DO_NOT_TRACK."}),...A_,summary:j_}).strict(),Khe=F({scope:_8.default(`project`),source:j().min(1).meta({description:`External skill source: full skills.sh skill-page URL, GitHub owner/repo[/subpath], git URL, or local/file path.`}),skills:P(j().min(1)).min(1).max(100).meta({description:`Skill names to import from the source.`}),install:N().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection. Default true.`}),marketplace:N().optional().meta({description:"The source came from a skills.sh listing the user chose (a marketplace plugin bundle), so the import is reported to skills.sh as one batched install event and counts toward that listing. Off by default: a hand-typed repo must not be announced to skills.sh. Honors the `telemetry.skillInstallReports.enabled` setting and DO_NOT_TRACK."}),...A_,summary:j_}).strict(),qhe=F({results:P(F({requested:j(),status:I([`imported`,`already-imported`,`not-found`,`failed`]),name:j().optional(),collisionRenamedFrom:j().optional(),warnings:P(j()),warningCodes:x8,error:j().optional()}).loose()),imported:M(),alreadyImported:M(),failed:M()}).loose(),Jhe=F({scope:_8.default(`project`),names:P(j().min(1)).min(1).max(100).meta({description:`Managed skill names to refresh from their recorded upstreams.`}),...A_,summary:j_}).strict(),Yhe=F({results:P(F({requested:j(),status:I([`updated`,`up-to-date`,`not-found`,`failed`]),source:j().optional(),warnings:P(j()),warningCodes:x8,error:j().optional()}).loose()),updated:M(),upToDate:M(),failed:M()}).loose(),Xhe=F({source:j(),ref:j().optional(),contentHash:j(),publisher:j().optional()}).loose(),Zhe=F({name:j().min(1).meta({description:`Managed skill name created or matched.`}),path:j().min(1).meta({description:`Store-relative path to the imported skill source.`}),created:N().meta({description:`True when this request created new source files.`}),alreadyImported:N().meta({description:`True when identical content was already present and no files changed.`}),collisionRenamedFrom:j().optional().meta({description:`Original source name when collision handling renamed the import.`}),provenance:Xhe,warnings:P(j()).meta({description:`Non-fatal import warnings, such as skipped unsupported files.`}),warningCodes:x8}).loose(),z8=`server-info`,B8=`branch-switched`,V8=`disk-ack`,H8=`config-validation-rejected`,U8=`config-ignore-nested-error`,Qhe=I([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`,`comments`,`lint-config`,`local-targets`]),$he=F({v:L(1),ch:L(z8),seq:M(),serverInstanceId:j().min(1),currentBranch:j().min(1).optional()}).loose(),ege=F({v:L(1),ch:L(B8),seq:M(),branch:j().min(1)}).loose(),tge=F({v:L(1),ch:Qhe,seq:M()}).loose(),nge=F({v:L(1),ch:L(V8),seq:M(),docName:j().min(1),sv:j().min(1)}).loose(),rge=F({v:L(1),ch:L(H8),seq:M(),docName:j().min(1),error:Gh}).loose(),ige=F({v:L(1),ch:L(U8),seq:M(),path:j().min(1),error:j().min(1)}).loose(),W8={arabic:`ar`,armenian:`am`,bulgarian:`bg`,czech:`cz`,danish:`dk`,dutch:`nl`,english:`en`,finnish:`fi`,french:`fr`,german:`de`,greek:`gr`,hungarian:`hu`,indian:`in`,indonesian:`id`,irish:`ie`,italian:`it`,lithuanian:`lt`,nepali:`np`,norwegian:`no`,portuguese:`pt`,romanian:`ro`,russian:`ru`,serbian:`rs`,slovenian:`ru`,spanish:`es`,swedish:`se`,tamil:`ta`,turkish:`tr`,ukrainian:`uk`,sanskrit:`sk`},age={dutch:/[^A-Za-zàèéìòóù0-9_'-]+/gim,english:/[^A-Za-zàèéìòóù0-9_'-]+/gim,french:/[^a-z0-9äâàéèëêïîöôùüûœç-]+/gim,italian:/[^A-Za-zàèéìòóù0-9_'-]+/gim,norwegian:/[^a-z0-9_æøåÆØÅäÄöÖüÜ]+/gim,portuguese:/[^a-z0-9à-úÀ-Ú]/gim,russian:/[^a-z0-9а-яА-ЯёЁ]+/gim,spanish:/[^a-z0-9A-Zá-úÁ-ÚñÑüÜ]+/gim,swedish:/[^a-z0-9_åÅäÄöÖüÜ-]+/gim,german:/[^a-z0-9A-ZäöüÄÖÜß]+/gim,finnish:/[^a-z0-9äöÄÖ]+/gim,danish:/[^a-z0-9æøåÆØÅ]+/gim,hungarian:/[^a-z0-9áéíóöőúüűÁÉÍÓÖŐÚÜŰ]+/gim,romanian:/[^a-z0-9ăâîșțĂÂÎȘȚ]+/gim,serbian:/[^a-z0-9čćžšđČĆŽŠĐ]+/gim,turkish:/[^a-z0-9çÇğĞıİöÖşŞüÜ]+/gim,lithuanian:/[^a-z0-9ąčęėįšųūžĄČĘĖĮŠŲŪŽ]+/gim,arabic:/[^a-z0-9أ-ي]+/gim,nepali:/[^a-z0-9अ-ह]+/gim,irish:/[^a-z0-9áéíóúÁÉÍÓÚ]+/gim,indian:/[^a-z0-9अ-ह]+/gim,armenian:/[^a-z0-9ա-ֆ]+/gim,greek:/[^a-z0-9α-ωά-ώ]+/gim,indonesian:/[^a-z0-9]+/gim,ukrainian:/[^a-z0-9а-яА-ЯіїєІЇЄ]+/gim,slovenian:/[^a-z0-9螚ȎŠ]+/gim,bulgarian:/[^a-z0-9а-яА-Я]+/gim,tamil:/[^a-z0-9அ-ஹ]+/gim,sanskrit:/[^a-z0-9A-Zāīūṛḷṃṁḥśṣṭḍṇṅñḻḹṝ]+/gim,czech:/[^A-Z0-9a-zěščřžýáíéúůóťďĚŠČŘŽÝÁÍÉÓÚŮŤĎ-]+/gim},G8=Object.keys(W8);function oge(e){return e!==void 0&&G8.includes(e)?W8[e]:void 0}const sge=Date.now().toString().slice(5);let cge=0;const K8=BigInt(1e3),q8=BigInt(1e6),J8=BigInt(1e9),Y8=65535;function X8(e,t){if(t.length<65535)Array.prototype.push.apply(e,t);else{let n=t.length;for(let r=0;r<n;r+=Y8)Array.prototype.push.apply(e,t.slice(r,r+Y8))}}function lge(e,...t){return e.replace(/%(?:(?<position>\d+)\$)?(?<width>-?\d*\.?\d*)(?<type>[dfs])/g,function(...e){let{width:n,type:r,position:i}=e[e.length-1],a=i?t[Number.parseInt(i)-1]:t.shift(),o=n===``?0:Number.parseInt(n);switch(r){case`d`:return a.toString().padStart(o,`0`);case`f`:{let e=a,[t,r]=n.split(`.`).map(e=>Number.parseFloat(e));return typeof r==`number`&&r>=0&&(e=e.toFixed(r)),typeof t==`number`&&t>=0?e.toString().padStart(o,`0`):e.toString()}case`s`:return o<0?a.toString().padEnd(-o,` `):a.toString().padStart(o,` `);default:return a}})}function uge(){return typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope}function dge(){return typeof process<`u`&&process.release&&process.release.name===`node`}function Z8(){return BigInt(Math.floor(performance.now()*1e6))}function Q8(e){return typeof e==`number`&&(e=BigInt(e)),e<K8?`${e}ns`:e<q8?`${e/K8}μs`:e<J8?`${e/q8}ms`:`${e/J8}s`}function $8(){return uge()?Z8():dge()||typeof process<`u`&&typeof process?.hrtime?.bigint==`function`?process.hrtime.bigint():typeof performance<`u`?Z8():BigInt(0)}function e5(){return`${sge}-${cge++}`}function t5(e,t){return Object.hasOwn===void 0?Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0:Object.hasOwn(e,t)?e[t]:void 0}function n5(e,t){return t[1]===e[1]?e[0]-t[0]:t[1]-e[1]}function fge(e){if(e.length===0)return[];if(e.length===1)return e[0];for(let t=1;t<e.length;t++)if(e[t].length<e[0].length){let n=e[0];e[0]=e[t],e[t]=n}let t=new Map;for(let n of e[0])t.set(n,1);for(let n=1;n<e.length;n++){let r=0;for(let i of e[n]){let e=t.get(i);e===n&&(t.set(i,e+1),r++)}if(r===0)return[]}return e[0].filter(n=>{let r=t.get(n);return r!==void 0&&t.set(n,0),r===e.length})}function r5(e,t){let n={},r=t.length;for(let i=0;i<r;i++){let r=t[i],a=r.split(`.`),o=e,s=a.length;for(let e=0;e<s;e++)if(o=o[a[e]],typeof o==`object`){if(o!==null&&`lat`in o&&`lon`in o&&typeof o.lat==`number`&&typeof o.lon==`number`){o=n[r]=o;break}if(!Array.isArray(o)&&o!==null&&e===s-1){o=void 0;break}}else if((typeof o!=`object`||!o)&&e<s-1){o=void 0;break}o!==void 0&&(n[r]=o)}return n}function i5(e,t){return r5(e,[t])[t]}const pge={cm:.01,m:1,km:1e3,ft:.3048,yd:.9144,mi:1609.344};function a5(e,t){let n=pge[t];if(n===void 0)throw Error(f5(`INVALID_DISTANCE_SUFFIX`,e).message);return e*n}function o5(e,t){e.hits=e.hits.map(e=>({...e,document:{...e.document,...t.reduce((e,t)=>{let n=t.split(`.`),r=n.pop(),i=e;for(let e of n)i[e]=i[e]??{},i=i[e];return i[r]=null,e},e.document)}}))}function s5(e){return Array.isArray(e)?e.some(e=>s5(e)):e?.constructor?.name===`AsyncFunction`}const c5=`intersection`in new Set;function l5(...e){if(e.length===0)return new Set;if(e.length===1)return e[0];if(e.length===2){let t=e[0],n=e[1];if(c5)return t.intersection(n);let r=new Set,i=t.size<n.size?t:n,a=i===t?n:t;for(let e of i)a.has(e)&&r.add(e);return r}let t={index:0,size:e[0].size};for(let n=1;n<e.length;n++)e[n].size<t.size&&(t.index=n,t.size=e[n].size);if(c5){let n=e[t.index];for(let r=0;r<e.length;r++)r!==t.index&&(n=n.intersection(e[r]));return n}let n=e[t.index];for(let r=0;r<e.length;r++){if(r===t.index)continue;let i=e[r];for(let e of n)i.has(e)||n.delete(e)}return n}const mge=`union`in new Set;function u5(e,t){return mge?e?e.union(t):t:e?new Set([...e,...t]):new Set(t)}function hge(e,t){let n=new Set;for(let r of e)t.has(r)||n.add(r);return n}function d5(e){if(typeof SharedArrayBuffer<`u`&&typeof Atomics<`u`){let t=new Int32Array(new SharedArrayBuffer(4));if(!(e>0&&e<1/0))throw typeof e!=`number`&&typeof e!=`bigint`?TypeError(`sleep: ms must be a number`):RangeError(`sleep: ms must be a number that is greater than 0 but less than Infinity`);Atomics.wait(t,0,0,Number(e))}else{if(!(e>0&&e<1/0))throw typeof e!=`number`&&typeof e!=`bigint`?TypeError(`sleep: ms must be a number`):RangeError(`sleep: ms must be a number that is greater than 0 but less than Infinity`);let t=Date.now()+Number(e);for(;t>Date.now(););}}const gge={NO_LANGUAGE_WITH_CUSTOM_TOKENIZER:`Do not pass the language option to create when using a custom tokenizer.`,LANGUAGE_NOT_SUPPORTED:`Language "%s" is not supported.\nSupported languages are:\n - ${G8.join(`
|
|
389
389
|
- `)}`,INVALID_STEMMER_FUNCTION_TYPE:`config.stemmer property must be a function.`,MISSING_STEMMER:`As of version 1.0.0 @orama/orama does not ship non English stemmers by default. To solve this, please explicitly import and specify the "%s" stemmer from the package @orama/stemmers. See https://docs.orama.com/docs/orama-js/text-analysis/stemming for more information.`,CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY:`Custom stop words array must only contain strings.`,UNSUPPORTED_COMPONENT:`Unsupported component "%s".`,COMPONENT_MUST_BE_FUNCTION:`The component "%s" must be a function.`,COMPONENT_MUST_BE_FUNCTION_OR_ARRAY_FUNCTIONS:`The component "%s" must be a function or an array of functions.`,INVALID_SCHEMA_TYPE:`Unsupported schema type "%s" at "%s". Expected "string", "boolean" or "number" or array of them.`,DOCUMENT_ID_MUST_BE_STRING:`Document id must be of type "string". Got "%s" instead.`,DOCUMENT_ALREADY_EXISTS:`A document with id "%s" already exists.`,DOCUMENT_DOES_NOT_EXIST:`A document with id "%s" does not exists.`,MISSING_DOCUMENT_PROPERTY:`Missing searchable property "%s".`,INVALID_DOCUMENT_PROPERTY:`Invalid document property "%s": expected "%s", got "%s"`,UNKNOWN_INDEX:`Invalid property name "%s". Expected a wildcard string ("*") or array containing one of the following properties: %s`,INVALID_BOOST_VALUE:`Boost value must be a number greater than, or less than 0.`,INVALID_FILTER_OPERATION:`You can only use one operation per filter, you requested %d.`,SCHEMA_VALIDATION_FAILURE:`Cannot insert document due schema validation failure on "%s" property.`,INVALID_SORT_SCHEMA_TYPE:`Unsupported sort schema type "%s" at "%s". Expected "string" or "number".`,CANNOT_SORT_BY_ARRAY:`Cannot configure sort for "%s" because it is an array (%s).`,UNABLE_TO_SORT_ON_UNKNOWN_FIELD:`Unable to sort on unknown field "%s". Allowed fields: %s`,SORT_DISABLED:`Sort is disabled. Please read the documentation at https://docs.orama.com/docs/orama-js for more information.`,UNKNOWN_GROUP_BY_PROPERTY:`Unknown groupBy property "%s".`,INVALID_GROUP_BY_PROPERTY:`Invalid groupBy property "%s". Allowed types: "%s", but given "%s".`,UNKNOWN_FILTER_PROPERTY:`Unknown filter property "%s".`,UNKNOWN_VECTOR_PROPERTY:`Unknown vector property "%s". Make sure the property exists in the schema and is configured as a vector.`,INVALID_VECTOR_SIZE:`Vector size must be a number greater than 0. Got "%s" instead.`,INVALID_VECTOR_VALUE:`Vector value must be a number greater than 0. Got "%s" instead.`,INVALID_INPUT_VECTOR:`Property "%s" was declared as a %s-dimensional vector, but got a %s-dimensional vector instead.
|
|
390
390
|
Input vectors must be of the size declared in the schema, as calculating similarity between vectors of different sizes can lead to unexpected results.`,WRONG_SEARCH_PROPERTY_TYPE:`Property "%s" is not searchable. Only "string" properties are searchable.`,FACET_NOT_SUPPORTED:`Facet doens't support the type "%s".`,INVALID_DISTANCE_SUFFIX:`Invalid distance suffix "%s". Valid suffixes are: cm, m, km, mi, yd, ft.`,INVALID_SEARCH_MODE:`Invalid search mode "%s". Valid modes are: "fulltext", "vector", "hybrid".`,MISSING_VECTOR_AND_SECURE_PROXY:`No vector was provided and no secure proxy was configured. Please provide a vector or configure an Orama Secure Proxy to perform hybrid search.`,MISSING_TERM:`"term" is a required parameter when performing hybrid search. Please provide a search term.`,INVALID_VECTOR_INPUT:`Invalid "vector" property. Expected an object with "value" and "property" properties, but got "%s" instead.`,PLUGIN_CRASHED:`A plugin crashed during initialization. Please check the error message for more information:`,PLUGIN_SECURE_PROXY_NOT_FOUND:`Could not find '@orama/secure-proxy-plugin' installed in your Orama instance.
|
|
391
391
|
Please install it before proceeding with creating an answer session.
|
|
@@ -393,8 +393,8 @@ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#pl
|
|
|
393
393
|
`,PLUGIN_SECURE_PROXY_MISSING_CHAT_MODEL:`Could not find a chat model defined in the secure proxy plugin configuration.
|
|
394
394
|
Please provide a chat model before proceeding with creating an answer session.
|
|
395
395
|
Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#plugin-secure-proxy
|
|
396
|
-
`,ANSWER_SESSION_LAST_MESSAGE_IS_NOT_ASSISTANT:`The last message in the session is not an assistant message. Cannot regenerate non-assistant messages.`,PLUGIN_COMPONENT_CONFLICT:`The component "%s" is already defined. The plugin "%s" is trying to redefine it.`};function f5(e,...t){let n=Error(sge(mge[e]??`Unsupported Orama Error code: ${e}`,...t));return n.code=e,`captureStackTrace`in Error.prototype&&Error.captureStackTrace(n),n}function hge(e){return{raw:Number(e),formatted:Q8(e)}}function gge(e){if(e.id){if(typeof e.id!=`string`)throw f5(`DOCUMENT_ID_MUST_BE_STRING`,typeof e.id);return e.id}return e5()}function p5(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];if(t!==void 0&&(r!==`geopoint`||typeof t!=`object`||typeof t.lon!=`number`||typeof t.lat!=`number`)&&(r!==`enum`||typeof t!=`string`&&typeof t!=`number`)){if(r===`enum[]`&&Array.isArray(t)){let e=t.length;for(let r=0;r<e;r++)if(typeof t[r]!=`string`&&typeof t[r]!=`number`)return n+`.`+r;continue}if(m5(r)){let e=_5(r);if(!Array.isArray(t)||t.length!==e)throw f5(`INVALID_INPUT_VECTOR`,n,e,t.length);continue}if(h5(r)){if(!Array.isArray(t))return n;let e=g5(r),i=t.length;for(let r=0;r<i;r++)if(typeof t[r]!==e)return n+`.`+r;continue}if(typeof r==`object`){if(!t||typeof t!=`object`)return n;let e=p5(t,r);if(e)return n+`.`+e;continue}if(typeof t!==r)return n}}}const _ge={string:!1,number:!1,boolean:!1,enum:!1,geopoint:!1,"string[]":!0,"number[]":!0,"boolean[]":!0,"enum[]":!0},vge={"string[]":`string`,"number[]":`number`,"boolean[]":`boolean`,"enum[]":`enum`};function yge(e){return e===`geopoint`}function m5(e){return typeof e==`string`&&/^vector\[\d+\]$/.test(e)}function h5(e){return typeof e==`string`&&_ge[e]}function g5(e){return vge[e]}function _5(e){let t=Number(e.slice(7,-1));switch(!0){case isNaN(t):throw f5(`INVALID_VECTOR_VALUE`,e);case t<=0:throw f5(`INVALID_VECTOR_SIZE`,e);default:return t}}function bge(){return{idToInternalId:new Map,internalIdToId:[],save:xge,load:Sge}}function xge(e){return{internalIdToId:e.internalIdToId}}function Sge(e,t){let{internalIdToId:n}=t;e.internalDocumentIDStore.idToInternalId.clear(),e.internalDocumentIDStore.internalIdToId=[];let r=n.length;for(let t=0;t<r;t++){let r=n[t];e.internalDocumentIDStore.idToInternalId.set(r,t+1),e.internalDocumentIDStore.internalIdToId.push(r)}}function v5(e,t){if(typeof t==`string`){let n=e.idToInternalId.get(t);if(n)return n;let r=e.idToInternalId.size+1;return e.idToInternalId.set(t,r),e.internalIdToId.push(t),r}return t>e.internalIdToId.length?v5(e,t.toString()):t}function y5(e,t){if(e.internalIdToId.length<t)throw Error(`Invalid internalId ${t}`);return e.internalIdToId[t-1]}function Cge(e,t){return{sharedInternalDocumentStore:t,docs:{},count:0}}function wge(e,t){let n=v5(e.sharedInternalDocumentStore,t);return e.docs[n]}function Tge(e,t){let n=t.length,r=Array.from({length:n});for(let i=0;i<n;i++){let n=v5(e.sharedInternalDocumentStore,t[i]);r[i]=e.docs[n]}return r}function Ege(e){return e.docs}function Dge(e,t,n,r){return e.docs[n]===void 0&&(e.docs[n]=r,e.count++,!0)}function Oge(e,t){let n=v5(e.sharedInternalDocumentStore,t);return e.docs[n]!==void 0&&(delete e.docs[n],e.count--,!0)}function kge(e){return e.count}function Age(e,t){let n=t;return{docs:n.docs,count:n.count,sharedInternalDocumentStore:e}}function jge(e){return{docs:e.docs,count:e.count}}function Mge(){return{create:Cge,get:wge,getMultiple:Tge,getAll:Ege,store:Dge,remove:Oge,count:kge,load:Age,save:jge}}const Nge=[`beforeInsert`,`afterInsert`,`beforeRemove`,`afterRemove`,`beforeUpdate`,`afterUpdate`,`beforeUpsert`,`afterUpsert`,`beforeSearch`,`afterSearch`,`beforeInsertMultiple`,`afterInsertMultiple`,`beforeRemoveMultiple`,`afterRemoveMultiple`,`beforeUpdateMultiple`,`afterUpdateMultiple`,`beforeUpsertMultiple`,`afterUpsertMultiple`,`beforeLoad`,`afterLoad`,`afterCreate`];function Pge(e,t){let n=[],r=e.plugins?.length;if(!r)return n;for(let i=0;i<r;i++)try{let r=e.plugins[i];typeof r[t]==`function`&&n.push(r[t])}catch(e){throw console.error(`Caught error in getAllPluginsByHook:`,e),f5(`PLUGIN_CRASHED`)}return n}const Fge=[`tokenizer`,`index`,`documentsStore`,`sorter`,`pinning`],b5=[`validateSchema`,`getDocumentIndexId`,`getDocumentProperties`,`formatElapsedTime`];function x5(e,t,n,r){if(e.some(s5))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function S5(e,t,n){if(e.some(s5))return(async()=>{for(let r of e)await r(t,n)})();for(let r of e)r(t,n)}function C5(e,t,n,r,i){if(e.some(s5))return(async()=>{for(let a of e)await a(t,n,r,i)})();for(let a of e)a(t,n,r,i)}function w5(e,t,n,r){if(e.some(s5))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function Ige(e,t){if(e.some(s5))return(async()=>{for(let n of e)await n(t)})();for(let n of e)n(t)}var T5=class e{k;v;l=null;r=null;h=1;constructor(e,t){this.k=e,this.v=new Set(t)}updateHeight(){this.h=Math.max(e.getHeight(this.l),e.getHeight(this.r))+1}static getHeight(e){return e?e.h:0}getBalanceFactor(){return e.getHeight(this.l)-e.getHeight(this.r)}rotateLeft(){let e=this.r;return this.r=e.l,e.l=this,this.updateHeight(),e.updateHeight(),e}rotateRight(){let e=this.l;return this.l=e.r,e.r=this,this.updateHeight(),e.updateHeight(),e}toJSON(){return{k:this.k,v:Array.from(this.v),l:this.l?this.l.toJSON():null,r:this.r?this.r.toJSON():null,h:this.h}}static fromJSON(t){let n=new e(t.k,t.v);return n.l=t.l?e.fromJSON(t.l):null,n.r=t.r?e.fromJSON(t.r):null,n.h=t.h,n}},E5=class e{root=null;insertCount=0;constructor(e,t){e!==void 0&&t!==void 0&&(this.root=new T5(e,t))}insert(e,t,n=1e3){this.root=this.insertNode(this.root,e,t,n)}insertMultiple(e,t,n=1e3){for(let r of t)this.insert(e,r,n)}rebalance(){this.root&&=this.rebalanceNode(this.root)}toJSON(){return{root:this.root?this.root.toJSON():null,insertCount:this.insertCount}}static fromJSON(t){let n=new e;return n.root=t.root?T5.fromJSON(t.root):null,n.insertCount=t.insertCount||0,n}insertNode(e,t,n,r){if(e===null)return new T5(t,[n]);let i=[],a=e,o=null;for(;a!==null;)if(i.push({parent:o,node:a}),t<a.k){if(a.l===null){a.l=new T5(t,[n]),i.push({parent:a,node:a.l});break}o=a,a=a.l}else if(t>a.k){if(a.r===null){a.r=new T5(t,[n]),i.push({parent:a,node:a.r});break}o=a,a=a.r}else return a.v.add(n),e;let s=!1;this.insertCount++%r===0&&(s=!0);for(let t=i.length-1;t>=0;t--){let{parent:n,node:r}=i[t];if(r.updateHeight(),s){let t=this.rebalanceNode(r);n?n.l===r?n.l=t:n.r===r&&(n.r=t):e=t}}return e}rebalanceNode(e){let t=e.getBalanceFactor();if(t>1){if(e.l&&e.l.getBalanceFactor()>=0)return e.rotateRight();if(e.l)return e.l=e.l.rotateLeft(),e.rotateRight()}if(t<-1){if(e.r&&e.r.getBalanceFactor()<=0)return e.rotateLeft();if(e.r)return e.r=e.r.rotateRight(),e.rotateLeft()}return e}find(e){let t=this.findNodeByKey(e);return t?t.v:null}contains(e){return this.find(e)!==null}getSize(){let e=0,t=[],n=this.root;for(;n||t.length>0;){for(;n;)t.push(n),n=n.l;n=t.pop(),e++,n=n.r}return e}isBalanced(){if(!this.root)return!0;let e=[this.root];for(;e.length>0;){let t=e.pop(),n=t.getBalanceFactor();if(Math.abs(n)>1)return!1;t.l&&e.push(t.l),t.r&&e.push(t.r)}return!0}remove(e){this.root=this.removeNode(this.root,e)}removeDocument(e,t){let n=this.findNodeByKey(e);n&&(n.v.size===1?this.root=this.removeNode(this.root,e):n.v=new Set([...n.v.values()].filter(e=>e!==t)))}findNodeByKey(e){let t=this.root;for(;t;)if(e<t.k)t=t.l;else if(e>t.k)t=t.r;else return t;return null}removeNode(e,t){if(e===null)return null;let n=[],r=e;for(;r!==null&&r.k!==t;)n.push(r),r=t<r.k?r.l:r.r;if(r===null)return e;if(r.l===null||r.r===null){let t=r.l?r.l:r.r;if(n.length===0)e=t;else{let e=n[n.length-1];e.l===r?e.l=t:e.r=t}}else{let e=r,t=r.r;for(;t.l!==null;)e=t,t=t.l;r.k=t.k,r.v=t.v,e.l===t?e.l=t.r:e.r=t.r,r=e}n.push(r);for(let t=n.length-1;t>=0;t--){let r=n[t];r.updateHeight();let i=this.rebalanceNode(r);if(t>0){let e=n[t-1];e.l===r?e.l=i:e.r===r&&(e.r=i)}else e=i}return e}rangeSearch(e,t){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),i.k>=e&&i.k<=t)for(let e of i.v)n.add(e);if(i.k>t)break;i=i.r}return n}greaterThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.r;if(i=r.pop(),t&&i.k>=e||!t&&i.k>e)for(let e of i.v)n.add(e);else if(i.k<=e)break;i=i.l}return n}lessThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),t&&i.k<=e||!t&&i.k<e)for(let e of i.v)n.add(e);else if(i.k>e)break;i=i.r}return n}},D5=class e{numberToDocumentId;constructor(){this.numberToDocumentId=new Map}insert(e,t){this.numberToDocumentId.has(e)?this.numberToDocumentId.get(e).add(t):this.numberToDocumentId.set(e,new Set([t]))}find(e){let t=this.numberToDocumentId.get(e);return t?Array.from(t):null}remove(e){this.numberToDocumentId.delete(e)}removeDocument(e,t){let n=this.numberToDocumentId.get(t);n&&(n.delete(e),n.size===0&&this.numberToDocumentId.delete(t))}contains(e){return this.numberToDocumentId.has(e)}getSize(){let e=0;for(let t of this.numberToDocumentId.values())e+=t.size;return e}filter(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`eq`:{let t=e[n],r=this.numberToDocumentId.get(t);return r?Array.from(r):[]}case`in`:{let t=e[n],r=new Set;for(let e of t){let t=this.numberToDocumentId.get(e);if(t)for(let e of t)r.add(e)}return Array.from(r)}case`nin`:{let t=new Set(e[n]),r=new Set;for(let[e,n]of this.numberToDocumentId.entries())if(!t.has(e))for(let e of n)r.add(e);return Array.from(r)}default:throw Error(`Invalid operation`)}}filterArr(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`containsAll`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e].filter(e=>t.has(e))));return Array.from(r)}case`containsAny`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e,...t]));return Array.from(r)}default:throw Error(`Invalid operation`)}}static fromJSON(t){if(!t.numberToDocumentId)throw Error(`Invalid Flat Tree JSON`);let n=new e;for(let[e,r]of t.numberToDocumentId)n.numberToDocumentId.set(e,new Set(r));return n}toJSON(){return{numberToDocumentId:Array.from(this.numberToDocumentId.entries()).map(([e,t])=>[e,Array.from(t)])}}};function Lge(e,t,n){if(n<0)return-1;if(e===t)return 0;let r=e.length,i=t.length;if(r===0)return i<=n?i:-1;if(i===0)return r<=n?r:-1;let a=Math.abs(r-i);if(e.startsWith(t))return a<=n?a:-1;if(t.startsWith(e))return 0;if(a>n)return-1;let o=[];for(let e=0;e<=r;e++){o[e]=[e];for(let t=1;t<=i;t++)o[e][t]=e===0?t:0}for(let a=1;a<=r;a++){let r=1/0;for(let n=1;n<=i;n++)e[a-1]===t[n-1]?o[a][n]=o[a-1][n-1]:o[a][n]=Math.min(o[a-1][n]+1,o[a][n-1]+1,o[a-1][n-1]+1),r=Math.min(r,o[a][n]);if(r>n)return-1}return o[r][i]<=n?o[r][i]:-1}function O5(e,t,n){let r=Lge(e,t,n);return{distance:r,isBounded:r>=0}}var k5=class e{k;s;c=new Map;d=new Set;e;w=``;constructor(e,t,n){this.k=e,this.s=t,this.e=n}updateParent(e){this.w=e.w+this.s}addDocument(e){this.d.add(e)}removeDocument(e){return this.d.delete(e)}findAllWords(e,t,n,r){let i=[this];for(;i.length>0;){let a=i.pop();if(a.e){let{w:i,d:o}=a;if(n&&i!==t)continue;if(t5(e,i)!==null){if(r){if(Math.abs(t.length-i.length)<=r&&O5(t,i,r).isBounded)e[i]=[];else continue}else e[i]=[]}if(t5(e,i)!=null&&o.size>0){let t=e[i];for(let e of o)t.includes(e)||t.push(e)}}a.c.size>0&&i.push(...a.c.values())}return e}insert(t,n){let r=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=r.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c){if(r=s,i+=l,i===a){s.e||=!0,s.addDocument(n);return}continue}let u=o.slice(0,l),d=o.slice(l),f=t.slice(i+l),p=new e(u[0],u,!1);if(r.c.set(u[0],p),p.updateParent(r),s.s=d,s.k=d[0],p.c.set(d[0],s),s.updateParent(p),f){let t=new e(f[0],f,!0);t.addDocument(n),p.c.set(f[0],t),t.updateParent(p)}else p.e=!0,p.addDocument(n);return}{let a=new e(o,t.slice(i),!0);a.addDocument(n),r.c.set(o,a),a.updateParent(r);return}}r.e||(r.e=!0),r.addDocument(n)}_findLevenshtein(e,t,n,r,i){let a=[{node:this,index:t,tolerance:n}];for(;a.length>0;){let{node:t,index:n,tolerance:o}=a.pop();if(t.w.startsWith(e)){t.findAllWords(i,e,!1,0);continue}if(o<0)continue;if(t.e){let{w:n,d:a}=t;if(n&&(O5(e,n,r).isBounded&&(i[n]=[]),t5(i,n)!==void 0&&a.size>0)){let e=new Set(i[n]);for(let t of a)e.add(t);i[n]=Array.from(e)}}if(n>=e.length)continue;let s=e[n];if(t.c.has(s)){let e=t.c.get(s);a.push({node:e,index:n+1,tolerance:o})}a.push({node:t,index:n+1,tolerance:o-1});for(let[e,r]of t.c)a.push({node:r,index:n,tolerance:o-1}),e!==s&&a.push({node:r,index:n+1,tolerance:o-1})}}find(e){let{term:t,exact:n,tolerance:r}=e;if(r&&!n){let e={};return this._findLevenshtein(t,0,r,r,e),e}{let e=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=e.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c)e=s,i+=l;else if(i+l===a){if(l===a-i){if(n)return{};{let e={};return s.findAllWords(e,t,n,r),e}}return{}}else return{}}else return{}}let o={};return e.findAllWords(o,t,n,r),o}}contains(e){let t=this,n=0,r=e.length;for(;n<r;){let i=e[n],a=t.c.get(i);if(a){let i=a.s,o=i.length,s=0;for(;s<o&&n+s<r&&i[s]===e[n+s];)s++;if(s<o)return!1;n+=o,t=a}else return!1}return!0}removeWord(e){if(!e)return!1;let t=this,n=e.length,r=[];for(let i=0;i<n;i++){let n=e[i];if(t.c.has(n)){let e=t.c.get(n);r.push({parent:t,character:n}),i+=e.s.length-1,t=e}else return!1}for(t.d.clear(),t.e=!1;r.length>0&&t.c.size===0&&!t.e&&t.d.size===0;){let{parent:e,character:n}=r.pop();e.c.delete(n),t=e}return!0}removeDocumentByWord(e,t,n=!0){if(!e)return!0;let r=this,i=e.length;for(let a=0;a<i;a++){let i=e[a];if(r.c.has(i)){let o=r.c.get(i);a+=o.s.length-1,r=o,n&&r.w!==e||r.removeDocument(t)}else return!1}return!0}static getCommonPrefix(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e.charCodeAt(r)===t.charCodeAt(r);)r++;return e.slice(0,r)}toJSON(){return{w:this.w,s:this.s,e:this.e,k:this.k,d:Array.from(this.d),c:Array.from(this.c?.entries())?.map(([e,t])=>[e,t.toJSON()])}}static fromJSON(t){let n=new e(t.k,t.s,t.e);return n.w=t.w,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([t,n])=>[t,e.fromJSON(n)])||[]),n}},A5=class e extends k5{constructor(){super(``,``,!1)}static fromJSON(t){let n=new e;return n.w=t.w,n.s=t.s,n.e=t.e,n.k=t.k,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([e,t])=>[e,k5.fromJSON(t)])||[]),n}toJSON(){return super.toJSON()}},j5=class e{point;docIDs;left;right;parent;constructor(e,t){this.point=e,this.docIDs=new Set(t),this.left=null,this.right=null,this.parent=null}toJSON(){return{point:this.point,docIDs:Array.from(this.docIDs),left:this.left?this.left.toJSON():null,right:this.right?this.right.toJSON():null}}static fromJSON(t,n=null){let r=new e(t.point,t.docIDs);return r.parent=n,t.left&&(r.left=e.fromJSON(t.left,r)),t.right&&(r.right=e.fromJSON(t.right,r)),r}},M5=class e{root;nodeMap;constructor(){this.root=null,this.nodeMap=new Map}getPointKey(e){return`${e.lon},${e.lat}`}insert(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);if(r){t.forEach(e=>r.docIDs.add(e));return}let i=new j5(e,t);if(this.nodeMap.set(n,i),this.root==null){this.root=i;return}let a=this.root,o=0;for(;;){if(o%2==0){if(e.lon<a.point.lon){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}}else if(e.lat<a.point.lat){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}o++}}contains(e){let t=this.getPointKey(e);return this.nodeMap.has(t)}getDocIDsByCoordinates(e){let t=this.getPointKey(e),n=this.nodeMap.get(t);return n?Array.from(n.docIDs):null}removeDocByID(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);r&&(r.docIDs.delete(t),r.docIDs.size===0&&(this.nodeMap.delete(n),this.deleteNode(r)))}deleteNode(e){let t=e.parent,n=e.left?e.left:e.right;n&&(n.parent=t),t?t.left===e?t.left=n:t.right===e&&(t.right=n):(this.root=n,this.root&&(this.root.parent=null))}searchByRadius(t,n,r=!0,i=`asc`,a=!1){let o=a?e.vincentyDistance:e.haversineDistance,s=[{node:this.root,depth:0}],c=[];for(;s.length>0;){let{node:e,depth:i}=s.pop();if(e==null)continue;let a=o(t,e.point);(r?a<=n:a>n)&&c.push({point:e.point,docIDs:Array.from(e.docIDs)}),e.left!=null&&s.push({node:e.left,depth:i+1}),e.right!=null&&s.push({node:e.right,depth:i+1})}return i&&c.sort((e,n)=>{let r=o(t,e.point),a=o(t,n.point);return i.toLowerCase()===`asc`?r-a:a-r}),c}searchByPolygon(t,n=!0,r=null,i=!1){let a=[{node:this.root,depth:0}],o=[];for(;a.length>0;){let{node:r,depth:i}=a.pop();if(r==null)continue;r.left!=null&&a.push({node:r.left,depth:i+1}),r.right!=null&&a.push({node:r.right,depth:i+1});let s=e.isPointInPolygon(t,r.point);(s&&n||!s&&!n)&&o.push({point:r.point,docIDs:Array.from(r.docIDs)})}let s=e.calculatePolygonCentroid(t);if(r){let t=i?e.vincentyDistance:e.haversineDistance;o.sort((e,n)=>{let i=t(s,e.point),a=t(s,n.point);return r.toLowerCase()===`asc`?i-a:a-i})}return o}toJSON(){return{root:this.root?this.root.toJSON():null}}static fromJSON(t){let n=new e;return t.root&&(n.root=j5.fromJSON(t.root),n.buildNodeMap(n.root)),n}buildNodeMap(e){if(e==null)return;let t=this.getPointKey(e.point);this.nodeMap.set(t,e),e.left&&this.buildNodeMap(e.left),e.right&&this.buildNodeMap(e.right)}static calculatePolygonCentroid(e){let t=0,n=0,r=0,i=e.length;for(let a=0,o=i-1;a<i;o=a++){let i=e[a].lon,s=e[a].lat,c=e[o].lon,l=e[o].lat,u=i*l-c*s;t+=u,n+=(i+c)*u,r+=(s+l)*u}t/=2;let a=6*t;return n/=a,r/=a,{lon:n,lat:r}}static isPointInPolygon(e,t){let n=!1,r=t.lon,i=t.lat,a=e.length;for(let t=0,o=a-1;t<a;o=t++){let a=e[t].lon,s=e[t].lat,c=e[o].lon,l=e[o].lat;s>i!=l>i&&r<(c-a)*(i-s)/(l-s)+a&&(n=!n)}return n}static haversineDistance(e,t){let n=Math.PI/180,r=e.lat*n,i=t.lat*n,a=(t.lat-e.lat)*n,o=(t.lon-e.lon)*n,s=Math.sin(a/2)*Math.sin(a/2)+Math.cos(r)*Math.cos(i)*Math.sin(o/2)*Math.sin(o/2);return 6371e3*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))}static vincentyDistance(e,t){let n=6378137,r=1/298.257223563,i=.9966471893352525*n,a=Math.PI/180,o=e.lat*a,s=t.lat*a,c=(t.lon-e.lon)*a,l=Math.atan(.9966471893352525*Math.tan(o)),u=Math.atan(.9966471893352525*Math.tan(s)),d=Math.sin(l),f=Math.cos(l),p=Math.sin(u),m=Math.cos(u),h=c,g,_=1e3,v,y,b,x,S,C;do{let e=Math.sin(h),t=Math.cos(h);if(v=Math.sqrt(m*e*(m*e)+(f*p-d*m*t)*(f*p-d*m*t)),v===0)return 0;y=d*p+f*m*t,b=Math.atan2(v,y),x=f*m*e/v,S=1-x*x,C=y-2*d*p/S,isNaN(C)&&(C=0);let n=r/16*S*(4+r*(4-3*S));g=h,h=c+(1-n)*r*x*(b+n*v*(C+n*y*(-1+2*C*C)))}while(Math.abs(h-g)>1e-12&&--_>0);if(_===0)return NaN;let w=S*(n*n-i*i)/(i*i),T=1+w/16384*(4096+w*(-768+w*(320-175*w))),ee=w/1024*(256+w*(-128+w*(74-47*w))),te=ee*v*(C+ee/4*(y*(-1+2*C*C)-ee/6*C*(-3+4*v*v)*(-3+4*C*C)));return i*T*(b-te)}},N5=class e{true;false;constructor(){this.true=new Set,this.false=new Set}insert(e,t){t?this.true.add(e):this.false.add(e)}delete(e,t){t?this.true.delete(e):this.false.delete(e)}getSize(){return this.true.size+this.false.size}toJSON(){return{true:Array.from(this.true),false:Array.from(this.false)}}static fromJSON(t){let n=new e;return n.true=new Set(t.true),n.false=new Set(t.false),n}};function Rge(e,t,n,r,i,{k:a,b:o,d:s}){return Math.log(1+(n-t+.5)/(t+.5))*(s+e*(a+1))/(e+a*(1-o+o*r/i))}var P5=class e{size;vectors=new Map;constructor(e){this.size=e}add(e,t){t instanceof Float32Array||(t=new Float32Array(t));let n=F5(t,this.size);this.vectors.set(e,[n,t])}remove(e){this.vectors.delete(e)}find(e,t,n){return e instanceof Float32Array||(e=new Float32Array(e)),zge(e,n,this.vectors,this.size,t)}toJSON(){let e=[];for(let[t,[n,r]]of this.vectors)e.push([t,[n,Array.from(r)]]);return{size:this.size,vectors:e}}static fromJSON(t){let n=t,r=new e(n.size);for(let[e,[t,i]]of n.vectors)r.vectors.set(e,[t,new Float32Array(i)]);return r}};function F5(e,t){let n=0;for(let r=0;r<t;r++)n+=e[r]*e[r];return Math.sqrt(n)}function zge(e,t,n,r,i){let a=F5(e,r),o=[],s=t||n.keys();for(let t of s){let s=n.get(t);if(!s)continue;let c=s[0],l=s[1],u=0;for(let t=0;t<r;t++)u+=e[t]*l[t];let d=u/(a*c);d>=i&&o.push([t,d])}return o}function Bge(e,t,n,r,i){let a=v5(e.sharedInternalDocumentStore,n);e.avgFieldLength[t]=((e.avgFieldLength[t]??0)*(i-1)+r.length)/i,e.fieldLengths[t][a]=r.length,e.frequencies[t][a]={}}function Vge(e,t,n,r,i){let a=0;for(let e of r)e===i&&a++;let o=v5(e.sharedInternalDocumentStore,n),s=a/r.length;e.frequencies[t][o][i]=s,i in e.tokenOccurrences[t]||(e.tokenOccurrences[t][i]=0),e.tokenOccurrences[t][i]=(e.tokenOccurrences[t][i]??0)+1}function Hge(e,t,n,r){let i=v5(e.sharedInternalDocumentStore,n);r>1?e.avgFieldLength[t]=(e.avgFieldLength[t]*r-e.fieldLengths[t][i])/(r-1):e.avgFieldLength[t]=void 0,e.fieldLengths[t][i]=void 0,e.frequencies[t][i]=void 0}function Uge(e,t,n){e.tokenOccurrences[t][n]--}function I5(e,t,n,r,i=``){r||={sharedInternalDocumentStore:t,indexes:{},vectorIndexes:{},searchableProperties:[],searchablePropertiesWithTypes:{},frequencies:{},tokenOccurrences:{},avgFieldLength:{},fieldLengths:{}};for(let[a,o]of Object.entries(n)){let n=`${i}${i?`.`:``}${a}`;if(typeof o==`object`&&!Array.isArray(o)){I5(e,t,o,r,n);continue}if(m5(o))r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o,r.vectorIndexes[n]={type:`Vector`,node:new P5(_5(o)),isArray:!1};else{let e=/\[/.test(o);switch(o){case`boolean`:case`boolean[]`:r.indexes[n]={type:`Bool`,node:new N5,isArray:e};break;case`number`:case`number[]`:r.indexes[n]={type:`AVL`,node:new E5(0,[]),isArray:e};break;case`string`:case`string[]`:r.indexes[n]={type:`Radix`,node:new A5,isArray:e},r.avgFieldLength[n]=0,r.frequencies[n]={},r.tokenOccurrences[n]={},r.fieldLengths[n]={};break;case`enum`:case`enum[]`:r.indexes[n]={type:`Flat`,node:new D5,isArray:e};break;case`geopoint`:r.indexes[n]={type:`BKD`,node:new M5,isArray:e};break;default:throw f5(`INVALID_SCHEMA_TYPE`,Array.isArray(o)?`array`:o,n)}r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o}}return r}function Wge(e,t,n,r,i,a,o,s){return c=>{let{type:l,node:u}=t.indexes[n];switch(l){case`Bool`:u[c?`true`:`false`].add(r);break;case`AVL`:{let e=s?.avlRebalanceThreshold??1;u.insert(c,r,e);break}case`Radix`:{let s=a.tokenize(c,i,n,!1);e.insertDocumentScoreParameters(t,n,r,s,o);for(let i of s)e.insertTokenScoreParameters(t,n,r,s,i),u.insert(i,r);break}case`Flat`:u.insert(c,r);break;case`BKD`:u.insert(c,[r])}}}function Gge(e,t,n,r,i,a,o,s,c,l,u){if(m5(o))return Kge(t,n,a,r,i);let d=Wge(e,t,n,i,s,c,l,u);if(!h5(o))return d(a);let f=a,p=f.length;for(let e=0;e<p;e++)d(f[e])}function Kge(e,t,n,r,i){e.vectorIndexes[t].node.add(i,n)}function L5(e,t,n,r,i,a,o,s,c,l){if(m5(o))return t.vectorIndexes[n].node.remove(i),!0;let{type:u,node:d}=t.indexes[n];switch(u){case`AVL`:return d.removeDocument(a,i),!0;case`Bool`:return d[a?`true`:`false`].delete(i),!0;case`Radix`:{let o=c.tokenize(a,s,n);e.removeDocumentScoreParameters(t,n,r,l);for(let r of o)e.removeTokenScoreParameters(t,n,r),d.removeDocumentByWord(r,i);return!0}case`Flat`:return d.removeDocument(i,a),!0;case`BKD`:return d.removeDocByID(a,i),!1}}function qge(e,t,n,r,i,a,o,s,c,l){if(!h5(o))return L5(e,t,n,r,i,a,o,s,c,l);let u=g5(o),d=a,f=d.length;for(let a=0;a<f;a++)L5(e,t,n,r,i,d[a],u,s,c,l);return!0}function R5(e,t,n,r,i,a,o,s,c,l){let u=Array.from(r),d=e.avgFieldLength[t],f=e.fieldLengths[t],p=e.tokenOccurrences[t],m=e.frequencies[t],h=typeof p[n]==`number`?p[n]??0:0,g=u.length;for(let e=0;e<g;e++){let r=u[e];if(c&&!c.has(r))continue;l.has(r)||l.set(r,new Map);let p=l.get(r);p.set(t,(p.get(t)||0)+1);let g=Rge(m?.[r]?.[n]??0,h,i,f[r],d,a);o.has(r)?o.set(r,o.get(r)+g*s):o.set(r,g*s)}}function Jge(e,t,n,r,i,a,o,s,c,l,u,d=0){let f=n.tokenize(t,r),p=f.length||1,m=new Map,h=new Map,g=new Map;for(let n of i){if(!(n in e.indexes))continue;let r=e.indexes[n],{type:i}=r;if(i!==`Radix`)throw f5(`WRONG_SEARCH_PROPERTY_TYPE`,n);let d=s[n]??1;if(d<=0)throw f5(`INVALID_BOOST_VALUE`,d);f.length===0&&!t&&f.push(``);let p=f.length;for(let t=0;t<p;t++){let i=f[t],s=r.node.find({term:i,exact:a,tolerance:o}),p=Object.keys(s);p.length>0&&h.set(i,!0);let _=p.length;for(let t=0;t<_;t++){let r=p[t],i=s[r];R5(e,n,r,i,l,c,g,d,u,m)}}}let _=Array.from(g.entries()).map(([e,t])=>[e,t]).sort((e,t)=>t[1]-e[1]);if(_.length===0)return[];if(d===1)return _;if(d===0){if(p===1)return _;for(let e of f)if(!h.get(e))return[];return _.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1})}let v=_.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1});if(v.length>0){let e=_.filter(([e])=>!v.some(([t])=>t===e)),t=Math.ceil(e.length*d);return[...v,...e.slice(0,t)]}return _}function z5(e,t,n,r){if(`and`in n&&n.and&&Array.isArray(n.and)){let i=n.and;return i.length===0?new Set:l5(...i.map(n=>z5(e,t,n,r)))}if(`or`in n&&n.or&&Array.isArray(n.or)){let i=n.or;return i.length===0?new Set:i.map(n=>z5(e,t,n,r)).reduce((e,t)=>u5(e,t),new Set)}if(`not`in n&&n.not){let i=n.not,a=new Set,o=e.sharedInternalDocumentStore;for(let e=1;e<=o.internalIdToId.length;e++)a.add(e);return pge(a,z5(e,t,i,r))}let i=Object.keys(n),a=i.reduce((e,t)=>({[t]:new Set,...e}),{});for(let o of i){let i=n[o];if(e.indexes[o]===void 0)throw f5(`UNKNOWN_FILTER_PROPERTY`,o);let{node:s,type:c,isArray:l}=e.indexes[o];if(c===`Bool`){let e=s,t=i?e.true:e.false;a[o]=u5(a[o],t);continue}if(c===`BKD`){let e;if(`radius`in i)e=`radius`;else if(`polygon`in i)e=`polygon`;else throw Error(`Invalid operation ${i}`);if(e===`radius`){let{value:t,coordinates:n,unit:r=`m`,inside:c=!0,highPrecision:l=!1}=i[e],u=a5(t,r),d=s.searchByRadius(n,u,c,void 0,l);a[o]=B5(a[o],d)}else{let{coordinates:t,inside:n=!0,highPrecision:r=!1}=i[e],c=s.searchByPolygon(t,n,void 0,r);a[o]=B5(a[o],c)}continue}if(c===`Radix`&&(typeof i==`string`||Array.isArray(i))){for(let e of[i].flat()){let n=t.tokenize(e,r,o);for(let e of n){let t=s.find({term:e,exact:!0});a[o]=n_e(a[o],t)}}continue}let u=Object.keys(i);if(u.length>1)throw f5(`INVALID_FILTER_OPERATION`,u.length);if(c===`Flat`){let e=new Set(l?s.filterArr(i):s.filter(i));a[o]=u5(a[o],e);continue}if(c===`AVL`){let e=u[0],t=i[e],n;switch(e){case`gt`:n=s.greaterThan(t,!1);break;case`gte`:n=s.greaterThan(t,!0);break;case`lt`:n=s.lessThan(t,!1);break;case`lte`:n=s.lessThan(t,!0);break;case`eq`:n=s.find(t)??new Set;break;case`between`:{let[e,r]=t;n=s.rangeSearch(e,r);break}default:throw f5(`INVALID_FILTER_OPERATION`,e)}a[o]=u5(a[o],n)}}return l5(...Object.values(a))}function Yge(e){return e.searchableProperties}function Xge(e){return e.searchablePropertiesWithTypes}function Zge(e,t){let{indexes:n,vectorIndexes:r,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}=t,u={},d={};for(let e of Object.keys(n)){let{node:t,type:r,isArray:i}=n[e];switch(r){case`Radix`:u[e]={type:`Radix`,node:A5.fromJSON(t),isArray:i};break;case`Flat`:u[e]={type:`Flat`,node:D5.fromJSON(t),isArray:i};break;case`AVL`:u[e]={type:`AVL`,node:E5.fromJSON(t),isArray:i};break;case`BKD`:u[e]={type:`BKD`,node:M5.fromJSON(t),isArray:i};break;case`Bool`:u[e]={type:`Bool`,node:N5.fromJSON(t),isArray:i};break;default:u[e]=n[e]}}for(let e of Object.keys(r))d[e]={type:`Vector`,isArray:!1,node:P5.fromJSON(r[e])};return{sharedInternalDocumentStore:e,indexes:u,vectorIndexes:d,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}}function Qge(e){let{indexes:t,vectorIndexes:n,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}=e,l={};for(let e of Object.keys(n))l[e]=n[e].node.toJSON();let u={};for(let e of Object.keys(t)){let{type:n,node:r,isArray:i}=t[e];n===`Flat`||n===`Radix`||n===`AVL`||n===`BKD`||n===`Bool`?u[e]={type:n,node:r.toJSON(),isArray:i}:(u[e]=t[e],u[e].node=u[e].node.toJSON())}return{indexes:u,vectorIndexes:l,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}}function $ge(){return{create:I5,insert:Gge,remove:qge,insertDocumentScoreParameters:Bge,insertTokenScoreParameters:Vge,removeDocumentScoreParameters:Hge,removeTokenScoreParameters:Uge,calculateResultScores:R5,search:Jge,searchByWhereClause:z5,getSearchableProperties:Yge,getSearchablePropertiesWithTypes:Xge,load:Zge,save:Qge}}function B5(e,t){e||=new Set;let n=t.length;for(let r=0;r<n;r++){let n=t[r].docIDs,i=n.length;for(let t=0;t<i;t++)e.add(n[t])}return e}function V5(e,t,n=!1){let r=n?M5.vincentyDistance:M5.haversineDistance,i=[],a=[];for(let{point:n}of e)a.push(r(t,n));let o=Math.max(...a),s=0;for(let{docIDs:t}of e){let e=o-a[s]+1;for(let n of t)i.push([n,e]);s++}return i.sort((e,t)=>t[1]-e[1]),i}function e_e(e,t){let n=Object.keys(e);if(n.length!==1)return{isGeoOnly:!1};let r=n[0],i=e[r];if(t.indexes[r]===void 0)return{isGeoOnly:!1};let{type:a}=t.indexes[r];return a===`BKD`&&i&&(`radius`in i||`polygon`in i)?{isGeoOnly:!0,geoProperty:r,geoOperation:i}:{isGeoOnly:!1}}function t_e(e,t){let n=e,r=e_e(t,n);if(!r.isGeoOnly||!r.geoProperty||!r.geoOperation)return null;let{node:i}=n.indexes[r.geoProperty],a=r.geoOperation,o=i,s;if(`radius`in a){let{value:e,coordinates:t,unit:n=`m`,inside:r=!0,highPrecision:i=!1}=a.radius,c=t,l=a5(e,n);return s=o.searchByRadius(c,l,r,`asc`,i),V5(s,c,i)}if(`polygon`in a){let{coordinates:e,inside:t=!0,highPrecision:n=!1}=a.polygon;s=o.searchByPolygon(e,t,`asc`,n);let r=M5.calculatePolygonCentroid(e);return V5(s,r,n)}return null}function n_e(e,t){e||=new Set;let n=Object.keys(t),r=n.length;for(let i=0;i<r;i++){let r=t[n[i]],a=r.length;for(let t=0;t<a;t++)e.add(r[t])}return e}function H5(e,t,n,r,i){let a={language:e.tokenizer.language,sharedInternalDocumentStore:t,enabled:!0,isSorted:!0,sortableProperties:[],sortablePropertiesWithTypes:{},sorts:{}};for(let[o,s]of Object.entries(n)){let n=`${i}${i?`.`:``}${o}`;if(!r.includes(n)){if(typeof s==`object`&&!Array.isArray(s)){let i=H5(e,t,s,r,n);X8(a.sortableProperties,i.sortableProperties),a.sorts={...a.sorts,...i.sorts},a.sortablePropertiesWithTypes={...a.sortablePropertiesWithTypes,...i.sortablePropertiesWithTypes};continue}if(!m5(s))switch(s){case`boolean`:case`number`:case`string`:a.sortableProperties.push(n),a.sortablePropertiesWithTypes[n]=s,a.sorts[n]={docs:new Map,orderedDocsToRemove:new Map,orderedDocs:[],type:s};break;case`geopoint`:case`enum`:continue;case`enum[]`:case`boolean[]`:case`number[]`:case`string[]`:continue;default:throw f5(`INVALID_SORT_SCHEMA_TYPE`,Array.isArray(s)?`array`:s,n)}}}return a}function r_e(e,t,n,r){return r?.enabled===!1?{disabled:!0}:H5(e,t,n,(r||{}).unsortableProperties||[],``)}function i_e(e,t,n,r){if(!e.enabled)return;e.isSorted=!1;let i=v5(e.sharedInternalDocumentStore,n),a=e.sorts[t];a.orderedDocsToRemove.has(i)&&W5(e,t),a.docs.set(i,a.orderedDocs.length),a.orderedDocs.push([i,r])}function U5(e){if(e.isSorted||!e.enabled)return;let t=Object.keys(e.sorts);for(let n of t)c_e(e,n);e.isSorted=!0}function a_e(e,t,n){return t[1].localeCompare(n[1],ige(e))}function o_e(e,t){return e[1]-t[1]}function s_e(e,t){return t[1]?-1:1}function c_e(e,t){let n=e.sorts[t],r;switch(n.type){case`string`:r=a_e.bind(null,e.language);break;case`number`:r=o_e.bind(null);break;case`boolean`:r=s_e.bind(null)}n.orderedDocs.sort(r);let i=n.orderedDocs.length;for(let e=0;e<i;e++){let t=n.orderedDocs[e][0];n.docs.set(t,e)}}function l_e(e){let t=Object.keys(e.sorts);for(let n of t)W5(e,n)}function W5(e,t){let n=e.sorts[t];n.orderedDocsToRemove.size&&(n.orderedDocs=n.orderedDocs.filter(e=>!n.orderedDocsToRemove.has(e[0])),n.orderedDocsToRemove.clear())}function u_e(e,t,n){if(!e.enabled)return;let r=e.sorts[t],i=v5(e.sharedInternalDocumentStore,n);r.docs.get(i)&&(r.docs.delete(i),r.orderedDocsToRemove.set(i,!0))}function d_e(e,t,n){if(!e.enabled)throw f5(`SORT_DISABLED`);let r=n.property,i=n.order===`DESC`,a=e.sorts[r];if(!a)throw f5(`UNABLE_TO_SORT_ON_UNKNOWN_FIELD`,r,e.sortableProperties.join(`, `));return W5(e,r),U5(e),t.sort((t,n)=>{let r=a.docs.get(v5(e.sharedInternalDocumentStore,t[0])),o=a.docs.get(v5(e.sharedInternalDocumentStore,n[0])),s=r!==void 0,c=o!==void 0;return!s&&!c?0:s?c?i?o-r:r-o:-1:1}),t}function f_e(e){return e.enabled?e.sortableProperties:[]}function p_e(e){return e.enabled?e.sortablePropertiesWithTypes:{}}function m_e(e,t){let n=t;if(!n.enabled)return{enabled:!1};let r=Object.keys(n.sorts).reduce((e,t)=>{let{docs:r,orderedDocs:i,type:a}=n.sorts[t];return e[t]={docs:new Map(Object.entries(r).map(([e,t])=>[+e,t])),orderedDocsToRemove:new Map,orderedDocs:i,type:a},e},{});return{sharedInternalDocumentStore:e,language:n.language,sortableProperties:n.sortableProperties,sortablePropertiesWithTypes:n.sortablePropertiesWithTypes,sorts:r,enabled:!0,isSorted:n.isSorted}}function h_e(e){if(!e.enabled)return{enabled:!1};l_e(e),U5(e);let t=Object.keys(e.sorts).reduce((t,n)=>{let{docs:r,orderedDocs:i,type:a}=e.sorts[n];return t[n]={docs:Object.fromEntries(r.entries()),orderedDocs:i,type:a},t},{});return{language:e.language,sortableProperties:e.sortableProperties,sortablePropertiesWithTypes:e.sortablePropertiesWithTypes,sorts:t,enabled:e.enabled,isSorted:e.isSorted}}function g_e(){return{create:r_e,insert:i_e,remove:u_e,save:h_e,load:m_e,sortBy:d_e,getSortableProperties:f_e,getSortablePropertiesWithTypes:p_e}}const __e=[65,65,65,65,65,65,65,67,69,69,69,69,73,73,73,73,69,78,79,79,79,79,79,null,79,85,85,85,85,89,80,115,97,97,97,97,97,97,97,99,101,101,101,101,105,105,105,105,101,110,111,111,111,111,111,null,111,117,117,117,117,121,112,121,65,97,65,97,65,97,67,99,67,99,67,99,67,99,68,100,68,100,69,101,69,101,69,101,69,101,69,101,71,103,71,103,71,103,71,103,72,104,72,104,73,105,73,105,73,105,73,105,73,105,73,105,74,106,75,107,107,76,108,76,108,76,108,76,108,76,108,78,110,78,110,78,110,110,78,110,79,111,79,111,79,111,79,111,82,114,82,114,82,114,83,115,83,115,83,115,83,115,84,116,84,116,84,116,85,117,85,117,85,117,85,117,85,117,85,117,87,119,89,121,89,90,122,90,122,90,122,115];function v_e(e){return e<192||e>383?e:__e[e-192]||e}function y_e(e){let t=[];for(let n=0;n<e.length;n++)t[n]=v_e(e.charCodeAt(n));return String.fromCharCode(...t)}const b_e={ational:`ate`,tional:`tion`,enci:`ence`,anci:`ance`,izer:`ize`,bli:`ble`,alli:`al`,entli:`ent`,eli:`e`,ousli:`ous`,ization:`ize`,ation:`ate`,ator:`ate`,alism:`al`,iveness:`ive`,fulness:`ful`,ousness:`ous`,aliti:`al`,iviti:`ive`,biliti:`ble`,logi:`log`},x_e={icate:`ic`,ative:``,alize:`al`,iciti:`ic`,ical:`ic`,ful:``,ness:``},G5=`[aeiouy]`,K5=`[^aeiou][^aeiouy]*`,q5=G5+`[aeiou]*`,J5=`^(`+K5+`)?`+q5+K5,Y5=`^(`+K5+`)?`+q5+K5+q5+K5,X5=`^(`+K5+`)?`+G5;function S_e(e){let t,n,r,i,a,o;if(e.length<3)return e;let s=e.substring(0,1);if(s==`y`&&(e=s.toUpperCase()+e.substring(1)),r=/^(.+?)(ss|i)es$/,i=/^(.+?)([^s])s$/,r.test(e)?e=e.replace(r,`$1$2`):i.test(e)&&(e=e.replace(i,`$1$2`)),r=/^(.+?)eed$/,i=/^(.+?)(ed|ing)$/,r.test(e)){let t=r.exec(e);r=RegExp(J5),r.test(t[1])&&(r=/.$/,e=e.replace(r,``))}else i.test(e)&&(t=i.exec(e)[1],i=RegExp(X5),i.test(t)&&(e=t,i=/(at|bl|iz)$/,a=RegExp(`([^aeiouylsz])\\1$`),o=RegExp(`^`+K5+G5+`[^aeiouwxy]$`),i.test(e)?e+=`e`:a.test(e)?(r=/.$/,e=e.replace(r,``)):o.test(e)&&(e+=`e`)));if(r=/^(.+?)y$/,r.test(e)&&(t=r.exec(e)?.[1],r=RegExp(X5),t&&r.test(t)&&(e=t+`i`)),r=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=RegExp(J5),t&&r.test(t)&&(e=t+b_e[n])}if(r=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=RegExp(J5),t&&r.test(t)&&(e=t+x_e[n])}if(r=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,i=/^(.+?)(s|t)(ion)$/,r.test(e))t=r.exec(e)?.[1],r=RegExp(Y5),t&&r.test(t)&&(e=t);else if(i.test(e)){let n=i.exec(e);t=n?.[1]??``+n?.[2]??``,i=RegExp(Y5),i.test(t)&&(e=t)}return r=/^(.+?)e$/,r.test(e)&&(t=r.exec(e)?.[1],r=RegExp(Y5),i=RegExp(`^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*([aeiouy][aeiou]*)?$`),a=RegExp(`^`+K5+G5+`[^aeiouwxy]$`),t&&(r.test(t)||i.test(t)&&!a.test(t))&&(e=t)),r=/ll$/,i=RegExp(Y5),r.test(e)&&i.test(e)&&(r=/.$/,e=e.replace(r,``)),s==`y`&&(e=s.toLowerCase()+e.substring(1)),e}function Z5(e,t,n=!0){let r=`${this.language}:${e}:${t}`;return n&&this.normalizationCache.has(r)?this.normalizationCache.get(r):this.stopWords?.includes(t)?(n&&this.normalizationCache.set(r,``),``):(this.stemmer&&!this.stemmerSkipProperties.has(e)&&(t=this.stemmer(t)),t=y_e(t),n&&this.normalizationCache.set(r,t),t)}function C_e(e){for(;e[e.length-1]===``;)e.pop();for(;e[0]===``;)e.shift();return e}function Q5(e,t,n,r=!0){if(t&&t!==this.language)throw f5(`LANGUAGE_NOT_SUPPORTED`,t);if(typeof e!=`string`)return[e];let i=this.normalizeToken.bind(this,n??``),a;if(n&&this.tokenizeSkipProperties.has(n))a=[i(e,r)];else{let t=rge[this.language];a=e.toLowerCase().split(t).map(e=>i(e,r)).filter(Boolean)}let o=C_e(a);return this.allowDuplicates?o:Array.from(new Set(o))}function $5(e={}){if(!e.language)e.language=`english`;else if(!G8.includes(e.language))throw f5(`LANGUAGE_NOT_SUPPORTED`,e.language);let t;if(e.stemming||e.stemmer&&!(`stemming`in e)){if(e.stemmer){if(typeof e.stemmer!=`function`)throw f5(`INVALID_STEMMER_FUNCTION_TYPE`);t=e.stemmer}else if(e.language===`english`)t=S_e;else throw f5(`MISSING_STEMMER`,e.language)}let n;if(e.stopWords!==!1){if(n=[],Array.isArray(e.stopWords))n=e.stopWords;else if(typeof e.stopWords==`function`)n=e.stopWords(n);else if(e.stopWords)throw f5(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);if(!Array.isArray(n))throw f5(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);for(let e of n)if(typeof e!=`string`)throw f5(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`)}let r={tokenize:Q5,language:e.language,stemmer:t,stemmerSkipProperties:new Set(e.stemmerSkipProperties?[e.stemmerSkipProperties].flat():[]),tokenizeSkipProperties:new Set(e.tokenizeSkipProperties?[e.tokenizeSkipProperties].flat():[]),stopWords:n,allowDuplicates:!!e.allowDuplicates,normalizeToken:Z5,normalizationCache:new Map};return r.tokenize=Q5.bind(r),r.normalizeToken=Z5,r}function w_e(e){return{sharedInternalDocumentStore:e,rules:new Map}}function T_e(e,t){if(e.rules.has(t.id))throw Error(`PINNING_RULE_ALREADY_EXISTS: A pinning rule with id "${t.id}" already exists. Use updateRule to modify it.`);e.rules.set(t.id,t)}function E_e(e,t){if(!e.rules.has(t.id))throw Error(`PINNING_RULE_NOT_FOUND: Cannot update pinning rule with id "${t.id}" because it does not exist. Use addRule to create it.`);e.rules.set(t.id,t)}function D_e(e,t){return e.rules.delete(t)}function O_e(e,t){return e.rules.get(t)}function k_e(e){return Array.from(e.rules.values())}function A_e(e,t){let n=e.toLowerCase().trim(),r=t.pattern.toLowerCase().trim();switch(t.anchoring){case`is`:return n===r;case`starts_with`:return n.startsWith(r);case`contains`:return n.includes(r);default:return!1}}function j_e(e,t){return e?t.conditions.every(t=>A_e(e,t)):!1}function e7(e,t){if(!t)return[];let n=[];for(let r of e.rules.values())j_e(t,r)&&n.push(r);return n}function M_e(e,t){return{sharedInternalDocumentStore:e,rules:new Map(t?.rules??[])}}function N_e(e){return{rules:Array.from(e.rules.entries())}}function P_e(){return{create:w_e,addRule:T_e,updateRule:E_e,removeRule:D_e,getRule:O_e,getAllRules:k_e,getMatchingRules:e7,load:M_e,save:N_e}}function F_e(e){let t={formatElapsedTime:hge,getDocumentIndexId:gge,getDocumentProperties:r5,validateSchema:p5};for(let n of b5){let r=n;if(e[r]){if(typeof e[r]!=`function`)throw f5(`COMPONENT_MUST_BE_FUNCTION`,r)}else e[r]=t[r]}for(let t of Object.keys(e))if(!Fge.includes(t)&&!b5.includes(t))throw f5(`UNSUPPORTED_COMPONENT`,t)}function I_e({schema:e,sort:t,language:n,components:r,id:i,plugins:a}){r||={};for(let t of a??[]){if(!(`getComponents`in t)||typeof t.getComponents!=`function`)continue;let n=t.getComponents(e),i=Object.keys(n);for(let e of i)if(r[e])throw f5(`PLUGIN_COMPONENT_CONFLICT`,e,t.name);r={...r,...n}}i||=e5();let o=r.tokenizer,s=r.index,c=r.documentsStore,l=r.sorter,u=r.pinning;if(o=o?o.tokenize?o:$5(o):$5({language:n??`english`}),r.tokenizer&&n)throw f5(`NO_LANGUAGE_WITH_CUSTOM_TOKENIZER`);let d=bge();s||=$ge(),l||=g_e(),c||=Mge(),u||=P_e(),F_e(r);let{getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,formatElapsedTime:h}=r,g={data:{},caches:{},schema:e,tokenizer:o,index:s,sorter:l,documentsStore:c,pinning:u,internalDocumentIDStore:d,getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,beforeInsert:[],afterInsert:[],beforeRemove:[],afterRemove:[],beforeUpdate:[],afterUpdate:[],beforeUpsert:[],afterUpsert:[],beforeSearch:[],afterSearch:[],beforeInsertMultiple:[],afterInsertMultiple:[],beforeRemoveMultiple:[],afterRemoveMultiple:[],beforeUpdateMultiple:[],afterUpdateMultiple:[],beforeUpsertMultiple:[],afterUpsertMultiple:[],afterCreate:[],formatElapsedTime:h,id:i,plugins:a,version:L_e()};g.data={index:g.index.create(g,d,e),docs:g.documentsStore.create(g,d),sorting:g.sorter.create(g,d,e,t),pinning:g.pinning.create(d)};for(let e of Nge)g[e]=(g[e]??[]).concat(Pge(g,e));let _=g.afterCreate;return _&&Ige(_,g),g}function L_e(){return`{{VERSION}}`}function t7(e){return e.documentsStore.count(e.data.docs)}function n7(e,t,n,r,i){let a=e.validateSchema(t,e.schema);if(a)throw f5(`SCHEMA_VALIDATION_FAILURE`,a);return s5(e.beforeInsert)||s5(e.afterInsert)||s5(e.index.beforeInsert)||s5(e.index.insert)||s5(e.index.afterInsert)?B_e(e,t,n,r,i):V_e(e,t,n,r,i)}const R_e=new Set([`enum`,`enum[]`]),z_e=new Set([`string`,`number`]);async function B_e(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw f5(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=v5(e.internalDocumentIDStore,s);if(r||await x5(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw f5(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];r7(n,r,e,t)}return await H_e(e,s,u,f,l,n,t,i),r||await x5(e.afterInsert,e,s,t),s}function V_e(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw f5(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=v5(e.internalDocumentIDStore,s);if(r||x5(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw f5(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];r7(n,r,e,t)}return U_e(e,s,u,f,l,n,t,i),r||x5(e.afterInsert,e,s,t),s}function r7(e,t,n,r){if(!(yge(t)&&typeof r==`object`&&typeof r.lon==`number`&&typeof r.lat==`number`)&&!(m5(t)&&Array.isArray(r))&&!(h5(t)&&Array.isArray(r))&&!(R_e.has(t)&&z_e.has(e))&&e!==t)throw f5(`INVALID_DOCUMENT_PROPERTY`,n,t,e)}async function H_e(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o];await e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i);let l=e.internalDocumentIDStore.idToInternalId.get(t);await e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),await e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function U_e(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o],l=v5(e.internalDocumentIDStore,t);e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i),e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function i7(e,t,n,r,i,a){return s5(e.afterInsertMultiple)||s5(e.beforeInsertMultiple)||s5(e.index.beforeInsert)||s5(e.index.insert)||s5(e.index.afterInsert)?W_e(e,t,n,r,i,a):G_e(e,t,n,r,i,a)}async function W_e(e,t,n=1e3,r,i,a=0){let o=[],s=async a=>{let s=Math.min(a+n,t.length),c=t.slice(a,s);for(let t of c){let n=await n7(e,t,r,i,{avlRebalanceThreshold:c.length});o.push(n)}return s};return await(async()=>{let e=0;for(;e<t.length;){let t=Date.now();if(e=await s(e),a>0){let e=a-(Date.now()-t);e>0&&d5(e)}}})(),i||await S5(e.afterInsertMultiple,e,t),o}function G_e(e,t,n=1e3,r,i,a=0){let o=[],s=0;function c(){let a=t.slice(s*n,(s+1)*n);if(a.length===0)return!1;for(let t of a){let n=n7(e,t,r,i,{avlRebalanceThreshold:a.length});o.push(n)}return s++,!0}function l(){let e=Date.now();for(;c();)if(a>0){let t=Date.now()-e;if(t>=a){let e=a-t%a;e>0&&d5(e)}}}return l(),i||S5(e.afterInsertMultiple,e,t),o}function a7(e,t,n,r){return s5(e.index.beforeRemove)||s5(e.index.remove)||s5(e.index.afterRemove)?K_e(e,t,n,r):q_e(e,t,n,r)}async function K_e(e,t,n,r){let i=!0,{index:a,docs:o}=e.data,s=e.documentsStore.get(o,t);if(!s)return!1;let c=v5(e.internalDocumentIDStore,t),l=y5(e.internalDocumentIDStore,c),u=e.documentsStore.count(o);r||await x5(e.beforeRemove,e,l);let d=e.index.getSearchableProperties(a),f=e.index.getSearchablePropertiesWithTypes(a),p=e.getDocumentProperties(s,d);for(let r of d){let a=p[r];if(a===void 0)continue;let o=f[r];await e.index.beforeRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u),await e.index.remove(e.index,e.data.index,r,t,c,a,o,n,e.tokenizer,u)||(i=!1),await e.index.afterRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u)}let m=await e.sorter.getSortableProperties(e.data.sorting),h=await e.getDocumentProperties(s,m);for(let n of m)h[n]!==void 0&&e.sorter.remove(e.data.sorting,n,t);return r||await x5(e.afterRemove,e,l),e.documentsStore.remove(e.data.docs,t,c),i}function q_e(e,t,n,r){let i=!0,{index:a,docs:o}=e.data,s=e.documentsStore.get(o,t);if(!s)return!1;let c=v5(e.internalDocumentIDStore,t),l=y5(e.internalDocumentIDStore,c),u=e.documentsStore.count(o);r||x5(e.beforeRemove,e,l);let d=e.index.getSearchableProperties(a),f=e.index.getSearchablePropertiesWithTypes(a),p=e.getDocumentProperties(s,d);for(let r of d){let a=p[r];if(a===void 0)continue;let o=f[r];e.index.beforeRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u),e.index.remove(e.index,e.data.index,r,t,c,a,o,n,e.tokenizer,u)||(i=!1),e.index.afterRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u)}let m=e.sorter.getSortableProperties(e.data.sorting),h=e.getDocumentProperties(s,m);for(let n of m)h[n]!==void 0&&e.sorter.remove(e.data.sorting,n,t);return r||x5(e.afterRemove,e,l),e.documentsStore.remove(e.data.docs,t,c),i}function J_e(e,t,n,r,i){return s5(e.index.beforeRemove)||s5(e.index.remove)||s5(e.index.afterRemove)||s5(e.beforeRemoveMultiple)||s5(e.afterRemoveMultiple)?Y_e(e,t,n,r,i):X_e(e,t,n,r,i)}async function Y_e(e,t,n,r,i){let a=0;n||=1e3;let o=i?[]:t.map(t=>y5(e.internalDocumentIDStore,v5(e.internalDocumentIDStore,t)));return i||await S5(e.beforeRemoveMultiple,e,o),await new Promise((o,s)=>{let c=0;async function l(){let u=t.slice(c*n,++c*n);if(!u.length)return o();for(let t of u)try{await a7(e,t,r,i)&&a++}catch(e){s(e)}setTimeout(l,0)}setTimeout(l,0)}),i||await S5(e.afterRemoveMultiple,e,o),a}function X_e(e,t,n,r,i){let a=0;n||=1e3;let o=i?[]:t.map(t=>y5(e.internalDocumentIDStore,v5(e.internalDocumentIDStore,t)));i||S5(e.beforeRemoveMultiple,e,o);let s=0;function c(){let o=t.slice(s*n,++s*n);if(o.length){for(let t of o)a7(e,t,r,i)&&a++;setTimeout(c,0)}}return c(),i||S5(e.afterRemoveMultiple,e,o),a}function Z_e(e,t){return e[1]-t[1]}function Q_e(e,t){return t[1]-e[1]}function $_e(e=`desc`){return e.toLowerCase()===`asc`?Z_e:Q_e}function o7(e,t,n){let r={},i=t.map(([e])=>e),a=e.documentsStore.getMultiple(e.data.docs,i),o=Object.keys(n),s=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e of o){let t;if(s[e]===`number`){let{ranges:r}=n[e],i=r.length,a=Array.from({length:i});for(let e=0;e<i;e++){let t=r[e];a[e]=[`${t.from}-${t.to}`,0]}t=Object.fromEntries(a)}r[e]={count:0,values:t??{}}}let c=a.length;for(let e=0;e<c;e++){let t=a[e];for(let e of o){let i=e.includes(`.`)?i5(t,e):t[e],a=s[e],o=r[e].values;switch(a){case`number`:{let t=n[e].ranges;s7(t,o)(i);break}case`number[]`:{let t=new Set,r=n[e].ranges,a=s7(r,o,t);for(let e of i)a(e);break}case`boolean`:case`enum`:case`string`:c7(o,a)(i);break;case`boolean[]`:case`enum[]`:case`string[]`:{let e=c7(o,a===`boolean[]`?`boolean`:`string`,new Set);for(let t of i)e(t);break}default:throw f5(`FACET_NOT_SUPPORTED`,a)}}}for(let e of o){let t=r[e];if(t.count=Object.keys(t.values).length,s[e]===`string`){let r=n[e],i=$_e(r.sort);t.values=Object.fromEntries(Object.entries(t.values).sort(i).slice(r.offset??0,r.limit??10))}}return r}function s7(e,t,n){return r=>{for(let i of e){let e=`${i.from}-${i.to}`;n?.has(e)||r>=i.from&&r<=i.to&&(t[e]===void 0?t[e]=1:(t[e]++,n?.add(e)))}}}function c7(e,t,n){let r=t===`boolean`?`false`:``;return t=>{let i=t?.toString()??r;n?.has(i)||(e[i]=(e[i]??0)+1,n?.add(i))}}const eve={reducer:(e,t,n,r)=>(t[r]=n,t),getInitialValue:e=>Array.from({length:e})},l7=[`string`,`number`,`boolean`];function u7(e,t,n){let r=n.properties,i=r.length,a=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e=0;e<i;e++){let t=r[e];if(a[t]===void 0)throw f5(`UNKNOWN_GROUP_BY_PROPERTY`,t);if(!l7.includes(a[t]))throw f5(`INVALID_GROUP_BY_PROPERTY`,t,l7.join(`, `),a[t])}let o=t.map(([t])=>y5(e.internalDocumentIDStore,t)),s=e.documentsStore.getMultiple(e.data.docs,o),c=s.length,l=n.maxResult||2**53-1,u=[],d={};for(let e=0;e<i;e++){let t=r[e],n={property:t,perValue:{}},i=new Set;for(let e=0;e<c;e++){let r=s[e],a=i5(r,t);if(a===void 0)continue;let o=typeof a==`boolean`?``+a:a,c=n.perValue[o]??{indexes:[],count:0};c.count>=l||(c.indexes.push(e),c.count++,n.perValue[o]=c,i.add(a))}u.push(Array.from(i)),d[t]=n}let f=d7(u),p=f.length,m=[];for(let e=0;e<p;e++){let t=f[e],n=t.length,i={values:[],indexes:[]},a=[];for(let e=0;e<n;e++){let n=t[e],o=r[e];a.push(d[o].perValue[typeof n==`boolean`?``+n:n].indexes),i.values.push(n)}i.indexes=uge(a).sort((e,t)=>e-t),i.indexes.length!==0&&m.push(i)}let h=m.length,g=Array.from({length:h});for(let e=0;e<h;e++){let r=m[e],i=n.reduce||eve,a=r.indexes.map(e=>({id:o[e],score:t[e][1],document:s[e]})),c=i.reducer.bind(null,r.values),l=i.getInitialValue(r.indexes.length),u=a.reduce(c,l);g[e]={values:r.values,result:u}}return g}function d7(e,t=0){if(t+1===e.length)return e[t].map(e=>[e]);let n=e[t],r=d7(e,t+1),i=[];for(let e of n)for(let t of r){let n=[e];X8(n,t),i.push(n)}return i}function f7(e,t,n,r){let i=e7(t,r);if(i.length===0)return n;let a=i.flatMap(e=>e.consequence.promote);a.sort((e,t)=>e.position-t.position);let o=new Set,s=new Map,c=new Set;for(let t of a){let n=v5(e.internalDocumentIDStore,t.doc_id);if(n!==void 0){if(s.has(n)){let e=s.get(n);t.position<e&&s.set(n,t.position);continue}c.has(t.position)||(o.add(n),s.set(n,t.position),c.add(t.position))}}if(s.size===0)return n;let l=n.filter(([e])=>!o.has(e)),u=[];for(let[t,r]of s.entries())n.find(([e])=>e===t)?u.push([t,1e6-r]):e.documentsStore.get(e.data.docs,t)&&u.push([t,0]);u.sort((e,t)=>(s.get(e[0])??1/0)-(s.get(t[0])??1/0));let d=[],f=new Map;for(let e of u){let t=s.get(e[0]);f.set(t,e)}let p=0,m=0;for(;m<l.length+u.length;)if(f.has(m))d.push(f.get(m)),m++;else if(p<l.length)d.push(l[p]),p++,m++;else break;for(let[e,t]of f.entries())e>=d.length&&d.push(t);return d}function p7(e,t,n){let{term:r,properties:i}=t,a=e.data.index,o=e.caches.propertiesToSearch;if(!o){let t=e.index.getSearchablePropertiesWithTypes(a);o=e.index.getSearchableProperties(a),o=o.filter(e=>t[e].startsWith(`string`)),e.caches.propertiesToSearch=o}if(i&&i!==`*`){for(let e of i)if(!o.includes(e))throw f5(`UNKNOWN_INDEX`,e,o.join(`, `));o=o.filter(e=>i.includes(e))}let s=Object.keys(t.where??{}).length>0,c;s&&(c=e.index.searchByWhereClause(a,e.tokenizer,t.where,n));let l,u=t.threshold!==void 0&&t.threshold!==null?t.threshold:1;if(r||i){let i=t7(e);if(l=e.index.search(a,r||``,e.tokenizer,n,o,t.exact||!1,t.tolerance||0,t.boost||{},ive(t.relevance),i,c,u),t.exact&&r){let t=r.trim().split(/\s+/);l=l.filter(([n])=>{let r=e.documentsStore.get(e.data.docs,n);if(!r)return!1;for(let e of o){let n=nve(r,e);if(typeof n==`string`&&t.every(e=>RegExp(`\\b${tve(e)}\\b`).test(n)))return!0}return!1})}}else l=s?t_e(a,t.where)||(c?Array.from(c):[]).map(e=>[+e,0]):Object.keys(e.documentsStore.getAll(e.data.docs)).map(e=>[+e,0]);return l}function tve(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function nve(e,t){let n=t.split(`.`),r=e;for(let e of n)if(r&&typeof r==`object`&&e in r)r=r[e];else return;return r}function rve(e,t,n){let r=$8();function i(){let i=Object.keys(e.data.index.vectorIndexes),a=t.facets&&Object.keys(t.facets).length>0,{limit:o=10,offset:s=0,distinctOn:c,includeVectors:l=!1}=t,u=t.preflight===!0,d=p7(e,t,n);if(t.sortBy){if(typeof t.sortBy==`function`){let n=d.map(([e])=>e),r=e.documentsStore.getMultiple(e.data.docs,n).map((e,t)=>[d[t][0],d[t][1],e]);r.sort(t.sortBy),d=r.map(([e,t])=>[e,t])}else d=e.sorter.sortBy(e.data.sorting,d,t.sortBy).map(([t,n])=>[v5(e.internalDocumentIDStore,t),n])}else d=d.sort(n5);d=f7(e,e.data.pinning,d,t.term);let f;u||(f=c?pve(e,d,s,o,c):v7(e,d,s,o));let p={elapsed:{formatted:``,raw:0},hits:[],count:d.length};return f!==void 0&&(p.hits=f.filter(Boolean),l||o5(p,i)),a&&(p.facets=o7(e,d,t.facets)),t.groupBy&&(p.groups=u7(e,d,t.groupBy)),p.elapsed=e.formatElapsedTime($8()-r),p}async function a(){e.beforeSearch&&await w5(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await C5(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}const m7={k:1.2,b:.75,d:.5};function ive(e){let t=e??{};return t.k=t.k??m7.k,t.b=t.b??m7.b,t.d=t.d??m7.d,t}function h7(e,t,n){let r=t.vector;if(r&&(!(`value`in r)||!(`property`in r)))throw f5(`INVALID_VECTOR_INPUT`,Object.keys(r).join(`, `));let i=e.data.index.vectorIndexes[r.property];if(!i)throw f5(`UNKNOWN_VECTOR_PROPERTY`,r.property);let a=i.node.size;if(r?.value.length!==a)throw r?.property===void 0||r?.value.length===void 0?f5(`INVALID_INPUT_VECTOR`,`undefined`,a,`undefined`):f5(`INVALID_INPUT_VECTOR`,r.property,a,r.value.length);let o=e.data.index,s;return Object.keys(t.where??{}).length>0&&(s=e.index.searchByWhereClause(o,e.tokenizer,t.where,n)),i.node.find(r.value,t.similarity??.8,s)}function ave(e,t,n=`english`){let r=$8();function i(){let i=h7(e,t,n).sort(n5);i=f7(e,e.data.pinning,i,void 0);let a=[];t.facets&&Object.keys(t.facets).length>0&&(a=o7(e,i,t.facets));let o=t.vector.property,s=t.includeVectors??!1,c=t.limit??10,l=t.offset??0,u=Array.from({length:c});for(let t=0;t<c;t++){let n=i[t+l];if(!n)break;let r=e.data.docs.docs[n[0]];if(r){s||(r[o]=null);let i={id:y5(e.internalDocumentIDStore,n[0]),score:n[1],document:r};u[t]=i}}let d=[];t.groupBy&&(d=u7(e,i,t.groupBy));let f=$8()-r;return{count:i.length,hits:u.filter(Boolean),elapsed:{raw:Number(f),formatted:Q8(f)},...a?{facets:a}:{},...d?{groups:d}:{}}}async function a(){e.beforeSearch&&await w5(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await C5(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function ove(e,t,n){let r=cve(p7(e,t,n)),i=h7(e,t,n),a=t.hybridWeights;return uve(r,i,t.term??``,a)}function sve(e,t,n){let r=$8();function i(){let i=ove(e,t,n);i=f7(e,e.data.pinning,i,t.term);let a;t.facets&&Object.keys(t.facets).length>0&&(a=o7(e,i,t.facets));let o;t.groupBy&&(o=u7(e,i,t.groupBy));let s=t.offset??0,c=t.limit??10,l=v7(e,i,s,c).filter(Boolean),u=$8(),d={count:i.length,elapsed:{raw:Number(u-r),formatted:Q8(u-r)},hits:l,...a?{facets:a}:{},...o?{groups:o}:{}};return(t.includeVectors??!1)||o5(d,Object.keys(e.data.index.vectorIndexes)),d}async function a(){e.beforeSearch&&await w5(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await C5(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function g7(e){return e[1]}function cve(e){let t=Math.max.apply(Math,e.map(g7));return e.map(([e,n])=>[e,n/t])}function _7(e,t){return e/t}function lve(e,t){return(n,r)=>n*e+r*t}function uve(e,t,n,r){let i=Math.max.apply(Math,e.map(g7)),a=Math.max.apply(Math,t.map(g7)),{text:o,vector:s}=r&&r.text&&r.vector?r:dve(n),c=new Map,l=e.length,u=lve(o,s);for(let t=0;t<l;t++){let[n,r]=e[t],a=u(_7(r,i),0);c.set(n,a)}let d=t.length;for(let e=0;e<d;e++){let[n,r]=t[e],i=_7(r,a),o=c.get(n)??0;c.set(n,o+u(0,i))}return[...c].sort((e,t)=>t[1]-e[1])}function dve(e){return{text:.5,vector:.5}}function fve(e,t,n){let r=t.mode??`fulltext`;if(r===`fulltext`)return rve(e,t,n);if(r===`vector`)return ave(e,t);if(r===`hybrid`)return sve(e,t);throw f5(`INVALID_SEARCH_MODE`,r)}function pve(e,t,n,r,i){let a=e.data.docs,o=new Map,s=[],c=new Set,l=t.length,u=0;for(let d=0;d<l;d++){let l=t[d];if(l===void 0)continue;let[f,p]=l;if(c.has(f))continue;let m=e.documentsStore.get(a,f),h=i5(m,i);if(!(h===void 0||o.has(h))&&(o.set(h,!0),u++,!(u<=n)&&(s.push({id:y5(e.internalDocumentIDStore,f),score:p,document:m}),c.add(f),u>=n+r)))break}return s}function v7(e,t,n,r){let i=e.data.docs,a=Array.from({length:r}),o=new Set;for(let s=n;s<r+n;s++){let n=t[s];if(n===void 0)break;let[r,c]=n;if(!o.has(r)){let t=e.documentsStore.get(i,r);a[s]={id:y5(e.internalDocumentIDStore,r),score:c,document:t},o.add(r)}}return a}const mve={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},y7=new WeakMap;function hve(e){return e===void 0||!Number.isFinite(e)?20:Math.max(1,Math.min(100,Math.trunc(e)))}function b7(e){return e.trim().toLowerCase()}const gve=/\.(?:md|mdx)$/;function _ve(e,t){if(t!==`page`)return e;let n=e.replace(gve,``);return n.length>0?n:e}function vve(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function yve(e){let t=vve(e.path),n=e.title?.trim()||t,r=e.modifiedTs??0,i=e.path.split(`/`).filter(Boolean),a=new Set(i),o=[...new Set((e.aliases??[]).flatMap(e=>e.split(`/`).filter(Boolean)).filter(e=>!a.has(e)))];return{id:`${e.kind}:${e.path}`,kind:e.kind,path:e.path,title:n,name:t,pathSegments:[...i,...o].join(` `),content:e.content??``,modifiedTs:Number.isFinite(r)?r:0}}const x7=/[^\P{L}a-zàèéìòóù]|[^\P{Nd}0-9]|\p{Nl}/iu,S7=(()=>{let e=globalThis.Intl.Segmenter;return e?new e(`en`,{granularity:`word`}):null})();function bve(){let e=$5({language:`english`}),t=e.tokenize.bind(e);return e.tokenize=(e,n,r,i)=>{let a=t(e,n,r,i);if(!S7||typeof e!=`string`||!x7.test(e))return a;let o=new Set(a);for(let{segment:t,isWordLike:n}of S7.segment(e)){if(!n||!x7.test(t))continue;let e=t.toLowerCase();o.has(e)||(o.add(e),a.push(e))}return a},e}function C7(e){let t=I_e({schema:mve,components:{tokenizer:bve()}});return e.length>0&&i7(t,e),t}function w7(e){let t={documents:e};return y7.set(t,C7(e)),t}function xve(e){let t=y7.get(e);if(t)return t;let n=C7(e.documents);return y7.set(e,n),n}const T7=new WeakSet;function Sve(e,t){return e===t||e.kind===t.kind&&e.path===t.path&&e.title===t.title&&e.name===t.name&&e.pathSegments===t.pathSegments&&e.modifiedTs===t.modifiedTs&&e.content===t.content}function Cve(e,t){let n=e=>({corpus:w7(t),inserted:0,updated:0,removed:0,rebuilt:!0,rebuildReason:e}),r=y7.get(e);if(!r)return n(`no-index`);if(T7.has(e))return n(`stale-base`);let i=new Map(t.map(e=>[e.id,e]));if(i.size!==t.length)return n(`duplicate-id`);let a=[],o=[],s=0;for(let t of e.documents){let e=i.get(t.id);e?Sve(t,e)||(a.push(t.id),o.push(e),s+=1):a.push(t.id)}let c=new Set(e.documents.map(e=>e.id));for(let e of t)c.has(e.id)||o.push(e);if(a.length+o.length>t.length)return n(`bulk-change`);T7.add(e);try{if(a.length>0&&J_e(r,a),o.length>0&&i7(r,o),t7(r)!==t.length)throw Error(`Search index count ${t7(r)} diverged from document count ${t.length} after incremental update`)}catch{return n(`mutation-failed`)}let l={documents:t};return y7.set(l,r),{corpus:l,inserted:o.length-s,updated:s,removed:a.length-s,rebuilt:!1}}function wve(e){return e===`autocomplete`?[`page`]:e===`full_text`?[`page`,`content`,`file`]:[`page`,`folder`,`file`]}function E7(e,t){return t.has(e.kind)?!0:e.kind===`page`&&t.has(`content`)}function Tve(e,t){let n=b7(t);if(!n)return 0;let r=_ve(n,e.kind),i=b7(e.title),a=b7(e.name),o=b7(e.path),s=o.split(`/`);return i===r||a===r?700:o===r?650:i.startsWith(r)||a.startsWith(r)?600:s.some(e=>e.startsWith(r))?550:i.includes(r)||a.includes(r)?500:o.includes(r)?450:-1}function D7(e,t){let n=Tve(e,t);return n<=0?n:zg(e.path)?n*.5:n}function Eve(e){return e===`file`?-60:0}function Dve(e,t,n,r,i){let a=i>0?t/i:0,o=n/50,s=r===`file`?-.001:0,c=1*a+1*o+s;return e*1e3+c}function O7(e,t,n,r){return e+t*20+n+Eve(r)}function k7(e,t,n,r,i,a){return e===`relevance`?O7(t,n,r,i):Dve(t,n,r,i,a)}function Ove(e,t){return t||(e===`full_text`?`relevance`:`navigation`)}function A7(e,t){let n=0;for(let r of e){let e=t.get(r.id)??0;e>n&&(n=e)}return n}function kve(e){let t=e.map(e=>e.modifiedTs).filter(e=>Number.isFinite(e)&&e>0);if(t.length===0)return new Map;let n=1/0,r=-1/0;for(let e of t)e<n&&(n=e),e>r&&(r=e);let i=Math.max(1,r-n);return new Map(e.map(e=>[e.id,e.modifiedTs>0?(e.modifiedTs-n)/i*50:0]))}function Ave(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function jve(e){return e===`full_text`?{title:8,name:7,path:5,pathSegments:4,content:1}:e===`autocomplete`?{title:10,name:9,path:5,pathSegments:4}:{title:8,name:7,path:5,pathSegments:4}}const Mve=/[-ក- -〿-ゟ゠-ヿ㐀-䶿一-鿿\uf900--\u1100-\u11ff\u3130-\u318f\ua960-\ua97f\uac00-\ud7ff]/;function Nve(e,t){let n=b7(t);return n.length<4||Mve.test(n)?0:+(e===`full_text`)}function Pve(e){let{lexical:t,fullText:n}=e.signals;return t>=500?`lexical`:t===450&&n<=0?`pathOnly`:`body`}function Fve(e){let t=[],n=[],r=[];for(let i of e){let e=Pve(i);e===`lexical`?t.length<100&&t.push(i):e===`body`?n.length<6&&n.push(i):r.length<4&&r.push(i)}return[...t,...n,...r]}function j7(e,t,n){if(t===`relevance`)return e.slice(0,n);let r=Fve(e),i=[],a=0,o=0;for(let e of r){if(e.document.kind===`folder`){if(a>=3)continue;a+=1}else if(e.document.kind===`file`){if(o>=3)continue;o+=1}if(i.push(e),i.length>=n)break}return i}function Ive(e,t,n={}){let r=n.intent??`omnibar`,i=Ove(r,n.ranking),a=hve(n.limit),o=new Set(n.scopes??wve(r)),s=e.documents.filter(e=>E7(e,o)),c=b7(t);if(!c)return s.slice().sort((e,t)=>e.path.localeCompare(t.path)).slice(0,a).map(e=>({document:e,score:0,signals:{lexical:0,fullText:0,recency:0}}));let l=fve(xve(e),{term:c,properties:Ave(r),boost:jve(r),tolerance:Nve(r,c),limit:Math.max(a*4,40)}),u=new Map(l.hits.filter(e=>E7(e.document,o)).map(e=>[e.document.id,e.score])),d=kve(s),f=new Map;for(let e of s)D7(e,c)>=0&&f.set(e.id,e);for(let e of l.hits)E7(e.document,o)&&f.set(e.document.id,e.document);if(!n.semantic){let e=A7(f.values(),u);return j7([...f.values()].map(t=>{let n=Math.max(0,D7(t,c)),r=u.get(t.id)??0,a=d.get(t.id)??0;return{document:t,score:k7(i,n,r,a,t.kind,e),signals:{lexical:n,fullText:r,recency:a}}}).sort((e,t)=>e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score),i,a)}return j7(Lve({scopedDocuments:s,candidates:f,fullTextScores:u,recency:d,normalizedQuery:c,ranking:i,semantic:n.semantic}),i,a)}function M7(e){let t=new Map;return e.forEach((e,n)=>{t.set(e,n+1)}),t}function Lve(e){let{scopedDocuments:t,candidates:n,fullTextScores:r,recency:i,normalizedQuery:a,ranking:o,semantic:s}=e,c=s.rrfK??60,l=s.candidateLimit??64,u=s.similarityFloor??0,d=s.scores,f=new Map(t.map(e=>[e.id,e])),p=[...d.entries()].filter(([e,t])=>t>=u&&f.has(e)).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])).slice(0,l);for(let[e]of p)if(!n.has(e)){let t=f.get(e);t&&n.set(e,t)}let m=A7(n.values(),r),h=[...n.values()].map(e=>{let t=Math.max(0,D7(e,a)),n=r.get(e.id)??0,s=i.get(e.id)??0,c=d.get(e.id),l=c!==void 0&&c>=u;return{document:e,score:t>0?k7(o,t,n,s,e.kind,m):O7(t,n,s,e.kind),signals:l?{lexical:t,fullText:n,recency:s,vector:c}:{lexical:t,fullText:n,recency:s},lexical:t,fullText:n,recency:s,cosine:c}}),g=M7(h.filter(e=>e.fullText>0).sort((e,t)=>t.fullText-e.fullText||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),_=M7(h.filter(e=>e.cosine!==void 0&&e.cosine>=u).sort((e,t)=>t.cosine-e.cosine||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),v=e=>{let t=0,n=g.get(e);n!==void 0&&(t+=1/(c+n));let r=_.get(e);return r!==void 0&&(t+=1/(c+r)),t};return h.sort((e,t)=>{let n=+(e.lexical>0),r=+(t.lexical>0);if(n!==r)return r-n;if(n===1)return e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score;let i=v(e.document.id),a=v(t.document.id);return i===a?e.recency===t.recency?e.document.path.localeCompare(t.document.path):t.recency-e.recency:a-i}).map(({document:e,score:t,signals:n})=>({document:e,score:t,signals:n}))}const Rve=/^[A-Za-z0-9._-]+$/,zve=/^(?:\d{1,3}\.){3}\d{1,3}$/;var N7=class extends Error{constructor(e){super(e),this.name=`InvalidShareUrlError`}};function Bve(e,t=0){if(F7(t,!0),t===0)return Uve(e);if(e.length>2985)throw new N7(`Share URL exceeds the v2 URL size limit`);Hve(P7(e),t);let n=new TextEncoder().encode(e);if(n.length>2985)throw new N7(`Share URL exceeds the v2 URL size limit`);let r=new Uint8Array(3+n.length);if(r[0]=2,r[1]=t>>>8,r[2]=t&255,r.set(n,3),r.length>2988)throw new N7(`Share payload exceeds the v2 size limit`);let i=V7(r);if(i.length>3984)throw new N7(`Share token exceeds the v2 size limit`);return i}function P7(e){if(!e.startsWith(`https://`))throw new N7(`Share URL must use canonical HTTPS spelling`);if(e.includes(`?`)||e.includes(`#`))throw new N7(`Share URL cannot contain a query or fragment`);let t=e.slice(8),n=t.indexOf(`/`);if(n<=0)throw new N7(`Share URL is missing its repository path`);let r=t.slice(0,n);I7(r);let i=t.slice(n+1).split(`/`);if(i.length<4||i.some(e=>e.length===0))throw new N7(`Share URL has an invalid path shape`);let[a,o,s,c,...l]=i;if(s!==`blob`&&s!==`tree`)throw new N7(`Share URL has an unsupported repository path shape`);let u=L7(a,`owner`),d=L7(o,`repository`),f=Wve(c),p=l.map(e=>Gve(e,`target`)),m=s===`blob`?`doc`:`folder`;if(m===`doc`&&p.length===0)throw new N7(`Document share URL is missing its target path`);let h={host:r,owner:u,repo:d,branch:f,kind:m,targetSegments:p};if(Vve(h)!==e)throw new N7(`Share URL is not canonically serialized`);return h}function Vve(e){if(I7(e.host),B7(e.owner,`owner`),B7(e.repo,`repository`),!S_(e.branch))throw new N7(`Share URL branch is invalid`);if(e.kind!==`doc`&&e.kind!==`folder`)throw new N7(`Share URL target kind is invalid`);if(e.kind===`doc`&&e.targetSegments.length===0)throw new N7(`Document share URL is missing its target path`);for(let t of e.targetSegments)z7(t,`target`);let t=e.kind===`doc`?`blob`:`tree`,n=[encodeURIComponent(e.owner),encodeURIComponent(e.repo),t,encodeURIComponent(e.branch),...e.targetSegments.map(e=>encodeURIComponent(e))];return`https://${e.host}/${n.join(`/`)}`}function Hve(e,t){if(F7(t,!1),t>e.targetSegments.length)throw new N7(`Content root depth exceeds the repository target path`);let n=e.targetSegments.slice(t).join(`/`);if(e.kind===`doc`){if(n.length===0)throw new N7(`Document share target cannot be the content root`);return{kind:`doc`,docPath:n}}return{kind:`folder`,folderPath:n}}function Uve(e){let t=new TextEncoder().encode(e),n=new Uint8Array(1+t.length);return n[0]=1,n.set(t,1),V7(n)}function F7(e,t){if(!Number.isInteger(e)||e<+!t||e>65535)throw new N7(`Content root depth is invalid`)}function I7(e){if(e.length===0||e.length>253||e.endsWith(`.`)||e!==e.toLowerCase()||zve.test(e))throw new N7(`Share URL host is not canonical`);if(e.split(`.`).some(e=>e.length===0||e.length>63||!/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/.test(e)))throw new N7(`Share URL host is not a DNS name`);if(c(e)!==e)throw new N7(`Share URL host is not a canonical GitHub host`)}function Wve(e){let t=R7(e,`branch`);if(!S_(t))throw new N7(`Share URL branch is invalid`);return t}function Gve(e,t){let n=R7(e,t);return z7(n,t),n}function L7(e,t){let n=R7(e,t);return B7(n,t),n}function R7(e,t){let n;try{n=decodeURIComponent(e)}catch{throw new N7(`Share URL ${t} has malformed percent encoding`)}if(encodeURIComponent(n)!==e)throw new N7(`Share URL ${t} is not canonically encoded`);return n}function z7(e,t){if(e.length===0||e===`.`||e===`..`||e.toLowerCase()===`.git`||e.includes(`/`)||e.includes(`\\`)||Kve(e))throw new N7(`Share URL ${t} component is invalid`)}function B7(e,t){if(z7(e,t),!Rve.test(e)||e.startsWith(`-`))throw new N7(`Share URL ${t} component is invalid`)}function Kve(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<=31||n===127)return!0}return!1}function V7(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}const qve=yo({name:j(),description:j(),files:yo({skillMd:j(),scripts:P(j()),references:P(j())})}),Jve=yo({pluginProvider:j().optional(),plugin:j().optional(),marketplace:j().optional(),repositoryUrl:j().optional(),version:j().optional(),gitCommitSha:j().optional(),scope:j().optional(),projectPath:j().optional()}),Yve=yo({commands:N(),hooks:N(),mcp:N()}),Xve=yo({...qve.shape,sourceHarness:j(),sourceHarnesses:P(j()),home:j(),provenance:Jve,inert:Yve,outsideProject:N().optional()}),Zve=yo({schema:L(1),name:j(),version:j(),description:j().optional(),author:yo({name:j()}).optional(),skills:P(j()),hostCompatibility:P(j()).optional(),capabilities:yo({scripts:j(),network:j(),inert:P(j())}).optional(),provenance:yo({source:j(),ref:j(),contentHash:j()}).optional()}),Qve=F({skills:P(Xve),packs:P(Zve)}).loose(),$ve=F({results:P(F({id:j().min(1),name:j().min(1),source:j().min(1),description:j(),installs:M().int().nonnegative().nullable(),publisher:j().nullable()}).loose()),backend:I([`skills.sh`,`github-fallback`]),degraded:N()}).loose(),eye=F({title:j(),description:j(),image:j().nullable(),skillsUrl:j().nullable(),sourceKind:I([`github`,`site`]),sourceUrl:j()}).loose(),tye=F({skills:P(F({name:j(),description:j().nullable()}).loose())}).loose(),nye=F({kind:I([`local`,`import`,`none`]),scope:I(ug).optional(),name:j().optional(),dir:j().optional(),source:j().optional(),ref:j().optional(),via:I([`source`,`publisher`]).optional()}).loose(),rye=F({relPath:j(),content:j().nullable()}).loose(),iye=F({provider:j(),plugin:j(),version:j().optional(),marketplace:j().optional(),repositoryUrl:j().optional()}).loose(),aye=F({provider:j(),plugin:j(),version:j().optional(),description:j().optional(),repositoryUrl:j().optional(),bundledSkills:P(j()),capabilities:F({commands:N(),hooks:N(),mcp:N(),agents:N()}),setupSupported:N()}).loose(),oye=F({name:j(),description:j().nullable(),skillMd:j(),files:P(rye),plugin:iye.optional(),pluginBundle:aye.optional()}).loose(),H7=e=>e*8+4;H7(92),H7(40);const U7=(()=>{let e=globalThis.Intl.Segmenter;return e?new e(void 0,{granularity:`grapheme`}):null})();function sye(e){return e>=56320&&e<=57343}function cye(e){return e>=55296&&e<=56319}function lye(e,t){if(U7){let n=U7.segment(e).containing(t);return n===void 0?t:n.index}return sye(e.charCodeAt(t))&&cye(e.charCodeAt(t-1))?t-1:t}function uye(e,t){return e.length<=t?e:t<=0?``:e.slice(0,lye(e,t))}Array.from({length:256},(e,t)=>(t+256).toString(16).slice(1));const dye={fileSystem:`File System`,gitUpstream:`Git (upstream)`,service:`OpenKnowledge (service)`,generator:`OpenKnowledge (generated)`},fye=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],pye={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`};function mye(e,t=fye){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}const hye={"claude-code":`claude`,"claude-ai":`claude`,cursor:`cursor`,"cursor-vscode":`cursor`,cascade:`windsurf`,codex:`openai`,"codex-mcp-client":`openai`,copilot:`github`,cline:`cline`,"claude-acp":`claude`,"codex-acp":`openai`,"github-copilot-cli":`github`};function W7(e){return e?hye[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}const gye={claude:`Claude`,cursor:`Cursor`,windsurf:`Windsurf`,openai:`Codex`,github:`Copilot`,cline:`Cline`};function _ye(e){let t=e?.trim();return t?gye[W7(t)]??t:`Agent`}function G7(e){if(!e.includes(`%`))return e;let t;try{t=decodeURIComponent(e)}catch{return e}return t===`.`||t===`..`||t.includes(`/`)||t.includes(`\\`)||t.includes(`\0`)?e:t}function K7(e){return e===`.`||e===`..`?e:encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.codePointAt(0)?.toString(16).toUpperCase()}`)}function vye(e){return e.split(`/`).map(K7).join(`/`)}function q7(e){return e.split(`/`).map(G7).join(`/`)}function J7(e,t){let n=e.trim();if(!n||/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n)||n.startsWith(`//`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=r>=0?n.slice(0,r):n,a=r>=0?n.slice(r+1):null,o=(i.split(`?`)[0]??``).trim();if(!o)return null;let s=G7(o.split(`/`).pop()??``).match(/\.([a-z0-9]+)$/i);if(s){let e=`.${(s[1]??``).toLowerCase()}`;if(!hp.includes(e))return null}let c=o.startsWith(`/`),l=c?o.slice(1):o,u=c?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[],d=l.split(`/`),f=d.length-1;for(let e=0;e<d.length;e++){let t=G7(d[e]??``);if(e===f&&(t=mg(t)),t===`..`){if(u.length===0)return null;u.pop()}else t!==`.`&&t!==``&&u.push(t)}return u.length===0?null:{docName:u.join(`/`),anchor:a||null}}function yye(e){throw Error(`Unhandled ClassifiedLinkTarget variant: ${JSON.stringify(e)}`)}const Y7=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function X7(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function Z7(e){let t=e.trim();return Y7.test(t)||t.startsWith(`//`)}function bye(e,t){let n=e.trim();if(!n)return null;if(n.startsWith(`#`)){let e=n.slice(1).trim();return e?{kind:`anchor`,anchor:e}:null}if(Z7(n))return{kind:`external`,url:n};let r=n.indexOf(`#`),i=q7(r<0?n:n.slice(0,r)),a=yg(i,t);if(a)return{kind:`doc`,docName:a,anchor:r<0?null:n.slice(r+1)};let o=vg(i,t);if(o)return{kind:`doc`,docName:o,anchor:r<0?null:n.slice(r+1)};let s=J7(n,t);if(s)return{kind:`doc`,docName:s.docName,anchor:s.anchor};let c=X7(i);return c&&c!==`md`&&c!==`mdx`?{kind:`asset`,url:n,ext:c,literal:!1}:null}function Q7(e,t){let n=e.trim();if(!n)return null;if(Z7(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=X7(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r,literal:!0}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function xye(e,t,n){let r=e.trim();if(!r||Y7.test(r)||r.startsWith(`//`)||r.startsWith(`#`))return null;let i=r.indexOf(`#`),a=((i>=0?r.slice(0,i):r).split(`?`)[0]??``).trim();if(!a)return null;let o=a.startsWith(`/`),s=o?a.slice(1):a,c=o?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of s.split(`/`))if(e===`..`){if(c.length===0)return null;c.pop()}else e!==`.`&&e!==``&&c.push(n.literal?e:G7(e));return c.length===0?null:c.join(`/`)}const Sye={document:{unicode:`NFC`,case:`sensitive`},folder:{unicode:`NFC`,case:`sensitive`},file:{unicode:`NFC`,case:`insensitive`}};function $7(e,t){let n=Sye[e],r=t.normalize(n.unicode);return n.case===`insensitive`?r.toLowerCase():r}function e9(e){return $7(`file`,e)}function t9(e,t){return e<t?-1:+(e>t)}function n9(e,t){let n=t.split(`/`),r=n.length-1;return n.map((t,n)=>$7(n===r?e:`folder`,t)).join(`/`)}function Cye(e){let t=n9(`file`,e);return X6(t)||t}const r9=Symbol.for(`@inkeep/open-knowledge-core/target-namespace`);var wye=class extends Set{kind;[r9]=!0;byKey=new Map;constructor(e,t){super(),this.kind=e;for(let e of t)this.add(e)}add(e){if(super.has(e))return this;super.add(e);let t=n9(this.kind,e),n=this.byKey.get(t);if(n===void 0)return this.byKey.set(t,[e]),this;let r=0;for(;r<n.length&&t9(n[r],e)<0;)r++;return n.splice(r,0,e),this}delete(e){if(!super.delete(e))return!1;let t=n9(this.kind,e),n=this.byKey.get(t);return n===void 0||(n.splice(n.indexOf(e),1),n.length===0&&this.byKey.delete(t),!0)}clear(){super.clear(),this.byKey.clear()}lookup(e){if(super.has(e))return{kind:`exact`,name:e};let t=this.byKey.get(n9(this.kind,e));if(t===void 0)return{kind:`absent`};let n=t[0];return t.length===1?{kind:`equivalent`,name:n}:{kind:`ambiguous`,name:n,candidates:[...t]}}resolve(e){return super.has(e)?e:this.byKey.get(n9(this.kind,e))?.[0]}};function i9(e,t=[]){return new wye(e,t)}function Tye(e,t){for(let n of t)for(let t=n.indexOf(`/`);t!==-1;t=n.indexOf(`/`,t+1))e.add(n.slice(0,t));return e}function Eye(e){return e[r9]===!0}function a9(e,t){return Eye(e)?e.resolve(t):e.has(t)?t:void 0}function Dye(e,t){let n=e;return n[r9]===!0&&n.kind===t}function o9(e,t){return Dye(t,e)?t:i9(e,t)}function s9(e){return`pagesBySlug`in e}function c9(e){return s9(e)?e.pages:e}function Oye(e,t){return s9(e)?e.assetPaths??new Set:t??new Set}function kye(e,t){return s9(e)?e.filePaths??new Set:t??new Set}function Aye(e,t){let n=new Map;for(let r of e){let e=t(r),i=n.get(e);e&&(i===void 0||t9(r,i)<0)&&n.set(e,r)}return n}function jye(e,t){let n=new Map,r=[...e].sort(t9);for(let e of r){let r=e.lastIndexOf(`/`),i=t(r===-1?e:e.slice(r+1));i&&!n.has(i)&&n.set(i,e)}return n}function Mye(e,t){let n=X6(e);if(!n)return;if(s9(t))return t.pagesBySlug.get(n);let r;for(let e of t)X6(e)===n&&(r===void 0||t9(e,r)<0)&&(r=e);return r}function Nye(e,t){if(e.includes(`/`))return;let n=X6(e);if(!n)return;if(s9(t))return t.pagesByBasename?.get(n);let r;for(let e of t){let t=e.lastIndexOf(`/`);X6(t===-1?e:e.slice(t+1))===n&&(r===void 0||t9(e,r)<0)&&(r=e)}return r}function Pye(e){let t=e.trim();if(!t)return[];let n=X6(t);return n.length>0&&n!==t?[n]:[]}function l9(e,t){let n=e.trim();if(!n)return;let r=a9(c9(t),n);if(r!==void 0)return r;let i=n.replace(/\.(md|mdx)$/i,``);if(i!==n){let e=u9(i,t);if(e!==void 0)return e}return u9(n,t)}function u9(e,t){let n=e.trim();if(!n)return;let r=c9(t),i=a9(r,n);if(i!==void 0)return i;let a=Mye(n,t);if(a)return a;for(let e of Pye(n)){let t=a9(r,e);if(t!==void 0)return t}return Fye(n,r)||Nye(n,t)}function Fye(e,t){let n=a9(t,`${e}/index`);if(n!==void 0)return n;let r=e.lastIndexOf(`/`),i=r===-1?e:e.slice(r+1);return i?a9(t,`${e}/${i}`):void 0}function Iye(e){let t=((e.trim().split(`#`)[0]??``).trim().split(`?`)[0]??``).trim();return t.startsWith(`/`)?t.slice(1):t}function Lye(e){let t=new Map;for(let n of e){let e=e9(n),r=t.get(e);(r===void 0||t9(n,r)<0)&&t.set(e,n)}return t}function d9(e){let t=o9(`file`,e),n;return e=>{let r=t.resolve(e);return r===void 0?(n??=Lye(t),n.get(e9(e))):r}}function Rye(e,t,n){let r=Iye(e);if(!r)return null;let i=n?[t,n]:[t];for(let e of i){let t=d9(e)(r);if(t!==void 0)return t}if(r.includes(`/`))return null;let a=$7(`file`,r),o=[];for(let e of i)for(let t of e){let e=t.lastIndexOf(`/`);$7(`file`,e===-1?t:t.slice(e+1))===a&&o.push(t)}return o.length===0?null:o.sort(t9)[0]??null}function zye(e,t,n){let r=Q7(e,t);return r===null||r.kind!==`asset`||Rye(r.url,Oye(n),kye(n))!==null||l9(e,n)===void 0?r:{kind:`doc`,docName:e.trim(),anchor:t?.trim()||null}}const Bye=`state/bug-reports`,Vye=yo({at:j(),transport:j(),outcome:j(),reference:j().optional(),error:j().optional(),errorCode:j().optional()}),Hye=yo({reason:j(),at:j(),errorCode:j().optional()});yo({version:M().int().catch(1),id:j(),createdAt:j(),bundleLevel:j(),zipBytes:M().int().nonnegative().catch(0),zipDeleted:N().optional(),state:j(),systemWide:N().optional(),projectSlug:j().nullable().optional(),reference:j().optional(),lastError:Hye.optional(),attempts:P(Vye).optional(),note:j().optional()});const Uye=`.sent.yaml`;yo({version:M().int().catch(1),id:j().optional(),sentAt:j().optional(),reference:j().optional()});var f9=class extends Error{envVar;constructor(e,t){super(`${e}: ${t}`),this.name=`EnvVarError`,this.envVar=e}};const p9=new Map([[`PORT`,[`server`,`port`]],[`OK_BIND`,[`server`,`bind`]],[`OK_EXTERNAL_URL`,[`server`,`externalUrl`]],[`OK_ALLOW_EXTERNAL`,[`server`,`allowExternal`]],[`OK_OPEN_BROWSER`,[`server`,`openBrowser`]],[`OK_IDLE_SHUTDOWN`,[`server`,`idleShutdown`]]]);function Wye(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1_$2`).toUpperCase()}function m9(e){return`OK_${(e[0]===`server`?e.slice(1):e).map(Wye).join(`_`)}`}function h9(e){let t=e;for(let e=0;e<16;e++){let e=t?._zod?.def;if(e===void 0||e.type!=="default"&&e.type!==`optional`&&e.type!==`nullable`)return t;t=e.innerType}return t}function Gye(e){return h9(e)?._zod?.def?.type}function Kye(e=eh){let t=[],n=(e,r)=>{let i=h9(e)?._zod?.def?.shape;if(i===void 0){r.length>0&&t.push(r);return}for(let[e,t]of Object.entries(i))n(t,[...r,e])};return n(e,[]),t}function qye(){let e=new Map;for(let t of Kye())e.set(m9(t),t);return e}function Jye(e,t,n){switch(Gye(n)){case`boolean`:if(t===`1`||t===`true`)return!0;if(t===`0`||t===`false`)return!1;throw new f9(e,`expected a boolean (1/0/true/false), got ${JSON.stringify(t)}`);case`number`:{let n=Number(t);if(!Number.isFinite(n))throw new f9(e,`expected a number, got ${JSON.stringify(t)}`);return n}case`array`:return t.split(/\s+/).filter(e=>e!==``);default:return t}}function Yye(e,t){let n=Array(t.length+1);for(let e=0;e<=t.length;e++)n[e]=e;for(let r=1;r<=e.length;r++){let i=n[0];n[0]=r;for(let a=1;a<=t.length;a++){let o=Math.min(n[a]+1,n[a-1]+1,i+(e[r-1]===t[a-1]?0:1));i=n[a],n[a]=o}}return n[t.length]}function Xye(e,t){if(e===`OK_PORT`)return{envVar:e,message:`OK_PORT is not read — the port variable is unprefixed PORT.`};let n=t.get(e);if(n!==void 0)return{envVar:e,message:`${e} maps to config key ${n.join(`.`)}, which is not env-configurable — set it in the config file instead.`};for(let t of p9.keys())if(t!==`PORT`&&Yye(e,t)<=2)return{envVar:e,message:`Unknown variable ${e} — did you mean ${t}?`};return null}function g9(e,t){let n={...e};for(let[e,r]of Object.entries(t)){if(r===void 0)continue;let t=n[e];n[e]=_9(r)&&_9(t)?g9(t,r):r}return n}function _9(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Zye(e){let t=[],n=[],r=qye();for(let[n,r]of p9){let i=e[n];if(i===void 0||i.trim()===``)continue;let a=th(eh,r);if(a===void 0)throw new f9(n,`internal: config path ${r.join(`.`)} does not resolve`);let o=Jye(n,i.trim(),a),s=a.safeParse(o);if(!s.success)throw new f9(n,`${s.error.issues.map(e=>e.message).join(`; `)||`invalid value`} (got ${JSON.stringify(i)})`);t.push({path:r,envVar:n,value:s.data})}for(let t of Object.keys(e)){if(!t.startsWith(`OK_`)||p9.has(t)||e[t]===void 0)continue;let i=Xye(t,r);i!==null&&n.push(i)}let i={};for(let{path:e,value:n}of t){let t=i;for(let n of e.slice(0,-1))t[n]??={},t=t[n];t[e[e.length-1]]=n}return{overrides:t,layer:i,diagnostics:n}}function Qye(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function $ye(e){let{value:t,file:n,source:r,doc:i}=e,a=[],o=(e,t)=>{if(t.length>0){let e=nh(eh,t);if(e!==void 0){if(e.scope===`project-local`){let e=m9(t),o;i!=null&&r!=null&&n!=null&&(o=fh({file:n,source:r,doc:i,path:t})),a.push({path:[...t],...p9.has(e)?{envVar:e}:{},...o===void 0?{}:{source:o}})}return}}if(Qye(e))for(let[n,r]of Object.entries(e))o(r,[...t,n])};return o(t,[]),a}function ebe(e){let t=e.path.join(`.`);return`${e.source===void 0?``:`${e.source.file}:${e.source.line}:${e.source.column}: `}${t} is a per-machine (project-local) setting; the value committed in .ok/config.yml is ignored. Set it in .ok/local/config.yml (this machine only)${e.envVar===void 0?``:`, or set ${e.envVar} on this host`}.`}const v9=`(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)`,tbe=RegExp(`^127\\.${v9}\\.${v9}\\.${v9}$`);function nbe(e){let t=e.trim().toLowerCase();return t===`localhost`||t===`::1`||t===`[::1]`||tbe.test(t)}function y9(e){return e.every(nbe)}function rbe(e){return!e.loopbackOnly}function ibe(e){if(e===`off`)return null;if(!zm.test(e))throw Error(`invalid idleShutdown duration: ${JSON.stringify(e)}`);let t=Number(e.slice(0,-1));switch(e.at(-1)){case`s`:return t*1e3;case`m`:return t*6e4;default:return t*36e5}}function abe(e){let t=e?.server,n=t?.bind===void 0||t.bind.length===0?Rm:t.bind,r=y9(n),i=t?.port,a=t?.externalUrl,o=(t?.allowExternal??!1)&&a!==void 0;return{port:i,bind:n,externalUrl:a,allowExternal:t?.allowExternal??!1,openBrowser:t?.openBrowser??r,idleShutdown:t?.idleShutdown??(r&&!o?`30m`:`off`),loopbackOnly:r}}const obe={"unix-chain":{1:[`macos-bundle`,`npx-fallback`],2:[`macos-bundle`,`linux-deb-bundle`,`npx-fallback`]},"windows-chain":{1:[`windows-global-cli`,`npx-fallback`]}};function b9(e){return{kind:`declined`,reason:e}}function sbe(e){if(e.command===`node`)return b9(`dev-mode`);if(typeof e.command==`string`)return Array.isArray(e.args)?e.command===`/bin/sh`?e.args.length!==3||e.args[0]!==`-l`||e.args[1]!==`-c`||typeof e.args[2]!=`string`?b9(`malformed-argv`):{envelope:`split-command-args`,family:`unix-chain`,body:e.args[2]}:e.command===`powershell`?e.args.length!==4||e.args[0]!==`-NoProfile`||e.args[1]!==`-NonInteractive`||e.args[2]!==`-Command`||typeof e.args[3]!=`string`?b9(`malformed-argv`):{envelope:`split-command-args`,family:`windows-chain`,body:e.args[3]}:b9(`foreign-command`):b9(`malformed-argv`);if(e.type!==`local`||!Array.isArray(e.command))return b9(`unknown-envelope`);let[t,...n]=e.command;return t===`node`?b9(`dev-mode`):t===`/bin/sh`?n.length!==3||n[0]!==`-l`||n[1]!==`-c`||typeof n[2]!=`string`?b9(`malformed-argv`):{envelope:`opencode-argv`,family:`unix-chain`,body:n[2]}:t===`powershell`?n.length!==4||n[0]!==`-NoProfile`||n[1]!==`-NonInteractive`||n[2]!==`-Command`||typeof n[3]!=`string`?b9(`malformed-argv`):{envelope:`opencode-argv`,family:`windows-chain`,body:n[3]}:b9(`foreign-command`)}function x9(e,t){return e===`unix-chain`?`# ok-mcp${t}-v`:`# ok-mcp${t}-win-v`}function cbe(e,t,n){let r=e.split(/\r?\n/,1)[0],i=x9(t,n);if(r===void 0||!r.startsWith(i))return null;let a=r.slice(i.length).match(/^([1-9]\d*)$/);if(a==null)return null;let o=Number(a[1]);return Number.isSafeInteger(o)?o:null}function lbe(e,t=obe,n=s().mcpChainTag){if(typeof e!=`object`||!e)return b9(`not-an-object`);let r=sbe(e);if(`kind`in r)return r;let i=cbe(r.body,r.family,n);if(i===null)return b9(`malformed-marker`);let a=t[r.family],o=Math.max(...Object.keys(a).map(Number));if(i>o)return{kind:`recognized`,disposition:`keep`,descriptor:{envelope:r.envelope,family:r.family,revision:i,knowledge:`future`,capabilities:`opaque`}};let c=a[i];return c===void 0?b9(`unknown-revision`):{kind:`recognized`,disposition:i===o?`keep`:`upgrade`,descriptor:{envelope:r.envelope,family:r.family,revision:i,knowledge:`known`,capabilities:c}}}function S9(e){return e.replace(/\/+/g,`/`).replace(/\/+$/,``)}function ube(e){return i[e].userHomeDirName}function dbe(e,t,n=`darwin`,r){return e===`stable`?n===`linux`?`${S9(r?.startsWith(`/`)?r:`${S9(t)}/.config`)}/OpenKnowledge/path-install.json`:`${S9(t)}/Library/Application Support/OpenKnowledge/path-install.json`:`${S9(t)}/${ube(e)}/path-install.json`}function fbe(e){return e===`stable`?`open-knowledge cli`:`open-knowledge ${e} cli`}function pbe(e){return e===`stable`?`open-knowledge.fish`:`open-knowledge-${e}.fish`}const mbe=`127.0.0.1`,C9=`installed-skills.json`,hbe=[`.ok`,u,C9],gbe=I(ug),_be=yo({hosts:P(j()),scope:gbe,scripts:N(),installedAt:wa(),projection:I([`symlink`,`copy`]).optional(),contentHash:j().optional()}),w9=yo({schema:L(1),skills:ko(j(),_be).default({})});function vbe(){return{schema:1,skills:{}}}function ybe(e){let t;try{t=JSON.parse(e)}catch{return null}let n=w9.safeParse(t);return n.success?n.data:null}const T9=`machine-id`,E9=`skills`,D9=`skill-placements.json`,O9=`skill-move-retained.json`,k9=`server-authority.sqlite`,A9=`server-authority-leases`,bbe=[T9,E9,Tj,`${u}/${C9}`,`${u}/${D9}`,`${u}/${O9}`,`${u}/${k9}`,`${u}/${k9}-journal`,`${u}/${A9}`];function xbe(e){let{frontmatter:t}=iu(e);if(t===``)return null;let n;try{let e=(0,su.parseDocument)(ou(t));if(e.errors.length>0)return null;n=e.toJS()}catch{return null}return typeof n!=`object`||!n||Array.isArray(n)?null:n}function j9(e,t){switch(e){case`darwin`:return[`/opt/homebrew/bin`,`/usr/local/bin`,`/opt/local/bin`,`${t}/.local/bin`,`${t}/.asdf/shims`,`${t}/.local/share/mise/shims`];case`win32`:return[];default:return[`/usr/local/bin`,`/home/linuxbrew/.linuxbrew/bin`,`${t}/.local/bin`,`${t}/.asdf/shims`,`${t}/.local/share/mise/shims`]}}function M9(e,t,n){let r=n.delimiter,i=(e??``).split(r).filter(e=>e.length>0),a=new Set(i),o=[];for(let e of t)!a.has(e)&&n.isDir(e)&&(a.add(e),o.push(e));return[...i,...o].join(r)}function Sbe(e,t){return M9(e,j9(t.platform,t.homeDir),t)}function Cbe(e,t){switch(e){case`darwin`:return[`${t}/Library/pnpm`,`${t}/.bun/bin`,`${t}/.volta/bin`,`${t}/.yarn/bin`,`${t}/.npm-global/bin`];case`win32`:return[];default:return[`${t}/.local/share/pnpm`,`${t}/.bun/bin`,`${t}/.volta/bin`,`${t}/.yarn/bin`,`${t}/.npm-global/bin`]}}function wbe(e,t){return M9(e,[...j9(t.platform,t.homeDir),...Cbe(t.platform,t.homeDir)],t)}`${d}`;const N9=`:(literal)`;function P9(e){if(e===``)throw Error(`toPathspec: empty path. ":(literal)" is an empty pattern that matches every tracked path; pass "." if you meant the repo root.`);return`${N9}${e}`}function Tbe(e){if(e.length===0)throw Error(`pathspecArgs: empty path list. A bare "--" removes the pathspec restriction rather than selecting nothing.`);return[`--`,...e.map(e=>P9(e))]}function Ebe(e){return e.replaceAll(N9,``)}const F9=[{tagName:`Mirror`,attrName:`src`,resolution:`bare-doc-name`},{tagName:`Excalidraw`,attrName:`src`,resolution:`doc-relative`}];for(let e of F9){let t=t2.find(t=>t.name===e.tagName);if(!t)throw Error(`JSX_SRC_REF_TAGS: no built-in component descriptor named '${e.tagName}' — the rename-rewrite and backlink passes for this entry would silently never match. Fix the tagName to match a descriptor in builtInComponents.`);if(!t.props.some(t=>t.name===e.attrName))throw Error(`JSX_SRC_REF_TAGS: component '${e.tagName}' declares no prop named '${e.attrName}' — the rename-rewrite and backlink passes for this entry would silently never match. Fix the attrName to match one of the descriptor's props.`)}const Dbe=d4(),Obe=R2(),kbe=z2();function Abe(){return t2.filter(e=>e.surface===`canonical`&&e.name!==`*`)}function jbe(){return Abe().filter(e=>{let t=I9(e);return t!==`fence`&&t!==`html`})}function I9(e){return e.name===`MermaidFence`?`fence`:e.name===`HtmlAlignBlock`?`html`:e.hasChildren?`jsx-block`:`jsx-void`}function Mbe(e){return{id:e.name,displayName:e.displayName??e.name,description:e.description??``,kind:I9(e)}}function Nbe(e){if(e.hidden!==!0&&e.type!==`reactnode`){if(`defaultValue`in e&&e.defaultValue!==void 0)return e.defaultValue;if(e.type===`enum`)return e.enumValues[0];if(e.type===`string`)return``;if(e.type===`number`)return 0;if(e.type===`boolean`)return!1}}function Pbe(e,t){return!(e.omitOnDefault===!0&&`defaultValue`in e&&Object.is(e.defaultValue,t)||e.type===`string`&&e.required===!1&&e.defaultValue===void 0&&t===``)}function Fbe(e){let t=[];for(let n of e.props){let e=Nbe(n);e!==void 0&&Pbe(n,e)&&t.push(w0(n.name,e))}return t}function Ibe(e){return $T(e.exampleBody&&e.exampleBody.trim().length>0?e.exampleBody:`Body content here.`,{extensions:[Dbe],mdastExtensions:[Obe]}).children}function Lbe(e){let t=I9(e),n;if(t===`fence`)n={type:`code`,lang:`mermaid`,meta:null,value:e.exampleBody&&e.exampleBody.trim().length>0?e.exampleBody:`graph LR
|
|
397
|
-
A --> B`};else{let r=
|
|
396
|
+
`,ANSWER_SESSION_LAST_MESSAGE_IS_NOT_ASSISTANT:`The last message in the session is not an assistant message. Cannot regenerate non-assistant messages.`,PLUGIN_COMPONENT_CONFLICT:`The component "%s" is already defined. The plugin "%s" is trying to redefine it.`};function f5(e,...t){let n=Error(lge(gge[e]??`Unsupported Orama Error code: ${e}`,...t));return n.code=e,`captureStackTrace`in Error.prototype&&Error.captureStackTrace(n),n}function _ge(e){return{raw:Number(e),formatted:Q8(e)}}function vge(e){if(e.id){if(typeof e.id!=`string`)throw f5(`DOCUMENT_ID_MUST_BE_STRING`,typeof e.id);return e.id}return e5()}function p5(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];if(t!==void 0&&(r!==`geopoint`||typeof t!=`object`||typeof t.lon!=`number`||typeof t.lat!=`number`)&&(r!==`enum`||typeof t!=`string`&&typeof t!=`number`)){if(r===`enum[]`&&Array.isArray(t)){let e=t.length;for(let r=0;r<e;r++)if(typeof t[r]!=`string`&&typeof t[r]!=`number`)return n+`.`+r;continue}if(m5(r)){let e=_5(r);if(!Array.isArray(t)||t.length!==e)throw f5(`INVALID_INPUT_VECTOR`,n,e,t.length);continue}if(h5(r)){if(!Array.isArray(t))return n;let e=g5(r),i=t.length;for(let r=0;r<i;r++)if(typeof t[r]!==e)return n+`.`+r;continue}if(typeof r==`object`){if(!t||typeof t!=`object`)return n;let e=p5(t,r);if(e)return n+`.`+e;continue}if(typeof t!==r)return n}}}const yge={string:!1,number:!1,boolean:!1,enum:!1,geopoint:!1,"string[]":!0,"number[]":!0,"boolean[]":!0,"enum[]":!0},bge={"string[]":`string`,"number[]":`number`,"boolean[]":`boolean`,"enum[]":`enum`};function xge(e){return e===`geopoint`}function m5(e){return typeof e==`string`&&/^vector\[\d+\]$/.test(e)}function h5(e){return typeof e==`string`&&yge[e]}function g5(e){return bge[e]}function _5(e){let t=Number(e.slice(7,-1));switch(!0){case isNaN(t):throw f5(`INVALID_VECTOR_VALUE`,e);case t<=0:throw f5(`INVALID_VECTOR_SIZE`,e);default:return t}}function Sge(){return{idToInternalId:new Map,internalIdToId:[],save:Cge,load:wge}}function Cge(e){return{internalIdToId:e.internalIdToId}}function wge(e,t){let{internalIdToId:n}=t;e.internalDocumentIDStore.idToInternalId.clear(),e.internalDocumentIDStore.internalIdToId=[];let r=n.length;for(let t=0;t<r;t++){let r=n[t];e.internalDocumentIDStore.idToInternalId.set(r,t+1),e.internalDocumentIDStore.internalIdToId.push(r)}}function v5(e,t){if(typeof t==`string`){let n=e.idToInternalId.get(t);if(n)return n;let r=e.idToInternalId.size+1;return e.idToInternalId.set(t,r),e.internalIdToId.push(t),r}return t>e.internalIdToId.length?v5(e,t.toString()):t}function y5(e,t){if(e.internalIdToId.length<t)throw Error(`Invalid internalId ${t}`);return e.internalIdToId[t-1]}function Tge(e,t){return{sharedInternalDocumentStore:t,docs:{},count:0}}function Ege(e,t){let n=v5(e.sharedInternalDocumentStore,t);return e.docs[n]}function Dge(e,t){let n=t.length,r=Array.from({length:n});for(let i=0;i<n;i++){let n=v5(e.sharedInternalDocumentStore,t[i]);r[i]=e.docs[n]}return r}function Oge(e){return e.docs}function kge(e,t,n,r){return e.docs[n]===void 0&&(e.docs[n]=r,e.count++,!0)}function Age(e,t){let n=v5(e.sharedInternalDocumentStore,t);return e.docs[n]!==void 0&&(delete e.docs[n],e.count--,!0)}function jge(e){return e.count}function Mge(e,t){let n=t;return{docs:n.docs,count:n.count,sharedInternalDocumentStore:e}}function Nge(e){return{docs:e.docs,count:e.count}}function Pge(){return{create:Tge,get:Ege,getMultiple:Dge,getAll:Oge,store:kge,remove:Age,count:jge,load:Mge,save:Nge}}const Fge=[`beforeInsert`,`afterInsert`,`beforeRemove`,`afterRemove`,`beforeUpdate`,`afterUpdate`,`beforeUpsert`,`afterUpsert`,`beforeSearch`,`afterSearch`,`beforeInsertMultiple`,`afterInsertMultiple`,`beforeRemoveMultiple`,`afterRemoveMultiple`,`beforeUpdateMultiple`,`afterUpdateMultiple`,`beforeUpsertMultiple`,`afterUpsertMultiple`,`beforeLoad`,`afterLoad`,`afterCreate`];function Ige(e,t){let n=[],r=e.plugins?.length;if(!r)return n;for(let i=0;i<r;i++)try{let r=e.plugins[i];typeof r[t]==`function`&&n.push(r[t])}catch(e){throw console.error(`Caught error in getAllPluginsByHook:`,e),f5(`PLUGIN_CRASHED`)}return n}const Lge=[`tokenizer`,`index`,`documentsStore`,`sorter`,`pinning`],b5=[`validateSchema`,`getDocumentIndexId`,`getDocumentProperties`,`formatElapsedTime`];function x5(e,t,n,r){if(e.some(s5))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function S5(e,t,n){if(e.some(s5))return(async()=>{for(let r of e)await r(t,n)})();for(let r of e)r(t,n)}function C5(e,t,n,r,i){if(e.some(s5))return(async()=>{for(let a of e)await a(t,n,r,i)})();for(let a of e)a(t,n,r,i)}function w5(e,t,n,r){if(e.some(s5))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function Rge(e,t){if(e.some(s5))return(async()=>{for(let n of e)await n(t)})();for(let n of e)n(t)}var T5=class e{k;v;l=null;r=null;h=1;constructor(e,t){this.k=e,this.v=new Set(t)}updateHeight(){this.h=Math.max(e.getHeight(this.l),e.getHeight(this.r))+1}static getHeight(e){return e?e.h:0}getBalanceFactor(){return e.getHeight(this.l)-e.getHeight(this.r)}rotateLeft(){let e=this.r;return this.r=e.l,e.l=this,this.updateHeight(),e.updateHeight(),e}rotateRight(){let e=this.l;return this.l=e.r,e.r=this,this.updateHeight(),e.updateHeight(),e}toJSON(){return{k:this.k,v:Array.from(this.v),l:this.l?this.l.toJSON():null,r:this.r?this.r.toJSON():null,h:this.h}}static fromJSON(t){let n=new e(t.k,t.v);return n.l=t.l?e.fromJSON(t.l):null,n.r=t.r?e.fromJSON(t.r):null,n.h=t.h,n}},E5=class e{root=null;insertCount=0;constructor(e,t){e!==void 0&&t!==void 0&&(this.root=new T5(e,t))}insert(e,t,n=1e3){this.root=this.insertNode(this.root,e,t,n)}insertMultiple(e,t,n=1e3){for(let r of t)this.insert(e,r,n)}rebalance(){this.root&&=this.rebalanceNode(this.root)}toJSON(){return{root:this.root?this.root.toJSON():null,insertCount:this.insertCount}}static fromJSON(t){let n=new e;return n.root=t.root?T5.fromJSON(t.root):null,n.insertCount=t.insertCount||0,n}insertNode(e,t,n,r){if(e===null)return new T5(t,[n]);let i=[],a=e,o=null;for(;a!==null;)if(i.push({parent:o,node:a}),t<a.k){if(a.l===null){a.l=new T5(t,[n]),i.push({parent:a,node:a.l});break}o=a,a=a.l}else if(t>a.k){if(a.r===null){a.r=new T5(t,[n]),i.push({parent:a,node:a.r});break}o=a,a=a.r}else return a.v.add(n),e;let s=!1;this.insertCount++%r===0&&(s=!0);for(let t=i.length-1;t>=0;t--){let{parent:n,node:r}=i[t];if(r.updateHeight(),s){let t=this.rebalanceNode(r);n?n.l===r?n.l=t:n.r===r&&(n.r=t):e=t}}return e}rebalanceNode(e){let t=e.getBalanceFactor();if(t>1){if(e.l&&e.l.getBalanceFactor()>=0)return e.rotateRight();if(e.l)return e.l=e.l.rotateLeft(),e.rotateRight()}if(t<-1){if(e.r&&e.r.getBalanceFactor()<=0)return e.rotateLeft();if(e.r)return e.r=e.r.rotateRight(),e.rotateLeft()}return e}find(e){let t=this.findNodeByKey(e);return t?t.v:null}contains(e){return this.find(e)!==null}getSize(){let e=0,t=[],n=this.root;for(;n||t.length>0;){for(;n;)t.push(n),n=n.l;n=t.pop(),e++,n=n.r}return e}isBalanced(){if(!this.root)return!0;let e=[this.root];for(;e.length>0;){let t=e.pop(),n=t.getBalanceFactor();if(Math.abs(n)>1)return!1;t.l&&e.push(t.l),t.r&&e.push(t.r)}return!0}remove(e){this.root=this.removeNode(this.root,e)}removeDocument(e,t){let n=this.findNodeByKey(e);n&&(n.v.size===1?this.root=this.removeNode(this.root,e):n.v=new Set([...n.v.values()].filter(e=>e!==t)))}findNodeByKey(e){let t=this.root;for(;t;)if(e<t.k)t=t.l;else if(e>t.k)t=t.r;else return t;return null}removeNode(e,t){if(e===null)return null;let n=[],r=e;for(;r!==null&&r.k!==t;)n.push(r),r=t<r.k?r.l:r.r;if(r===null)return e;if(r.l===null||r.r===null){let t=r.l?r.l:r.r;if(n.length===0)e=t;else{let e=n[n.length-1];e.l===r?e.l=t:e.r=t}}else{let e=r,t=r.r;for(;t.l!==null;)e=t,t=t.l;r.k=t.k,r.v=t.v,e.l===t?e.l=t.r:e.r=t.r,r=e}n.push(r);for(let t=n.length-1;t>=0;t--){let r=n[t];r.updateHeight();let i=this.rebalanceNode(r);if(t>0){let e=n[t-1];e.l===r?e.l=i:e.r===r&&(e.r=i)}else e=i}return e}rangeSearch(e,t){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),i.k>=e&&i.k<=t)for(let e of i.v)n.add(e);if(i.k>t)break;i=i.r}return n}greaterThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.r;if(i=r.pop(),t&&i.k>=e||!t&&i.k>e)for(let e of i.v)n.add(e);else if(i.k<=e)break;i=i.l}return n}lessThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),t&&i.k<=e||!t&&i.k<e)for(let e of i.v)n.add(e);else if(i.k>e)break;i=i.r}return n}},D5=class e{numberToDocumentId;constructor(){this.numberToDocumentId=new Map}insert(e,t){this.numberToDocumentId.has(e)?this.numberToDocumentId.get(e).add(t):this.numberToDocumentId.set(e,new Set([t]))}find(e){let t=this.numberToDocumentId.get(e);return t?Array.from(t):null}remove(e){this.numberToDocumentId.delete(e)}removeDocument(e,t){let n=this.numberToDocumentId.get(t);n&&(n.delete(e),n.size===0&&this.numberToDocumentId.delete(t))}contains(e){return this.numberToDocumentId.has(e)}getSize(){let e=0;for(let t of this.numberToDocumentId.values())e+=t.size;return e}filter(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`eq`:{let t=e[n],r=this.numberToDocumentId.get(t);return r?Array.from(r):[]}case`in`:{let t=e[n],r=new Set;for(let e of t){let t=this.numberToDocumentId.get(e);if(t)for(let e of t)r.add(e)}return Array.from(r)}case`nin`:{let t=new Set(e[n]),r=new Set;for(let[e,n]of this.numberToDocumentId.entries())if(!t.has(e))for(let e of n)r.add(e);return Array.from(r)}default:throw Error(`Invalid operation`)}}filterArr(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`containsAll`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e].filter(e=>t.has(e))));return Array.from(r)}case`containsAny`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e,...t]));return Array.from(r)}default:throw Error(`Invalid operation`)}}static fromJSON(t){if(!t.numberToDocumentId)throw Error(`Invalid Flat Tree JSON`);let n=new e;for(let[e,r]of t.numberToDocumentId)n.numberToDocumentId.set(e,new Set(r));return n}toJSON(){return{numberToDocumentId:Array.from(this.numberToDocumentId.entries()).map(([e,t])=>[e,Array.from(t)])}}};function zge(e,t,n){if(n<0)return-1;if(e===t)return 0;let r=e.length,i=t.length;if(r===0)return i<=n?i:-1;if(i===0)return r<=n?r:-1;let a=Math.abs(r-i);if(e.startsWith(t))return a<=n?a:-1;if(t.startsWith(e))return 0;if(a>n)return-1;let o=[];for(let e=0;e<=r;e++){o[e]=[e];for(let t=1;t<=i;t++)o[e][t]=e===0?t:0}for(let a=1;a<=r;a++){let r=1/0;for(let n=1;n<=i;n++)e[a-1]===t[n-1]?o[a][n]=o[a-1][n-1]:o[a][n]=Math.min(o[a-1][n]+1,o[a][n-1]+1,o[a-1][n-1]+1),r=Math.min(r,o[a][n]);if(r>n)return-1}return o[r][i]<=n?o[r][i]:-1}function O5(e,t,n){let r=zge(e,t,n);return{distance:r,isBounded:r>=0}}var k5=class e{k;s;c=new Map;d=new Set;e;w=``;constructor(e,t,n){this.k=e,this.s=t,this.e=n}updateParent(e){this.w=e.w+this.s}addDocument(e){this.d.add(e)}removeDocument(e){return this.d.delete(e)}findAllWords(e,t,n,r){let i=[this];for(;i.length>0;){let a=i.pop();if(a.e){let{w:i,d:o}=a;if(n&&i!==t)continue;if(t5(e,i)!==null){if(r){if(Math.abs(t.length-i.length)<=r&&O5(t,i,r).isBounded)e[i]=[];else continue}else e[i]=[]}if(t5(e,i)!=null&&o.size>0){let t=e[i];for(let e of o)t.includes(e)||t.push(e)}}a.c.size>0&&i.push(...a.c.values())}return e}insert(t,n){let r=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=r.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c){if(r=s,i+=l,i===a){s.e||=!0,s.addDocument(n);return}continue}let u=o.slice(0,l),d=o.slice(l),f=t.slice(i+l),p=new e(u[0],u,!1);if(r.c.set(u[0],p),p.updateParent(r),s.s=d,s.k=d[0],p.c.set(d[0],s),s.updateParent(p),f){let t=new e(f[0],f,!0);t.addDocument(n),p.c.set(f[0],t),t.updateParent(p)}else p.e=!0,p.addDocument(n);return}{let a=new e(o,t.slice(i),!0);a.addDocument(n),r.c.set(o,a),a.updateParent(r);return}}r.e||(r.e=!0),r.addDocument(n)}_findLevenshtein(e,t,n,r,i){let a=[{node:this,index:t,tolerance:n}];for(;a.length>0;){let{node:t,index:n,tolerance:o}=a.pop();if(t.w.startsWith(e)){t.findAllWords(i,e,!1,0);continue}if(o<0)continue;if(t.e){let{w:n,d:a}=t;if(n&&(O5(e,n,r).isBounded&&(i[n]=[]),t5(i,n)!==void 0&&a.size>0)){let e=new Set(i[n]);for(let t of a)e.add(t);i[n]=Array.from(e)}}if(n>=e.length)continue;let s=e[n];if(t.c.has(s)){let e=t.c.get(s);a.push({node:e,index:n+1,tolerance:o})}a.push({node:t,index:n+1,tolerance:o-1});for(let[e,r]of t.c)a.push({node:r,index:n,tolerance:o-1}),e!==s&&a.push({node:r,index:n+1,tolerance:o-1})}}find(e){let{term:t,exact:n,tolerance:r}=e;if(r&&!n){let e={};return this._findLevenshtein(t,0,r,r,e),e}{let e=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=e.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c)e=s,i+=l;else if(i+l===a){if(l===a-i){if(n)return{};{let e={};return s.findAllWords(e,t,n,r),e}}return{}}else return{}}else return{}}let o={};return e.findAllWords(o,t,n,r),o}}contains(e){let t=this,n=0,r=e.length;for(;n<r;){let i=e[n],a=t.c.get(i);if(a){let i=a.s,o=i.length,s=0;for(;s<o&&n+s<r&&i[s]===e[n+s];)s++;if(s<o)return!1;n+=o,t=a}else return!1}return!0}removeWord(e){if(!e)return!1;let t=this,n=e.length,r=[];for(let i=0;i<n;i++){let n=e[i];if(t.c.has(n)){let e=t.c.get(n);r.push({parent:t,character:n}),i+=e.s.length-1,t=e}else return!1}for(t.d.clear(),t.e=!1;r.length>0&&t.c.size===0&&!t.e&&t.d.size===0;){let{parent:e,character:n}=r.pop();e.c.delete(n),t=e}return!0}removeDocumentByWord(e,t,n=!0){if(!e)return!0;let r=this,i=e.length;for(let a=0;a<i;a++){let i=e[a];if(r.c.has(i)){let o=r.c.get(i);a+=o.s.length-1,r=o,n&&r.w!==e||r.removeDocument(t)}else return!1}return!0}static getCommonPrefix(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e.charCodeAt(r)===t.charCodeAt(r);)r++;return e.slice(0,r)}toJSON(){return{w:this.w,s:this.s,e:this.e,k:this.k,d:Array.from(this.d),c:Array.from(this.c?.entries())?.map(([e,t])=>[e,t.toJSON()])}}static fromJSON(t){let n=new e(t.k,t.s,t.e);return n.w=t.w,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([t,n])=>[t,e.fromJSON(n)])||[]),n}},A5=class e extends k5{constructor(){super(``,``,!1)}static fromJSON(t){let n=new e;return n.w=t.w,n.s=t.s,n.e=t.e,n.k=t.k,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([e,t])=>[e,k5.fromJSON(t)])||[]),n}toJSON(){return super.toJSON()}},j5=class e{point;docIDs;left;right;parent;constructor(e,t){this.point=e,this.docIDs=new Set(t),this.left=null,this.right=null,this.parent=null}toJSON(){return{point:this.point,docIDs:Array.from(this.docIDs),left:this.left?this.left.toJSON():null,right:this.right?this.right.toJSON():null}}static fromJSON(t,n=null){let r=new e(t.point,t.docIDs);return r.parent=n,t.left&&(r.left=e.fromJSON(t.left,r)),t.right&&(r.right=e.fromJSON(t.right,r)),r}},M5=class e{root;nodeMap;constructor(){this.root=null,this.nodeMap=new Map}getPointKey(e){return`${e.lon},${e.lat}`}insert(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);if(r){t.forEach(e=>r.docIDs.add(e));return}let i=new j5(e,t);if(this.nodeMap.set(n,i),this.root==null){this.root=i;return}let a=this.root,o=0;for(;;){if(o%2==0){if(e.lon<a.point.lon){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}}else if(e.lat<a.point.lat){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}o++}}contains(e){let t=this.getPointKey(e);return this.nodeMap.has(t)}getDocIDsByCoordinates(e){let t=this.getPointKey(e),n=this.nodeMap.get(t);return n?Array.from(n.docIDs):null}removeDocByID(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);r&&(r.docIDs.delete(t),r.docIDs.size===0&&(this.nodeMap.delete(n),this.deleteNode(r)))}deleteNode(e){let t=e.parent,n=e.left?e.left:e.right;n&&(n.parent=t),t?t.left===e?t.left=n:t.right===e&&(t.right=n):(this.root=n,this.root&&(this.root.parent=null))}searchByRadius(t,n,r=!0,i=`asc`,a=!1){let o=a?e.vincentyDistance:e.haversineDistance,s=[{node:this.root,depth:0}],c=[];for(;s.length>0;){let{node:e,depth:i}=s.pop();if(e==null)continue;let a=o(t,e.point);(r?a<=n:a>n)&&c.push({point:e.point,docIDs:Array.from(e.docIDs)}),e.left!=null&&s.push({node:e.left,depth:i+1}),e.right!=null&&s.push({node:e.right,depth:i+1})}return i&&c.sort((e,n)=>{let r=o(t,e.point),a=o(t,n.point);return i.toLowerCase()===`asc`?r-a:a-r}),c}searchByPolygon(t,n=!0,r=null,i=!1){let a=[{node:this.root,depth:0}],o=[];for(;a.length>0;){let{node:r,depth:i}=a.pop();if(r==null)continue;r.left!=null&&a.push({node:r.left,depth:i+1}),r.right!=null&&a.push({node:r.right,depth:i+1});let s=e.isPointInPolygon(t,r.point);(s&&n||!s&&!n)&&o.push({point:r.point,docIDs:Array.from(r.docIDs)})}let s=e.calculatePolygonCentroid(t);if(r){let t=i?e.vincentyDistance:e.haversineDistance;o.sort((e,n)=>{let i=t(s,e.point),a=t(s,n.point);return r.toLowerCase()===`asc`?i-a:a-i})}return o}toJSON(){return{root:this.root?this.root.toJSON():null}}static fromJSON(t){let n=new e;return t.root&&(n.root=j5.fromJSON(t.root),n.buildNodeMap(n.root)),n}buildNodeMap(e){if(e==null)return;let t=this.getPointKey(e.point);this.nodeMap.set(t,e),e.left&&this.buildNodeMap(e.left),e.right&&this.buildNodeMap(e.right)}static calculatePolygonCentroid(e){let t=0,n=0,r=0,i=e.length;for(let a=0,o=i-1;a<i;o=a++){let i=e[a].lon,s=e[a].lat,c=e[o].lon,l=e[o].lat,u=i*l-c*s;t+=u,n+=(i+c)*u,r+=(s+l)*u}t/=2;let a=6*t;return n/=a,r/=a,{lon:n,lat:r}}static isPointInPolygon(e,t){let n=!1,r=t.lon,i=t.lat,a=e.length;for(let t=0,o=a-1;t<a;o=t++){let a=e[t].lon,s=e[t].lat,c=e[o].lon,l=e[o].lat;s>i!=l>i&&r<(c-a)*(i-s)/(l-s)+a&&(n=!n)}return n}static haversineDistance(e,t){let n=Math.PI/180,r=e.lat*n,i=t.lat*n,a=(t.lat-e.lat)*n,o=(t.lon-e.lon)*n,s=Math.sin(a/2)*Math.sin(a/2)+Math.cos(r)*Math.cos(i)*Math.sin(o/2)*Math.sin(o/2);return 6371e3*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))}static vincentyDistance(e,t){let n=6378137,r=1/298.257223563,i=.9966471893352525*n,a=Math.PI/180,o=e.lat*a,s=t.lat*a,c=(t.lon-e.lon)*a,l=Math.atan(.9966471893352525*Math.tan(o)),u=Math.atan(.9966471893352525*Math.tan(s)),d=Math.sin(l),f=Math.cos(l),p=Math.sin(u),m=Math.cos(u),h=c,g,_=1e3,v,y,b,x,S,C;do{let e=Math.sin(h),t=Math.cos(h);if(v=Math.sqrt(m*e*(m*e)+(f*p-d*m*t)*(f*p-d*m*t)),v===0)return 0;y=d*p+f*m*t,b=Math.atan2(v,y),x=f*m*e/v,S=1-x*x,C=y-2*d*p/S,isNaN(C)&&(C=0);let n=r/16*S*(4+r*(4-3*S));g=h,h=c+(1-n)*r*x*(b+n*v*(C+n*y*(-1+2*C*C)))}while(Math.abs(h-g)>1e-12&&--_>0);if(_===0)return NaN;let w=S*(n*n-i*i)/(i*i),T=1+w/16384*(4096+w*(-768+w*(320-175*w))),ee=w/1024*(256+w*(-128+w*(74-47*w))),te=ee*v*(C+ee/4*(y*(-1+2*C*C)-ee/6*C*(-3+4*v*v)*(-3+4*C*C)));return i*T*(b-te)}},N5=class e{true;false;constructor(){this.true=new Set,this.false=new Set}insert(e,t){t?this.true.add(e):this.false.add(e)}delete(e,t){t?this.true.delete(e):this.false.delete(e)}getSize(){return this.true.size+this.false.size}toJSON(){return{true:Array.from(this.true),false:Array.from(this.false)}}static fromJSON(t){let n=new e;return n.true=new Set(t.true),n.false=new Set(t.false),n}};function Bge(e,t,n,r,i,{k:a,b:o,d:s}){return Math.log(1+(n-t+.5)/(t+.5))*(s+e*(a+1))/(e+a*(1-o+o*r/i))}var P5=class e{size;vectors=new Map;constructor(e){this.size=e}add(e,t){t instanceof Float32Array||(t=new Float32Array(t));let n=F5(t,this.size);this.vectors.set(e,[n,t])}remove(e){this.vectors.delete(e)}find(e,t,n){return e instanceof Float32Array||(e=new Float32Array(e)),Vge(e,n,this.vectors,this.size,t)}toJSON(){let e=[];for(let[t,[n,r]]of this.vectors)e.push([t,[n,Array.from(r)]]);return{size:this.size,vectors:e}}static fromJSON(t){let n=t,r=new e(n.size);for(let[e,[t,i]]of n.vectors)r.vectors.set(e,[t,new Float32Array(i)]);return r}};function F5(e,t){let n=0;for(let r=0;r<t;r++)n+=e[r]*e[r];return Math.sqrt(n)}function Vge(e,t,n,r,i){let a=F5(e,r),o=[],s=t||n.keys();for(let t of s){let s=n.get(t);if(!s)continue;let c=s[0],l=s[1],u=0;for(let t=0;t<r;t++)u+=e[t]*l[t];let d=u/(a*c);d>=i&&o.push([t,d])}return o}function Hge(e,t,n,r,i){let a=v5(e.sharedInternalDocumentStore,n);e.avgFieldLength[t]=((e.avgFieldLength[t]??0)*(i-1)+r.length)/i,e.fieldLengths[t][a]=r.length,e.frequencies[t][a]={}}function Uge(e,t,n,r,i){let a=0;for(let e of r)e===i&&a++;let o=v5(e.sharedInternalDocumentStore,n),s=a/r.length;e.frequencies[t][o][i]=s,i in e.tokenOccurrences[t]||(e.tokenOccurrences[t][i]=0),e.tokenOccurrences[t][i]=(e.tokenOccurrences[t][i]??0)+1}function Wge(e,t,n,r){let i=v5(e.sharedInternalDocumentStore,n);r>1?e.avgFieldLength[t]=(e.avgFieldLength[t]*r-e.fieldLengths[t][i])/(r-1):e.avgFieldLength[t]=void 0,e.fieldLengths[t][i]=void 0,e.frequencies[t][i]=void 0}function Gge(e,t,n){e.tokenOccurrences[t][n]--}function I5(e,t,n,r,i=``){r||={sharedInternalDocumentStore:t,indexes:{},vectorIndexes:{},searchableProperties:[],searchablePropertiesWithTypes:{},frequencies:{},tokenOccurrences:{},avgFieldLength:{},fieldLengths:{}};for(let[a,o]of Object.entries(n)){let n=`${i}${i?`.`:``}${a}`;if(typeof o==`object`&&!Array.isArray(o)){I5(e,t,o,r,n);continue}if(m5(o))r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o,r.vectorIndexes[n]={type:`Vector`,node:new P5(_5(o)),isArray:!1};else{let e=/\[/.test(o);switch(o){case`boolean`:case`boolean[]`:r.indexes[n]={type:`Bool`,node:new N5,isArray:e};break;case`number`:case`number[]`:r.indexes[n]={type:`AVL`,node:new E5(0,[]),isArray:e};break;case`string`:case`string[]`:r.indexes[n]={type:`Radix`,node:new A5,isArray:e},r.avgFieldLength[n]=0,r.frequencies[n]={},r.tokenOccurrences[n]={},r.fieldLengths[n]={};break;case`enum`:case`enum[]`:r.indexes[n]={type:`Flat`,node:new D5,isArray:e};break;case`geopoint`:r.indexes[n]={type:`BKD`,node:new M5,isArray:e};break;default:throw f5(`INVALID_SCHEMA_TYPE`,Array.isArray(o)?`array`:o,n)}r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o}}return r}function Kge(e,t,n,r,i,a,o,s){return c=>{let{type:l,node:u}=t.indexes[n];switch(l){case`Bool`:u[c?`true`:`false`].add(r);break;case`AVL`:{let e=s?.avlRebalanceThreshold??1;u.insert(c,r,e);break}case`Radix`:{let s=a.tokenize(c,i,n,!1);e.insertDocumentScoreParameters(t,n,r,s,o);for(let i of s)e.insertTokenScoreParameters(t,n,r,s,i),u.insert(i,r);break}case`Flat`:u.insert(c,r);break;case`BKD`:u.insert(c,[r])}}}function qge(e,t,n,r,i,a,o,s,c,l,u){if(m5(o))return Jge(t,n,a,r,i);let d=Kge(e,t,n,i,s,c,l,u);if(!h5(o))return d(a);let f=a,p=f.length;for(let e=0;e<p;e++)d(f[e])}function Jge(e,t,n,r,i){e.vectorIndexes[t].node.add(i,n)}function L5(e,t,n,r,i,a,o,s,c,l){if(m5(o))return t.vectorIndexes[n].node.remove(i),!0;let{type:u,node:d}=t.indexes[n];switch(u){case`AVL`:return d.removeDocument(a,i),!0;case`Bool`:return d[a?`true`:`false`].delete(i),!0;case`Radix`:{let o=c.tokenize(a,s,n);e.removeDocumentScoreParameters(t,n,r,l);for(let r of o)e.removeTokenScoreParameters(t,n,r),d.removeDocumentByWord(r,i);return!0}case`Flat`:return d.removeDocument(i,a),!0;case`BKD`:return d.removeDocByID(a,i),!1}}function Yge(e,t,n,r,i,a,o,s,c,l){if(!h5(o))return L5(e,t,n,r,i,a,o,s,c,l);let u=g5(o),d=a,f=d.length;for(let a=0;a<f;a++)L5(e,t,n,r,i,d[a],u,s,c,l);return!0}function R5(e,t,n,r,i,a,o,s,c,l){let u=Array.from(r),d=e.avgFieldLength[t],f=e.fieldLengths[t],p=e.tokenOccurrences[t],m=e.frequencies[t],h=typeof p[n]==`number`?p[n]??0:0,g=u.length;for(let e=0;e<g;e++){let r=u[e];if(c&&!c.has(r))continue;l.has(r)||l.set(r,new Map);let p=l.get(r);p.set(t,(p.get(t)||0)+1);let g=Bge(m?.[r]?.[n]??0,h,i,f[r],d,a);o.has(r)?o.set(r,o.get(r)+g*s):o.set(r,g*s)}}function Xge(e,t,n,r,i,a,o,s,c,l,u,d=0){let f=n.tokenize(t,r),p=f.length||1,m=new Map,h=new Map,g=new Map;for(let n of i){if(!(n in e.indexes))continue;let r=e.indexes[n],{type:i}=r;if(i!==`Radix`)throw f5(`WRONG_SEARCH_PROPERTY_TYPE`,n);let d=s[n]??1;if(d<=0)throw f5(`INVALID_BOOST_VALUE`,d);f.length===0&&!t&&f.push(``);let p=f.length;for(let t=0;t<p;t++){let i=f[t],s=r.node.find({term:i,exact:a,tolerance:o}),p=Object.keys(s);p.length>0&&h.set(i,!0);let _=p.length;for(let t=0;t<_;t++){let r=p[t],i=s[r];R5(e,n,r,i,l,c,g,d,u,m)}}}let _=Array.from(g.entries()).map(([e,t])=>[e,t]).sort((e,t)=>t[1]-e[1]);if(_.length===0)return[];if(d===1)return _;if(d===0){if(p===1)return _;for(let e of f)if(!h.get(e))return[];return _.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1})}let v=_.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1});if(v.length>0){let e=_.filter(([e])=>!v.some(([t])=>t===e)),t=Math.ceil(e.length*d);return[...v,...e.slice(0,t)]}return _}function z5(e,t,n,r){if(`and`in n&&n.and&&Array.isArray(n.and)){let i=n.and;return i.length===0?new Set:l5(...i.map(n=>z5(e,t,n,r)))}if(`or`in n&&n.or&&Array.isArray(n.or)){let i=n.or;return i.length===0?new Set:i.map(n=>z5(e,t,n,r)).reduce((e,t)=>u5(e,t),new Set)}if(`not`in n&&n.not){let i=n.not,a=new Set,o=e.sharedInternalDocumentStore;for(let e=1;e<=o.internalIdToId.length;e++)a.add(e);return hge(a,z5(e,t,i,r))}let i=Object.keys(n),a=i.reduce((e,t)=>({[t]:new Set,...e}),{});for(let o of i){let i=n[o];if(e.indexes[o]===void 0)throw f5(`UNKNOWN_FILTER_PROPERTY`,o);let{node:s,type:c,isArray:l}=e.indexes[o];if(c===`Bool`){let e=s,t=i?e.true:e.false;a[o]=u5(a[o],t);continue}if(c===`BKD`){let e;if(`radius`in i)e=`radius`;else if(`polygon`in i)e=`polygon`;else throw Error(`Invalid operation ${i}`);if(e===`radius`){let{value:t,coordinates:n,unit:r=`m`,inside:c=!0,highPrecision:l=!1}=i[e],u=a5(t,r),d=s.searchByRadius(n,u,c,void 0,l);a[o]=B5(a[o],d)}else{let{coordinates:t,inside:n=!0,highPrecision:r=!1}=i[e],c=s.searchByPolygon(t,n,void 0,r);a[o]=B5(a[o],c)}continue}if(c===`Radix`&&(typeof i==`string`||Array.isArray(i))){for(let e of[i].flat()){let n=t.tokenize(e,r,o);for(let e of n){let t=s.find({term:e,exact:!0});a[o]=i_e(a[o],t)}}continue}let u=Object.keys(i);if(u.length>1)throw f5(`INVALID_FILTER_OPERATION`,u.length);if(c===`Flat`){let e=new Set(l?s.filterArr(i):s.filter(i));a[o]=u5(a[o],e);continue}if(c===`AVL`){let e=u[0],t=i[e],n;switch(e){case`gt`:n=s.greaterThan(t,!1);break;case`gte`:n=s.greaterThan(t,!0);break;case`lt`:n=s.lessThan(t,!1);break;case`lte`:n=s.lessThan(t,!0);break;case`eq`:n=s.find(t)??new Set;break;case`between`:{let[e,r]=t;n=s.rangeSearch(e,r);break}default:throw f5(`INVALID_FILTER_OPERATION`,e)}a[o]=u5(a[o],n)}}return l5(...Object.values(a))}function Zge(e){return e.searchableProperties}function Qge(e){return e.searchablePropertiesWithTypes}function $ge(e,t){let{indexes:n,vectorIndexes:r,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}=t,u={},d={};for(let e of Object.keys(n)){let{node:t,type:r,isArray:i}=n[e];switch(r){case`Radix`:u[e]={type:`Radix`,node:A5.fromJSON(t),isArray:i};break;case`Flat`:u[e]={type:`Flat`,node:D5.fromJSON(t),isArray:i};break;case`AVL`:u[e]={type:`AVL`,node:E5.fromJSON(t),isArray:i};break;case`BKD`:u[e]={type:`BKD`,node:M5.fromJSON(t),isArray:i};break;case`Bool`:u[e]={type:`Bool`,node:N5.fromJSON(t),isArray:i};break;default:u[e]=n[e]}}for(let e of Object.keys(r))d[e]={type:`Vector`,isArray:!1,node:P5.fromJSON(r[e])};return{sharedInternalDocumentStore:e,indexes:u,vectorIndexes:d,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}}function e_e(e){let{indexes:t,vectorIndexes:n,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}=e,l={};for(let e of Object.keys(n))l[e]=n[e].node.toJSON();let u={};for(let e of Object.keys(t)){let{type:n,node:r,isArray:i}=t[e];n===`Flat`||n===`Radix`||n===`AVL`||n===`BKD`||n===`Bool`?u[e]={type:n,node:r.toJSON(),isArray:i}:(u[e]=t[e],u[e].node=u[e].node.toJSON())}return{indexes:u,vectorIndexes:l,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}}function t_e(){return{create:I5,insert:qge,remove:Yge,insertDocumentScoreParameters:Hge,insertTokenScoreParameters:Uge,removeDocumentScoreParameters:Wge,removeTokenScoreParameters:Gge,calculateResultScores:R5,search:Xge,searchByWhereClause:z5,getSearchableProperties:Zge,getSearchablePropertiesWithTypes:Qge,load:$ge,save:e_e}}function B5(e,t){e||=new Set;let n=t.length;for(let r=0;r<n;r++){let n=t[r].docIDs,i=n.length;for(let t=0;t<i;t++)e.add(n[t])}return e}function V5(e,t,n=!1){let r=n?M5.vincentyDistance:M5.haversineDistance,i=[],a=[];for(let{point:n}of e)a.push(r(t,n));let o=Math.max(...a),s=0;for(let{docIDs:t}of e){let e=o-a[s]+1;for(let n of t)i.push([n,e]);s++}return i.sort((e,t)=>t[1]-e[1]),i}function n_e(e,t){let n=Object.keys(e);if(n.length!==1)return{isGeoOnly:!1};let r=n[0],i=e[r];if(t.indexes[r]===void 0)return{isGeoOnly:!1};let{type:a}=t.indexes[r];return a===`BKD`&&i&&(`radius`in i||`polygon`in i)?{isGeoOnly:!0,geoProperty:r,geoOperation:i}:{isGeoOnly:!1}}function r_e(e,t){let n=e,r=n_e(t,n);if(!r.isGeoOnly||!r.geoProperty||!r.geoOperation)return null;let{node:i}=n.indexes[r.geoProperty],a=r.geoOperation,o=i,s;if(`radius`in a){let{value:e,coordinates:t,unit:n=`m`,inside:r=!0,highPrecision:i=!1}=a.radius,c=t,l=a5(e,n);return s=o.searchByRadius(c,l,r,`asc`,i),V5(s,c,i)}if(`polygon`in a){let{coordinates:e,inside:t=!0,highPrecision:n=!1}=a.polygon;s=o.searchByPolygon(e,t,`asc`,n);let r=M5.calculatePolygonCentroid(e);return V5(s,r,n)}return null}function i_e(e,t){e||=new Set;let n=Object.keys(t),r=n.length;for(let i=0;i<r;i++){let r=t[n[i]],a=r.length;for(let t=0;t<a;t++)e.add(r[t])}return e}function H5(e,t,n,r,i){let a={language:e.tokenizer.language,sharedInternalDocumentStore:t,enabled:!0,isSorted:!0,sortableProperties:[],sortablePropertiesWithTypes:{},sorts:{}};for(let[o,s]of Object.entries(n)){let n=`${i}${i?`.`:``}${o}`;if(!r.includes(n)){if(typeof s==`object`&&!Array.isArray(s)){let i=H5(e,t,s,r,n);X8(a.sortableProperties,i.sortableProperties),a.sorts={...a.sorts,...i.sorts},a.sortablePropertiesWithTypes={...a.sortablePropertiesWithTypes,...i.sortablePropertiesWithTypes};continue}if(!m5(s))switch(s){case`boolean`:case`number`:case`string`:a.sortableProperties.push(n),a.sortablePropertiesWithTypes[n]=s,a.sorts[n]={docs:new Map,orderedDocsToRemove:new Map,orderedDocs:[],type:s};break;case`geopoint`:case`enum`:continue;case`enum[]`:case`boolean[]`:case`number[]`:case`string[]`:continue;default:throw f5(`INVALID_SORT_SCHEMA_TYPE`,Array.isArray(s)?`array`:s,n)}}}return a}function a_e(e,t,n,r){return r?.enabled===!1?{disabled:!0}:H5(e,t,n,(r||{}).unsortableProperties||[],``)}function o_e(e,t,n,r){if(!e.enabled)return;e.isSorted=!1;let i=v5(e.sharedInternalDocumentStore,n),a=e.sorts[t];a.orderedDocsToRemove.has(i)&&W5(e,t),a.docs.set(i,a.orderedDocs.length),a.orderedDocs.push([i,r])}function U5(e){if(e.isSorted||!e.enabled)return;let t=Object.keys(e.sorts);for(let n of t)u_e(e,n);e.isSorted=!0}function s_e(e,t,n){return t[1].localeCompare(n[1],oge(e))}function c_e(e,t){return e[1]-t[1]}function l_e(e,t){return t[1]?-1:1}function u_e(e,t){let n=e.sorts[t],r;switch(n.type){case`string`:r=s_e.bind(null,e.language);break;case`number`:r=c_e.bind(null);break;case`boolean`:r=l_e.bind(null)}n.orderedDocs.sort(r);let i=n.orderedDocs.length;for(let e=0;e<i;e++){let t=n.orderedDocs[e][0];n.docs.set(t,e)}}function d_e(e){let t=Object.keys(e.sorts);for(let n of t)W5(e,n)}function W5(e,t){let n=e.sorts[t];n.orderedDocsToRemove.size&&(n.orderedDocs=n.orderedDocs.filter(e=>!n.orderedDocsToRemove.has(e[0])),n.orderedDocsToRemove.clear())}function f_e(e,t,n){if(!e.enabled)return;let r=e.sorts[t],i=v5(e.sharedInternalDocumentStore,n);r.docs.get(i)&&(r.docs.delete(i),r.orderedDocsToRemove.set(i,!0))}function p_e(e,t,n){if(!e.enabled)throw f5(`SORT_DISABLED`);let r=n.property,i=n.order===`DESC`,a=e.sorts[r];if(!a)throw f5(`UNABLE_TO_SORT_ON_UNKNOWN_FIELD`,r,e.sortableProperties.join(`, `));return W5(e,r),U5(e),t.sort((t,n)=>{let r=a.docs.get(v5(e.sharedInternalDocumentStore,t[0])),o=a.docs.get(v5(e.sharedInternalDocumentStore,n[0])),s=r!==void 0,c=o!==void 0;return!s&&!c?0:s?c?i?o-r:r-o:-1:1}),t}function m_e(e){return e.enabled?e.sortableProperties:[]}function h_e(e){return e.enabled?e.sortablePropertiesWithTypes:{}}function g_e(e,t){let n=t;if(!n.enabled)return{enabled:!1};let r=Object.keys(n.sorts).reduce((e,t)=>{let{docs:r,orderedDocs:i,type:a}=n.sorts[t];return e[t]={docs:new Map(Object.entries(r).map(([e,t])=>[+e,t])),orderedDocsToRemove:new Map,orderedDocs:i,type:a},e},{});return{sharedInternalDocumentStore:e,language:n.language,sortableProperties:n.sortableProperties,sortablePropertiesWithTypes:n.sortablePropertiesWithTypes,sorts:r,enabled:!0,isSorted:n.isSorted}}function __e(e){if(!e.enabled)return{enabled:!1};d_e(e),U5(e);let t=Object.keys(e.sorts).reduce((t,n)=>{let{docs:r,orderedDocs:i,type:a}=e.sorts[n];return t[n]={docs:Object.fromEntries(r.entries()),orderedDocs:i,type:a},t},{});return{language:e.language,sortableProperties:e.sortableProperties,sortablePropertiesWithTypes:e.sortablePropertiesWithTypes,sorts:t,enabled:e.enabled,isSorted:e.isSorted}}function v_e(){return{create:a_e,insert:o_e,remove:f_e,save:__e,load:g_e,sortBy:p_e,getSortableProperties:m_e,getSortablePropertiesWithTypes:h_e}}const y_e=[65,65,65,65,65,65,65,67,69,69,69,69,73,73,73,73,69,78,79,79,79,79,79,null,79,85,85,85,85,89,80,115,97,97,97,97,97,97,97,99,101,101,101,101,105,105,105,105,101,110,111,111,111,111,111,null,111,117,117,117,117,121,112,121,65,97,65,97,65,97,67,99,67,99,67,99,67,99,68,100,68,100,69,101,69,101,69,101,69,101,69,101,71,103,71,103,71,103,71,103,72,104,72,104,73,105,73,105,73,105,73,105,73,105,73,105,74,106,75,107,107,76,108,76,108,76,108,76,108,76,108,78,110,78,110,78,110,110,78,110,79,111,79,111,79,111,79,111,82,114,82,114,82,114,83,115,83,115,83,115,83,115,84,116,84,116,84,116,85,117,85,117,85,117,85,117,85,117,85,117,87,119,89,121,89,90,122,90,122,90,122,115];function b_e(e){return e<192||e>383?e:y_e[e-192]||e}function x_e(e){let t=[];for(let n=0;n<e.length;n++)t[n]=b_e(e.charCodeAt(n));return String.fromCharCode(...t)}const S_e={ational:`ate`,tional:`tion`,enci:`ence`,anci:`ance`,izer:`ize`,bli:`ble`,alli:`al`,entli:`ent`,eli:`e`,ousli:`ous`,ization:`ize`,ation:`ate`,ator:`ate`,alism:`al`,iveness:`ive`,fulness:`ful`,ousness:`ous`,aliti:`al`,iviti:`ive`,biliti:`ble`,logi:`log`},C_e={icate:`ic`,ative:``,alize:`al`,iciti:`ic`,ical:`ic`,ful:``,ness:``},G5=`[aeiouy]`,K5=`[^aeiou][^aeiouy]*`,q5=G5+`[aeiou]*`,J5=`^(`+K5+`)?`+q5+K5,Y5=`^(`+K5+`)?`+q5+K5+q5+K5,X5=`^(`+K5+`)?`+G5;function w_e(e){let t,n,r,i,a,o;if(e.length<3)return e;let s=e.substring(0,1);if(s==`y`&&(e=s.toUpperCase()+e.substring(1)),r=/^(.+?)(ss|i)es$/,i=/^(.+?)([^s])s$/,r.test(e)?e=e.replace(r,`$1$2`):i.test(e)&&(e=e.replace(i,`$1$2`)),r=/^(.+?)eed$/,i=/^(.+?)(ed|ing)$/,r.test(e)){let t=r.exec(e);r=RegExp(J5),r.test(t[1])&&(r=/.$/,e=e.replace(r,``))}else i.test(e)&&(t=i.exec(e)[1],i=RegExp(X5),i.test(t)&&(e=t,i=/(at|bl|iz)$/,a=RegExp(`([^aeiouylsz])\\1$`),o=RegExp(`^`+K5+G5+`[^aeiouwxy]$`),i.test(e)?e+=`e`:a.test(e)?(r=/.$/,e=e.replace(r,``)):o.test(e)&&(e+=`e`)));if(r=/^(.+?)y$/,r.test(e)&&(t=r.exec(e)?.[1],r=RegExp(X5),t&&r.test(t)&&(e=t+`i`)),r=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=RegExp(J5),t&&r.test(t)&&(e=t+S_e[n])}if(r=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=RegExp(J5),t&&r.test(t)&&(e=t+C_e[n])}if(r=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,i=/^(.+?)(s|t)(ion)$/,r.test(e))t=r.exec(e)?.[1],r=RegExp(Y5),t&&r.test(t)&&(e=t);else if(i.test(e)){let n=i.exec(e);t=n?.[1]??``+n?.[2]??``,i=RegExp(Y5),i.test(t)&&(e=t)}return r=/^(.+?)e$/,r.test(e)&&(t=r.exec(e)?.[1],r=RegExp(Y5),i=RegExp(`^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*([aeiouy][aeiou]*)?$`),a=RegExp(`^`+K5+G5+`[^aeiouwxy]$`),t&&(r.test(t)||i.test(t)&&!a.test(t))&&(e=t)),r=/ll$/,i=RegExp(Y5),r.test(e)&&i.test(e)&&(r=/.$/,e=e.replace(r,``)),s==`y`&&(e=s.toLowerCase()+e.substring(1)),e}function Z5(e,t,n=!0){let r=`${this.language}:${e}:${t}`;return n&&this.normalizationCache.has(r)?this.normalizationCache.get(r):this.stopWords?.includes(t)?(n&&this.normalizationCache.set(r,``),``):(this.stemmer&&!this.stemmerSkipProperties.has(e)&&(t=this.stemmer(t)),t=x_e(t),n&&this.normalizationCache.set(r,t),t)}function T_e(e){for(;e[e.length-1]===``;)e.pop();for(;e[0]===``;)e.shift();return e}function Q5(e,t,n,r=!0){if(t&&t!==this.language)throw f5(`LANGUAGE_NOT_SUPPORTED`,t);if(typeof e!=`string`)return[e];let i=this.normalizeToken.bind(this,n??``),a;if(n&&this.tokenizeSkipProperties.has(n))a=[i(e,r)];else{let t=age[this.language];a=e.toLowerCase().split(t).map(e=>i(e,r)).filter(Boolean)}let o=T_e(a);return this.allowDuplicates?o:Array.from(new Set(o))}function $5(e={}){if(!e.language)e.language=`english`;else if(!G8.includes(e.language))throw f5(`LANGUAGE_NOT_SUPPORTED`,e.language);let t;if(e.stemming||e.stemmer&&!(`stemming`in e)){if(e.stemmer){if(typeof e.stemmer!=`function`)throw f5(`INVALID_STEMMER_FUNCTION_TYPE`);t=e.stemmer}else if(e.language===`english`)t=w_e;else throw f5(`MISSING_STEMMER`,e.language)}let n;if(e.stopWords!==!1){if(n=[],Array.isArray(e.stopWords))n=e.stopWords;else if(typeof e.stopWords==`function`)n=e.stopWords(n);else if(e.stopWords)throw f5(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);if(!Array.isArray(n))throw f5(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);for(let e of n)if(typeof e!=`string`)throw f5(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`)}let r={tokenize:Q5,language:e.language,stemmer:t,stemmerSkipProperties:new Set(e.stemmerSkipProperties?[e.stemmerSkipProperties].flat():[]),tokenizeSkipProperties:new Set(e.tokenizeSkipProperties?[e.tokenizeSkipProperties].flat():[]),stopWords:n,allowDuplicates:!!e.allowDuplicates,normalizeToken:Z5,normalizationCache:new Map};return r.tokenize=Q5.bind(r),r.normalizeToken=Z5,r}function E_e(e){return{sharedInternalDocumentStore:e,rules:new Map}}function D_e(e,t){if(e.rules.has(t.id))throw Error(`PINNING_RULE_ALREADY_EXISTS: A pinning rule with id "${t.id}" already exists. Use updateRule to modify it.`);e.rules.set(t.id,t)}function O_e(e,t){if(!e.rules.has(t.id))throw Error(`PINNING_RULE_NOT_FOUND: Cannot update pinning rule with id "${t.id}" because it does not exist. Use addRule to create it.`);e.rules.set(t.id,t)}function k_e(e,t){return e.rules.delete(t)}function A_e(e,t){return e.rules.get(t)}function j_e(e){return Array.from(e.rules.values())}function M_e(e,t){let n=e.toLowerCase().trim(),r=t.pattern.toLowerCase().trim();switch(t.anchoring){case`is`:return n===r;case`starts_with`:return n.startsWith(r);case`contains`:return n.includes(r);default:return!1}}function N_e(e,t){return e?t.conditions.every(t=>M_e(e,t)):!1}function e7(e,t){if(!t)return[];let n=[];for(let r of e.rules.values())N_e(t,r)&&n.push(r);return n}function P_e(e,t){return{sharedInternalDocumentStore:e,rules:new Map(t?.rules??[])}}function F_e(e){return{rules:Array.from(e.rules.entries())}}function I_e(){return{create:E_e,addRule:D_e,updateRule:O_e,removeRule:k_e,getRule:A_e,getAllRules:j_e,getMatchingRules:e7,load:P_e,save:F_e}}function L_e(e){let t={formatElapsedTime:_ge,getDocumentIndexId:vge,getDocumentProperties:r5,validateSchema:p5};for(let n of b5){let r=n;if(e[r]){if(typeof e[r]!=`function`)throw f5(`COMPONENT_MUST_BE_FUNCTION`,r)}else e[r]=t[r]}for(let t of Object.keys(e))if(!Lge.includes(t)&&!b5.includes(t))throw f5(`UNSUPPORTED_COMPONENT`,t)}function R_e({schema:e,sort:t,language:n,components:r,id:i,plugins:a}){r||={};for(let t of a??[]){if(!(`getComponents`in t)||typeof t.getComponents!=`function`)continue;let n=t.getComponents(e),i=Object.keys(n);for(let e of i)if(r[e])throw f5(`PLUGIN_COMPONENT_CONFLICT`,e,t.name);r={...r,...n}}i||=e5();let o=r.tokenizer,s=r.index,c=r.documentsStore,l=r.sorter,u=r.pinning;if(o=o?o.tokenize?o:$5(o):$5({language:n??`english`}),r.tokenizer&&n)throw f5(`NO_LANGUAGE_WITH_CUSTOM_TOKENIZER`);let d=Sge();s||=t_e(),l||=v_e(),c||=Pge(),u||=I_e(),L_e(r);let{getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,formatElapsedTime:h}=r,g={data:{},caches:{},schema:e,tokenizer:o,index:s,sorter:l,documentsStore:c,pinning:u,internalDocumentIDStore:d,getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,beforeInsert:[],afterInsert:[],beforeRemove:[],afterRemove:[],beforeUpdate:[],afterUpdate:[],beforeUpsert:[],afterUpsert:[],beforeSearch:[],afterSearch:[],beforeInsertMultiple:[],afterInsertMultiple:[],beforeRemoveMultiple:[],afterRemoveMultiple:[],beforeUpdateMultiple:[],afterUpdateMultiple:[],beforeUpsertMultiple:[],afterUpsertMultiple:[],afterCreate:[],formatElapsedTime:h,id:i,plugins:a,version:z_e()};g.data={index:g.index.create(g,d,e),docs:g.documentsStore.create(g,d),sorting:g.sorter.create(g,d,e,t),pinning:g.pinning.create(d)};for(let e of Fge)g[e]=(g[e]??[]).concat(Ige(g,e));let _=g.afterCreate;return _&&Rge(_,g),g}function z_e(){return`{{VERSION}}`}function t7(e){return e.documentsStore.count(e.data.docs)}function n7(e,t,n,r,i){let a=e.validateSchema(t,e.schema);if(a)throw f5(`SCHEMA_VALIDATION_FAILURE`,a);return s5(e.beforeInsert)||s5(e.afterInsert)||s5(e.index.beforeInsert)||s5(e.index.insert)||s5(e.index.afterInsert)?H_e(e,t,n,r,i):U_e(e,t,n,r,i)}const B_e=new Set([`enum`,`enum[]`]),V_e=new Set([`string`,`number`]);async function H_e(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw f5(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=v5(e.internalDocumentIDStore,s);if(r||await x5(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw f5(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];r7(n,r,e,t)}return await W_e(e,s,u,f,l,n,t,i),r||await x5(e.afterInsert,e,s,t),s}function U_e(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw f5(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=v5(e.internalDocumentIDStore,s);if(r||x5(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw f5(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];r7(n,r,e,t)}return G_e(e,s,u,f,l,n,t,i),r||x5(e.afterInsert,e,s,t),s}function r7(e,t,n,r){if(!(xge(t)&&typeof r==`object`&&typeof r.lon==`number`&&typeof r.lat==`number`)&&!(m5(t)&&Array.isArray(r))&&!(h5(t)&&Array.isArray(r))&&!(B_e.has(t)&&V_e.has(e))&&e!==t)throw f5(`INVALID_DOCUMENT_PROPERTY`,n,t,e)}async function W_e(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o];await e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i);let l=e.internalDocumentIDStore.idToInternalId.get(t);await e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),await e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function G_e(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o],l=v5(e.internalDocumentIDStore,t);e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i),e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function i7(e,t,n,r,i,a){return s5(e.afterInsertMultiple)||s5(e.beforeInsertMultiple)||s5(e.index.beforeInsert)||s5(e.index.insert)||s5(e.index.afterInsert)?K_e(e,t,n,r,i,a):q_e(e,t,n,r,i,a)}async function K_e(e,t,n=1e3,r,i,a=0){let o=[],s=async a=>{let s=Math.min(a+n,t.length),c=t.slice(a,s);for(let t of c){let n=await n7(e,t,r,i,{avlRebalanceThreshold:c.length});o.push(n)}return s};return await(async()=>{let e=0;for(;e<t.length;){let t=Date.now();if(e=await s(e),a>0){let e=a-(Date.now()-t);e>0&&d5(e)}}})(),i||await S5(e.afterInsertMultiple,e,t),o}function q_e(e,t,n=1e3,r,i,a=0){let o=[],s=0;function c(){let a=t.slice(s*n,(s+1)*n);if(a.length===0)return!1;for(let t of a){let n=n7(e,t,r,i,{avlRebalanceThreshold:a.length});o.push(n)}return s++,!0}function l(){let e=Date.now();for(;c();)if(a>0){let t=Date.now()-e;if(t>=a){let e=a-t%a;e>0&&d5(e)}}}return l(),i||S5(e.afterInsertMultiple,e,t),o}function a7(e,t,n,r){return s5(e.index.beforeRemove)||s5(e.index.remove)||s5(e.index.afterRemove)?J_e(e,t,n,r):Y_e(e,t,n,r)}async function J_e(e,t,n,r){let i=!0,{index:a,docs:o}=e.data,s=e.documentsStore.get(o,t);if(!s)return!1;let c=v5(e.internalDocumentIDStore,t),l=y5(e.internalDocumentIDStore,c),u=e.documentsStore.count(o);r||await x5(e.beforeRemove,e,l);let d=e.index.getSearchableProperties(a),f=e.index.getSearchablePropertiesWithTypes(a),p=e.getDocumentProperties(s,d);for(let r of d){let a=p[r];if(a===void 0)continue;let o=f[r];await e.index.beforeRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u),await e.index.remove(e.index,e.data.index,r,t,c,a,o,n,e.tokenizer,u)||(i=!1),await e.index.afterRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u)}let m=await e.sorter.getSortableProperties(e.data.sorting),h=await e.getDocumentProperties(s,m);for(let n of m)h[n]!==void 0&&e.sorter.remove(e.data.sorting,n,t);return r||await x5(e.afterRemove,e,l),e.documentsStore.remove(e.data.docs,t,c),i}function Y_e(e,t,n,r){let i=!0,{index:a,docs:o}=e.data,s=e.documentsStore.get(o,t);if(!s)return!1;let c=v5(e.internalDocumentIDStore,t),l=y5(e.internalDocumentIDStore,c),u=e.documentsStore.count(o);r||x5(e.beforeRemove,e,l);let d=e.index.getSearchableProperties(a),f=e.index.getSearchablePropertiesWithTypes(a),p=e.getDocumentProperties(s,d);for(let r of d){let a=p[r];if(a===void 0)continue;let o=f[r];e.index.beforeRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u),e.index.remove(e.index,e.data.index,r,t,c,a,o,n,e.tokenizer,u)||(i=!1),e.index.afterRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u)}let m=e.sorter.getSortableProperties(e.data.sorting),h=e.getDocumentProperties(s,m);for(let n of m)h[n]!==void 0&&e.sorter.remove(e.data.sorting,n,t);return r||x5(e.afterRemove,e,l),e.documentsStore.remove(e.data.docs,t,c),i}function X_e(e,t,n,r,i){return s5(e.index.beforeRemove)||s5(e.index.remove)||s5(e.index.afterRemove)||s5(e.beforeRemoveMultiple)||s5(e.afterRemoveMultiple)?Z_e(e,t,n,r,i):Q_e(e,t,n,r,i)}async function Z_e(e,t,n,r,i){let a=0;n||=1e3;let o=i?[]:t.map(t=>y5(e.internalDocumentIDStore,v5(e.internalDocumentIDStore,t)));return i||await S5(e.beforeRemoveMultiple,e,o),await new Promise((o,s)=>{let c=0;async function l(){let u=t.slice(c*n,++c*n);if(!u.length)return o();for(let t of u)try{await a7(e,t,r,i)&&a++}catch(e){s(e)}setTimeout(l,0)}setTimeout(l,0)}),i||await S5(e.afterRemoveMultiple,e,o),a}function Q_e(e,t,n,r,i){let a=0;n||=1e3;let o=i?[]:t.map(t=>y5(e.internalDocumentIDStore,v5(e.internalDocumentIDStore,t)));i||S5(e.beforeRemoveMultiple,e,o);let s=0;function c(){let o=t.slice(s*n,++s*n);if(o.length){for(let t of o)a7(e,t,r,i)&&a++;setTimeout(c,0)}}return c(),i||S5(e.afterRemoveMultiple,e,o),a}function $_e(e,t){return e[1]-t[1]}function eve(e,t){return t[1]-e[1]}function tve(e=`desc`){return e.toLowerCase()===`asc`?$_e:eve}function o7(e,t,n){let r={},i=t.map(([e])=>e),a=e.documentsStore.getMultiple(e.data.docs,i),o=Object.keys(n),s=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e of o){let t;if(s[e]===`number`){let{ranges:r}=n[e],i=r.length,a=Array.from({length:i});for(let e=0;e<i;e++){let t=r[e];a[e]=[`${t.from}-${t.to}`,0]}t=Object.fromEntries(a)}r[e]={count:0,values:t??{}}}let c=a.length;for(let e=0;e<c;e++){let t=a[e];for(let e of o){let i=e.includes(`.`)?i5(t,e):t[e],a=s[e],o=r[e].values;switch(a){case`number`:{let t=n[e].ranges;s7(t,o)(i);break}case`number[]`:{let t=new Set,r=n[e].ranges,a=s7(r,o,t);for(let e of i)a(e);break}case`boolean`:case`enum`:case`string`:c7(o,a)(i);break;case`boolean[]`:case`enum[]`:case`string[]`:{let e=c7(o,a===`boolean[]`?`boolean`:`string`,new Set);for(let t of i)e(t);break}default:throw f5(`FACET_NOT_SUPPORTED`,a)}}}for(let e of o){let t=r[e];if(t.count=Object.keys(t.values).length,s[e]===`string`){let r=n[e],i=tve(r.sort);t.values=Object.fromEntries(Object.entries(t.values).sort(i).slice(r.offset??0,r.limit??10))}}return r}function s7(e,t,n){return r=>{for(let i of e){let e=`${i.from}-${i.to}`;n?.has(e)||r>=i.from&&r<=i.to&&(t[e]===void 0?t[e]=1:(t[e]++,n?.add(e)))}}}function c7(e,t,n){let r=t===`boolean`?`false`:``;return t=>{let i=t?.toString()??r;n?.has(i)||(e[i]=(e[i]??0)+1,n?.add(i))}}const nve={reducer:(e,t,n,r)=>(t[r]=n,t),getInitialValue:e=>Array.from({length:e})},l7=[`string`,`number`,`boolean`];function u7(e,t,n){let r=n.properties,i=r.length,a=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e=0;e<i;e++){let t=r[e];if(a[t]===void 0)throw f5(`UNKNOWN_GROUP_BY_PROPERTY`,t);if(!l7.includes(a[t]))throw f5(`INVALID_GROUP_BY_PROPERTY`,t,l7.join(`, `),a[t])}let o=t.map(([t])=>y5(e.internalDocumentIDStore,t)),s=e.documentsStore.getMultiple(e.data.docs,o),c=s.length,l=n.maxResult||2**53-1,u=[],d={};for(let e=0;e<i;e++){let t=r[e],n={property:t,perValue:{}},i=new Set;for(let e=0;e<c;e++){let r=s[e],a=i5(r,t);if(a===void 0)continue;let o=typeof a==`boolean`?``+a:a,c=n.perValue[o]??{indexes:[],count:0};c.count>=l||(c.indexes.push(e),c.count++,n.perValue[o]=c,i.add(a))}u.push(Array.from(i)),d[t]=n}let f=d7(u),p=f.length,m=[];for(let e=0;e<p;e++){let t=f[e],n=t.length,i={values:[],indexes:[]},a=[];for(let e=0;e<n;e++){let n=t[e],o=r[e];a.push(d[o].perValue[typeof n==`boolean`?``+n:n].indexes),i.values.push(n)}i.indexes=fge(a).sort((e,t)=>e-t),i.indexes.length!==0&&m.push(i)}let h=m.length,g=Array.from({length:h});for(let e=0;e<h;e++){let r=m[e],i=n.reduce||nve,a=r.indexes.map(e=>({id:o[e],score:t[e][1],document:s[e]})),c=i.reducer.bind(null,r.values),l=i.getInitialValue(r.indexes.length),u=a.reduce(c,l);g[e]={values:r.values,result:u}}return g}function d7(e,t=0){if(t+1===e.length)return e[t].map(e=>[e]);let n=e[t],r=d7(e,t+1),i=[];for(let e of n)for(let t of r){let n=[e];X8(n,t),i.push(n)}return i}function f7(e,t,n,r){let i=e7(t,r);if(i.length===0)return n;let a=i.flatMap(e=>e.consequence.promote);a.sort((e,t)=>e.position-t.position);let o=new Set,s=new Map,c=new Set;for(let t of a){let n=v5(e.internalDocumentIDStore,t.doc_id);if(n!==void 0){if(s.has(n)){let e=s.get(n);t.position<e&&s.set(n,t.position);continue}c.has(t.position)||(o.add(n),s.set(n,t.position),c.add(t.position))}}if(s.size===0)return n;let l=n.filter(([e])=>!o.has(e)),u=[];for(let[t,r]of s.entries())n.find(([e])=>e===t)?u.push([t,1e6-r]):e.documentsStore.get(e.data.docs,t)&&u.push([t,0]);u.sort((e,t)=>(s.get(e[0])??1/0)-(s.get(t[0])??1/0));let d=[],f=new Map;for(let e of u){let t=s.get(e[0]);f.set(t,e)}let p=0,m=0;for(;m<l.length+u.length;)if(f.has(m))d.push(f.get(m)),m++;else if(p<l.length)d.push(l[p]),p++,m++;else break;for(let[e,t]of f.entries())e>=d.length&&d.push(t);return d}function p7(e,t,n){let{term:r,properties:i}=t,a=e.data.index,o=e.caches.propertiesToSearch;if(!o){let t=e.index.getSearchablePropertiesWithTypes(a);o=e.index.getSearchableProperties(a),o=o.filter(e=>t[e].startsWith(`string`)),e.caches.propertiesToSearch=o}if(i&&i!==`*`){for(let e of i)if(!o.includes(e))throw f5(`UNKNOWN_INDEX`,e,o.join(`, `));o=o.filter(e=>i.includes(e))}let s=Object.keys(t.where??{}).length>0,c;s&&(c=e.index.searchByWhereClause(a,e.tokenizer,t.where,n));let l,u=t.threshold!==void 0&&t.threshold!==null?t.threshold:1;if(r||i){let i=t7(e);if(l=e.index.search(a,r||``,e.tokenizer,n,o,t.exact||!1,t.tolerance||0,t.boost||{},ove(t.relevance),i,c,u),t.exact&&r){let t=r.trim().split(/\s+/);l=l.filter(([n])=>{let r=e.documentsStore.get(e.data.docs,n);if(!r)return!1;for(let e of o){let n=ive(r,e);if(typeof n==`string`&&t.every(e=>RegExp(`\\b${rve(e)}\\b`).test(n)))return!0}return!1})}}else l=s?r_e(a,t.where)||(c?Array.from(c):[]).map(e=>[+e,0]):Object.keys(e.documentsStore.getAll(e.data.docs)).map(e=>[+e,0]);return l}function rve(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function ive(e,t){let n=t.split(`.`),r=e;for(let e of n)if(r&&typeof r==`object`&&e in r)r=r[e];else return;return r}function ave(e,t,n){let r=$8();function i(){let i=Object.keys(e.data.index.vectorIndexes),a=t.facets&&Object.keys(t.facets).length>0,{limit:o=10,offset:s=0,distinctOn:c,includeVectors:l=!1}=t,u=t.preflight===!0,d=p7(e,t,n);if(t.sortBy){if(typeof t.sortBy==`function`){let n=d.map(([e])=>e),r=e.documentsStore.getMultiple(e.data.docs,n).map((e,t)=>[d[t][0],d[t][1],e]);r.sort(t.sortBy),d=r.map(([e,t])=>[e,t])}else d=e.sorter.sortBy(e.data.sorting,d,t.sortBy).map(([t,n])=>[v5(e.internalDocumentIDStore,t),n])}else d=d.sort(n5);d=f7(e,e.data.pinning,d,t.term);let f;u||(f=c?hve(e,d,s,o,c):v7(e,d,s,o));let p={elapsed:{formatted:``,raw:0},hits:[],count:d.length};return f!==void 0&&(p.hits=f.filter(Boolean),l||o5(p,i)),a&&(p.facets=o7(e,d,t.facets)),t.groupBy&&(p.groups=u7(e,d,t.groupBy)),p.elapsed=e.formatElapsedTime($8()-r),p}async function a(){e.beforeSearch&&await w5(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await C5(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}const m7={k:1.2,b:.75,d:.5};function ove(e){let t=e??{};return t.k=t.k??m7.k,t.b=t.b??m7.b,t.d=t.d??m7.d,t}function h7(e,t,n){let r=t.vector;if(r&&(!(`value`in r)||!(`property`in r)))throw f5(`INVALID_VECTOR_INPUT`,Object.keys(r).join(`, `));let i=e.data.index.vectorIndexes[r.property];if(!i)throw f5(`UNKNOWN_VECTOR_PROPERTY`,r.property);let a=i.node.size;if(r?.value.length!==a)throw r?.property===void 0||r?.value.length===void 0?f5(`INVALID_INPUT_VECTOR`,`undefined`,a,`undefined`):f5(`INVALID_INPUT_VECTOR`,r.property,a,r.value.length);let o=e.data.index,s;return Object.keys(t.where??{}).length>0&&(s=e.index.searchByWhereClause(o,e.tokenizer,t.where,n)),i.node.find(r.value,t.similarity??.8,s)}function sve(e,t,n=`english`){let r=$8();function i(){let i=h7(e,t,n).sort(n5);i=f7(e,e.data.pinning,i,void 0);let a=[];t.facets&&Object.keys(t.facets).length>0&&(a=o7(e,i,t.facets));let o=t.vector.property,s=t.includeVectors??!1,c=t.limit??10,l=t.offset??0,u=Array.from({length:c});for(let t=0;t<c;t++){let n=i[t+l];if(!n)break;let r=e.data.docs.docs[n[0]];if(r){s||(r[o]=null);let i={id:y5(e.internalDocumentIDStore,n[0]),score:n[1],document:r};u[t]=i}}let d=[];t.groupBy&&(d=u7(e,i,t.groupBy));let f=$8()-r;return{count:i.length,hits:u.filter(Boolean),elapsed:{raw:Number(f),formatted:Q8(f)},...a?{facets:a}:{},...d?{groups:d}:{}}}async function a(){e.beforeSearch&&await w5(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await C5(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function cve(e,t,n){let r=uve(p7(e,t,n)),i=h7(e,t,n),a=t.hybridWeights;return fve(r,i,t.term??``,a)}function lve(e,t,n){let r=$8();function i(){let i=cve(e,t,n);i=f7(e,e.data.pinning,i,t.term);let a;t.facets&&Object.keys(t.facets).length>0&&(a=o7(e,i,t.facets));let o;t.groupBy&&(o=u7(e,i,t.groupBy));let s=t.offset??0,c=t.limit??10,l=v7(e,i,s,c).filter(Boolean),u=$8(),d={count:i.length,elapsed:{raw:Number(u-r),formatted:Q8(u-r)},hits:l,...a?{facets:a}:{},...o?{groups:o}:{}};return(t.includeVectors??!1)||o5(d,Object.keys(e.data.index.vectorIndexes)),d}async function a(){e.beforeSearch&&await w5(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await C5(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function g7(e){return e[1]}function uve(e){let t=Math.max.apply(Math,e.map(g7));return e.map(([e,n])=>[e,n/t])}function _7(e,t){return e/t}function dve(e,t){return(n,r)=>n*e+r*t}function fve(e,t,n,r){let i=Math.max.apply(Math,e.map(g7)),a=Math.max.apply(Math,t.map(g7)),{text:o,vector:s}=r&&r.text&&r.vector?r:pve(n),c=new Map,l=e.length,u=dve(o,s);for(let t=0;t<l;t++){let[n,r]=e[t],a=u(_7(r,i),0);c.set(n,a)}let d=t.length;for(let e=0;e<d;e++){let[n,r]=t[e],i=_7(r,a),o=c.get(n)??0;c.set(n,o+u(0,i))}return[...c].sort((e,t)=>t[1]-e[1])}function pve(e){return{text:.5,vector:.5}}function mve(e,t,n){let r=t.mode??`fulltext`;if(r===`fulltext`)return ave(e,t,n);if(r===`vector`)return sve(e,t);if(r===`hybrid`)return lve(e,t);throw f5(`INVALID_SEARCH_MODE`,r)}function hve(e,t,n,r,i){let a=e.data.docs,o=new Map,s=[],c=new Set,l=t.length,u=0;for(let d=0;d<l;d++){let l=t[d];if(l===void 0)continue;let[f,p]=l;if(c.has(f))continue;let m=e.documentsStore.get(a,f),h=i5(m,i);if(!(h===void 0||o.has(h))&&(o.set(h,!0),u++,!(u<=n)&&(s.push({id:y5(e.internalDocumentIDStore,f),score:p,document:m}),c.add(f),u>=n+r)))break}return s}function v7(e,t,n,r){let i=e.data.docs,a=Array.from({length:r}),o=new Set;for(let s=n;s<r+n;s++){let n=t[s];if(n===void 0)break;let[r,c]=n;if(!o.has(r)){let t=e.documentsStore.get(i,r);a[s]={id:y5(e.internalDocumentIDStore,r),score:c,document:t},o.add(r)}}return a}const gve={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},y7=new WeakMap;function _ve(e){return e===void 0||!Number.isFinite(e)?20:Math.max(1,Math.min(100,Math.trunc(e)))}function b7(e){return e.trim().toLowerCase()}const vve=/\.(?:md|mdx)$/;function yve(e,t){if(t!==`page`)return e;let n=e.replace(vve,``);return n.length>0?n:e}function bve(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function xve(e){let t=bve(e.path),n=e.title?.trim()||t,r=e.modifiedTs??0,i=e.path.split(`/`).filter(Boolean),a=new Set(i),o=[...new Set((e.aliases??[]).flatMap(e=>e.split(`/`).filter(Boolean)).filter(e=>!a.has(e)))];return{id:`${e.kind}:${e.path}`,kind:e.kind,path:e.path,title:n,name:t,pathSegments:[...i,...o].join(` `),content:e.content??``,modifiedTs:Number.isFinite(r)?r:0}}const x7=/[^\P{L}a-zàèéìòóù]|[^\P{Nd}0-9]|\p{Nl}/iu,S7=(()=>{let e=globalThis.Intl.Segmenter;return e?new e(`en`,{granularity:`word`}):null})();function Sve(){let e=$5({language:`english`}),t=e.tokenize.bind(e);return e.tokenize=(e,n,r,i)=>{let a=t(e,n,r,i);if(!S7||typeof e!=`string`||!x7.test(e))return a;let o=new Set(a);for(let{segment:t,isWordLike:n}of S7.segment(e)){if(!n||!x7.test(t))continue;let e=t.toLowerCase();o.has(e)||(o.add(e),a.push(e))}return a},e}function C7(e){let t=R_e({schema:gve,components:{tokenizer:Sve()}});return e.length>0&&i7(t,e),t}function w7(e){let t={documents:e};return y7.set(t,C7(e)),t}function Cve(e){let t=y7.get(e);if(t)return t;let n=C7(e.documents);return y7.set(e,n),n}const T7=new WeakSet;function wve(e,t){return e===t||e.kind===t.kind&&e.path===t.path&&e.title===t.title&&e.name===t.name&&e.pathSegments===t.pathSegments&&e.modifiedTs===t.modifiedTs&&e.content===t.content}function Tve(e,t){let n=e=>({corpus:w7(t),inserted:0,updated:0,removed:0,rebuilt:!0,rebuildReason:e}),r=y7.get(e);if(!r)return n(`no-index`);if(T7.has(e))return n(`stale-base`);let i=new Map(t.map(e=>[e.id,e]));if(i.size!==t.length)return n(`duplicate-id`);let a=[],o=[],s=0;for(let t of e.documents){let e=i.get(t.id);e?wve(t,e)||(a.push(t.id),o.push(e),s+=1):a.push(t.id)}let c=new Set(e.documents.map(e=>e.id));for(let e of t)c.has(e.id)||o.push(e);if(a.length+o.length>t.length)return n(`bulk-change`);T7.add(e);try{if(a.length>0&&X_e(r,a),o.length>0&&i7(r,o),t7(r)!==t.length)throw Error(`Search index count ${t7(r)} diverged from document count ${t.length} after incremental update`)}catch{return n(`mutation-failed`)}let l={documents:t};return y7.set(l,r),{corpus:l,inserted:o.length-s,updated:s,removed:a.length-s,rebuilt:!1}}function Eve(e){return e===`autocomplete`?[`page`]:e===`full_text`?[`page`,`content`,`file`]:[`page`,`folder`,`file`]}function E7(e,t){return t.has(e.kind)?!0:e.kind===`page`&&t.has(`content`)}function Dve(e,t){let n=b7(t);if(!n)return 0;let r=yve(n,e.kind),i=b7(e.title),a=b7(e.name),o=b7(e.path),s=o.split(`/`);return i===r||a===r?700:o===r?650:i.startsWith(r)||a.startsWith(r)?600:s.some(e=>e.startsWith(r))?550:i.includes(r)||a.includes(r)?500:o.includes(r)?450:-1}function D7(e,t){let n=Dve(e,t);return n<=0?n:zg(e.path)?n*.5:n}function Ove(e){return e===`file`?-60:0}function kve(e,t,n,r,i){let a=i>0?t/i:0,o=n/50,s=r===`file`?-.001:0,c=1*a+1*o+s;return e*1e3+c}function O7(e,t,n,r){return e+t*20+n+Ove(r)}function k7(e,t,n,r,i,a){return e===`relevance`?O7(t,n,r,i):kve(t,n,r,i,a)}function Ave(e,t){return t||(e===`full_text`?`relevance`:`navigation`)}function A7(e,t){let n=0;for(let r of e){let e=t.get(r.id)??0;e>n&&(n=e)}return n}function jve(e){let t=e.map(e=>e.modifiedTs).filter(e=>Number.isFinite(e)&&e>0);if(t.length===0)return new Map;let n=1/0,r=-1/0;for(let e of t)e<n&&(n=e),e>r&&(r=e);let i=Math.max(1,r-n);return new Map(e.map(e=>[e.id,e.modifiedTs>0?(e.modifiedTs-n)/i*50:0]))}function Mve(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function Nve(e){return e===`full_text`?{title:8,name:7,path:5,pathSegments:4,content:1}:e===`autocomplete`?{title:10,name:9,path:5,pathSegments:4}:{title:8,name:7,path:5,pathSegments:4}}const Pve=/[-ក- -〿-ゟ゠-ヿ㐀-䶿一-鿿\uf900--\u1100-\u11ff\u3130-\u318f\ua960-\ua97f\uac00-\ud7ff]/;function Fve(e,t){let n=b7(t);return n.length<4||Pve.test(n)?0:+(e===`full_text`)}function Ive(e){let{lexical:t,fullText:n}=e.signals;return t>=500?`lexical`:t===450&&n<=0?`pathOnly`:`body`}function Lve(e){let t=[],n=[],r=[];for(let i of e){let e=Ive(i);e===`lexical`?t.length<100&&t.push(i):e===`body`?n.length<6&&n.push(i):r.length<4&&r.push(i)}return[...t,...n,...r]}function j7(e,t,n){if(t===`relevance`)return e.slice(0,n);let r=Lve(e),i=[],a=0,o=0;for(let e of r){if(e.document.kind===`folder`){if(a>=3)continue;a+=1}else if(e.document.kind===`file`){if(o>=3)continue;o+=1}if(i.push(e),i.length>=n)break}return i}function Rve(e,t,n={}){let r=n.intent??`omnibar`,i=Ave(r,n.ranking),a=_ve(n.limit),o=new Set(n.scopes??Eve(r)),s=e.documents.filter(e=>E7(e,o)),c=b7(t);if(!c)return s.slice().sort((e,t)=>e.path.localeCompare(t.path)).slice(0,a).map(e=>({document:e,score:0,signals:{lexical:0,fullText:0,recency:0}}));let l=mve(Cve(e),{term:c,properties:Mve(r),boost:Nve(r),tolerance:Fve(r,c),limit:Math.max(a*4,40)}),u=new Map(l.hits.filter(e=>E7(e.document,o)).map(e=>[e.document.id,e.score])),d=jve(s),f=new Map;for(let e of s)D7(e,c)>=0&&f.set(e.id,e);for(let e of l.hits)E7(e.document,o)&&f.set(e.document.id,e.document);if(!n.semantic){let e=A7(f.values(),u);return j7([...f.values()].map(t=>{let n=Math.max(0,D7(t,c)),r=u.get(t.id)??0,a=d.get(t.id)??0;return{document:t,score:k7(i,n,r,a,t.kind,e),signals:{lexical:n,fullText:r,recency:a}}}).sort((e,t)=>e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score),i,a)}return j7(zve({scopedDocuments:s,candidates:f,fullTextScores:u,recency:d,normalizedQuery:c,ranking:i,semantic:n.semantic}),i,a)}function M7(e){let t=new Map;return e.forEach((e,n)=>{t.set(e,n+1)}),t}function zve(e){let{scopedDocuments:t,candidates:n,fullTextScores:r,recency:i,normalizedQuery:a,ranking:o,semantic:s}=e,c=s.rrfK??60,l=s.candidateLimit??64,u=s.similarityFloor??0,d=s.scores,f=new Map(t.map(e=>[e.id,e])),p=[...d.entries()].filter(([e,t])=>t>=u&&f.has(e)).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])).slice(0,l);for(let[e]of p)if(!n.has(e)){let t=f.get(e);t&&n.set(e,t)}let m=A7(n.values(),r),h=[...n.values()].map(e=>{let t=Math.max(0,D7(e,a)),n=r.get(e.id)??0,s=i.get(e.id)??0,c=d.get(e.id),l=c!==void 0&&c>=u;return{document:e,score:t>0?k7(o,t,n,s,e.kind,m):O7(t,n,s,e.kind),signals:l?{lexical:t,fullText:n,recency:s,vector:c}:{lexical:t,fullText:n,recency:s},lexical:t,fullText:n,recency:s,cosine:c}}),g=M7(h.filter(e=>e.fullText>0).sort((e,t)=>t.fullText-e.fullText||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),_=M7(h.filter(e=>e.cosine!==void 0&&e.cosine>=u).sort((e,t)=>t.cosine-e.cosine||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),v=e=>{let t=0,n=g.get(e);n!==void 0&&(t+=1/(c+n));let r=_.get(e);return r!==void 0&&(t+=1/(c+r)),t};return h.sort((e,t)=>{let n=+(e.lexical>0),r=+(t.lexical>0);if(n!==r)return r-n;if(n===1)return e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score;let i=v(e.document.id),a=v(t.document.id);return i===a?e.recency===t.recency?e.document.path.localeCompare(t.document.path):t.recency-e.recency:a-i}).map(({document:e,score:t,signals:n})=>({document:e,score:t,signals:n}))}const Bve=/^[A-Za-z0-9._-]+$/,Vve=/^(?:\d{1,3}\.){3}\d{1,3}$/;var N7=class extends Error{constructor(e){super(e),this.name=`InvalidShareUrlError`}};function Hve(e,t=0){if(F7(t,!0),t===0)return Gve(e);if(e.length>2985)throw new N7(`Share URL exceeds the v2 URL size limit`);Wve(P7(e),t);let n=new TextEncoder().encode(e);if(n.length>2985)throw new N7(`Share URL exceeds the v2 URL size limit`);let r=new Uint8Array(3+n.length);if(r[0]=2,r[1]=t>>>8,r[2]=t&255,r.set(n,3),r.length>2988)throw new N7(`Share payload exceeds the v2 size limit`);let i=V7(r);if(i.length>3984)throw new N7(`Share token exceeds the v2 size limit`);return i}function P7(e){if(!e.startsWith(`https://`))throw new N7(`Share URL must use canonical HTTPS spelling`);if(e.includes(`?`)||e.includes(`#`))throw new N7(`Share URL cannot contain a query or fragment`);let t=e.slice(8),n=t.indexOf(`/`);if(n<=0)throw new N7(`Share URL is missing its repository path`);let r=t.slice(0,n);I7(r);let i=t.slice(n+1).split(`/`);if(i.length<4||i.some(e=>e.length===0))throw new N7(`Share URL has an invalid path shape`);let[a,o,s,c,...l]=i;if(s!==`blob`&&s!==`tree`)throw new N7(`Share URL has an unsupported repository path shape`);let u=L7(a,`owner`),d=L7(o,`repository`),f=Kve(c),p=l.map(e=>qve(e,`target`)),m=s===`blob`?`doc`:`folder`;if(m===`doc`&&p.length===0)throw new N7(`Document share URL is missing its target path`);let h={host:r,owner:u,repo:d,branch:f,kind:m,targetSegments:p};if(Uve(h)!==e)throw new N7(`Share URL is not canonically serialized`);return h}function Uve(e){if(I7(e.host),B7(e.owner,`owner`),B7(e.repo,`repository`),!S_(e.branch))throw new N7(`Share URL branch is invalid`);if(e.kind!==`doc`&&e.kind!==`folder`)throw new N7(`Share URL target kind is invalid`);if(e.kind===`doc`&&e.targetSegments.length===0)throw new N7(`Document share URL is missing its target path`);for(let t of e.targetSegments)z7(t,`target`);let t=e.kind===`doc`?`blob`:`tree`,n=[encodeURIComponent(e.owner),encodeURIComponent(e.repo),t,encodeURIComponent(e.branch),...e.targetSegments.map(e=>encodeURIComponent(e))];return`https://${e.host}/${n.join(`/`)}`}function Wve(e,t){if(F7(t,!1),t>e.targetSegments.length)throw new N7(`Content root depth exceeds the repository target path`);let n=e.targetSegments.slice(t).join(`/`);if(e.kind===`doc`){if(n.length===0)throw new N7(`Document share target cannot be the content root`);return{kind:`doc`,docPath:n}}return{kind:`folder`,folderPath:n}}function Gve(e){let t=new TextEncoder().encode(e),n=new Uint8Array(1+t.length);return n[0]=1,n.set(t,1),V7(n)}function F7(e,t){if(!Number.isInteger(e)||e<+!t||e>65535)throw new N7(`Content root depth is invalid`)}function I7(e){if(e.length===0||e.length>253||e.endsWith(`.`)||e!==e.toLowerCase()||Vve.test(e))throw new N7(`Share URL host is not canonical`);if(e.split(`.`).some(e=>e.length===0||e.length>63||!/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/.test(e)))throw new N7(`Share URL host is not a DNS name`);if(c(e)!==e)throw new N7(`Share URL host is not a canonical GitHub host`)}function Kve(e){let t=R7(e,`branch`);if(!S_(t))throw new N7(`Share URL branch is invalid`);return t}function qve(e,t){let n=R7(e,t);return z7(n,t),n}function L7(e,t){let n=R7(e,t);return B7(n,t),n}function R7(e,t){let n;try{n=decodeURIComponent(e)}catch{throw new N7(`Share URL ${t} has malformed percent encoding`)}if(encodeURIComponent(n)!==e)throw new N7(`Share URL ${t} is not canonically encoded`);return n}function z7(e,t){if(e.length===0||e===`.`||e===`..`||e.toLowerCase()===`.git`||e.includes(`/`)||e.includes(`\\`)||Jve(e))throw new N7(`Share URL ${t} component is invalid`)}function B7(e,t){if(z7(e,t),!Bve.test(e)||e.startsWith(`-`))throw new N7(`Share URL ${t} component is invalid`)}function Jve(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<=31||n===127)return!0}return!1}function V7(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}const Yve=yo({name:j(),description:j(),files:yo({skillMd:j(),scripts:P(j()),references:P(j())})}),Xve=yo({pluginProvider:j().optional(),plugin:j().optional(),marketplace:j().optional(),repositoryUrl:j().optional(),version:j().optional(),gitCommitSha:j().optional(),scope:j().optional(),projectPath:j().optional()}),Zve=yo({commands:N(),hooks:N(),mcp:N()}),Qve=yo({...Yve.shape,sourceHarness:j(),sourceHarnesses:P(j()),home:j(),provenance:Xve,inert:Zve,outsideProject:N().optional()}),$ve=yo({schema:L(1),name:j(),version:j(),description:j().optional(),author:yo({name:j()}).optional(),skills:P(j()),hostCompatibility:P(j()).optional(),capabilities:yo({scripts:j(),network:j(),inert:P(j())}).optional(),provenance:yo({source:j(),ref:j(),contentHash:j()}).optional()}),eye=F({skills:P(Qve),packs:P($ve)}).loose(),tye=F({results:P(F({id:j().min(1),name:j().min(1),source:j().min(1),description:j(),installs:M().int().nonnegative().nullable(),publisher:j().nullable()}).loose()),backend:I([`skills.sh`,`github-fallback`]),degraded:N()}).loose(),nye=F({title:j(),description:j(),image:j().nullable(),skillsUrl:j().nullable(),sourceKind:I([`github`,`site`]),sourceUrl:j()}).loose(),rye=F({skills:P(F({name:j(),description:j().nullable()}).loose())}).loose(),iye=F({kind:I([`local`,`import`,`none`]),scope:I(ug).optional(),name:j().optional(),dir:j().optional(),source:j().optional(),ref:j().optional(),via:I([`source`,`publisher`]).optional()}).loose(),aye=F({relPath:j(),content:j().nullable()}).loose(),oye=F({provider:j(),plugin:j(),version:j().optional(),marketplace:j().optional(),repositoryUrl:j().optional()}).loose(),sye=F({provider:j(),plugin:j(),version:j().optional(),description:j().optional(),repositoryUrl:j().optional(),bundledSkills:P(j()),capabilities:F({commands:N(),hooks:N(),mcp:N(),agents:N()}),setupSupported:N()}).loose(),cye=F({name:j(),description:j().nullable(),skillMd:j(),files:P(aye),plugin:oye.optional(),pluginBundle:sye.optional()}).loose(),H7=e=>e*8+4;H7(92),H7(40);const U7=(()=>{let e=globalThis.Intl.Segmenter;return e?new e(void 0,{granularity:`grapheme`}):null})();function lye(e){return e>=56320&&e<=57343}function uye(e){return e>=55296&&e<=56319}function dye(e,t){if(U7){let n=U7.segment(e).containing(t);return n===void 0?t:n.index}return lye(e.charCodeAt(t))&&uye(e.charCodeAt(t-1))?t-1:t}function fye(e,t){return e.length<=t?e:t<=0?``:e.slice(0,dye(e,t))}Array.from({length:256},(e,t)=>(t+256).toString(16).slice(1));const pye={fileSystem:`File System`,gitUpstream:`Git (upstream)`,service:`OpenKnowledge (service)`,generator:`OpenKnowledge (generated)`},mye=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],hye={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`};function gye(e,t=mye){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}const _ye={"claude-code":`claude`,"claude-ai":`claude`,cursor:`cursor`,"cursor-vscode":`cursor`,cascade:`windsurf`,codex:`openai`,"codex-mcp-client":`openai`,copilot:`github`,cline:`cline`,"claude-acp":`claude`,"codex-acp":`openai`,"github-copilot-cli":`github`};function W7(e){return e?_ye[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}const vye={claude:`Claude`,cursor:`Cursor`,windsurf:`Windsurf`,openai:`Codex`,github:`Copilot`,cline:`Cline`};function yye(e){let t=e?.trim();return t?vye[W7(t)]??t:`Agent`}function G7(e){if(!e.includes(`%`))return e;let t;try{t=decodeURIComponent(e)}catch{return e}return t===`.`||t===`..`||t.includes(`/`)||t.includes(`\\`)||t.includes(`\0`)?e:t}function K7(e){return e===`.`||e===`..`?e:encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.codePointAt(0)?.toString(16).toUpperCase()}`)}function bye(e){return e.split(`/`).map(K7).join(`/`)}function q7(e){return e.split(`/`).map(G7).join(`/`)}function J7(e,t){let n=e.trim();if(!n||/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n)||n.startsWith(`//`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=r>=0?n.slice(0,r):n,a=r>=0?n.slice(r+1):null,o=(i.split(`?`)[0]??``).trim();if(!o)return null;let s=G7(o.split(`/`).pop()??``).match(/\.([a-z0-9]+)$/i);if(s){let e=`.${(s[1]??``).toLowerCase()}`;if(!hp.includes(e))return null}let c=o.startsWith(`/`),l=c?o.slice(1):o,u=c?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[],d=l.split(`/`),f=d.length-1;for(let e=0;e<d.length;e++){let t=G7(d[e]??``);if(e===f&&(t=mg(t)),t===`..`){if(u.length===0)return null;u.pop()}else t!==`.`&&t!==``&&u.push(t)}return u.length===0?null:{docName:u.join(`/`),anchor:a||null}}function xye(e){throw Error(`Unhandled ClassifiedLinkTarget variant: ${JSON.stringify(e)}`)}const Y7=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function X7(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function Z7(e){let t=e.trim();return Y7.test(t)||t.startsWith(`//`)}function Sye(e,t){let n=e.trim();if(!n)return null;if(n.startsWith(`#`)){let e=n.slice(1).trim();return e?{kind:`anchor`,anchor:e}:null}if(Z7(n))return{kind:`external`,url:n};let r=n.indexOf(`#`),i=q7(r<0?n:n.slice(0,r)),a=yg(i,t);if(a)return{kind:`doc`,docName:a,anchor:r<0?null:n.slice(r+1)};let o=vg(i,t);if(o)return{kind:`doc`,docName:o,anchor:r<0?null:n.slice(r+1)};let s=J7(n,t);if(s)return{kind:`doc`,docName:s.docName,anchor:s.anchor};let c=X7(i);return c&&c!==`md`&&c!==`mdx`?{kind:`asset`,url:n,ext:c,literal:!1}:null}function Q7(e,t){let n=e.trim();if(!n)return null;if(Z7(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=X7(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r,literal:!0}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function Cye(e,t,n){let r=e.trim();if(!r||Y7.test(r)||r.startsWith(`//`)||r.startsWith(`#`))return null;let i=r.indexOf(`#`),a=((i>=0?r.slice(0,i):r).split(`?`)[0]??``).trim();if(!a)return null;let o=a.startsWith(`/`),s=o?a.slice(1):a,c=o?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of s.split(`/`))if(e===`..`){if(c.length===0)return null;c.pop()}else e!==`.`&&e!==``&&c.push(n.literal?e:G7(e));return c.length===0?null:c.join(`/`)}const wye={document:{unicode:`NFC`,case:`sensitive`},folder:{unicode:`NFC`,case:`sensitive`},file:{unicode:`NFC`,case:`insensitive`}};function $7(e,t){let n=wye[e],r=t.normalize(n.unicode);return n.case===`insensitive`?r.toLowerCase():r}function e9(e){return $7(`file`,e)}function t9(e,t){return e<t?-1:+(e>t)}function n9(e,t){let n=t.split(`/`),r=n.length-1;return n.map((t,n)=>$7(n===r?e:`folder`,t)).join(`/`)}function Tye(e){let t=n9(`file`,e);return X6(t)||t}const r9=Symbol.for(`@inkeep/open-knowledge-core/target-namespace`);var Eye=class extends Set{kind;[r9]=!0;byKey=new Map;constructor(e,t){super(),this.kind=e;for(let e of t)this.add(e)}add(e){if(super.has(e))return this;super.add(e);let t=n9(this.kind,e),n=this.byKey.get(t);if(n===void 0)return this.byKey.set(t,[e]),this;let r=0;for(;r<n.length&&t9(n[r],e)<0;)r++;return n.splice(r,0,e),this}delete(e){if(!super.delete(e))return!1;let t=n9(this.kind,e),n=this.byKey.get(t);return n===void 0||(n.splice(n.indexOf(e),1),n.length===0&&this.byKey.delete(t),!0)}clear(){super.clear(),this.byKey.clear()}lookup(e){if(super.has(e))return{kind:`exact`,name:e};let t=this.byKey.get(n9(this.kind,e));if(t===void 0)return{kind:`absent`};let n=t[0];return t.length===1?{kind:`equivalent`,name:n}:{kind:`ambiguous`,name:n,candidates:[...t]}}resolve(e){return super.has(e)?e:this.byKey.get(n9(this.kind,e))?.[0]}};function i9(e,t=[]){return new Eye(e,t)}function Dye(e,t){for(let n of t)for(let t=n.indexOf(`/`);t!==-1;t=n.indexOf(`/`,t+1))e.add(n.slice(0,t));return e}function Oye(e){return e[r9]===!0}function a9(e,t){return Oye(e)?e.resolve(t):e.has(t)?t:void 0}function kye(e,t){let n=e;return n[r9]===!0&&n.kind===t}function o9(e,t){return kye(t,e)?t:i9(e,t)}function s9(e){return`pagesBySlug`in e}function c9(e){return s9(e)?e.pages:e}function Aye(e,t){return s9(e)?e.assetPaths??new Set:t??new Set}function jye(e,t){return s9(e)?e.filePaths??new Set:t??new Set}function Mye(e,t){let n=new Map;for(let r of e){let e=t(r),i=n.get(e);e&&(i===void 0||t9(r,i)<0)&&n.set(e,r)}return n}function Nye(e,t){let n=new Map,r=[...e].sort(t9);for(let e of r){let r=e.lastIndexOf(`/`),i=t(r===-1?e:e.slice(r+1));i&&!n.has(i)&&n.set(i,e)}return n}function Pye(e,t){let n=X6(e);if(!n)return;if(s9(t))return t.pagesBySlug.get(n);let r;for(let e of t)X6(e)===n&&(r===void 0||t9(e,r)<0)&&(r=e);return r}function Fye(e,t){if(e.includes(`/`))return;let n=X6(e);if(!n)return;if(s9(t))return t.pagesByBasename?.get(n);let r;for(let e of t){let t=e.lastIndexOf(`/`);X6(t===-1?e:e.slice(t+1))===n&&(r===void 0||t9(e,r)<0)&&(r=e)}return r}function Iye(e){let t=e.trim();if(!t)return[];let n=X6(t);return n.length>0&&n!==t?[n]:[]}function l9(e,t){let n=e.trim();if(!n)return;let r=a9(c9(t),n);if(r!==void 0)return r;let i=n.replace(/\.(md|mdx)$/i,``);if(i!==n){let e=u9(i,t);if(e!==void 0)return e}return u9(n,t)}function u9(e,t){let n=e.trim();if(!n)return;let r=c9(t),i=a9(r,n);if(i!==void 0)return i;let a=Pye(n,t);if(a)return a;for(let e of Iye(n)){let t=a9(r,e);if(t!==void 0)return t}return Lye(n,r)||Fye(n,t)}function Lye(e,t){let n=a9(t,`${e}/index`);if(n!==void 0)return n;let r=e.lastIndexOf(`/`),i=r===-1?e:e.slice(r+1);return i?a9(t,`${e}/${i}`):void 0}function Rye(e){let t=((e.trim().split(`#`)[0]??``).trim().split(`?`)[0]??``).trim();return t.startsWith(`/`)?t.slice(1):t}function zye(e){let t=new Map;for(let n of e){let e=e9(n),r=t.get(e);(r===void 0||t9(n,r)<0)&&t.set(e,n)}return t}function d9(e){let t=o9(`file`,e),n;return e=>{let r=t.resolve(e);return r===void 0?(n??=zye(t),n.get(e9(e))):r}}function Bye(e,t,n){let r=Rye(e);if(!r)return null;let i=n?[t,n]:[t];for(let e of i){let t=d9(e)(r);if(t!==void 0)return t}if(r.includes(`/`))return null;let a=$7(`file`,r),o=[];for(let e of i)for(let t of e){let e=t.lastIndexOf(`/`);$7(`file`,e===-1?t:t.slice(e+1))===a&&o.push(t)}return o.length===0?null:o.sort(t9)[0]??null}function Vye(e,t,n){let r=Q7(e,t);return r===null||r.kind!==`asset`||Bye(r.url,Aye(n),jye(n))!==null||l9(e,n)===void 0?r:{kind:`doc`,docName:e.trim(),anchor:t?.trim()||null}}const Hye=`state/bug-reports`,Uye=yo({at:j(),transport:j(),outcome:j(),reference:j().optional(),error:j().optional(),errorCode:j().optional()}),Wye=yo({reason:j(),at:j(),errorCode:j().optional()});yo({version:M().int().catch(1),id:j(),createdAt:j(),bundleLevel:j(),zipBytes:M().int().nonnegative().catch(0),zipDeleted:N().optional(),state:j(),systemWide:N().optional(),projectSlug:j().nullable().optional(),reference:j().optional(),lastError:Wye.optional(),attempts:P(Uye).optional(),note:j().optional()});const Gye=`.sent.yaml`;yo({version:M().int().catch(1),id:j().optional(),sentAt:j().optional(),reference:j().optional()});var f9=class extends Error{envVar;constructor(e,t){super(`${e}: ${t}`),this.name=`EnvVarError`,this.envVar=e}};const p9=new Map([[`PORT`,[`server`,`port`]],[`OK_BIND`,[`server`,`bind`]],[`OK_EXTERNAL_URL`,[`server`,`externalUrl`]],[`OK_ALLOW_EXTERNAL`,[`server`,`allowExternal`]],[`OK_OPEN_BROWSER`,[`server`,`openBrowser`]],[`OK_IDLE_SHUTDOWN`,[`server`,`idleShutdown`]]]);function Kye(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1_$2`).toUpperCase()}function m9(e){return`OK_${(e[0]===`server`?e.slice(1):e).map(Kye).join(`_`)}`}function h9(e){let t=e;for(let e=0;e<16;e++){let e=t?._zod?.def;if(e===void 0||e.type!=="default"&&e.type!==`optional`&&e.type!==`nullable`)return t;t=e.innerType}return t}function qye(e){return h9(e)?._zod?.def?.type}function Jye(e=eh){let t=[],n=(e,r)=>{let i=h9(e)?._zod?.def?.shape;if(i===void 0){r.length>0&&t.push(r);return}for(let[e,t]of Object.entries(i))n(t,[...r,e])};return n(e,[]),t}function Yye(){let e=new Map;for(let t of Jye())e.set(m9(t),t);return e}function Xye(e,t,n){switch(qye(n)){case`boolean`:if(t===`1`||t===`true`)return!0;if(t===`0`||t===`false`)return!1;throw new f9(e,`expected a boolean (1/0/true/false), got ${JSON.stringify(t)}`);case`number`:{let n=Number(t);if(!Number.isFinite(n))throw new f9(e,`expected a number, got ${JSON.stringify(t)}`);return n}case`array`:return t.split(/\s+/).filter(e=>e!==``);default:return t}}function Zye(e,t){let n=Array(t.length+1);for(let e=0;e<=t.length;e++)n[e]=e;for(let r=1;r<=e.length;r++){let i=n[0];n[0]=r;for(let a=1;a<=t.length;a++){let o=Math.min(n[a]+1,n[a-1]+1,i+(e[r-1]===t[a-1]?0:1));i=n[a],n[a]=o}}return n[t.length]}function Qye(e,t){if(e===`OK_PORT`)return{envVar:e,message:`OK_PORT is not read — the port variable is unprefixed PORT.`};let n=t.get(e);if(n!==void 0)return{envVar:e,message:`${e} maps to config key ${n.join(`.`)}, which is not env-configurable — set it in the config file instead.`};for(let t of p9.keys())if(t!==`PORT`&&Zye(e,t)<=2)return{envVar:e,message:`Unknown variable ${e} — did you mean ${t}?`};return null}function g9(e,t){let n={...e};for(let[e,r]of Object.entries(t)){if(r===void 0)continue;let t=n[e];n[e]=_9(r)&&_9(t)?g9(t,r):r}return n}function _9(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function $ye(e){let t=[],n=[],r=Yye();for(let[n,r]of p9){let i=e[n];if(i===void 0||i.trim()===``)continue;let a=th(eh,r);if(a===void 0)throw new f9(n,`internal: config path ${r.join(`.`)} does not resolve`);let o=Xye(n,i.trim(),a),s=a.safeParse(o);if(!s.success)throw new f9(n,`${s.error.issues.map(e=>e.message).join(`; `)||`invalid value`} (got ${JSON.stringify(i)})`);t.push({path:r,envVar:n,value:s.data})}for(let t of Object.keys(e)){if(!t.startsWith(`OK_`)||p9.has(t)||e[t]===void 0)continue;let i=Qye(t,r);i!==null&&n.push(i)}let i={};for(let{path:e,value:n}of t){let t=i;for(let n of e.slice(0,-1))t[n]??={},t=t[n];t[e[e.length-1]]=n}return{overrides:t,layer:i,diagnostics:n}}function ebe(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function tbe(e){let{value:t,file:n,source:r,doc:i}=e,a=[],o=(e,t)=>{if(t.length>0){let e=nh(eh,t);if(e!==void 0){if(e.scope===`project-local`){let e=m9(t),o;i!=null&&r!=null&&n!=null&&(o=fh({file:n,source:r,doc:i,path:t})),a.push({path:[...t],...p9.has(e)?{envVar:e}:{},...o===void 0?{}:{source:o}})}return}}if(ebe(e))for(let[n,r]of Object.entries(e))o(r,[...t,n])};return o(t,[]),a}function nbe(e){let t=e.path.join(`.`);return`${e.source===void 0?``:`${e.source.file}:${e.source.line}:${e.source.column}: `}${t} is a per-machine (project-local) setting; the value committed in .ok/config.yml is ignored. Set it in .ok/local/config.yml (this machine only)${e.envVar===void 0?``:`, or set ${e.envVar} on this host`}.`}const v9=`(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)`,rbe=RegExp(`^127\\.${v9}\\.${v9}\\.${v9}$`);function ibe(e){let t=e.trim().toLowerCase();return t===`localhost`||t===`::1`||t===`[::1]`||rbe.test(t)}function y9(e){return e.every(ibe)}function abe(e){return!e.loopbackOnly}function obe(e){if(e===`off`)return null;if(!zm.test(e))throw Error(`invalid idleShutdown duration: ${JSON.stringify(e)}`);let t=Number(e.slice(0,-1));switch(e.at(-1)){case`s`:return t*1e3;case`m`:return t*6e4;default:return t*36e5}}function sbe(e){let t=e?.server,n=t?.bind===void 0||t.bind.length===0?Rm:t.bind,r=y9(n),i=t?.port,a=t?.externalUrl,o=(t?.allowExternal??!1)&&a!==void 0;return{port:i,bind:n,externalUrl:a,allowExternal:t?.allowExternal??!1,openBrowser:t?.openBrowser??r,idleShutdown:t?.idleShutdown??(r&&!o?`30m`:`off`),loopbackOnly:r}}const cbe={"unix-chain":{1:[`macos-bundle`,`npx-fallback`],2:[`macos-bundle`,`linux-deb-bundle`,`npx-fallback`]},"windows-chain":{1:[`windows-global-cli`,`npx-fallback`]}};function b9(e){return{kind:`declined`,reason:e}}function lbe(e){if(e.command===`node`)return b9(`dev-mode`);if(typeof e.command==`string`)return Array.isArray(e.args)?e.command===`/bin/sh`?e.args.length!==3||e.args[0]!==`-l`||e.args[1]!==`-c`||typeof e.args[2]!=`string`?b9(`malformed-argv`):{envelope:`split-command-args`,family:`unix-chain`,body:e.args[2]}:e.command===`powershell`?e.args.length!==4||e.args[0]!==`-NoProfile`||e.args[1]!==`-NonInteractive`||e.args[2]!==`-Command`||typeof e.args[3]!=`string`?b9(`malformed-argv`):{envelope:`split-command-args`,family:`windows-chain`,body:e.args[3]}:b9(`foreign-command`):b9(`malformed-argv`);if(e.type!==`local`||!Array.isArray(e.command))return b9(`unknown-envelope`);let[t,...n]=e.command;return t===`node`?b9(`dev-mode`):t===`/bin/sh`?n.length!==3||n[0]!==`-l`||n[1]!==`-c`||typeof n[2]!=`string`?b9(`malformed-argv`):{envelope:`opencode-argv`,family:`unix-chain`,body:n[2]}:t===`powershell`?n.length!==4||n[0]!==`-NoProfile`||n[1]!==`-NonInteractive`||n[2]!==`-Command`||typeof n[3]!=`string`?b9(`malformed-argv`):{envelope:`opencode-argv`,family:`windows-chain`,body:n[3]}:b9(`foreign-command`)}function x9(e,t){return e===`unix-chain`?`# ok-mcp${t}-v`:`# ok-mcp${t}-win-v`}function ube(e,t,n){let r=e.split(/\r?\n/,1)[0],i=x9(t,n);if(r===void 0||!r.startsWith(i))return null;let a=r.slice(i.length).match(/^([1-9]\d*)$/);if(a==null)return null;let o=Number(a[1]);return Number.isSafeInteger(o)?o:null}function dbe(e,t=cbe,n=s().mcpChainTag){if(typeof e!=`object`||!e)return b9(`not-an-object`);let r=lbe(e);if(`kind`in r)return r;let i=ube(r.body,r.family,n);if(i===null)return b9(`malformed-marker`);let a=t[r.family],o=Math.max(...Object.keys(a).map(Number));if(i>o)return{kind:`recognized`,disposition:`keep`,descriptor:{envelope:r.envelope,family:r.family,revision:i,knowledge:`future`,capabilities:`opaque`}};let c=a[i];return c===void 0?b9(`unknown-revision`):{kind:`recognized`,disposition:i===o?`keep`:`upgrade`,descriptor:{envelope:r.envelope,family:r.family,revision:i,knowledge:`known`,capabilities:c}}}function S9(e){return e.replace(/\/+/g,`/`).replace(/\/+$/,``)}function fbe(e){return i[e].userHomeDirName}function pbe(e,t,n=`darwin`,r){return e===`stable`?n===`linux`?`${S9(r?.startsWith(`/`)?r:`${S9(t)}/.config`)}/OpenKnowledge/path-install.json`:`${S9(t)}/Library/Application Support/OpenKnowledge/path-install.json`:`${S9(t)}/${fbe(e)}/path-install.json`}function mbe(e){return e===`stable`?`open-knowledge cli`:`open-knowledge ${e} cli`}function hbe(e){return e===`stable`?`open-knowledge.fish`:`open-knowledge-${e}.fish`}const gbe=`127.0.0.1`,C9=`installed-skills.json`,_be=[`.ok`,u,C9],vbe=I(ug),ybe=yo({hosts:P(j()),scope:vbe,scripts:N(),installedAt:wa(),projection:I([`symlink`,`copy`]).optional(),contentHash:j().optional()}),w9=yo({schema:L(1),skills:ko(j(),ybe).default({})});function bbe(){return{schema:1,skills:{}}}function xbe(e){let t;try{t=JSON.parse(e)}catch{return null}let n=w9.safeParse(t);return n.success?n.data:null}const T9=`machine-id`,E9=`skills`,D9=`skill-placements.json`,O9=`skill-move-retained.json`,k9=`server-authority.sqlite`,A9=`server-authority-leases`,Sbe=[T9,E9,Tj,`${u}/${C9}`,`${u}/${D9}`,`${u}/${O9}`,`${u}/${k9}`,`${u}/${k9}-journal`,`${u}/${A9}`];function Cbe(e){let{frontmatter:t}=iu(e);if(t===``)return null;let n;try{let e=(0,su.parseDocument)(ou(t));if(e.errors.length>0)return null;n=e.toJS()}catch{return null}return typeof n!=`object`||!n||Array.isArray(n)?null:n}function j9(e,t){switch(e){case`darwin`:return[`/opt/homebrew/bin`,`/usr/local/bin`,`/opt/local/bin`,`${t}/.local/bin`,`${t}/.asdf/shims`,`${t}/.local/share/mise/shims`];case`win32`:return[];default:return[`/usr/local/bin`,`/home/linuxbrew/.linuxbrew/bin`,`${t}/.local/bin`,`${t}/.asdf/shims`,`${t}/.local/share/mise/shims`]}}function M9(e,t,n){let r=n.delimiter,i=(e??``).split(r).filter(e=>e.length>0),a=new Set(i),o=[];for(let e of t)!a.has(e)&&n.isDir(e)&&(a.add(e),o.push(e));return[...i,...o].join(r)}function wbe(e,t){return M9(e,j9(t.platform,t.homeDir),t)}function Tbe(e,t){switch(e){case`darwin`:return[`${t}/Library/pnpm`,`${t}/.bun/bin`,`${t}/.volta/bin`,`${t}/.yarn/bin`,`${t}/.npm-global/bin`];case`win32`:return[];default:return[`${t}/.local/share/pnpm`,`${t}/.bun/bin`,`${t}/.volta/bin`,`${t}/.yarn/bin`,`${t}/.npm-global/bin`]}}function Ebe(e,t){return M9(e,[...j9(t.platform,t.homeDir),...Tbe(t.platform,t.homeDir)],t)}`${d}`;const N9=`:(literal)`;function P9(e){if(e===``)throw Error(`toPathspec: empty path. ":(literal)" is an empty pattern that matches every tracked path; pass "." if you meant the repo root.`);return`${N9}${e}`}function Dbe(e){if(e.length===0)throw Error(`pathspecArgs: empty path list. A bare "--" removes the pathspec restriction rather than selecting nothing.`);return[`--`,...e.map(e=>P9(e))]}function Obe(e){return e.replaceAll(N9,``)}const F9=[{tagName:`Mirror`,attrName:`src`,resolution:`bare-doc-name`},{tagName:`Excalidraw`,attrName:`src`,resolution:`doc-relative`}];for(let e of F9){let t=t2.find(t=>t.name===e.tagName);if(!t)throw Error(`JSX_SRC_REF_TAGS: no built-in component descriptor named '${e.tagName}' — the rename-rewrite and backlink passes for this entry would silently never match. Fix the tagName to match a descriptor in builtInComponents.`);if(!t.props.some(t=>t.name===e.attrName))throw Error(`JSX_SRC_REF_TAGS: component '${e.tagName}' declares no prop named '${e.attrName}' — the rename-rewrite and backlink passes for this entry would silently never match. Fix the attrName to match one of the descriptor's props.`)}const kbe=d4(),Abe=B2(),jbe=V2();function Mbe(){return t2.filter(e=>e.surface===`canonical`&&e.name!==`*`)}function Nbe(){return Mbe().filter(e=>{let t=I9(e);return t!==`fence`&&t!==`html`})}function I9(e){return e.name===`MermaidFence`?`fence`:e.name===`HtmlAlignBlock`?`html`:e.hasChildren?`jsx-block`:`jsx-void`}function Pbe(e){return{id:e.name,displayName:e.displayName??e.name,description:e.description??``,kind:I9(e)}}function Fbe(e){if(e.hidden!==!0&&e.type!==`reactnode`){if(`defaultValue`in e&&e.defaultValue!==void 0)return e.defaultValue;if(e.type===`enum`)return e.enumValues[0];if(e.type===`string`)return``;if(e.type===`number`)return 0;if(e.type===`boolean`)return!1}}function Ibe(e,t){return!(e.omitOnDefault===!0&&`defaultValue`in e&&Object.is(e.defaultValue,t)||e.type===`string`&&e.required===!1&&e.defaultValue===void 0&&t===``)}function Lbe(e){let t=[];for(let n of e.props){let e=Fbe(n);e!==void 0&&Ibe(n,e)&&t.push(w0(n.name,e))}return t}function Rbe(e){return $T(e.exampleBody&&e.exampleBody.trim().length>0?e.exampleBody:`Body content here.`,{extensions:[kbe],mdastExtensions:[Abe]}).children}function zbe(e){let t=I9(e),n;if(t===`fence`)n={type:`code`,lang:`mermaid`,meta:null,value:e.exampleBody&&e.exampleBody.trim().length>0?e.exampleBody:`graph LR
|
|
397
|
+
A --> B`};else{let r=Lbe(e),i=t===`jsx-block`?Rbe(e):[];n={type:`mdxJsxFlowElement`,name:e.name,attributes:r,children:i}}return gx({type:`root`,children:[n]},{extensions:[jbe]}).trimEnd()}function Bbe(e){let t=[];for(let n of e.props){if(n.hidden===!0)continue;let e={name:n.name,type:n.type,required:n.required},r=r2(n);r!==void 0&&(e.description=r),n.advanced===!0&&(e.advanced=!0),n.omitOnDefault===!0&&(e.omitOnDefault=!0),n.type===`enum`&&(e.values=n.enumValues,n.defaultValue!==void 0&&(e.defaultValue=n.defaultValue)),n.type===`string`&&(n.defaultValue!==void 0&&(e.defaultValue=n.defaultValue),n.language!==void 0&&(e.language=n.language),n.accept!==void 0&&(e.accept=n.accept)),n.type===`boolean`&&n.defaultValue!==void 0&&(e.defaultValue=n.defaultValue),n.type===`number`&&n.defaultValue!==void 0&&(e.defaultValue=n.defaultValue),t.push(e)}return t}function Vbe(e){return{...Pbe(e),example:zbe(e),params:Bbe(e)}}const L9=Symbol.for(`@inkeep/open-knowledge/skill-state-field-registry`),R9=globalThis;R9[L9]===void 0&&(R9[L9]=Vr());const z9=R9[L9],Hbe=`skill-state.yml`,Ube=[`claude-cowork`,`cli-hosts`],Wbe=[`server-build-and-open`,`electron-build-and-open`,`cli-npx-skills-add`,`desktop-direct`,`cli-start`],B9=/^\d+\.\d+\.\d+(?:[-+][\w.-]+)?$/,V9=yo({version:j().regex(B9,`version must match /^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$/`).register(z9,{description:`Recorded skill version for this target.`}),recordedAt:wa().register(z9,{description:`ISO 8601 timestamp of the most recent successful write. Updated on every write, including reinstalls of the same version.`}),surface:I(Wbe).register(z9,{description:`Install-source surface that recorded this entry.`}).optional()}),Gbe=yo({enabled:N().register(z9,{description:`Whether this user-global skill bundle is opted in.`}),decidedAt:wa().register(z9,{description:`ISO 8601 timestamp of the opt-in / opt-out decision.`})}),Kbe=yo({schema:L(1).register(z9,{description:`Schema major version. Bumped only on breaking shape changes.`}),targets:yo({"claude-cowork":V9.optional(),"cli-hosts":V9.optional()}).register(z9,{description:`Per-target install-state entries. Absent target = no recorded install.`}).default({}),bundles:ko(j(),Gbe).register(z9,{description:`Per-bundle opt-in decisions keyed by install name. Absent key = no recorded decision.`}).optional(),installsReported:P(j()).register(z9,{description:"Skill installs already reported to skills.sh from this machine, as `<owner/repo>#<skill>`. Append-only; presence suppresses a re-report."}).optional()});function qbe(e,t){return e??t.installedOnDisk}function Jbe(){return{schema:1,targets:{}}}const H9=`template`;function U9(e){if(e.trim()===``)return{};let t;try{t=(0,su.parse)(e)}catch{return{}}return typeof t!=`object`||!t||Array.isArray(t)?{}:t}function W9(e,t){return e.trim()===``?t:`---\n${e}\n---\n${t}`}function Ybe(e){let{frontmatter:t,body:n}=iu(e);return t===``?{docFrontmatterText:``,markdown:e}:{docFrontmatterText:ou(t),markdown:n}}function Xbe(e){let t=e.split(`
|
|
398
398
|
`);if(!(t[0]??``).startsWith(`template:`))return null;let n=[t[0]??``],r=1;for(;r<t.length;){let e=t[r]??``;if(/^[ \t]/.test(e)){n.push(e),r++;continue}if(e.trim()===``){let i=r+1;for(;i<t.length&&(t[i]??``).trim()===``;)i++;if(i<t.length&&/^[ \t]/.test(t[i]??``)){n.push(e),r++;continue}}break}let i=U9(n.join(`
|
|
399
399
|
`))[H9];return{identity:typeof i==`object`&&i&&!Array.isArray(i)?i:{},docFrontmatterText:t.slice(r).join(`
|
|
400
|
-
`).replace(/\n+$/,``)}}function G9(e){let t=e.charCodeAt(0)===65279?e.slice(1):e,{frontmatter:n,body:r}=iu(t);if(n===``)return{identity:{},starterContent:t};let i=ou(n),a=Jbe(i);if(a)return{identity:a.identity,starterContent:W9(a.docFrontmatterText,r)};let{frontmatter:o}=iu(r);if(o!==``)return{identity:U9(i),starterContent:r};let s=U9(i);return typeof s.title==`string`?{identity:s,starterContent:r}:{identity:{},starterContent:W9(i,r)}}function Ybe(e,t){let{docFrontmatterText:n,markdown:r}=qbe(t),i={};for(let[t,n]of Object.entries(e))n!==void 0&&(i[t]=n);let a=(0,su.stringify)({[H9]:i});return`---\n${n.trim()===``?a:`${a}${n}\n`}---\n${r}`}function Xbe(e){return G9(e).starterContent}const Zbe=`core-base`;function K9(e){let t=e;return t.startsWith(`./`)&&(t=t.slice(2)),t.startsWith(`/`)&&(t=t.slice(1)),t}function q9(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function J9(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function Y9(e){return e.split(`/`).filter(e=>e!==``)}function Qbe(e,t){let n=J9(t);return e===``||n===e||n.startsWith(`${e}/`)}function X9(e,t){let n=J9(t);if(e===n)return 0;let r=e===``?n:n.slice(e.length+1);return r===``?0:Y9(r).length}function Z9(e,t){let n=Y9(e),r=Y9(t),i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i++;return n.length-i+(r.length-i)}function $be(){let e=new Map;function t(t){let n=K9(t);if(n===``)return;let r=q9(n);if(r===``)return;let i=$7(`file`,r),a=e.get(i);if(!a){e.set(i,[n]);return}a.includes(n)||a.push(n)}function n(t){let n=K9(t),r=$7(`file`,q9(n)),i=e.get(r);if(!i)return;let a=i.indexOf(n);a!==-1&&(i.splice(a,1),i.length===0&&e.delete(r))}function r(e,r){n(e),t(r)}function i(t,n){let r=$7(`file`,t),i=e.get(r);if(!i||i.length===0)return null;if(i.length===1)return i[0];let a=J9(K9(n)),o=[],s=[];for(let e of i)Qbe(a,e)?o.push(e):s.push(e);return o.length>0?(e=>{let t=e[0],n=X9(a,t);for(let r=1;r<e.length;r++){let i=e[r],o=X9(a,i);(o<n||o===n&&i<t)&&(t=i,n=o)}return t})(o):(e=>{let t=e[0],n=Z9(a,J9(t));for(let r=1;r<e.length;r++){let i=e[r],o=Z9(a,J9(i));(o<n||o===n&&i<t)&&(t=i,n=o)}return t})(s)}function a(){let t=new Map;for(let[n,r]of e)t.set(n,[...r]);return t}function o(){e.clear()}return{add:t,remove:n,rename:r,resolveEmbed:i,clear:o,snapshot:a,size:()=>e.size}}function exe(e){if(!e)return[];let t=e.split(`/`),n=[],r=``;for(let e of t)r=r?`${r}/${e}`:e,n.push(r);return n}function txe(e,t){if(e.size===0)return new Set;if(t===``)return new Set(e);let n=new Set,r=`${t}/`;for(let i of e)(i===t||i.startsWith(r))&&n.add(i);return n}function Q9(e){let t=e?.trim();return t===void 0||t===``?void 0:t}function nxe(e){return e.reason!==void 0||Q9(e.note)!==void 0||Q9(e.email)!==void 0}function rxe(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol===`https:`)return t;let n=t.hostname===`localhost`||t.hostname===`127.0.0.1`||t.hostname===`[::1]`;return t.protocol===`http:`&&n?t:null}function ixe(){return rxe((typeof process>`u`?void 0:Q9(process.env?.OK_FEEDBACK_INTAKE_ORIGIN))??`https://openknowledge.ai`)}function axe(e){let t=Q9(e);if(t!==void 0)return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)?t:void 0}async function $9(e,t,n){try{let r=await fetch(e,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t),signal:AbortSignal.timeout(n)});if(r.ok){let e=await r.json().catch(()=>null);return{ok:!0,reference:typeof e?.reference==`string`?e.reference:``}}return r.status===400||r.status===413?{ok:!1,reason:`invalid`}:r.status===503?{ok:!1,reason:`unavailable`}:{ok:!1,reason:`error`}}catch(e){return{ok:!1,reason:e instanceof Error&&(e.name===`TimeoutError`||e.name===`AbortError`)?`timeout`:`error`}}}async function oxe(e,t={}){let n=ixe();if(n===null)return{ok:!1,reason:`error`};let r=new URL(`/api/feedback`,n),i=Q9(e.note),a=axe(e.email),o={kind:`uninstall`,reasons:e.reason===void 0?[]:[e.reason],...i===void 0?{}:{message:i},appVersion:e.appVersion,platform:e.platform,source:e.source},s=Date.now()+(t.timeoutMs??4e3),c=()=>s-Date.now();if(a===void 0)return $9(r,o,c());let l=await $9(r,{...o,email:a},c());return l.ok||l.reason!==`invalid`||c()<=0?l:$9(r,o,c())}const sxe=new Fde({extensions:lY,deriveStructuralFreshness:!0}),cxe=UV(lY);export{Ebe as $,pj as $a,mh as $c,St as $d,mfe as $i,Hte as $l,Cpe as $n,P_ as $o,ghe as $r,Wne as $s,z8 as $t,pu as $u,vbe as A,LY as Aa,lg as Ac,so as Ad,Ghe as Ai,Ym as Al,qpe as An,zO as Ao,Zfe as Ar,ere as As,eye as At,Df as Au,xbe as B,Lj as Ba,xg as Bc,Do as Bd,Mme as Bi,hne as Bl,epe as Bn,cj as Bo,Bhe as Br,l_ as Bs,yve as Bt,zd as Bu,g9 as C,r3 as Ca,tg as Cc,I as Cd,O as Cf,Dhe as Ci,ym as Cl,Dfe as Cn,RA as Co,dme as Cr,Qne as Cs,J7 as Ct,Md as Cu,Ybe as D,UY as Da,ig as Dc,N as Dd,She as Di,Fm as Dl,Qpe as Dn,ij as Do,Fme as Dr,Xne as Ds,_ye as Dt,af as Du,lbe as E,l2 as Ea,ng as Ec,P as Ed,Gme as Ei,Im as El,zfe as En,rj as Eo,C8 as Er,N_ as Es,mye as Et,ate as Eu,nxe as F,ZU as Fa,fg as Fc,F as Fd,upe as Fi,Qm as Fl,c8 as Fn,gk as Fo,gme as Fr,Une as Fs,$ve as Ft,yf as Fu,dbe as G,Aj as Ga,Xh as Gc,Ma as Gd,Pme as Gi,ene as Gl,d8 as Gn,aA as Go,uhe as Gr,y_ as Gs,tge as Gt,td as Gu,G9 as H,kj as Ha,yg as Hc,po as Hd,Ame as Hi,dne as Hl,spe as Hn,WA as Ho,L8 as Hr,d_ as Hs,Cve as Ht,nf as Hu,ibe as I,PP as Ia,dg as Ic,Io as Id,Rme as Ii,Um as Il,u8 as In,DA as Io,_me as Ir,h_ as Is,N7 as It,rte as Iu,zbe as J,jj as Ja,Kh as Jc,ti as Jd,Dme as Ji,wp as Jl,Tpe as Jn,sj as Jo,phe as Jr,b_ as Js,Zhe as Jt,Cu as Ju,Tbe as K,zj as Ka,Uh as Kc,wa as Kd,Ome as Ki,Fp as Kl,ipe as Kn,QA as Ko,dhe as Kr,v_ as Ks,$he as Kt,Mu as Ku,Xbe as L,U as La,pg as Lc,ss as Ld,zme as Li,mm as Ll,Yfe as Ln,kA as Lo,yme as Lr,__ as Ls,Bve as Lt,cf as Lu,exe as M,OY as Ma,cg as Mc,L as Md,Khe as Mi,Hm as Ml,wme as Mn,tk as Mo,vme as Mr,Bne as Ms,oye as Mt,uf as Mu,ebe as N,iW as Na,ug as Nc,yo as Nd,qhe as Ni,Xm as Nl,Tme as Nn,oj as No,mme as Nr,Qg as Ns,nye as Nt,ute as Nu,$be as O,WY as Oa,rg as Oc,rs as Od,Che as Oi,pm as Ol,$pe as On,MA as Oo,E8 as Or,rre as Os,W7 as Ot,hf as Ou,jbe as P,YU as Pa,eg as Pc,M as Pd,Wpe as Pi,Vm as Pl,Pfe as Pn,PA as Po,hme as Pr,Vne as Ps,Qve as Pt,Ud as Pu,abe as Q,Cj as Qa,Ch as Qc,bt as Qd,Mpe as Qi,Zte as Ql,gpe as Qn,L_ as Qo,hhe as Qr,jne as Qs,V8 as Qt,uu as Qu,y9 as R,Bj as Ra,Cg as Rc,ko as Rd,Sme as Ri,xm as Rl,Xfe as Rn,PO as Ro,Mhe as Rr,e_ as Rs,P7 as Rt,df as Ru,Zbe as S,f6 as Sa,Pg as Sc,Fo as Sd,ge as Sf,whe as Si,Dm as Sl,Sfe as Sn,SA as So,ume as Sr,H_ as Ss,K7 as St,jd as Su,Sbe as T,t3 as Ta,ag as Tc,uo as Td,ce as Tf,Wme as Ti,Lm as Tl,Rfe as Tn,RO as To,M8 as Tr,Zne as Ts,dye as Tt,dte as Tu,fbe as U,Ij as Ua,wg as Uc,ro as Ud,jme as Ui,fne as Ul,Upe as Un,GA as Uo,I8 as Ur,m_ as Us,Qhe as Ut,Nd as Uu,ybe as V,Rj as Va,gg as Vc,xo as Vd,Eme as Vi,gne as Vl,tpe as Vn,UA as Vo,Rhe as Vr,u_ as Vs,Ive as Vt,gf as Vu,pbe as W,Nj as Wa,Og as Wc,to as Wd,Nme as Wi,Ip as Wl,Lfe as Wn,YA as Wo,$me as Wr,s_ as Ws,nge as Wt,xf as Wu,Gbe as X,_j as Xa,bh as Xc,wn as Xd,Npe as Xi,Bte as Xl,mpe as Xn,QE as Xo,vhe as Xr,Ene as Xs,U8 as Xt,vu as Xu,rbe as Y,fj as Ya,Th as Yc,dr as Yd,Fpe as Yi,Ute as Yl,Epe as Yn,iD as Yo,yhe as Yr,Dne as Ys,B8 as Yt,hu as Yu,Zye as Z,gj as Za,xh as Zc,vt as Zd,Ppe as Zi,Cp as Zl,hpe as Zn,F_ as Zo,mhe as Zr,kne as Zs,H8 as Zt,lu as Zu,Bbe as _,Zde as _a,kg as _c,Sc as _d,de as _f,Ahe as _i,Pm as _l,sme as _n,_k as _o,_fe as _r,ev as _s,Q7 as _t,Cf as _u,hbe as a,v8 as aa,i_ as ac,tu as ad,k as af,bhe as ai,fh as al,kfe as an,FO as ao,Spe as ar,mv as as,zye as at,hp as au,Wbe as b,ude as ba,jg as bc,Ls as bd,ue as bf,Qme as bi,km as bl,wfe as bn,HO as bo,ame as br,Q_ as bs,q7 as bt,xd as bu,T9 as c,Bme as ca,Xg as cc,pl as cd,be as cf,j8 as ci,Eh as cl,jfe as cn,pA as co,Vpe as cr,W_ as cs,o9 as ct,kte as cu,A9 as d,zhe as da,Mne as dc,Wc as dd,re as df,lhe as di,ch as dl,Xpe as dn,cA as do,Ipe as dr,dv as ds,Cye as dt,$f as du,cme as ea,Gne as ec,au as ed,wt as ef,_he as ei,Ah as el,Ape as en,vj as eo,wpe as er,I_ as es,txe as et,Vte as eu,k9 as f,T8 as fa,zne as fc,Dl as fd,ie as ff,the as fi,ih as fl,Zpe as fn,yA as fo,Hpe as fr,lv as fs,n9 as ft,_te as fu,D9 as g,tfe as ga,Fg as gc,Oc as gd,le as gf,Xme as gi,jm as gl,ome as gn,Dk as go,vfe as gr,bv as gs,bye as gt,Pd as gu,O9 as h,m8 as ha,Rg as hc,kc as hd,oe as hf,Yme as hi,eh as hl,lpe as hn,fA as ho,eme as hr,yv as hs,yye as ht,gte as hu,f9 as i,Lhe as ia,Jg as ic,Jl as id,A as if,Yhe as ii,Dh as il,Afe as in,rA as io,ype as ir,K_ as is,d9 as it,Fte as iu,Kbe as j,PY as ja,sg as jc,To as jd,Kme as ji,yne as jl,Cme as jn,lj as jo,Qfe as jr,$ne as js,tye as jt,kf as ju,$ye as k,GY as ka,hg as kc,Co as kd,Whe as ki,vne as kl,Hfe as kn,nj as ko,w8 as kr,tre as ks,uye as kt,Bd as ku,Uye as l,she as la,Zg as lc,Nl as ld,ve as lf,ehe as li,yh as ll,e8 as ln,mA as lo,zpe as lr,fv as ls,i9 as lt,ip as lu,E9 as m,Ihe as ma,zg as mc,Ac as md,fe as mf,Jme as mi,Cm as ml,Ype as mn,jA as mo,nme as mr,uv as ms,e9 as mt,yte as mu,cxe as n,D8 as na,r_ as nc,ou as nd,Je as nf,Vme as ni,Sh as nl,nfe as nn,aj as no,vpe as nr,G_ as ns,jye as nt,Yte as nu,w9 as o,Phe as oa,a_ as oc,Xc as od,we as of,Hhe as oi,jh as ol,cfe as on,UO as oo,dpe as or,hv as os,l9 as ot,Ote as ou,bbe as p,che as pa,S_ as pc,hl as pd,ae as pf,qme as pi,ah as pl,Jpe as pn,TA as po,ope as pr,sv as ps,$7 as pt,bte as pu,oxe as q,Pj as qa,Yh as qc,Sa as qd,kme as qi,Sp as ql,ape as qn,oA as qo,fhe as qr,Cne as qs,ege as qt,wu as qu,mbe as r,npe as ra,Yg as rc,Zl as rd,Ie as rf,Uhe as ri,_h as rl,sfe as rn,VO as ro,bpe as rr,pv as rs,Aye as rt,Qte as ru,F9 as s,Lme as sa,qg as sc,Vl as sd,xe as sf,xhe as si,Oh as sl,lfe as sn,FA as so,ppe as sr,vv as ss,Tye as st,Ate as su,sxe as t,lme as ta,o_ as tc,iu as td,gt as tf,Ehe as ti,kh as tl,jpe as tn,wj as to,_pe as tr,av as ts,P9 as tt,Xte as tu,Bye as u,h8 as ua,Rne as uc,Yc as ud,ne as uf,nhe as ui,oh as ul,yfe as un,bA as uo,Lpe as ur,U_ as us,a9 as ut,vte as uu,Vbe as v,Jde as va,Ng as vc,jc as vd,E as vf,jhe as vi,Nm as vl,gfe as vn,EA as vo,hfe as vr,B_ as vs,Z7 as vt,ote as vu,wbe as w,n3 as wa,og as wc,co as wd,me as wf,khe as wi,zm as wl,Efe as wn,tj as wo,b8 as wr,nre as ws,pye as wt,Yd as wu,H9 as x,p6 as xa,Ag as xc,oo as xd,pe as xf,_8 as xi,Om as xl,s8 as xn,wA as xo,rpe as xr,tv as xs,vye as xt,bd as xu,B9 as y,X6 as ya,Mg as yc,Ic as yd,_e as yf,Zme as yi,Mm as yl,Cfe as yn,AA as yo,ime as yr,nv as ys,xye as yt,ite as yu,x9 as z,Ej as za,Dg as zc,j as zd,bme as zi,dm as zl,Ufe as zn,qO as zo,R8 as zr,c_ as zs,w7 as zt,_f as zu};
|
|
400
|
+
`).replace(/\n+$/,``)}}function G9(e){let t=e.charCodeAt(0)===65279?e.slice(1):e,{frontmatter:n,body:r}=iu(t);if(n===``)return{identity:{},starterContent:t};let i=ou(n),a=Xbe(i);if(a)return{identity:a.identity,starterContent:W9(a.docFrontmatterText,r)};let{frontmatter:o}=iu(r);if(o!==``)return{identity:U9(i),starterContent:r};let s=U9(i);return typeof s.title==`string`?{identity:s,starterContent:r}:{identity:{},starterContent:W9(i,r)}}function Zbe(e,t){let{docFrontmatterText:n,markdown:r}=Ybe(t),i={};for(let[t,n]of Object.entries(e))n!==void 0&&(i[t]=n);let a=(0,su.stringify)({[H9]:i});return`---\n${n.trim()===``?a:`${a}${n}\n`}---\n${r}`}function Qbe(e){return G9(e).starterContent}const $be=`core-base`;function K9(e){let t=e;return t.startsWith(`./`)&&(t=t.slice(2)),t.startsWith(`/`)&&(t=t.slice(1)),t}function q9(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function J9(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function Y9(e){return e.split(`/`).filter(e=>e!==``)}function exe(e,t){let n=J9(t);return e===``||n===e||n.startsWith(`${e}/`)}function X9(e,t){let n=J9(t);if(e===n)return 0;let r=e===``?n:n.slice(e.length+1);return r===``?0:Y9(r).length}function Z9(e,t){let n=Y9(e),r=Y9(t),i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i++;return n.length-i+(r.length-i)}function txe(){let e=new Map;function t(t){let n=K9(t);if(n===``)return;let r=q9(n);if(r===``)return;let i=$7(`file`,r),a=e.get(i);if(!a){e.set(i,[n]);return}a.includes(n)||a.push(n)}function n(t){let n=K9(t),r=$7(`file`,q9(n)),i=e.get(r);if(!i)return;let a=i.indexOf(n);a!==-1&&(i.splice(a,1),i.length===0&&e.delete(r))}function r(e,r){n(e),t(r)}function i(t,n){let r=$7(`file`,t),i=e.get(r);if(!i||i.length===0)return null;if(i.length===1)return i[0];let a=J9(K9(n)),o=[],s=[];for(let e of i)exe(a,e)?o.push(e):s.push(e);return o.length>0?(e=>{let t=e[0],n=X9(a,t);for(let r=1;r<e.length;r++){let i=e[r],o=X9(a,i);(o<n||o===n&&i<t)&&(t=i,n=o)}return t})(o):(e=>{let t=e[0],n=Z9(a,J9(t));for(let r=1;r<e.length;r++){let i=e[r],o=Z9(a,J9(i));(o<n||o===n&&i<t)&&(t=i,n=o)}return t})(s)}function a(){let t=new Map;for(let[n,r]of e)t.set(n,[...r]);return t}function o(){e.clear()}return{add:t,remove:n,rename:r,resolveEmbed:i,clear:o,snapshot:a,size:()=>e.size}}function nxe(e){if(!e)return[];let t=e.split(`/`),n=[],r=``;for(let e of t)r=r?`${r}/${e}`:e,n.push(r);return n}function rxe(e,t){if(e.size===0)return new Set;if(t===``)return new Set(e);let n=new Set,r=`${t}/`;for(let i of e)(i===t||i.startsWith(r))&&n.add(i);return n}function Q9(e){let t=e?.trim();return t===void 0||t===``?void 0:t}function ixe(e){return e.reason!==void 0||Q9(e.note)!==void 0||Q9(e.email)!==void 0}function axe(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol===`https:`)return t;let n=t.hostname===`localhost`||t.hostname===`127.0.0.1`||t.hostname===`[::1]`;return t.protocol===`http:`&&n?t:null}function oxe(){return axe((typeof process>`u`?void 0:Q9(process.env?.OK_FEEDBACK_INTAKE_ORIGIN))??`https://openknowledge.ai`)}function sxe(e){let t=Q9(e);if(t!==void 0)return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)?t:void 0}async function $9(e,t,n){try{let r=await fetch(e,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t),signal:AbortSignal.timeout(n)});if(r.ok){let e=await r.json().catch(()=>null);return{ok:!0,reference:typeof e?.reference==`string`?e.reference:``}}return r.status===400||r.status===413?{ok:!1,reason:`invalid`}:r.status===503?{ok:!1,reason:`unavailable`}:{ok:!1,reason:`error`}}catch(e){return{ok:!1,reason:e instanceof Error&&(e.name===`TimeoutError`||e.name===`AbortError`)?`timeout`:`error`}}}async function cxe(e,t={}){let n=oxe();if(n===null)return{ok:!1,reason:`error`};let r=new URL(`/api/feedback`,n),i=Q9(e.note),a=sxe(e.email),o={kind:`uninstall`,reasons:e.reason===void 0?[]:[e.reason],...i===void 0?{}:{message:i},appVersion:e.appVersion,platform:e.platform,source:e.source},s=Date.now()+(t.timeoutMs??4e3),c=()=>s-Date.now();if(a===void 0)return $9(r,o,c());let l=await $9(r,{...o,email:a},c());return l.ok||l.reason!==`invalid`||c()<=0?l:$9(r,o,c())}const lxe=new Lde({extensions:lY,deriveStructuralFreshness:!0}),uxe=UV(lY);export{Obe as $,pj as $a,mh as $c,St as $d,gfe as $i,Hte as $l,Tpe as $n,P_ as $o,vhe as $r,Wne as $s,z8 as $t,pu as $u,bbe as A,LY as Aa,lg as Ac,so as Ad,qhe as Ai,Ym as Al,Ype as An,zO as Ao,$fe as Ar,ere as As,nye as At,Df as Au,Cbe as B,Lj as Ba,xg as Bc,Do as Bd,Pme as Bi,hne as Bl,npe as Bn,cj as Bo,Hhe as Br,l_ as Bs,xve as Bt,zd as Bu,g9 as C,r3 as Ca,tg as Cc,I as Cd,O as Cf,khe as Ci,ym as Cl,kfe as Cn,RA as Co,pme as Cr,Qne as Cs,J7 as Ct,Md as Cu,Zbe as D,UY as Da,ig as Dc,N as Dd,whe as Di,Fm as Dl,eme as Dn,ij as Do,Lme as Dr,Xne as Ds,yye as Dt,af as Du,dbe as E,d2 as Ea,ng as Ec,P as Ed,qme as Ei,Im as El,Vfe as En,rj as Eo,C8 as Er,N_ as Es,gye as Et,ate as Eu,ixe as F,ZU as Fa,fg as Fc,F as Fd,fpe as Fi,Qm as Fl,c8 as Fn,gk as Fo,vme as Fr,Une as Fs,tye as Ft,yf as Fu,pbe as G,Aj as Ga,Xh as Gc,Ma as Gd,Ime as Gi,ene as Gl,d8 as Gn,aA as Go,fhe as Gr,y_ as Gs,rge as Gt,td as Gu,G9 as H,kj as Ha,yg as Hc,po as Hd,Mme as Hi,dne as Hl,lpe as Hn,WA as Ho,L8 as Hr,d_ as Hs,Tve as Ht,nf as Hu,obe as I,PP as Ia,dg as Ic,Io as Id,Bme as Ii,Um as Il,u8 as In,DA as Io,yme as Ir,h_ as Is,N7 as It,rte as Iu,Vbe as J,jj as Ja,Kh as Jc,ti as Jd,kme as Ji,wp as Jl,Dpe as Jn,sj as Jo,hhe as Jr,b_ as Js,$he as Jt,Cu as Ju,Dbe as K,zj as Ka,Uh as Kc,wa as Kd,Ame as Ki,Fp as Kl,ope as Kn,QA as Ko,phe as Kr,v_ as Ks,tge as Kt,Mu as Ku,Qbe as L,U as La,pg as Lc,ss as Ld,Vme as Li,mm as Ll,Zfe as Ln,kA as Lo,xme as Lr,__ as Ls,Hve as Lt,cf as Lu,nxe as M,OY as Ma,cg as Mc,L as Md,Jhe as Mi,Hm as Ml,Eme as Mn,tk as Mo,bme as Mr,Bne as Ms,cye as Mt,uf as Mu,nbe as N,iW as Na,ug as Nc,yo as Nd,Yhe as Ni,Xm as Nl,Dme as Nn,oj as No,gme as Nr,Qg as Ns,iye as Nt,ute as Nu,txe as O,WY as Oa,rg as Oc,rs as Od,The as Oi,pm as Ol,tme as On,MA as Oo,E8 as Or,rre as Os,W7 as Ot,hf as Ou,Nbe as P,YU as Pa,eg as Pc,M as Pd,Kpe as Pi,Vm as Pl,Ife as Pn,PA as Po,_me as Pr,Vne as Ps,eye as Pt,Ud as Pu,sbe as Q,Cj as Qa,Ch as Qc,bt as Qd,Ppe as Qi,Zte as Ql,vpe as Qn,L_ as Qo,_he as Qr,jne as Qs,V8 as Qt,uu as Qu,y9 as R,Bj as Ra,Cg as Rc,ko as Rd,wme as Ri,xm as Rl,Qfe as Rn,PO as Ro,Phe as Rr,e_ as Rs,P7 as Rt,df as Ru,$be as S,f6 as Sa,Pg as Sc,Fo as Sd,ge as Sf,Ehe as Si,Dm as Sl,wfe as Sn,SA as So,fme as Sr,H_ as Ss,K7 as St,jd as Su,wbe as T,t3 as Ta,ag as Tc,uo as Td,ce as Tf,Kme as Ti,Lm as Tl,Bfe as Tn,RO as To,M8 as Tr,Zne as Ts,pye as Tt,dte as Tu,mbe as U,Ij as Ua,wg as Uc,ro as Ud,Nme as Ui,fne as Ul,Gpe as Un,GA as Uo,I8 as Ur,m_ as Us,ege as Ut,Nd as Uu,xbe as V,Rj as Va,gg as Vc,xo as Vd,Ome as Vi,gne as Vl,rpe as Vn,UA as Vo,Bhe as Vr,u_ as Vs,Rve as Vt,gf as Vu,hbe as W,Nj as Wa,Og as Wc,to as Wd,Fme as Wi,Ip as Wl,zfe as Wn,YA as Wo,the as Wr,s_ as Ws,ige as Wt,xf as Wu,qbe as X,_j as Xa,bh as Xc,wn as Xd,Fpe as Xi,Bte as Xl,gpe as Xn,QE as Xo,bhe as Xr,Ene as Xs,U8 as Xt,vu as Xu,abe as Y,fj as Ya,Th as Yc,dr as Yd,Lpe as Yi,Ute as Yl,Ope as Yn,iD as Yo,xhe as Yr,Dne as Ys,B8 as Yt,hu as Yu,$ye as Z,gj as Za,xh as Zc,vt as Zd,Ipe as Zi,Cp as Zl,_pe as Zn,F_ as Zo,ghe as Zr,kne as Zs,H8 as Zt,lu as Zu,Hbe as _,$de as _a,kg as _c,Sc as _d,de as _f,Mhe as _i,Pm as _l,lme as _n,_k as _o,yfe as _r,ev as _s,Q7 as _t,Cf as _u,_be as a,v8 as aa,i_ as ac,tu as ad,k as af,She as ai,fh as al,jfe as an,FO as ao,wpe as ar,mv as as,Vye as at,hp as au,Kbe as b,fde as ba,jg as bc,Ls as bd,ue as bf,ehe as bi,km as bl,Efe as bn,HO as bo,sme as br,Q_ as bs,q7 as bt,xd as bu,T9 as c,Hme as ca,Xg as cc,pl as cd,be as cf,j8 as ci,Eh as cl,Nfe as cn,pA as co,Upe as cr,W_ as cs,o9 as ct,kte as cu,A9 as d,Vhe as da,Mne as dc,Wc as dd,re as df,dhe as di,ch as dl,Qpe as dn,cA as do,Rpe as dr,dv as ds,Tye as dt,$f as du,ume as ea,Gne as ec,au as ed,wt as ef,yhe as ei,Ah as el,Mpe as en,vj as eo,Epe as er,I_ as es,rxe as et,Vte as eu,k9 as f,T8 as fa,zne as fc,Dl as fd,ie as ff,rhe as fi,ih as fl,$pe as fn,yA as fo,Wpe as fr,lv as fs,n9 as ft,_te as fu,D9 as g,rfe as ga,Fg as gc,Oc as gd,le as gf,Qme as gi,jm as gl,cme as gn,Dk as go,bfe as gr,bv as gs,Sye as gt,Pd as gu,O9 as h,m8 as ha,Rg as hc,kc as hd,oe as hf,Zme as hi,eh as hl,dpe as hn,fA as ho,nme as hr,yv as hs,xye as ht,gte as hu,f9 as i,zhe as ia,Jg as ic,Jl as id,A as if,Zhe as ii,Dh as il,Mfe as in,rA as io,xpe as ir,K_ as is,d9 as it,Fte as iu,Jbe as j,PY as ja,sg as jc,To as jd,Jme as ji,yne as jl,Tme as jn,lj as jo,epe as jr,$ne as js,rye as jt,kf as ju,tbe as k,GY as ka,hg as kc,Co as kd,Khe as ki,vne as kl,Wfe as kn,nj as ko,w8 as kr,tre as ks,fye as kt,Bd as ku,Gye as l,lhe as la,Zg as lc,Nl as ld,ve as lf,nhe as li,yh as ll,e8 as ln,mA as lo,Vpe as lr,fv as ls,i9 as lt,ip as lu,E9 as m,Rhe as ma,zg as mc,Ac as md,fe as mf,Xme as mi,Cm as ml,Zpe as mn,jA as mo,ime as mr,uv as ms,e9 as mt,yte as mu,uxe as n,D8 as na,r_ as nc,ou as nd,Je as nf,Ume as ni,Sh as nl,ife as nn,aj as no,bpe as nr,G_ as ns,Nye as nt,Yte as nu,w9 as o,Ihe as oa,a_ as oc,Xc as od,we as of,Whe as oi,jh as ol,ufe as on,UO as oo,ppe as or,hv as os,l9 as ot,Ote as ou,Sbe as p,uhe as pa,S_ as pc,hl as pd,ae as pf,Yme as pi,ah as pl,Xpe as pn,TA as po,cpe as pr,sv as ps,$7 as pt,bte as pu,cxe as q,Pj as qa,Yh as qc,Sa as qd,jme as qi,Sp as ql,spe as qn,oA as qo,mhe as qr,Cne as qs,nge as qt,wu as qu,gbe as r,ipe as ra,Yg as rc,Zl as rd,Ie as rf,Ghe as ri,_h as rl,lfe as rn,VO as ro,Spe as rr,pv as rs,Mye as rt,Qte as ru,F9 as s,zme as sa,qg as sc,Vl as sd,xe as sf,Che as si,Oh as sl,dfe as sn,FA as so,hpe as sr,vv as ss,Dye as st,Ate as su,lxe as t,dme as ta,o_ as tc,iu as td,gt as tf,Ohe as ti,kh as tl,Npe as tn,wj as to,ype as tr,av as ts,P9 as tt,Xte as tu,Hye as u,h8 as ua,Rne as uc,Yc as ud,ne as uf,ihe as ui,oh as ul,xfe as un,bA as uo,zpe as ur,U_ as us,a9 as ut,vte as uu,Ube as v,Xde as va,Ng as vc,jc as vd,E as vf,Nhe as vi,Nm as vl,vfe as vn,EA as vo,_fe as vr,B_ as vs,Z7 as vt,ote as vu,Ebe as w,n3 as wa,og as wc,co as wd,me as wf,jhe as wi,zm as wl,Ofe as wn,tj as wo,b8 as wr,nre as ws,hye as wt,Yd as wu,H9 as x,p6 as xa,Ag as xc,oo as xd,pe as xf,_8 as xi,Om as xl,s8 as xn,wA as xo,ape as xr,tv as xs,bye as xt,bd as xu,B9 as y,X6 as ya,Mg as yc,Ic as yd,_e as yf,$me as yi,Mm as yl,Tfe as yn,AA as yo,ome as yr,nv as ys,Cye as yt,ite as yu,x9 as z,Ej as za,Dg as zc,j as zd,Sme as zi,dm as zl,Gfe as zn,qO as zo,R8 as zr,c_ as zs,w7 as zt,_f as zu};
|