@inkeep/open-knowledge 0.80.0-beta.3 → 0.80.0-beta.5
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.mjs +6 -6
- package/dist/constants-BZiqchuc.mjs +1 -0
- package/dist/{dist-LKhxaIqd.mjs → dist-CuWl8z8W.mjs} +1 -1
- package/dist/{dist-DIt2A6O3.mjs → dist-DZXRg1jC.mjs} +483 -483
- package/dist/index.mjs +107 -105
- package/dist/{init-BGBPXL0D.mjs → init-Boyt6ulg.mjs} +2 -2
- package/dist/init-Bx1lz5rE.mjs +1 -0
- package/dist/{launch-json-removal-DIzQ3twn.mjs → launch-json-removal-B7LKMRLc.mjs} +1 -1
- package/dist/loader-C5L_-7Kf.mjs +1 -0
- package/dist/{loader-D1pgp7cf.mjs → loader-DXL-jEwi.mjs} +1 -1
- package/dist/{md-manager-BGnqyqi1-Kd9RuPsT.mjs → md-manager-BGnqyqi1-LuKRfqxD.mjs} +31 -29
- package/dist/{open-browser-C_W051pq.mjs → open-browser-B_00nhl_.mjs} +1 -1
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-p2PvxfBS.mjs → preview-B_9MsldP.mjs} +1 -1
- package/dist/preview-C2LIBolB.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-BAPXGHWo.js → ActivityModeContent-Fa2Bc7H7.js} +1 -1
- package/dist/public/assets/{AddPropertiesButton-DaM5tzpb.js → AddPropertiesButton-CY_aojnI.js} +2 -2
- package/dist/public/assets/{AgentDiffPane-CjZnjfGe.js → AgentDiffPane-VQlod0uk.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-BSPGAh_E.js → AgentThreadClientBinder-D83Ifc_u.js} +1 -1
- package/dist/public/assets/{BugReportHistory-CJiUb73a.js → BugReportHistory-DNPLKDE6.js} +1 -1
- package/dist/public/assets/{BugReportHistoryDialog-CtByXbBx.js → BugReportHistoryDialog-BMwN9BIK.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-6Z5ZMAPQ.js → CodeMirrorPropInput-q5OQqF4N.js} +1 -1
- package/dist/public/assets/{ConsentDialogBody-DpXOW8ek.js → ConsentDialogBody-BarwUkfl.js} +1 -1
- package/dist/public/assets/{DeleteConfirmationDialog-BHaoO6w5.js → DeleteConfirmationDialog-tv35CpzH.js} +1 -1
- package/dist/public/assets/{DiffViewBoundary-B3HbMKFC.js → DiffViewBoundary-Df7pBeha.js} +1 -1
- package/dist/public/assets/{DocumentContext-Cn9J8crD.js → DocumentContext-VRYqEU-B.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-AmfJVzHm.js → EditorModeToggle-Ey6xkZS2.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-C9TkBHT5.js → EnableSyncConfirmDialog-Di9qhAZg.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-qQa8ZSkt.js → ExcalidrawDocEditor-CjG9RZeu.js} +1 -1
- package/dist/public/assets/FeedbackForm-0otENm61.js +1 -0
- package/dist/public/assets/{GraphPanel-DrXj04wO.js → GraphPanel-sDvfmrPI.js} +1 -1
- package/dist/public/assets/{ImageAttachments-BCZsZ1sq.js → ImageAttachments-COJDM7Zs.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-DQxxrVN7.js → ImportSkillDialog-DZI_Ymxz.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-ConhfeLc.js → LintConfigEditor-CMCb-_WR.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-C-JL8uLM.js +1 -0
- package/dist/public/assets/{ManagedArtifactProperties-CX6Vb1JW.js → ManagedArtifactProperties-C-o6w1oB.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-BsGXHGGp.js → MermaidDocEditor-af9-qY7T.js} +1 -1
- package/dist/public/assets/{OpenInAgentMenuItem-nGXqEk1W.js → OpenInAgentMenuItem-lbV79xn9.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-DzMc70ZS.js → PropertyDisplayRow-CbnGGdQB.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-Csy_gtym.js → RegisteredAgentIcon-Btbw9w2J.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-DYDHbNSq.js → ReportBugDialogBody-B1H-65Sn.js} +1 -1
- package/dist/public/assets/{ReportBugMenuTrigger-BI86cMBx.js → ReportBugMenuTrigger-B-ySnIcK.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-CAUyzvxl.js → SchemaConfigEditor-T4_tM4AM.js} +1 -1
- package/dist/public/assets/{SessionsHost-BlOe2SwN.js → SessionsHost-Df6cK8IF.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-bGbz3rU_.js → SettingsDialogBody-7ULgKnMJ.js} +1 -1
- package/dist/public/assets/{ShareBranchSwitchDialog-B1uJs5Bn.js → ShareBranchSwitchDialog-ycuaed88.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-D5zztXCK.js → ShareReceiveDialog-DmE16_gX.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-DTEfqcON.js → ShareReceiveMissDialog-DqsqkZ98.js} +1 -1
- package/dist/public/assets/{SkillCostValue-ak3JKnDm.js → SkillCostValue-C43y1frw.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-B5rEaInO.js → SkillEditBanner-DttpBxOJ.js} +1 -1
- package/dist/public/assets/{SkillForkDialog-Cu7JHqqd.js → SkillForkDialog-Dzre8M2R.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-B7K9elQU.js → SkillInstallMenu-B0JB7kZB.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-DYbcJg7P.js → SkillOriginInline-CShk5VBB.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-DcbvW2T6.js → SkillToolbarControls-1BYcSekj.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-7LjoJy_5.js → SlidesToolbarControls-CIR9Gt5P.js} +1 -1
- package/dist/public/assets/{SourceEditor-C8ffIHwr.js → SourceEditor-dlengKQr.js} +1 -1
- package/dist/public/assets/{TerminalPanel-CiqML_vV.js → TerminalPanel-DVVYNGxU.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-BeNUbLdQ.js → TerminalWindowApp-Dbf1LEIb.js} +1 -1
- package/dist/public/assets/{TextDocEditor-Dp7FK75S.js → TextDocEditor-Bfgflu7Y.js} +1 -1
- package/dist/public/assets/{ThreadView-9tYfJB3u.js → ThreadView-BAqefrNB.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-CBzWQFjK.js → TimelineDiffPane-C5Pk8YKQ.js} +1 -1
- package/dist/public/assets/{agent-connections-BeE3-bph.js → agent-connections-36VzA4Nj.js} +1 -1
- package/dist/public/assets/{auth-state-cache--dIcIe7G.js → auth-state-cache-y7ZNLaEX.js} +1 -1
- package/dist/public/assets/{bug-report-send-manager-DNdGRps_.js → bug-report-send-manager-WZvhB30v.js} +1 -1
- package/dist/public/assets/{client-version-DUN6viBa.js → client-version-DAE_LnJT.js} +1 -1
- package/dist/public/assets/{comment-chips-TcK52Do9.js → comment-chips-mEcLNjUa.js} +1 -1
- package/dist/public/assets/{config-provider-CG9gR7T8.js → config-provider-Dc4ERnKv.js} +1 -1
- package/dist/public/assets/{css-color-to-hex-Z8frkoC6.js → css-color-to-hex-HXZok3qq.js} +1 -1
- package/dist/public/assets/{diagnostic-breadcrumb-CntZqCsY.js → diagnostic-breadcrumb-Da90WJfg.js} +1 -1
- package/dist/public/assets/{dist-DWDffHoo.js → dist-BXv2iH4t.js} +30 -28
- package/dist/public/assets/{doc-paths-DApIJEsY.js → doc-paths-DbP8RoCY.js} +1 -1
- package/dist/public/assets/{doc-undo-manager-BsCVxADi.js → doc-undo-manager-BuQfcH7g.js} +1 -1
- package/dist/public/assets/{documents-events-D3WFvAcg.js → documents-events-B9_p7FnW.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-BBZoex3H.js → file-tree-adapter-CC3PZmuz.js} +1 -1
- package/dist/public/assets/{file-tree-utils-MSwqAf_Q.js → file-tree-utils-SoxHR8nZ.js} +1 -1
- package/dist/public/assets/{folder-config-api-CTSvuorZ.js → folder-config-api-D2T7lLE2.js} +1 -1
- package/dist/public/assets/{index-z4pOD0dV.js → index-ZJRhdCXy.js} +8 -8
- package/dist/public/assets/{lint-config-client-DPGrXD4q.js → lint-config-client-ByyVt3Ji.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-CAHOja9n.js → markdownlint-rule-browser-DLR8ICzt.js} +1 -1
- package/dist/public/assets/{navigation-targets-CU6rzUlp.js → navigation-targets-CPBRP2pX.js} +1 -1
- package/dist/public/assets/{page-list-cache-BqFWbREg.js → page-list-cache-DP6EykyZ.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-D3aYtYmc.js → pending-receive-nav-store-BiglQO8z.js} +1 -1
- package/dist/public/assets/{preferred-session-events-DAmmw5gh.js → preferred-session-events-Bw6PF8j6.js} +1 -1
- package/dist/public/assets/{progress-sy7HQozy.js → progress-3N7lmUHc.js} +1 -1
- package/dist/public/assets/{project-paths-ZxQBkNtH.js → project-paths-WwDCX6Wj.js} +1 -1
- package/dist/public/assets/{prop-types-DKh1WKWf.js → prop-types-D7m1bgZd.js} +1 -1
- package/dist/public/assets/{receive-store-MDSlAMS-.js → receive-store-s0TOnYEX.js} +1 -1
- package/dist/public/assets/{selection-context-W5wdYOgq.js → selection-context-DFvB64m4.js} +1 -1
- package/dist/public/assets/{sign-in-terminal-events-hpuzOw8T.js → sign-in-terminal-events-n2711hbP.js} +1 -1
- package/dist/public/assets/{skill-scope-Bez3g3qc.js → skill-scope-BEZoxlA_.js} +1 -1
- package/dist/public/assets/{skills-api-Dg4Bu4bF.js → skills-api-xEJYLsBT.js} +1 -1
- package/dist/public/assets/{src-BnWuP41K.js → src-DW6dj9Em.js} +1 -1
- package/dist/public/assets/{startup-marks-BANMGjlj.js → startup-marks-BI3f20Ai.js} +1 -1
- package/dist/public/assets/{tag-pill-input-X411ZGOD.js → tag-pill-input-9A5egJpq.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-BC3uQ8d6.js → target-navigation-intent-KL1RgeS2.js} +1 -1
- package/dist/public/assets/{telemetry-startup-C1Pox6wt.js → telemetry-startup-D5AbtRQp.js} +1 -1
- package/dist/public/assets/{terminal-command-events-DhjWRdh7.js → terminal-command-events-Cwnlls-2.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-BdwMO1Yd.js → terminal-launch-events-BeaRJslN.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-CkRgU6v9.js → terminal-telemetry-B-Ex6x4P.js} +1 -1
- package/dist/public/assets/{thread-client-Cs7m3o_c.js → thread-client-BohJshIz.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-DYnzK_Dw.js → typing-burst-detector-CRC92mGc.js} +1 -1
- package/dist/public/assets/{uninstall-D-JcCb1g.js → uninstall-BI1OhVGa.js} +1 -1
- package/dist/public/assets/{use-activity-panel-E7Mh-Ezq.js → use-activity-panel-DSA7U3E8.js} +1 -1
- package/dist/public/assets/{use-apply-config-language-D6tEZ9VT.js → use-apply-config-language-BQbUd-j-.js} +1 -1
- package/dist/public/assets/{use-collab-url-D86Y_0c-.js → use-collab-url-BLYPZ3GH.js} +1 -1
- package/dist/public/assets/{use-conflicts-DX3qdaOd.js → use-conflicts-Bk4ek4CK.js} +1 -1
- package/dist/public/assets/{use-git-sync-status-CD2DOuM6.js → use-git-sync-status-CDLRE1Yh.js} +1 -1
- package/dist/public/assets/{use-installed-clis-Cwk9Ej-5.js → use-installed-clis-e8k5ayDZ.js} +2 -2
- package/dist/public/assets/{use-live-xterm-theme-CuUImHB-.js → use-live-xterm-theme-CumqDZtn.js} +1 -1
- package/dist/public/assets/{use-open-skill-D7-vvik5.js → use-open-skill-LwyclBox.js} +1 -1
- package/dist/public/assets/{use-settings-route-Cgem-_t0.js → use-settings-route-4si6XFq0.js} +1 -1
- package/dist/public/assets/{use-skill-origin-B_Jm5scu.js → use-skill-origin-BuNz7780.js} +1 -1
- package/dist/public/assets/{use-skills-BDkMItFj.js → use-skills-C1ayg_tU.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-CE0TRk5u.js → use-terminal-enabled-DH9NZVb3.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-D2HtWDOo.js → use-timeline-entry-diff-x56ANf6r.js} +1 -1
- package/dist/public/assets/{use-workspace-CUF62sEC.js → use-workspace-DkzDvF62.js} +1 -1
- package/dist/public/index.html +59 -59
- package/dist/public/uninstall.html +3 -3
- package/dist/{registry-probes-C_CjBt1X.mjs → registry-probes-3L8CRnGg.mjs} +1 -1
- package/dist/{removal-file-path-Dpgj65Fm.mjs → removal-file-path-3ZpUklLl.mjs} +1 -1
- package/dist/{repair-launch-json-D2_vTIDM.mjs → repair-launch-json-CMMYwCjW.mjs} +1 -1
- package/dist/{repair-mcp-configs-B7iHsYuV.mjs → repair-mcp-configs-DzGALib-.mjs} +1 -1
- package/dist/{src-BXartIQO.mjs → src-DU6Xx1gD.mjs} +1 -1
- package/dist/src-DjmVymt-.mjs +1 -0
- package/dist/start-B8Yg-ZtE.mjs +1 -0
- package/dist/{start-B02FL8wC.mjs → start-Jnb5yYdV.mjs} +3 -3
- package/package.json +5 -5
- package/dist/constants-B-aUCjZp.mjs +0 -1
- package/dist/init-BJXU6KnD.mjs +0 -1
- package/dist/loader-DS_Yxo5c.mjs +0 -1
- package/dist/preview-CQAChk_4.mjs +0 -1
- package/dist/public/assets/FeedbackForm-DFC9eU2O.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-DhhC3S2j.js +0 -1
- package/dist/src-CFZDRhgI.mjs +0 -1
- package/dist/start-D8xMsLwv.mjs +0 -1
|
@@ -515,7 +515,7 @@ $2`).split(`
|
|
|
515
515
|
`)}function z2(e,t,n,r,i,a,o){if(e.kind===`lines`)return F2(e.startLine,e.endLine,n);if(e.kind===`anchor`)return P2(e.markdown,n);let s=N2(e.markdown);return d2(R2(t,``,s,r,i),a,o)<=f2(o,s2)?s:P2(e.markdown,n)}function B2(e,t,n,r){let{target:i}=e,a=e.transport??`url`,o=Y0(e.docRelativePath),s=`Let's work on @${o} using OpenKnowledge.`,c=z2(t,s,o,n,r,i,a);return R2(s,D2(e.instruction,i,e=>R2(s,e,c,n,r),a),c,n,r)}function V2(e){let{target:t}=e,n=e.autoOpen?j2:``,r=I2(e.mentions);if(e.scope===`doc`&&e.selection!==void 0)return B2(e,e.selection,r,n);let i=L2(e);return R2(i,D2(e.instruction,t,e=>R2(i,e,``,r,n),e.transport??`url`),``,r,n)}function H2(e){let t=Y0(e.relativePath),n=e.ruleAlias===void 0?`${e.source}/${e.code}`:`${e.source}/${e.code} (${e.ruleAlias})`,r=[`Fix this lint problem in @${t} using OpenKnowledge.`,``,`Problem: ${n} at line ${e.line}, column ${e.column}:`,``,M2(e.message.trim())],i=e.lineText??``;if(i.trim()!==``){let t=g2(i);r.push(``,`Line ${e.line} reads:`,``,t,i,t)}return r.push(``,`Edit @${t} via the OpenKnowledge MCP server, then re-lint it to confirm the problem is resolved.`),r.join(`
|
|
516
516
|
`)}function U2(e){if(e===null)return[`Fix every problem across this project's documents using OpenKnowledge.`,``,"Run the `audit` tool for the current list of lint violations and broken links, then work file by file — the `lint` tool with `fix: true` clears one document's mechanically-fixable problems at a time — and re-audit until it reports no problems."].join(`
|
|
517
517
|
`);let t=Y0(e);return[`Fix every problem in @${t} using OpenKnowledge.`,``,`Run the \`audit\` tool scoped to it for the current list of lint violations and broken links, then fix each one — the \`lint\` tool with \`fix: true\` clears the mechanically-fixable ones — and re-audit @${t} until it reports no problems.`].join(`
|
|
518
|
-
`)}function W2(e){if(e.length===0)return{ok:!1,reason:`docName must not be empty`};if(e.trim().length===0)return{ok:!1,reason:`docName must not be blank (whitespace only)`};if(e!==e.trim())return{ok:!1,reason:`docName must not have leading or trailing whitespace`};for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<32||n===127)return{ok:!1,reason:`docName must not contain control characters`}}if(e.includes(`..`)||e.startsWith(`/`)||e.includes(`\\`))return{ok:!1,reason:`docName must not contain "..", a leading "/", or a backslash`};for(let t of e.split(`/`)){if(t.length===0)return{ok:!1,reason:`docName must not contain empty path segments (no leading, trailing, or doubled "/")`};if(t.startsWith(`.`))return{ok:!1,reason:`docName path segments must not start with "." (hidden files are not addressable)`}}return{ok:!0}}var G2=new Set([`opencode.json`]),K2=/^\.[A-Za-z0-9_-]+\/skills\/[^/]+\/.+$/;function q2(e){return K2.test(e)}function J2(e){return q2(e)?!1:e.split(`/`).some(e=>e.startsWith(`.`))?!0:G2.has(e.slice(e.lastIndexOf(`/`)+1))}function Y2(e,t){let n=W2(e);n.ok||t.addIssue({code:`custom`,message:n.reason})}var X2=M().superRefine(Y2).optional(),Z2=M().superRefine(Y2),Q2={agentId:M().optional(),agentName:M().optional(),colorSeed:M().optional(),clientName:M().optional(),clientVersion:M().optional(),label:M().optional()},$2=M().optional(),e4=/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;Qa(`kind`,[I({kind:z(`doc`),docPath:M().min(1)}).loose(),I({kind:z(`folder`),folderPath:M()}).loose()]);var t4=R([`no-remote`,`detached-head`,`branch-not-on-origin`,`non-github-remote`,`invalid-path`,`unsupported-share-url`]),n4=R([`current`,`stale`,`absent`,`empty`]),r4=Qa(`ok`,[I({ok:z(!0),shareUrl:M().min(1),sharedUrl:M().min(1),branch:M().min(1),freshness:n4.optional().catch(void 0)}).loose(),I({ok:z(!1),error:t4,branch:M().min(1).optional()}).loose()]),i4=R([`user`,`org`]),a4=I({login:M().min(1),kind:i4,avatarUrl:M().optional()}).loose(),o4=R([`auth-required`,`network`]),s4=Qa(`ok`,[I({ok:z(!0),owners:F(a4)}).loose(),I({ok:z(!1),error:o4}).loose()]),c4=Qa(`ok`,[I({ok:z(!0),available:P()}).loose(),I({ok:z(!1),error:o4}).loose()]),l4=R([`public`,`private`]);I({owner:M().min(1),name:M().min(1),visibility:l4,description:M().optional()}).loose();var u4=R([`name-conflict`,`saml-sso`,`auth-required`,`push-failed`,`init-failed`,`network`,`no-project`]),d4=Qa(`ok`,[I({ok:z(!0),ownerLogin:M().min(1),repoName:M().min(1),cloneUrl:M().min(1),defaultBranch:M().min(1)}).loose(),I({ok:z(!1),error:u4}).loose()]);function f4(e){return!(typeof e!=`string`||e.length===0||e.startsWith(`-`)||/[\x00-\x1F\x7F]/.test(e)||/\s/.test(e)||e.includes(`:`)||e.split(`/`).includes(`..`))}var p4=e=>e.refine(f4,`invalid branch name`),m4={shareTargetExists:P(),dirtyConflicts:I({conflicts:P(),files:F(M().min(1))}).loose(),branchIsLocal:P(),shareTargetOnOriginBranch:P().optional()};Qa(`detached`,[I({detached:z(!1),currentBranch:M().min(1).nullable(),currentHeadSha:Va(),...m4}).loose(),I({detached:z(!0),currentBranch:Va(),currentHeadSha:M().min(1),...m4}).loose()]),I({branch:p4(M().min(1)),principalId:M().optional(),fastForward:P().optional()}).loose();var h4=R([`dirty-conflict`,`branch-not-found`,`fetch-failed`,`checkout-failed`,`branch-in-other-worktree`,`ff-diverged`]);Qa(`ok`,[I({ok:z(!0)}).loose(),I({ok:z(!1),reason:h4,files:F(M().min(1)).optional(),otherWorktreePath:M().min(1).optional()}).loose()]),R([`on-origin`,`renamed`,`deleted`,`never-on-branch`,`changed-locally`,`unknown`]),I({branch:p4(M().min(1)),path:M(),kind:R([`doc`,`folder`]),contentRootDepth:N().int().min(1).max(65535).optional()}).loose(),Qa(`verdict`,[I({verdict:z(`on-origin`)}).loose(),I({verdict:z(`renamed`),renamedTo:M().min(1)}).loose(),I({verdict:z(`deleted`)}).loose(),I({verdict:z(`never-on-branch`)}).loose(),I({verdict:z(`changed-locally`)}).loose(),I({verdict:z(`unknown`)}).loose()]).catch({verdict:`unknown`});var g4=I({startedAt:M().min(1),httpListenMs:N().nonnegative().optional(),seedWalkMs:N().nonnegative().optional(),indexesMs:N().nonnegative().optional(),readyMs:N().nonnegative().optional(),fileCount:N().nonnegative().optional()}),_4=I({serverInstanceId:M().min(1),currentBranch:M().min(1).optional(),currentDiskAckSVs:no(M().min(1),M().min(1)).optional(),boot:g4.optional(),collabClients:N().int().nonnegative().optional()}).loose(),v4=I({id:M().min(1),display_name:M().min(1),display_email:M(),source:R([`git-config`,`synthesized`]),created_at:M().min(1)}).loose();I({collabUrl:M().nullable(),previewUrl:M().nullable(),port:N(),singleFile:P().default(!1)}).loose();var y4=R(`urn:ok:error:malformed-upload.urn:ok:error:collision-exhaustion.urn:ok:error:storage-full.urn:ok:error:storage-readonly.urn:ok:error:storage-error.urn:ok:error:no-file-received.urn:ok:error:path-escape.urn:ok:error:symlink-refused.urn:ok:error:method-not-allowed.urn:ok:error:invalid-request.urn:ok:error:payload-too-large.urn:ok:error:request-timeout.urn:ok:error:internal-server-error.urn:ok:error:derived-index-unavailable.urn:ok:error:loopback-required.urn:ok:error:invalid-origin.urn:ok:error:url-not-allowed.urn:ok:error:dir-outside-home.urn:ok:error:concurrent-operation.urn:ok:error:clone-failed.urn:ok:error:clone-timeout.urn:ok:error:server-start-failed.urn:ok:error:reserved-doc-name.urn:ok:error:target-not-found.urn:ok:error:stale-target.urn:ok:error:frontmatter-edit-not-supported.urn:ok:error:invalid-frontmatter-patch.urn:ok:error:frontmatter-malformed.urn:ok:error:no-active-session.urn:ok:error:too-many-agent-sessions.urn:ok:error:disk-divergence.urn:ok:error:stale-external-write.urn:ok:error:store-refused.urn:ok:error:doc-removed.urn:ok:error:doc-not-found.urn:ok:error:doc-already-exists.urn:ok:error:doc-not-open.urn:ok:error:rollback-not-configured.urn:ok:error:doc-not-available.urn:ok:error:backlink-index-not-configured.urn:ok:error:file-rescan-not-configured.urn:ok:error:shadow-not-configured.urn:ok:error:host-not-allowed.urn:ok:error:principal-not-available.urn:ok:error:not-found.urn:ok:error:auth-failed.urn:ok:error:no-project-dir.urn:ok:error:non-github-origin.urn:ok:error:server-open-failed.urn:ok:error:doc-in-conflict.urn:ok:error:concurrent-overwrite-refused.urn:ok:error:unresolved-conflict-markers.urn:ok:error:no-conflict-tracked.urn:ok:error:no-blocking-changes.urn:ok:error:sync-not-active.urn:ok:error:project-repo-not-configured.urn:ok:error:seed-prerequisite-missing.urn:ok:error:seed-invalid-root.urn:ok:error:tag-index-not-configured.urn:ok:error:template-not-found.urn:ok:error:unsupported-asset-type.urn:ok:error:asset-not-found.urn:ok:error:single-file-mode.urn:ok:error:collab-server-not-running.urn:ok:error:gateway-timeout.urn:ok:error:cursor-not-installed.urn:ok:error:cursor-spawn-timeout.urn:ok:error:cursor-spawn-failed.urn:ok:error:handoff-target-not-installed.urn:ok:error:handoff-spawn-timeout.urn:ok:error:handoff-spawn-failed.urn:ok:error:registry-unreachable.urn:ok:error:config-not-writable.urn:ok:error:audit-superseded.urn:ok:error:theme-name-taken.urn:ok:error:theme-name-invalid`.split(`.`)),b4=I({type:y4,title:M().min(1),status:N().int().min(400).max(599),instance:M().regex(e4,`instance must be urn:uuid:<uuid>`).optional(),detail:M().optional()}).loose();I({parentDocName:M().min(1),placement:R([`configured-attachments`,`parent-dir`]).default(`configured-attachments`),agentId:M().min(1).optional(),agentName:M().min(1).optional()}).loose();var x4=I({src:M().min(1),path:M().min(1).optional(),deduped:P().optional()}).loose();I({url:M().min(1),dir:M().min(1),branch:M().min(1).refine(f4,`invalid branch name`).optional()}).loose(),I({type:z(`error`),problem:b4}).loose();function S4(e){let t=e??(typeof navigator>`u`?void 0:navigator);return t===void 0?[]:t.languages!==void 0&&t.languages.length>0?yh(t.languages):t.language===void 0?[]:yh([t.language])}var C4={en:`ltr`,"zh-Hans":`ltr`,"zh-Hant":`ltr`,hi:`ltr`,es:`ltr`,ar:`rtl`,fr:`ltr`,bn:`ltr`,"pt-BR":`ltr`,id:`ltr`,ur:`rtl`,ko:`ltr`};function w4(e){let t=new Intl.Locale(e).getTextInfo?.().direction;return t===`rtl`||t===`ltr`?t:C4[e]}function T4(e,t){let n=t.map(e=>[bh(e),e]);for(let t of e){let e=bh(t);if(e===null)continue;let r=n.find(([t])=>t===e);if(r!==void 0)return r[1]}}function E4(e){let{override:t,storedPreference:n,preferenceList:r,supportedLocales:i}=e,a=e.autoDetectableLocales??i;if(t!==void 0){let e=T4([t],i);if(e!==void 0)return{locale:e,source:`override`}}if(n!==void 0&&n!==`system`&&i.includes(n))return{locale:n,source:`explicit`};let o=T4(r,a);return o===void 0?{locale:`en`,source:`fallback`}:{locale:o,source:`system`}}var D4=R(af),O4=L({hosts:F(M()),scope:D4,scripts:P(),installedAt:Ui(),projection:R([`symlink`,`copy`]).optional(),contentHash:M().optional()});L({schema:z(1),skills:no(M(),O4).default({})});var k4=`extra/screenshot.png`,A4=`extra/attachments/`,j4=3145728,M4=[`image/png`,`image/jpeg`,`image/webp`],N4={"image/png":`png`,"image/jpeg":`jpg`,"image/webp":`webp`};function P4(e){return e.startsWith(A4)}var F4=`extra/agent-chat/`;function I4(e){return e.startsWith(F4)}var L4=`extra/`;function R4(e){return!e.startsWith(L4)||!e.endsWith(`.dmp`)?!1:!e.slice(6).includes(`/`)}function z4(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===45||e===95}var B4=8,V4=`eyJ`;function H4(e){if(!e.includes(V4))return null;let t=[],n=[];for(let r=0;r<e.length;r+=1)if(z4(e.charCodeAt(r))){for(t.push(r);r<e.length&&z4(e.charCodeAt(r));)r+=1;n.push(r)}let r=[];for(let t=e.indexOf(V4);t!==-1;t=e.indexOf(V4,t+1))r.push(t);let i=r=>r+1<t.length&&e[n[r]??-1]===`.`&&t[r+1]===(n[r]??-1)+1,a=[],o=0,s=0;for(let c=0;c+2<t.length;c+=1){let l=t[c]??0,u=n[c]??0;for(;s<r.length&&(r[s]??0)<l;)s+=1;if(!i(c)||!i(c+1))continue;let d=t[c+1]??0,f=n[c+1]??0,p=(n[c+2]??0)-(t[c+2]??0);if(!e.startsWith(V4,d)||f-d<11||p<B4)continue;let m=r[s];m===void 0||m>=u||u-m<11||(a.push(e.slice(o,m),`[REDACTED-JWT]`),o=n[c+2]??e.length,c+=2)}return a.length===0?null:(a.push(e.slice(o)),a.join(``))}var foe=/(?:\b|(?<=(?:\[|\u009b)[0-?]*[ -/]*[@-~]))/.source;function U4(e){return RegExp(`${foe}${e.source}`,`g`)}var W4=[{name:`github-pat`,regex:/(ghp_|gho_|ghu_|ghs_|ghr_)[A-Za-z0-9]{36,}\b/g,replacement:`[REDACTED-GH-PAT]`},{name:`aws-access-key`,regex:U4(/(AKIA|ASIA|ABIA)[A-Z2-7]{16}\b/),replacement:`[REDACTED-AWS-KEY]`},{name:`anthropic-key`,regex:/sk-ant-api03-[A-Za-z0-9_-]{20,}\b/g,replacement:`[REDACTED-ANTHROPIC]`},{name:`openai-key`,regex:U4(/sk-[A-Za-z0-9]{20,}\b/),replacement:`[REDACTED-OPENAI]`},{name:`bearer-token`,regex:/([Aa]uthorization:\s*[Bb]earer\s+)(?:\\"[^\s"\\]+\\"|"[A-Za-z0-9\-._~+/=]+"|[^\s"\\]+)/g,replacement:`$1[REDACTED]`},{name:`jwt`,redact:H4},{name:`url-credentials`,regex:/:\/\/[^/\s:@"]+:[^/\s:@"]+@/g,replacement:`://[REDACTED]@`},{name:`github-pat-fine-grained`,regex:/github_pat_[0-9A-Za-z_]{20,}/g,replacement:`[REDACTED-GH-PAT]`},{name:`openai-key-modern`,regex:U4(/sk-(?:proj|svcacct|admin|None)-[A-Za-z0-9_-]{20,}/),replacement:`[REDACTED-OPENAI]`},{name:`slack-token`,regex:/xox[a-z]-[A-Za-z0-9-]{10,}/g,replacement:`[REDACTED-SLACK]`},{name:`google-api-key`,regex:/AIza[0-9A-Za-z_-]{35}/g,replacement:`[REDACTED-GOOGLE]`},{name:`stripe-secret-key`,regex:U4(/(?:sk|rk)_live_[0-9A-Za-z]{16,}\b/),replacement:`[REDACTED-STRIPE]`},{name:`gitlab-pat`,regex:/glpat-[0-9A-Za-z_-]{20,}/g,replacement:`[REDACTED-GITLAB]`},{name:`bearer-token-json`,regex:/("[Aa]uthorization"\s*:\s*"[Bb]earer\s+)(?:\\"[^"\\]+\\"|[^"\\]+)/g,replacement:`$1[REDACTED]`},{name:`macos-home-path`,regex:/\/Users\/[^/"\r]*[^/"\r\\]/g,replacement:`~`},{name:`linux-home-path`,regex:/\/home\/[^/"\r]*[^/"\r\\]/g,replacement:`~`},{name:`windows-home-path`,regex:/[A-Za-z]:\\{1,2}Users\\{1,2}(?:(?![A-Za-z]:\\)[^\\"\r])+/gi,replacement:`~`}];W4.map(e=>e.name);function poe(e){let t=new Set,n=0;return{redacted:e.split(`
|
|
518
|
+
`)}function W2(e){if(e.length===0)return{ok:!1,reason:`docName must not be empty`};if(e.trim().length===0)return{ok:!1,reason:`docName must not be blank (whitespace only)`};if(e!==e.trim())return{ok:!1,reason:`docName must not have leading or trailing whitespace`};for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<32||n===127)return{ok:!1,reason:`docName must not contain control characters`}}if(e.includes(`..`)||e.startsWith(`/`)||e.includes(`\\`))return{ok:!1,reason:`docName must not contain "..", a leading "/", or a backslash`};for(let t of e.split(`/`)){if(t.length===0)return{ok:!1,reason:`docName must not contain empty path segments (no leading, trailing, or doubled "/")`};if(t.startsWith(`.`))return{ok:!1,reason:`docName path segments must not start with "." (hidden files are not addressable)`}}return{ok:!0}}var G2=new Set([`opencode.json`]),K2=/^\.[A-Za-z0-9_-]+\/skills\/[^/]+\/.+$/;function q2(e){return K2.test(e)}function J2(e){return q2(e)?!1:e.split(`/`).some(e=>e.startsWith(`.`))?!0:G2.has(e.slice(e.lastIndexOf(`/`)+1))}function Y2(e,t){let n=W2(e);n.ok||t.addIssue({code:`custom`,message:n.reason})}var X2=M().superRefine(Y2).optional(),Z2=M().superRefine(Y2),Q2={agentId:M().optional(),agentName:M().optional(),colorSeed:M().optional(),clientName:M().optional(),clientVersion:M().optional(),label:M().optional()},$2=M().optional(),e4=/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;Qa(`kind`,[I({kind:z(`doc`),docPath:M().min(1)}).loose(),I({kind:z(`folder`),folderPath:M()}).loose()]);var t4=R([`no-remote`,`detached-head`,`branch-not-on-origin`,`non-github-remote`,`invalid-path`,`unsupported-share-url`]),n4=R([`current`,`stale`,`absent`,`empty`]),r4=Qa(`ok`,[I({ok:z(!0),shareUrl:M().min(1),sharedUrl:M().min(1),branch:M().min(1),freshness:n4.optional().catch(void 0)}).loose(),I({ok:z(!1),error:t4,branch:M().min(1).optional()}).loose()]),i4=R([`user`,`org`]),a4=I({login:M().min(1),kind:i4,avatarUrl:M().optional()}).loose(),o4=R([`auth-required`,`network`]),s4=Qa(`ok`,[I({ok:z(!0),owners:F(a4)}).loose(),I({ok:z(!1),error:o4}).loose()]),c4=Qa(`ok`,[I({ok:z(!0),available:P()}).loose(),I({ok:z(!1),error:o4}).loose()]),l4=R([`public`,`private`]);I({owner:M().min(1),name:M().min(1),visibility:l4,description:M().optional()}).loose();var u4=R([`name-conflict`,`saml-sso`,`auth-required`,`push-failed`,`init-failed`,`network`,`no-project`]),d4=Qa(`ok`,[I({ok:z(!0),ownerLogin:M().min(1),repoName:M().min(1),cloneUrl:M().min(1),defaultBranch:M().min(1)}).loose(),I({ok:z(!1),error:u4}).loose()]);function f4(e){return!(typeof e!=`string`||e.length===0||e.startsWith(`-`)||/[\x00-\x1F\x7F]/.test(e)||/\s/.test(e)||e.includes(`:`)||e.split(`/`).includes(`..`))}var p4=e=>e.refine(f4,`invalid branch name`),m4={shareTargetExists:P(),dirtyConflicts:I({conflicts:P(),files:F(M().min(1))}).loose(),branchIsLocal:P(),shareTargetOnOriginBranch:P().optional()};Qa(`detached`,[I({detached:z(!1),currentBranch:M().min(1).nullable(),currentHeadSha:Va(),...m4}).loose(),I({detached:z(!0),currentBranch:Va(),currentHeadSha:M().min(1),...m4}).loose()]),I({branch:p4(M().min(1)),principalId:M().optional(),fastForward:P().optional()}).loose();var h4=R([`dirty-conflict`,`branch-not-found`,`fetch-failed`,`checkout-failed`,`branch-in-other-worktree`,`ff-diverged`]);Qa(`ok`,[I({ok:z(!0)}).loose(),I({ok:z(!1),reason:h4,files:F(M().min(1)).optional(),otherWorktreePath:M().min(1).optional()}).loose()]),R([`on-origin`,`renamed`,`deleted`,`never-on-branch`,`changed-locally`,`unknown`]),I({branch:p4(M().min(1)),path:M(),kind:R([`doc`,`folder`]),contentRootDepth:N().int().min(1).max(65535).optional()}).loose(),Qa(`verdict`,[I({verdict:z(`on-origin`)}).loose(),I({verdict:z(`renamed`),renamedTo:M().min(1)}).loose(),I({verdict:z(`deleted`)}).loose(),I({verdict:z(`never-on-branch`)}).loose(),I({verdict:z(`changed-locally`)}).loose(),I({verdict:z(`unknown`)}).loose()]).catch({verdict:`unknown`});var g4=I({startedAt:M().min(1),httpListenMs:N().nonnegative().optional(),seedWalkMs:N().nonnegative().optional(),indexesMs:N().nonnegative().optional(),readyMs:N().nonnegative().optional(),fileCount:N().nonnegative().optional()}),_4=I({serverInstanceId:M().min(1),currentBranch:M().min(1).optional(),currentDiskAckSVs:no(M().min(1),M().min(1)).optional(),boot:g4.optional(),collabClients:N().int().nonnegative().optional()}).loose(),v4=I({id:M().min(1),display_name:M().min(1),display_email:M(),source:R([`git-config`,`synthesized`]),created_at:M().min(1)}).loose();I({collabUrl:M().nullable(),previewUrl:M().nullable(),port:N(),singleFile:P().default(!1)}).loose();var y4=R(`urn:ok:error:malformed-upload.urn:ok:error:collision-exhaustion.urn:ok:error:storage-full.urn:ok:error:storage-readonly.urn:ok:error:storage-error.urn:ok:error:no-file-received.urn:ok:error:path-escape.urn:ok:error:symlink-refused.urn:ok:error:method-not-allowed.urn:ok:error:invalid-request.urn:ok:error:unsupported-media-type.urn:ok:error:payload-too-large.urn:ok:error:request-timeout.urn:ok:error:internal-server-error.urn:ok:error:derived-index-unavailable.urn:ok:error:loopback-required.urn:ok:error:invalid-origin.urn:ok:error:url-not-allowed.urn:ok:error:dir-outside-home.urn:ok:error:concurrent-operation.urn:ok:error:clone-failed.urn:ok:error:clone-timeout.urn:ok:error:server-start-failed.urn:ok:error:reserved-doc-name.urn:ok:error:target-not-found.urn:ok:error:stale-target.urn:ok:error:frontmatter-edit-not-supported.urn:ok:error:invalid-frontmatter-patch.urn:ok:error:frontmatter-malformed.urn:ok:error:no-active-session.urn:ok:error:too-many-agent-sessions.urn:ok:error:disk-divergence.urn:ok:error:stale-external-write.urn:ok:error:store-refused.urn:ok:error:doc-removed.urn:ok:error:doc-not-found.urn:ok:error:doc-already-exists.urn:ok:error:doc-not-open.urn:ok:error:rollback-not-configured.urn:ok:error:doc-not-available.urn:ok:error:backlink-index-not-configured.urn:ok:error:file-rescan-not-configured.urn:ok:error:shadow-not-configured.urn:ok:error:host-not-allowed.urn:ok:error:principal-not-available.urn:ok:error:not-found.urn:ok:error:auth-failed.urn:ok:error:no-project-dir.urn:ok:error:non-github-origin.urn:ok:error:server-open-failed.urn:ok:error:doc-in-conflict.urn:ok:error:concurrent-overwrite-refused.urn:ok:error:unresolved-conflict-markers.urn:ok:error:no-conflict-tracked.urn:ok:error:no-blocking-changes.urn:ok:error:sync-not-active.urn:ok:error:project-repo-not-configured.urn:ok:error:seed-prerequisite-missing.urn:ok:error:seed-invalid-root.urn:ok:error:tag-index-not-configured.urn:ok:error:template-not-found.urn:ok:error:unsupported-asset-type.urn:ok:error:asset-not-found.urn:ok:error:single-file-mode.urn:ok:error:collab-server-not-running.urn:ok:error:gateway-timeout.urn:ok:error:cursor-not-installed.urn:ok:error:cursor-spawn-timeout.urn:ok:error:cursor-spawn-failed.urn:ok:error:handoff-target-not-installed.urn:ok:error:handoff-spawn-timeout.urn:ok:error:handoff-spawn-failed.urn:ok:error:registry-unreachable.urn:ok:error:config-not-writable.urn:ok:error:audit-superseded.urn:ok:error:theme-name-taken.urn:ok:error:theme-name-invalid`.split(`.`)),b4=I({type:y4,title:M().min(1),status:N().int().min(400).max(599),instance:M().regex(e4,`instance must be urn:uuid:<uuid>`).optional(),detail:M().optional()}).loose();I({parentDocName:M().min(1),placement:R([`configured-attachments`,`parent-dir`]).default(`configured-attachments`),agentId:M().min(1).optional(),agentName:M().min(1).optional()}).loose();var x4=I({src:M().min(1),path:M().min(1).optional(),deduped:P().optional()}).loose();I({url:M().min(1),dir:M().min(1),branch:M().min(1).refine(f4,`invalid branch name`).optional()}).loose(),I({type:z(`error`),problem:b4}).loose();function S4(e){let t=e??(typeof navigator>`u`?void 0:navigator);return t===void 0?[]:t.languages!==void 0&&t.languages.length>0?yh(t.languages):t.language===void 0?[]:yh([t.language])}var C4={en:`ltr`,"zh-Hans":`ltr`,"zh-Hant":`ltr`,hi:`ltr`,es:`ltr`,ar:`rtl`,fr:`ltr`,bn:`ltr`,"pt-BR":`ltr`,id:`ltr`,ur:`rtl`,ko:`ltr`};function w4(e){let t=new Intl.Locale(e).getTextInfo?.().direction;return t===`rtl`||t===`ltr`?t:C4[e]}function T4(e,t){let n=t.map(e=>[bh(e),e]);for(let t of e){let e=bh(t);if(e===null)continue;let r=n.find(([t])=>t===e);if(r!==void 0)return r[1]}}function E4(e){let{override:t,storedPreference:n,preferenceList:r,supportedLocales:i}=e,a=e.autoDetectableLocales??i;if(t!==void 0){let e=T4([t],i);if(e!==void 0)return{locale:e,source:`override`}}if(n!==void 0&&n!==`system`&&i.includes(n))return{locale:n,source:`explicit`};let o=T4(r,a);return o===void 0?{locale:`en`,source:`fallback`}:{locale:o,source:`system`}}var D4=R(af),O4=L({hosts:F(M()),scope:D4,scripts:P(),installedAt:Ui(),projection:R([`symlink`,`copy`]).optional(),contentHash:M().optional()});L({schema:z(1),skills:no(M(),O4).default({})});var k4=`extra/screenshot.png`,A4=`extra/attachments/`,j4=3145728,M4=[`image/png`,`image/jpeg`,`image/webp`],N4={"image/png":`png`,"image/jpeg":`jpg`,"image/webp":`webp`};function P4(e){return e.startsWith(A4)}var F4=`extra/agent-chat/`;function I4(e){return e.startsWith(F4)}var L4=`extra/`;function R4(e){return!e.startsWith(L4)||!e.endsWith(`.dmp`)?!1:!e.slice(6).includes(`/`)}function z4(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===45||e===95}var B4=8,V4=`eyJ`;function H4(e){if(!e.includes(V4))return null;let t=[],n=[];for(let r=0;r<e.length;r+=1)if(z4(e.charCodeAt(r))){for(t.push(r);r<e.length&&z4(e.charCodeAt(r));)r+=1;n.push(r)}let r=[];for(let t=e.indexOf(V4);t!==-1;t=e.indexOf(V4,t+1))r.push(t);let i=r=>r+1<t.length&&e[n[r]??-1]===`.`&&t[r+1]===(n[r]??-1)+1,a=[],o=0,s=0;for(let c=0;c+2<t.length;c+=1){let l=t[c]??0,u=n[c]??0;for(;s<r.length&&(r[s]??0)<l;)s+=1;if(!i(c)||!i(c+1))continue;let d=t[c+1]??0,f=n[c+1]??0,p=(n[c+2]??0)-(t[c+2]??0);if(!e.startsWith(V4,d)||f-d<11||p<B4)continue;let m=r[s];m===void 0||m>=u||u-m<11||(a.push(e.slice(o,m),`[REDACTED-JWT]`),o=n[c+2]??e.length,c+=2)}return a.length===0?null:(a.push(e.slice(o)),a.join(``))}var foe=/(?:\b|(?<=(?:\[|\u009b)[0-?]*[ -/]*[@-~]))/.source;function U4(e){return RegExp(`${foe}${e.source}`,`g`)}var W4=[{name:`github-pat`,regex:/(ghp_|gho_|ghu_|ghs_|ghr_)[A-Za-z0-9]{36,}\b/g,replacement:`[REDACTED-GH-PAT]`},{name:`aws-access-key`,regex:U4(/(AKIA|ASIA|ABIA)[A-Z2-7]{16}\b/),replacement:`[REDACTED-AWS-KEY]`},{name:`anthropic-key`,regex:/sk-ant-api03-[A-Za-z0-9_-]{20,}\b/g,replacement:`[REDACTED-ANTHROPIC]`},{name:`openai-key`,regex:U4(/sk-[A-Za-z0-9]{20,}\b/),replacement:`[REDACTED-OPENAI]`},{name:`bearer-token`,regex:/([Aa]uthorization:\s*[Bb]earer\s+)(?:\\"[^\s"\\]+\\"|"[A-Za-z0-9\-._~+/=]+"|[^\s"\\]+)/g,replacement:`$1[REDACTED]`},{name:`jwt`,redact:H4},{name:`url-credentials`,regex:/:\/\/[^/\s:@"]+:[^/\s:@"]+@/g,replacement:`://[REDACTED]@`},{name:`github-pat-fine-grained`,regex:/github_pat_[0-9A-Za-z_]{20,}/g,replacement:`[REDACTED-GH-PAT]`},{name:`openai-key-modern`,regex:U4(/sk-(?:proj|svcacct|admin|None)-[A-Za-z0-9_-]{20,}/),replacement:`[REDACTED-OPENAI]`},{name:`slack-token`,regex:/xox[a-z]-[A-Za-z0-9-]{10,}/g,replacement:`[REDACTED-SLACK]`},{name:`google-api-key`,regex:/AIza[0-9A-Za-z_-]{35}/g,replacement:`[REDACTED-GOOGLE]`},{name:`stripe-secret-key`,regex:U4(/(?:sk|rk)_live_[0-9A-Za-z]{16,}\b/),replacement:`[REDACTED-STRIPE]`},{name:`gitlab-pat`,regex:/glpat-[0-9A-Za-z_-]{20,}/g,replacement:`[REDACTED-GITLAB]`},{name:`bearer-token-json`,regex:/("[Aa]uthorization"\s*:\s*"[Bb]earer\s+)(?:\\"[^"\\]+\\"|[^"\\]+)/g,replacement:`$1[REDACTED]`},{name:`macos-home-path`,regex:/\/Users\/[^/"\r]*[^/"\r\\]/g,replacement:`~`},{name:`linux-home-path`,regex:/\/home\/[^/"\r]*[^/"\r\\]/g,replacement:`~`},{name:`windows-home-path`,regex:/[A-Za-z]:\\{1,2}Users\\{1,2}(?:(?![A-Za-z]:\\)[^\\"\r])+/gi,replacement:`~`}];W4.map(e=>e.name);function poe(e){let t=new Set,n=0;return{redacted:e.split(`
|
|
519
519
|
`).map(e=>{let r=e,i=!1;for(let e of W4){if(`redact`in e){let n=e.redact(r);if(n===null)continue;t.add(e.name),i=!0,r=n;continue}let{name:n,regex:a,replacement:o}=e;a.lastIndex=0,a.test(r)&&(t.add(n),i=!0,a.lastIndex=0,r=r.replace(a,o))}return i&&n++,r}).join(`
|
|
520
520
|
`),patterns:[...t],lineCount:n}}function G4(e){return poe(e).redacted}var K4=8192,moe=32768,hoe=`…[truncated]`,q4=[`level`,`time`,`pid`,`hostname`,`msg`,`name`,`runtime`,`subsystem`,`trace_id`,`span_id`,`trace_flags`];function goe(e){let t=G4(e).trim();if(t.length===0||t[0]!==`{`)return null;let n;try{n=JSON.parse(t)}catch{return null}if(typeof n!=`object`||!n||Array.isArray(n))return null;let r=n;for(let e of q4)delete r[e];return{event:typeof r.event==`string`?r.event:void 0,fields:r}}function _oe(e){return e.length<=8192?e:`${e.slice(0,8180)}${hoe}`}function voe(e){return e.includes("`")?`~`:"`"}function J4(e,t,n=3){let r=RegExp(`^ {0,3}(\\${e}+)[ \\t]*$`),i=Math.max(3,n);for(let e of t.split(`
|
|
521
521
|
`)){let t=r.exec(e);t&&t[1].length>=i&&(i=t[1].length+1)}return i}var Y4=/notionvc:/i,yoe=()=>e=>{X4(e)&&(Z4(e),Q4(e))};function X4(e){if(!(`children`in e)||!Array.isArray(e.children))return!1;for(let t of e.children){if(t.type===`comment`){let e=String(t.value??``);if(Y4.test(e))return!0}if(t.type===`element`&&X4(t))return!0}return!1}function Z4(e){if(!(`children`in e)||!Array.isArray(e.children))return;for(let t of e.children)t.type===`element`&&Z4(t);let t=[];for(let n of e.children){if(n.type!==`text`){t.push(n);continue}let e=String(n.value??``);if(!e.includes(`
|
|
@@ -527,26 +527,28 @@ $2`).split(`
|
|
|
527
527
|
<Tab label="Two">Body of the second tab panel.</Tab>`,serialize:(e,t)=>v3(`Tabs`,e,t,A3)},{name:`Tab`,surface:`canonical`,hasChildren:!0,props:j3,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)=>v3(`Tab`,e,t,j3)},{name:`Math`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:M3,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)=>v3(`Math`,e,t,M3)},{name:`MermaidFence`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:Tse,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:I3,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)=>v3(`Mirror`,e,t,I3)},{name:`MirrorSource`,surface:`canonical`,hasChildren:!0,props:L3,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)=>v3(`MirrorSource`,e,t,L3)},{name:`GFMCallout`,surface:`compat`,hasChildren:!0,props:gse,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:_se,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:t?.sourceUrl??t?.src??``,alt:t?.alt??``,title:t?.title??null}]}}},{name:`WikiEmbedImage`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:bse,icon:`ZoomIn`,category:`media`,displayName:`Wiki Embed Image`,description:"Obsidian-style `![[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:z3},{name:`WikiEmbedVideo`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:xse,icon:`Film`,category:`media`,displayName:`Wiki Embed Video`,description:"Obsidian-style `![[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:z3},{name:`WikiEmbedAudio`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:Sse,icon:`Volume2`,category:`media`,displayName:`Wiki Embed Audio`,description:"Obsidian-style `![[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:z3},{name:`WikiEmbedFile`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:Ese,icon:`Paperclip`,category:`media`,displayName:`Wiki Embed File`,description:"Obsidian-style `![[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:z3},{name:`HtmlDetailsAccordion`,surface:`compat`,hasChildren:!0,props:vse,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="${R3(n.name)}"`:``,a=n?.id?` id="${R3(n.id)}"`:``,o=n?.title?.trim(),s=o?`<summary>${Dse(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:yse,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"${R3(i)}"`):`${a} align="${R3(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:Cse,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:wse,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??``})}],Ose={name:`*`,surface:`canonical`,hasChildren:!0,props:[],description:`Unregistered component — children editable as markdown`,serialize:(e,t)=>v3(e.attrs.componentName||`*`,e,t)};function V3(){let e=new Map;e.set(`*`,Ose);for(let t of B3)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()}}}var H3={parseFallback:{blockLevel:0,wholeDoc:0,wholeDocBudget:0},jsxRenderFailure:{},jsxAutoConvertFailed:{},jsxAutoConvertSucceeded:{},jsxActionAborted:{},jsxPropDropped:{},jsxMoveFailed:{},jsxStuckCopyFailed:{},jsxStuckDeleteFailed:{},jsxPopoverCloseRestoreFailed:{},jsxKeyboardDeleteFailed:{},jsxChromeDeleteFailed:{},blockGripClickSelectFailed:{},jsxArrowNodeSelectFailed:{}};function U3(){H3.parseFallback.blockLevel++}function W3(){H3.parseFallback.wholeDoc++}function kse(){H3.parseFallback.wholeDocBudget++}function Ase(e){H3.jsxRenderFailure[e]=(H3.jsxRenderFailure[e]??0)+1}function jse(e){H3.jsxAutoConvertFailed[e]=(H3.jsxAutoConvertFailed[e]??0)+1}function Mse(e){H3.jsxAutoConvertSucceeded[e]=(H3.jsxAutoConvertSucceeded[e]??0)+1}function Nse(e){H3.jsxActionAborted[e]=(H3.jsxActionAborted[e]??0)+1}function Pse(e){H3.jsxPropDropped[e]=(H3.jsxPropDropped[e]??0)+1}function Fse(e){H3.jsxMoveFailed[e]=(H3.jsxMoveFailed[e]??0)+1}function Ise(e){H3.jsxStuckCopyFailed[e]=(H3.jsxStuckCopyFailed[e]??0)+1}function Lse(e){H3.jsxStuckDeleteFailed[e]=(H3.jsxStuckDeleteFailed[e]??0)+1}function Rse(e){H3.jsxPopoverCloseRestoreFailed[e]=(H3.jsxPopoverCloseRestoreFailed[e]??0)+1}function zse(e){H3.jsxKeyboardDeleteFailed[e]=(H3.jsxKeyboardDeleteFailed[e]??0)+1}function Bse(e){H3.jsxChromeDeleteFailed[e]=(H3.jsxChromeDeleteFailed[e]??0)+1}function Vse(e){H3.blockGripClickSelectFailed[e]=(H3.blockGripClickSelectFailed[e]??0)+1}function Hse(e){H3.jsxArrowNodeSelectFailed[e]=(H3.jsxArrowNodeSelectFailed[e]??0)+1}var Use=/^(`{3,}|~{3,})/gm;function G3(e){let t=[],n=null;for(let r of e.matchAll(Use)){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 K3(e,t){return t.some(([t,n])=>e>=t&&e<n)}var q3=/`+/g;function Wse(e){let t=[];q3.lastIndex=0;for(let n of e.matchAll(q3))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}var Gse=/^[ \t]{0,3}\[([^\]]+)\]:\s*(\S+)(\s+(?:"[^"]*"|'[^']*'|\([^)]*\)))?\s*$/gm;function J3(e){let t=G3(e),n=[];for(let r of e.matchAll(Gse))K3(r.index,t)||n.push(r[0].trimEnd());return n.length>0?`${n.join(`
|
|
528
528
|
`)}\n\n`:``}var Kse=500,qse=1e3;function Jse(e,t){let n={startMs:typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),calls:0};return Q3(e,t.parse,0,n)}function Y3(e){return e.calls>=qse?!0:(typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now())-e.startMs>=Kse}var X3=500;function Z3(e){return e instanceof Error?{name:e.name,message:e.message.slice(0,X3),stack:e.stack?.split(`
|
|
529
529
|
`).slice(0,4).join(`
|
|
530
|
-
`)}:{name:`UnknownError`,message:String(e??`unknown`).slice(0,X3)}}function Q3(e,t,n,r){if(n>20)return W3(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`MAX_SPLIT_DEPTH exceeded`})),e6(e);if(r){if(Y3(r))return kse(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`parse budget exhausted`,calls:r.calls})),e6(e);r.calls+=1}try{return t(e)}catch(i){let a=Yse(i),o=Z3(i);if(a===void 0){if(n===0){let n=nce(e,t,i,r);if(n)return n}return W3(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:o.message,error:o})),e6(e)}U3(),console.warn(JSON.stringify({event:`mdx-block-fallback`,offset:a,reason:o.message,error:o}));try{let i=ece(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()?Q3(c,t,n+1,r):{type:`doc`,content:[]},d=l.trim()?Q3(J3(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){W3();let n=Z3(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})),e6(e)}}}function Yse(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 Xse(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 $3(e,t){for(let n of e.matchAll(/\n\s*\n/g))if(n.index>=t)return n.index;return null}var Zse=32768;function Qse(e,t){let n=[];for(let r of e.matchAll(/<(\/?)([A-Z][A-Za-z0-9.]*)/g)){let i=r.index;if(K3(i,t))continue;let a=r[1]===`/`,o=r[2],s=i+r[0].length,c=Math.min(e.length,s+Zse),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 $se(e){let t=Qse(e,G3(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=$3(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=$3(e,t.start)??e.length;r.push({start:t.start,end:Math.min(e.length,n),source:`unmatched`})}return r}function ece(e,t){let n=$se(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:Xse(e,t)??0,end:$3(e,t)??e.length}}function tce(e){let t=G3(e),n=/\n[ \t]*\n/g,r=[0];for(let i of e.matchAll(n)){let e=i.index;K3(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 nce(e,t,n,r){let i=tce(e);if(i.length<2)return null;let a=[],o=!1,s=``;for(let e of i){if(r&&Y3(r))break;r&&(r.calls+=1);let i=s+e.src;try{let n=t(i).content??[];s+=J3(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){U3();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 e6(e){return{type:`doc`,content:[{type:`paragraph`,content:[{type:`text`,text:e}]}]}}function t6(e){if(typeof e!=`object`||!e||!Object.hasOwn(e,`escapedChars`))return{kind:`absent`};let t=e.escapedChars;return Array.isArray(t)&&t.every(e=>{if(typeof e!=`object`||!e)return!1;let t=e.offset;return typeof t==`number`&&Number.isInteger(t)&&t>=0&&typeof e.char==`string`})?{kind:`valid`,data:{escapedChars:t}}:{kind:`malformed`}}function n6(e){return t6(e).kind===`valid`}var r6=``,i6=``,a6=``,o6=``,s6=``,c6=[[r6,``],[i6,``],[a6,``],[o6,``],[s6,``]],l6=/[\uE000-\uE004]/,u6=/[\uE005-\uE009]/,rce=c6.map(([e,t])=>({from:e,to:t})),ice=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g,ace=/<!--[\s\S]*?-->/g,oce=/<\/([a-z][a-z0-9]*)\s*>/g,sce=/<([a-z][a-z0-9]*)(\s[^>]*)?\/?>/g,d6=new Set([`img`,`video`,`audio`]),f6=new Set([`mark`,`u`,`ins`]);function cce(e,t,n,r){let i=0,a=0,o=`<${t}`;for(;a<n;){let t=e.indexOf(o,a);if(t===-1||t>=n)break;a=t+o.length;let s=e[t+o.length];if(s!==void 0&&s!==`>`&&s!==`/`&&!/\s/.test(s)||K3(t,r))continue;let c=e.indexOf(`>`,t);c!==-1&&e[c-1]===`/`||i++}return i}var lce=/<\/([A-Z][A-Za-z0-9.]*)>/g;function p6(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 uce(e){let t=new Map,n=new RegExp(lce.source,`g`),r=n.exec(e);for(;r!==null;){let i=t.get(r[1]);i?i.push(r.index):t.set(r[1],[r.index]),r=n.exec(e)}return t}function dce(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 fce(e){let t=[],n=e.indexOf(`>`);for(;n!==-1;)t.push(n),n=e.indexOf(`>`,n+1);return t}
|
|
531
|
-
|
|
532
|
-
|
|
530
|
+
`)}:{name:`UnknownError`,message:String(e??`unknown`).slice(0,X3)}}function Q3(e,t,n,r){if(n>20)return W3(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`MAX_SPLIT_DEPTH exceeded`})),e6(e);if(r){if(Y3(r))return kse(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`parse budget exhausted`,calls:r.calls})),e6(e);r.calls+=1}try{return t(e)}catch(i){let a=Yse(i),o=Z3(i);if(a===void 0){if(n===0){let n=nce(e,t,i,r);if(n)return n}return W3(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:o.message,error:o})),e6(e)}U3(),console.warn(JSON.stringify({event:`mdx-block-fallback`,offset:a,reason:o.message,error:o}));try{let i=ece(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()?Q3(c,t,n+1,r):{type:`doc`,content:[]},d=l.trim()?Q3(J3(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){W3();let n=Z3(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})),e6(e)}}}function Yse(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 Xse(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 $3(e,t){for(let n of e.matchAll(/\n\s*\n/g))if(n.index>=t)return n.index;return null}var Zse=32768;function Qse(e,t){let n=[];for(let r of e.matchAll(/<(\/?)([A-Z][A-Za-z0-9.]*)/g)){let i=r.index;if(K3(i,t))continue;let a=r[1]===`/`,o=r[2],s=i+r[0].length,c=Math.min(e.length,s+Zse),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 $se(e){let t=Qse(e,G3(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=$3(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=$3(e,t.start)??e.length;r.push({start:t.start,end:Math.min(e.length,n),source:`unmatched`})}return r}function ece(e,t){let n=$se(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:Xse(e,t)??0,end:$3(e,t)??e.length}}function tce(e){let t=G3(e),n=/\n[ \t]*\n/g,r=[0];for(let i of e.matchAll(n)){let e=i.index;K3(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 nce(e,t,n,r){let i=tce(e);if(i.length<2)return null;let a=[],o=!1,s=``;for(let e of i){if(r&&Y3(r))break;r&&(r.calls+=1);let i=s+e.src;try{let n=t(i).content??[];s+=J3(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){U3();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 e6(e){return{type:`doc`,content:[{type:`paragraph`,content:[{type:`text`,text:e}]}]}}function t6(e){if(typeof e!=`object`||!e||!Object.hasOwn(e,`escapedChars`))return{kind:`absent`};let t=e.escapedChars;return Array.isArray(t)&&t.every(e=>{if(typeof e!=`object`||!e)return!1;let t=e.offset;return typeof t==`number`&&Number.isInteger(t)&&t>=0&&typeof e.char==`string`})?{kind:`valid`,data:{escapedChars:t}}:{kind:`malformed`}}function n6(e){return t6(e).kind===`valid`}var r6=``,i6=``,a6=``,o6=``,s6=``,c6=[[r6,``],[i6,``],[a6,``],[o6,``],[s6,``]],l6=/[\uE000-\uE004]/,u6=/[\uE005-\uE009]/,rce=c6.map(([e,t])=>({from:e,to:t})),ice=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g,ace=/<!--[\s\S]*?-->/g,oce=/<\/([a-z][a-z0-9]*)\s*>/g,sce=/<([a-z][a-z0-9]*)(\s[^>]*)?\/?>/g,d6=new Set([`img`,`video`,`audio`]),f6=new Set([`mark`,`u`,`ins`]);function cce(e,t,n,r){let i=0,a=0,o=`<${t}`;for(;a<n;){let t=e.indexOf(o,a);if(t===-1||t>=n)break;a=t+o.length;let s=e[t+o.length];if(s!==void 0&&s!==`>`&&s!==`/`&&!/\s/.test(s)||K3(t,r))continue;let c=e.indexOf(`>`,t);c!==-1&&e[c-1]===`/`||i++}return i}var lce=/<\/([A-Z][A-Za-z0-9.]*)>/g;function p6(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 uce(e){let t=new Map,n=new RegExp(lce.source,`g`),r=n.exec(e);for(;r!==null;){let i=t.get(r[1]);i?i.push(r.index):t.set(r[1],[r.index]),r=n.exec(e)}return t}function dce(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 fce(e){let t=[],n=e.indexOf(`>`);for(;n!==-1;)t.push(n),n=e.indexOf(`>`,n+1);return t}function pce(e){let t=[],n=e.indexOf(`
|
|
531
|
+
|
|
532
|
+
`);for(;n!==-1;)t.push(n),n=e.indexOf(`
|
|
533
533
|
|
|
534
|
-
|
|
534
|
+
`,n+1);return t}var m6=1024;function mce(e,t){if(t[e-1]!==`(`||t[e-2]!==`]`)return!1;let n=e-2,r=0;for(let e=n-1;e>=0&&t[e]===`\\`;e--)r++;if(r%2==1)return!1;let i=!1,a=Math.max(0,n-m6);for(let e=n-1;e>=a;e--){let n=t[e];if(n===`
|
|
535
|
+
`||n===`\r`||n==="`")return!1;if(n!==`[`&&n!==`]`)continue;let r=0;for(let n=e-1;n>=0&&t[n]===`\\`;n--)r++;if(r%2!=1){if(n===`]`||t[e+1]===`^`||t[e-1]===`]`)return!1;i=!0;break}}if(!i)return!1;let o=!1,s=-1,c=Math.min(t.length,e+1+m6);for(let n=e+1;n<c;n++){let e=t[n];if(e===`>`){s=n;break}if(e===`<`||e===`\\`||e===`
|
|
536
|
+
`||e===`\r`||e===r6||e===i6||e===a6||e===o6||e===s6)return!1;(e===` `||e===` `)&&(o=!0)}return s===-1||!o?!1:t[s+1]===`)`}function hce(e,t,n,r){let i=p6(n,e);if(i>=n.length)return!1;let a=n[i],o=p6(r,e);return a>=(o<r.length?r[o]:t.length)?!1:t[a-1]===`/`}function gce(e){let t=[],n=pce(e);for(let r of e.matchAll(/<\/?([A-Z][A-Za-z0-9.]*)/g)){let i=r.index;if(t.length>0){let[e,n]=t[t.length-1];if(i>e&&i<=n)continue}let a=i+r[0].length,o=p6(n,i),s=o<n.length?n[o]:e.length,c=!1,l=!1,u=!1,d=0,f=-1;for(;a<s;){let t=e[a];if(c)t===`'`?c=!1:t===`\\`&&a+1<e.length&&a++;else if(l)t===`"`?l=!1:t===`\\`&&a+1<e.length&&a++;else if(u)t==="`"?u=!1:t===`\\`&&a+1<e.length&&a++;else if(t===`'`)c=!0;else if(t===`"`)l=!0;else if(t==="`")u=!0;else if(t===`{`)d++;else if(t===`}`&&d>0)d--;else if(d===0&&t===`>`){f=a;break}a++}f!==-1&&t.push([i,f])}return t}function _ce(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 vce(e,t,n){let r=Math.min(t.length,n),i=!1,a=0;for(let n=e;n<r;n++){let e=t[n];if(i){e===`"`&&(i=!1),e===`\\`&&n+1<r&&n++;continue}if(e===`"`){i=!0;continue}if(e===`{`){a++;continue}if(e===`}`&&a>0){a--;continue}if(!(a>0)&&e===`>`)return n>0&&t[n-1]===`/`}return!1}function h6(e,t){let n=yce(e,t.escapeAware),r=new Set(n),i=[],a=[];return g6(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 yce(e,t){let n=[],r=[];return g6(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 g6(e,t,n){for(let r=0;r<e.length;r++){if(e[r]===`
|
|
535
537
|
`){let t=e[r+1];if(t===`
|
|
536
538
|
`||t===`>`){if(n.onFlush(),t===`
|
|
537
539
|
`)for(;e[r+1]===`
|
|
538
|
-
`;)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 _6(e){let t=e;if(l6.test(t))for(let[e,n]of c6)t=t.replaceAll(e,n);t=t.replace(ace,e=>e.replace(/</g,r6).replace(/>/g,i6)),t=t.replace(ice,(e,t)=>`${r6}${t.replaceAll(`:`,a6).replaceAll(`@`,o6)}${i6}`);let n=new Map,r=[...G3(t),...Wse(t)];t=t.replace(oce,(e,i,a)=>{if(f6.has(i)){let o=n.get(i)??0;if(o<cce(t,i,a,r))return n.set(i,o+1),e}return e.replace(/</g,r6).replace(/>/g,i6)}),t=t.replace(sce,(e,t)=>d6.has(t)&&e.endsWith(`/>`)||f6.has(t)?e:t[0]===t[0].toLowerCase()&&t[0]!==t[0].toUpperCase()?e.replace(/</g,r6).replace(/>/g,i6):e),t=t.replace(/<>/g,`${r6}${i6}`);let i=uce(t),a=dce(t),o=fce(t),s=
|
|
539
|
-
`,t),r=(n===-1?e.slice(t):e.slice(t,n)).match(
|
|
540
|
-
`?
|
|
541
|
-
`?(n+=1,r=1):r+=1;return{line:n,column:r,offset:t}}function
|
|
540
|
+
`;)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 _6(e){let t=e;if(l6.test(t))for(let[e,n]of c6)t=t.replaceAll(e,n);t=t.replace(ace,e=>e.replace(/</g,r6).replace(/>/g,i6)),t=t.replace(ice,(e,t)=>`${r6}${t.replaceAll(`:`,a6).replaceAll(`@`,o6)}${i6}`);let n=new Map,r=[...G3(t),...Wse(t)];t=t.replace(oce,(e,i,a)=>{if(f6.has(i)){let o=n.get(i)??0;if(o<cce(t,i,a,r))return n.set(i,o+1),e}return e.replace(/</g,r6).replace(/>/g,i6)}),t=t.replace(sce,(e,t)=>d6.has(t)&&e.endsWith(`/>`)||f6.has(t)?e:t[0]===t[0].toLowerCase()&&t[0]!==t[0].toUpperCase()?e.replace(/</g,r6).replace(/>/g,i6):e),t=t.replace(/<>/g,`${r6}${i6}`);let i=uce(t),a=dce(t),o=fce(t),s=gce(t);t=t.replace(/</g,(e,n)=>{if(mce(n,t)||_ce(n,s))return e;let r=t.slice(n,n+256);if(r[1]===`/`)return/^<\/[a-zA-Z][a-zA-Z0-9.]*[ \t]*>/.test(r)?e:r6;let c=/^<([a-z][a-z0-9]*)/.exec(r);if(c&&d6.has(c[1])&&hce(n,t,o,a))return e;let l=/^<([a-z][a-z0-9]*)([\s/>])/.exec(r);if(l&&f6.has(l[1])){let i=l[1];return r.startsWith(`<${i}/>`)||t.indexOf(`</${i}>`,n)!==-1?e:r6}let u=/^<([A-Z][a-zA-Z0-9.]*)[\s/>]/.exec(r);if(!u)return r6;let d=u[1],f=p6(a,n),p=f<a.length?a[f]:t.length;if(vce(n+1+d.length,t,p))return e;let m=i.get(d);return m&&p6(m,n)<m.length?e:r6});{let{unmatched:e}=h6(t,{escapeAware:!0});if(e.length>0){let n=t.split(``);for(let t of e)n[t]=s6;t=n.join(``)}}return t}function v6(e){return l6.test(e)||u6.test(e)}function y6(){return e=>{T(e,e=>{let t=e;typeof t.value==`string`&&v6(t.value)&&(t.value=b6(t.value)),typeof t.url==`string`&&v6(t.url)&&(t.url=b6(t.url)),typeof t.title==`string`&&v6(t.title)&&(t.title=b6(t.title)),typeof t.alt==`string`&&v6(t.alt)&&(t.alt=b6(t.alt)),typeof t.lang==`string`&&v6(t.lang)&&(t.lang=b6(t.lang)),typeof t.meta==`string`&&v6(t.meta)&&(t.meta=b6(t.meta))})}}function b6(e){let t=e.replaceAll(r6,`<`).replaceAll(i6,`>`).replaceAll(a6,`:`).replaceAll(o6,`@`).replaceAll(s6,`{`);if(u6.test(t))for(let[e,n]of c6)t=t.replaceAll(n,e);return t}var x6=``,S6=``,bce=[{from:`&`,to:x6},{from:`;`,to:S6}],C6=/&(?:[A-Za-z][A-Za-z0-9]*|#[0-9]+|#[xX][0-9A-Fa-f]+);/g;function xce(e,t){let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;r--)n++;return n}function w6(e,t,n){return t.lastIndex=0,e.replace(t,(t,r)=>typeof r!=`number`||xce(e,r)%2==1?t:n(t))}function T6(e){return C6.lastIndex=0,e.replace(C6,e=>{let t=e.slice(1,-1);if(t.startsWith(`#`)){let e=t[1]===`x`||t[1]===`X`;return u(t.slice(e?2:1),e?16:10)}let n=Te(t);return n===!1?e:n})}function Sce(e){return w6(e,C6,e=>`${x6}${e.slice(1,-1)}${S6}`)}var E6=RegExp(`${x6}([^${S6}]+)${S6}`,`g`);function D6(e){if(!e.includes(x6))return{value:e,spans:[]};let t=[],n=``,r=0;E6.lastIndex=0;let i=E6.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=E6.exec(e)}return r<e.length&&(n+=e.slice(r)),{value:n,spans:t}}function Cce(){return e=>{T(e,e=>{let t=e;if(typeof t.value==`string`&&t.value.includes(x6)){let{value:n,spans:r}=D6(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(x6)&&(t[e]=D6(n).value)}})}}var O6=``,wce=[{from:`\\`,to:O6}],Tce=/\\</g;function k6(e){return w6(e,Tce,e=>`${O6}${e.slice(1)}`)}function A6(){return e=>{T(e,e=>{let t=e;if(typeof t.value==`string`&&t.value.includes(O6))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]===O6?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(O6).join(``);for(let e of[`url`,`title`,`alt`]){let n=t[e];typeof n==`string`&&n.includes(O6)&&(t[e]=n.split(O6).join(``))}})}}var Ece=new Set([`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`]),Dce={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`},j6=`ok-alert`,Oce=RegExp(`(?:^|\\s)${j6}-(\\w+)(?:\\s|$)`),kce=/^>\s*\[!(\w+)\]([+-])?(?:\s+(.*?))?\s*$/i;function M6(e,t){if(t<0||t>=e.length)return null;let n=e.indexOf(`
|
|
541
|
+
`,t),r=(n===-1?e.slice(t):e.slice(t,n)).match(kce);return r?{rawType:r[1],foldableMarker:r[2]===`+`||r[2]===`-`?r[2]:null,title:r[3]?.trim()||null}:null}function Ace(e){if(e.data?.hName!==`div`)return null;let t=e.data?.hProperties?.class;if(typeof t!=`string`)return null;let n=t.match(Oce);return n?n[1].toLowerCase():null}function N6(e){return Dce[e.toLowerCase()]??null}function jce(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&&Mce(o[0],s)?o.slice(1):o,position:e.position}}function Mce(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 Nce(e){if(!e||typeof e!=`object`||e.type!==`paragraph`)return!1;let t=e.data?.hProperties?.class;return typeof t==`string`&&t.includes(`${j6}-title`)}function Pce(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;T(e,`blockquote`,(e,t,r)=>{if(r===void 0||typeof t!=`number`)return;let i=Ace(e);if(!i)return;let a=N6(i),o=null,s=null;e.position?.start?.offset!==void 0&&(s=M6(n,e.position.start.offset),s&&(o=s.title,a||=N6(s.rawType)));let c=a??`note`,l=s&&Ece.has(c)?s.foldableMarker:null,u=(()=>{if(e.position?.start?.offset!==void 0){let t=M6(n,e.position.start.offset);if(t?.rawType)return t.rawType}return i})(),d=u.toLowerCase()===c?null:u;if(!Nce(e.children[0]))return;let f=jce(e,c,o,l,d);r.children[t]=f})}}var Fce=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"></svg>`,Ice={markers:`*`,classPrefix:j6,matchCaseSensitive:!1,icons:new Proxy({},{get:()=>Fce})};function P6(e,t,n){return e[t]===`\\`&&t+1<e.length&&e[t+1]===n}function F6(e,t,n,r){let i=t,a=0;for(;a<r&&i<e.length;){let t=a>0&&n[a-1]===`
|
|
542
|
+
`?Rce(e,i,n[a]):null;t!==null&&(i=t),i+=P6(e,i,n[a])?2:1,a+=1}return i}function Lce(e,t,n){return e[t]===n||P6(e,t,n)}function Rce(e,t,n){let r=t,i=!1;for(;;){let t=r;for(;r<e.length&&(e[r]===` `||e[r]===` `);)r+=1;if(e[r]===`>`){r+=1,(e[r]===` `||e[r]===` `)&&(r+=1),i=!0;continue}r>t&&(i=!0);break}return i&&Lce(e,r,n)?r:null}function I6(e){return n6(e.data)?new Set(e.data.escapedChars.map(e=>e.offset)):null}function zce(e,t,n){return e.filter(e=>e.offset>=t&&e.offset<n).map(e=>({...e,offset:e.offset-t}))}function Bce(e,t,n){return e.filter(e=>e.offset>=t&&e.offset+e.length<=n).map(e=>({...e,offset:e.offset-t}))}function L6(e,t,n,r){let i={type:`text`,value:t.value.slice(n,r)},a=B6(e,t,n,r);a&&(i.position=a);let o;if(n6(t.data)&&(o={escapedChars:zce(t.data.escapedChars,n,r)}),t.data?.entityRefSpans?.length){let e=Bce(t.data.entityRefSpans,n,r);e.length>0&&(o={...o,entityRefSpans:e})}return o&&(i.data=o),i}function R6(e,t,n){if(e===null||e.size===0)return!1;for(let r=0;r<n;r++)if(e.has(t+r))return!0;return!1}function z6(e,t){let n=1,r=1;for(let i=0;i<t&&i<e.length;i++)e[i]===`
|
|
543
|
+
`?(n+=1,r=1):r+=1;return{line:n,column:r,offset:t}}function Vce(e,t,n){return{start:z6(e,t),end:z6(e,n)}}function B6(e,t,n,r){if(!e||!t.position||typeof t.position.start?.offset!=`number`)return;let i=t.position.start.offset;return Vce(e,F6(e,i,t.value,n),F6(e,i,t.value,r))}var V6=/(?<!%)%%([^\n]*?[^\n%])%%(?!%)/g,H6=/<!--([\s\S]*?)-->/g;function Hce(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;Wce(e,n),T(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=Uce(i,I6(e));if(a.length===0)return;let o=[],s=0;for(let t of a){t.start>s&&o.push(L6(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:[L6(n,e,c,c+t.body.length)],data:{sourceForm:t.sourceForm}},u=B6(n,e,t.start,t.end);u&&(l.position=u),o.push(l),s=t.end}return s<i.length&&o.push(L6(n,e,s,i.length)),r.children.splice(t,1,...o),[E,t+o.length]}),Yce(e,n)}}function Uce(e,t){let n=[];V6.lastIndex=0;let r;for(;(r=V6.exec(e))!==null;){if(R6(t,r.index,2)||R6(t,r.index+r[0].length-2,2)){V6.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`})}H6.lastIndex=0;let i;for(;(i=H6.exec(e))!==null;){if(R6(t,i.index,4)||R6(t,i.index+i[0].length-3,3)){H6.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 Wce(e,t){let n=e.children,r=0;for(;r<n.length;){let e=n[r];if(e.type===`paragraph`){let i=G6(e);if(i!==null){let t=e.children[0],a,o=()=>(a===void 0&&(a=I6(t)),a),s=Gce(i);if(s!==null&&!R6(o(),0,2)&&!R6(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=Kce(i);if(c!==null&&!R6(o(),i.length-i.trimStart().length,4)&&!R6(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=qce(e,t);if(a!==null&&!W6(e,4,3)){let e={type:`commentBlock`,children:[a],data:{sourceForm:`html`,sourceLayout:`inline`}};n.splice(r,1,e),r+=1;continue}let o=Jce(e,t);if(o!==null&&!W6(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`&&q6(e)){let e=r+1;for(;e<n.length;){let t=n[e];if(t.type===`paragraph`&&q6(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 U6(e,t,n){return R6(I6(e),t,n)}function W6(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=I6(r);return R6(s,a,t)?!0:R6(i===r?s:I6(i),o,n)}function G6(e){if(e.children.length!==1)return null;let t=e.children[0];return t.type===`text`?t.value:null}function Gce(e){let t=e.match(/^%%\n((?:.|\n(?!\n))+?)\n%%$/);return t===null?null:t[1]}function Kce(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 qce(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(K6(r,`<!--`)>1||K6(r,`-->`)>0)return null}else if(t===e.children.length-1){if(K6(r,`<!--`)>0||K6(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(L6(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(L6(t,r,0,s)),c.length===0?null:{type:`paragraph`,children:c}}function Jce(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:!0)||c.trim().length>0||l.trim().length>0))return null;let u=[];c.length>0&&u.push(L6(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(L6(t,r,0,s)),u.length===0?null:{type:`paragraph`,children:u}}function K6(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 q6(e){let t=G6(e);return t===null||t.trim()!==`%%`?!1:!U6(e.children[0],t.indexOf(`%%`),2)}function Yce(e,t){t.indexOf(`%%`)===-1&&t.indexOf(`<!--`)===-1||T(e,e=>{if(!Xce.has(e.type))return;let n=e.children;if(!(n===void 0||n.length<2)){for(let e of Zce)if(Qce(n,t,e))return}})}var Xce=new Set([`paragraph`,`heading`,`tableCell`]),Zce=[{sourceForm:`html`,open:`<!--`,close:`-->`},{sourceForm:`percent`,open:`%%`,close:`%%`}];function J6(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 Qce(e,t,n){let r,i;if(n.sourceForm===`percent`){let t=J6(e,`%%`);if(t.length!==2)return!1;[r,i]=t}else{let t=J6(e,`<!--`),n=J6(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]===`%`)||ele(e,n,r,i)||U6(a,r.offset,n.open.length)||U6(o,i.offset,n.close.length))return!1;for(let t=r.index+1;t<i.index;t++)if(X6(e[t]))return!1;if(r.offset===0&&X6(e[r.index-1])||i.offset+n.close.length===o.value.length&&X6(e[i.index+1]))return!1;let s=$ce(e,n,r,i,t);if(s===null)return!1;let c=[];a.value.slice(0,r.offset).length>0&&c.push(L6(t,a,0,r.offset));let l={type:`comment`,children:s,data:{sourceForm:n.sourceForm}},u=B6(t,a,r.offset,a.value.length),d=B6(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(L6(t,o,f,o.value.length)),e.splice(r.index,i.index-r.index+1,...c),!0}function $ce(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(L6(i,a,s,c));for(let t=n.index+1;t<r.index;t++)u.push(e[t]);return 0<l&&u.push(L6(i,o,0,l)),u.length===0||!u.some(e=>e.type===`text`?e.value.trim().length>0:!0)||!u.some(e=>e.type===`text`)?null:u}function ele(e,t,n,r){let i=e[n.index],a=e[r.index];if(i.value.indexOf(`
|
|
542
544
|
`,n.offset+t.open.length)!==-1||a.value.lastIndexOf(`
|
|
543
545
|
`,r.offset)!==-1)return!0;for(let t=n.index+1;t<r.index;t++)if(Y6(e[t]))return!0;return!1}function Y6(e){let t=e;return t?.type===`break`?!0:t?.type===`text`?(t.value??``).indexOf(`
|
|
544
|
-
`)!==-1:Array.isArray(t?.children)&&t.children.some(Y6)}function X6(e){if(e==null)return!1;if(e.type===`comment`)return!0;let t=e.children;return Array.isArray(t)&&t.some(X6)}var
|
|
545
|
-
`;)r--;let i=e.slice(r,n===t-1?n:n+1);if(i.trim().length===0){n=r-2;continue}return tle.test(i)}return!1}function Z6(e){if(!e.includes(`</`))return e;let t=G3(e),n=!1,r=e.replace(ele,(r,i,a,o,s)=>K3(s,t)||!nle(e,s)?r:(n=!0,`${a}${o}`));return n?r:e}var rle=/^<details(\s[^>]*)?>\s*<summary>([\s\S]*?)<\/summary>([\s\S]*?)<\/details>\s*$/,ile=/^<details(\s[^>]*)?>(?:\s*<summary>([\s\S]*?)<\/summary>)?[\s\S]*$/,ale=/^\s*<\/details>\s*$/;function Q6(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 $6(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 e8(e){if(e.type!==`paragraph`)return!1;let t=e.children;return t.length===1&&t[0].type===`text`}function t8(e){return e.children[0].value??``}function ole(e){if(!e8(e))return null;let t=t8(e).match(rle);if(!t)return null;let{defaultOpen:n,name:r,id:i}=Q6(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:$6({title:a,defaultOpen:n,name:r,id:i}),children:s,position:e.position}}function sle(e,t){let n=e[t];if(!e8(n))return null;let r=t8(n);if(!r.startsWith(`<details`)||r.includes(`</details>`))return null;let i=r.match(ile);if(!i)return null;let{defaultOpen:a,name:o,id:s}=Q6(i[1]),c=i[2]?.trim()||null;for(let n=t+1;n<e.length;n++){let t=e[n];if(!e8(t))continue;let r=t8(t);if(ale.test(r))return{closerIdx:n,title:c,defaultOpen:a,name:o,id:s};if(r.includes(`</details>`))return null}return null}function cle(e){let t=e.children,n=0;for(;n<t.length;){let e=t[n];if(e8(e)){let r=ole(e);if(r){t[n]=r,n++;continue}let i=sle(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:$6(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 lle(){return e=>{T(e,e=>{`children`in e&&Array.isArray(e.children)&&cle(e)})}}var ule=/^<(div|center)(\s[^>]*?)?\s*>$/i,dle=new Set([`center`,`left`,`right`,`justify`]);function fle(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 dle.has(n)?n:null}function n8(e){if(e.type!==`paragraph`)return!1;let t=e.children;return t.length===1&&t[0].type===`text`}function r8(e){return e.children[0].value??``}function ple(e){if(!n8(e))return null;let t=r8(e).trim().match(ule);if(!t)return null;let n=t[1].toLowerCase(),r=t[2]??``;return{tag:n,align:fle(r)??(n===`center`?`center`:null),sourceAttrs:r}}function mle(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(!n8(t))continue;let a=r8(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 hle(e){let t=e.children,n=0;for(;n<t.length;){let e=ple(t[n]);if(e!==null){let r=mle(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 gle(){return e=>{T(e,e=>{`children`in e&&Array.isArray(e.children)&&hle(e)})}}var i8=` `;function a8(e){return e.type===`listItem`&&typeof e.checked==`boolean`}function _le(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 vle(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!==i8)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===i8}function yle(e){T(e,`listItem`,e=>{if(!a8(e)||!_le(e))return;let t=e.children[0];t.children=[{type:`text`,value:` `,data:{sourceRaw:i8}}]})}function ble(e){T(e,`listItem`,e=>{!a8(e)||!vle(e)||(e.children[0].children=[])})}function xle(){return e=>{ble(e)}}var o8=57856,s8=63743,c8=/&(?:[A-Za-z][A-Za-z0-9]*|#[0-9]+|#[xX][0-9A-Fa-f]+);/g;function Sle(e){return c8.lastIndex=0,e.replace(c8,e=>{let t=e.slice(1,-1);if(t.startsWith(`#`)){let e=t[1]===`x`||t[1]===`X`;return u(t.slice(e?2:1),e?16:10)}let n=Te(t);return n===!1?e:n})}function Cle(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>=o8&&r<=s8&&t.add(r),r===o8?(e+=1,n=Math.max(n,e)):e=0)}}return{occupied:t,longestStartRun:n}}function wle(e){let{occupied:t,longestStartRun:n}=Cle([e,Sle(e)]);for(let e=o8;e<=s8;e+=1)if(!t.has(e))return String.fromCharCode(e);return String.fromCharCode(o8).repeat(n+1)+``}function Tle(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=>(T(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 Ele(e,t){let n;return(r,i)=>{let a=t.data();a.fromMarkdownExtensions??=[];let o=a.fromMarkdownExtensions,s=Tle(wle(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}}}var Dle=function(){let e=this;e.parser=Ele(e.parser,e)},l8=/(?<!=)==(?=\S)([^\n]*?[^\s=])==(?!=)/g;function Ole(e){return e.type===`strong`||e.type===`emphasis`||e.type===`delete`||e.type===`inlineCode`}function u8(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?u8(e.children[0]):null}function d8(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 d8(t[t.length-1])}return null}function kle(e,t){let n=e.children,r=new Map,i=e=>{let t=r.get(e);if(t!==void 0)return t;let n=I6(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||R6(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=u8(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||R6(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:u8(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||R6(i(t),r,2))continue;let a;if(r>0)a=t.value.charAt(r-1);else{let t=n[e-1];a=d8(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:u8(t):null}if(o!==`=`){s=e,c=r,l=!0;break}}if(s>=0)break}else if(!Ole(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(L6(t,e,o+2,r.length));for(let e=a+1;e<s;e++)h.push(n[e]);if(p.length>0&&h.push(L6(t,u,0,c)),!l){a++;continue}let g={type:`mark`,children:h},_=[];d.length>0&&_.push(L6(t,e,0,o)),_.push(g),m.length>0&&_.push(L6(t,u,c+2,u.value.length)),n.splice(a,s-a+1,..._),a+=+(d.length>0)+1}}function f8(e,t){if(`children`in e&&Array.isArray(e.children)){kle(e,t);for(let n of e.children)f8(n,t)}}function Ale(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;T(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`==`)===-1)return;let a=I6(e);l8.lastIndex=0;let o=[],s;for(;(s=l8.exec(i))!==null;){let e=s.index,t=e+s[0].length;if(R6(a,e,2)||R6(a,t-2,2)){l8.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(L6(n,e,l,r));let a={type:`mark`,children:[L6(n,e,r+2,i-2)]},o=B6(n,e,r,i);o&&(a.position=o),c.push(a),l=i}return l<i.length&&c.push(L6(n,e,l,i.length)),r.children.splice(t,1,...c),[E,t+c.length]}),f8(e,n),T(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 jle(){return e=>{T(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=Mle(r,e);n.children[t]=i})}}function Mle(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}var p8=/^( {4}|\t)/;function Nle(e){let t=e.split(`
|
|
546
|
-
`),n=!1;for(let e of t)if(e.length!==0&&(n=!0,!p8.test(e)))return!1;return n}function
|
|
546
|
+
`)!==-1:Array.isArray(t?.children)&&t.children.some(Y6)}function X6(e){if(e==null)return!1;if(e.type===`comment`)return!0;let t=e.children;return Array.isArray(t)&&t.some(X6)}var tle=/^([ ]{1,3})(<\/[A-Z][A-Za-z0-9_]*\s*>)([ \t]*)$/gm,nle=/^[ ]{0,3}([-*+]|\d{1,9}[.)])([ \t]|$)/;function rle(e,t){if(t===0)return!1;let n=t-1;for(;n>=0;){let r=n;for(;r>0&&e[r-1]!==`
|
|
547
|
+
`;)r--;let i=e.slice(r,n===t-1?n:n+1);if(i.trim().length===0){n=r-2;continue}return nle.test(i)}return!1}function Z6(e){if(!e.includes(`</`))return e;let t=G3(e),n=!1,r=e.replace(tle,(r,i,a,o,s)=>K3(s,t)||!rle(e,s)?r:(n=!0,`${a}${o}`));return n?r:e}var ile=/^<details(\s[^>]*)?>\s*<summary>([\s\S]*?)<\/summary>([\s\S]*?)<\/details>\s*$/,ale=/^<details(\s[^>]*)?>(?:\s*<summary>([\s\S]*?)<\/summary>)?[\s\S]*$/,ole=/^\s*<\/details>\s*$/;function Q6(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 $6(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 e8(e){if(e.type!==`paragraph`)return!1;let t=e.children;return t.length===1&&t[0].type===`text`}function t8(e){return e.children[0].value??``}function sle(e){if(!e8(e))return null;let t=t8(e).match(ile);if(!t)return null;let{defaultOpen:n,name:r,id:i}=Q6(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:$6({title:a,defaultOpen:n,name:r,id:i}),children:s,position:e.position}}function cle(e,t){let n=e[t];if(!e8(n))return null;let r=t8(n);if(!r.startsWith(`<details`)||r.includes(`</details>`))return null;let i=r.match(ale);if(!i)return null;let{defaultOpen:a,name:o,id:s}=Q6(i[1]),c=i[2]?.trim()||null;for(let n=t+1;n<e.length;n++){let t=e[n];if(!e8(t))continue;let r=t8(t);if(ole.test(r))return{closerIdx:n,title:c,defaultOpen:a,name:o,id:s};if(r.includes(`</details>`))return null}return null}function lle(e){let t=e.children,n=0;for(;n<t.length;){let e=t[n];if(e8(e)){let r=sle(e);if(r){t[n]=r,n++;continue}let i=cle(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:$6(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 ule(){return e=>{T(e,e=>{`children`in e&&Array.isArray(e.children)&&lle(e)})}}var dle=/^<(div|center)(\s[^>]*?)?\s*>$/i,fle=new Set([`center`,`left`,`right`,`justify`]);function ple(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 fle.has(n)?n:null}function n8(e){if(e.type!==`paragraph`)return!1;let t=e.children;return t.length===1&&t[0].type===`text`}function r8(e){return e.children[0].value??``}function mle(e){if(!n8(e))return null;let t=r8(e).trim().match(dle);if(!t)return null;let n=t[1].toLowerCase(),r=t[2]??``;return{tag:n,align:ple(r)??(n===`center`?`center`:null),sourceAttrs:r}}function hle(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(!n8(t))continue;let a=r8(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 gle(e){let t=e.children,n=0;for(;n<t.length;){let e=mle(t[n]);if(e!==null){let r=hle(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 _le(){return e=>{T(e,e=>{`children`in e&&Array.isArray(e.children)&&gle(e)})}}var i8=` `;function a8(e){return e.type===`listItem`&&typeof e.checked==`boolean`}function vle(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 yle(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!==i8)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===i8}function ble(e){T(e,`listItem`,e=>{if(!a8(e)||!vle(e))return;let t=e.children[0];t.children=[{type:`text`,value:` `,data:{sourceRaw:i8}}]})}function xle(e){T(e,`listItem`,e=>{!a8(e)||!yle(e)||(e.children[0].children=[])})}function Sle(){return e=>{xle(e)}}var o8=57856,s8=63743,c8=/&(?:[A-Za-z][A-Za-z0-9]*|#[0-9]+|#[xX][0-9A-Fa-f]+);/g;function Cle(e){return c8.lastIndex=0,e.replace(c8,e=>{let t=e.slice(1,-1);if(t.startsWith(`#`)){let e=t[1]===`x`||t[1]===`X`;return u(t.slice(e?2:1),e?16:10)}let n=Te(t);return n===!1?e:n})}function wle(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>=o8&&r<=s8&&t.add(r),r===o8?(e+=1,n=Math.max(n,e)):e=0)}}return{occupied:t,longestStartRun:n}}function Tle(e){let{occupied:t,longestStartRun:n}=wle([e,Cle(e)]);for(let e=o8;e<=s8;e+=1)if(!t.has(e))return String.fromCharCode(e);return String.fromCharCode(o8).repeat(n+1)+``}function Ele(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=>(T(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 Dle(e,t){let n;return(r,i)=>{let a=t.data();a.fromMarkdownExtensions??=[];let o=a.fromMarkdownExtensions,s=Ele(Tle(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}}}var Ole=function(){let e=this;e.parser=Dle(e.parser,e)},l8=/(?<!=)==(?=\S)([^\n]*?[^\s=])==(?!=)/g;function kle(e){return e.type===`strong`||e.type===`emphasis`||e.type===`delete`||e.type===`inlineCode`}function u8(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?u8(e.children[0]):null}function d8(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 d8(t[t.length-1])}return null}function Ale(e,t){let n=e.children,r=new Map,i=e=>{let t=r.get(e);if(t!==void 0)return t;let n=I6(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||R6(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=u8(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||R6(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:u8(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||R6(i(t),r,2))continue;let a;if(r>0)a=t.value.charAt(r-1);else{let t=n[e-1];a=d8(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:u8(t):null}if(o!==`=`){s=e,c=r,l=!0;break}}if(s>=0)break}else if(!kle(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(L6(t,e,o+2,r.length));for(let e=a+1;e<s;e++)h.push(n[e]);if(p.length>0&&h.push(L6(t,u,0,c)),!l){a++;continue}let g={type:`mark`,children:h},_=[];d.length>0&&_.push(L6(t,e,0,o)),_.push(g),m.length>0&&_.push(L6(t,u,c+2,u.value.length)),n.splice(a,s-a+1,..._),a+=+(d.length>0)+1}}function f8(e,t){if(`children`in e&&Array.isArray(e.children)){Ale(e,t);for(let n of e.children)f8(n,t)}}function jle(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;T(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`==`)===-1)return;let a=I6(e);l8.lastIndex=0;let o=[],s;for(;(s=l8.exec(i))!==null;){let e=s.index,t=e+s[0].length;if(R6(a,e,2)||R6(a,t-2,2)){l8.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(L6(n,e,l,r));let a={type:`mark`,children:[L6(n,e,r+2,i-2)]},o=B6(n,e,r,i);o&&(a.position=o),c.push(a),l=i}return l<i.length&&c.push(L6(n,e,l,i.length)),r.children.splice(t,1,...c),[E,t+c.length]}),f8(e,n),T(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 Mle(){return e=>{T(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=Nle(r,e);n.children[t]=i})}}function Nle(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}var p8=/^( {4}|\t)/;function Ple(e){let t=e.split(`
|
|
548
|
+
`),n=!1;for(let e of t)if(e.length!==0&&(n=!0,!p8.test(e)))return!1;return n}function Fle(e){return e.split(`
|
|
547
549
|
`).map(e=>e.length===0?e:e.startsWith(` `)?e.slice(4):e.startsWith(` `)?e.slice(1):e).join(`
|
|
548
|
-
`)}function
|
|
549
|
-
`;)a--;if(a===r)return null;let o=t.slice(a,r);if(!p8.test(o))return null;let s=t.slice(a,i);if(!
|
|
550
|
+
`)}function Ile(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]!==`
|
|
551
|
+
`;)a--;if(a===r)return null;let o=t.slice(a,r);if(!p8.test(o))return null;let s=t.slice(a,i);if(!Ple(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:Fle(s).replace(/\n+$/,``),position:c,data:{sourceStyle:`indented`}}}var Lle=function(){return(e,t)=>{let n=String(t.value??``);n&&T(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=Ile(e,n);a&&(r.children[t]=a)})}},Rle=3,zle=/^\n+$/;function Ble(e){return e.length<Rle||!zle.test(e)?0:e.length-2}function Vle(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=Ble(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 m8(e,t){let n=Vle(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(Hle(a.lines[e],a.offsets[e]));i+=1}r.push(e.children[t])}e.children=r}function Hle(e,t){let n={line:e,column:1,offset:t};return{type:`paragraph`,children:[],position:{start:n,end:{...n}}}}function h8(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}function g8(e){let t=e.identifier??e.label;if(typeof t!=`string`)return null;let n=h8(t);return n.length>0?n:null}function Ule(e){let t=new Map;return T(e,`definition`,e=>{let n=g8(e);n&&!t.has(n)&&t.set(n,e)}),t}function Wle(){return e=>{let t=Ule(e);t.size!==0&&T(e,`linkReference`,e=>{let n=g8(e);if(!n)return;let r=t.get(n);r&&(e.data={...e.data,resolvedUrl:r.url,resolvedTitle:r.title??null})})}}function _8(e,t,n){let r={type:`mdxJsxFlowElement`,name:e,attributes:[{type:`mdxJsxAttribute`,name:`formula`,value:t}],children:[]};return n&&(r.position=n),r}function Gle(){return e=>{T(e,`math`,(e,t,n)=>{if(!n||t==null)return;let r=_8(`DollarMath`,typeof e.value==`string`?e.value:``,e.position);n.children[t]=r}),T(e,`code`,(e,t,n)=>{if(!n||t==null||e.lang!==`math`)return;let r=_8(`MathFence`,typeof e.value==`string`?e.value:``,e.position);n.children[t]=r})}}var v8=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g;function Kle(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=I6(i);v8.lastIndex=0;let o=[],s=0;for(;;){let n=v8.exec(e);if(n===null)break;let c=n[0],l=n[1],u=n.index;if(R6(a,u,1))continue;u>s&&o.push(L6(t,i,s,u));let d={type:`link`,url:l,title:null,children:[L6(t,i,u+1,u+1+l.length)],data:{sourceStyle:`autolink`}},f=B6(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(L6(t,i,s,e.length)),n.push(...o))}r&&(e.children=n)}var qle=new Set(`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`.split(``));function y8(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 Jle(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(!n6(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&&qle.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]!==`
|
|
550
552
|
`;)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]!==`
|
|
551
553
|
`;)n--;let r=!1;for(let e=n;e<a;e++)if(t[e]===`>`){r=!0;break}let i=t.slice(a,o).split(`
|
|
552
554
|
`),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]!==`
|
|
@@ -560,11 +562,11 @@ $2`).split(`
|
|
|
560
562
|
`).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(`
|
|
561
563
|
`);a!==-1&&(i=i.slice(0,a));let o=y8(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(n[t]===`<`&&(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]===`
|
|
562
564
|
`);)t--;n[t]===`"`?e.data.sourceTitleMarker=`double`:n[t]===`'`?e.data.sourceTitleMarker=`single`:n[t]===`)`&&(e.data.sourceTitleMarker=`paren`)}}}}break;case`definition`:{let n=t.slice(a,o);if(e.data.sourceLayout=n.includes(`
|
|
563
|
-
`)?`multiline`:`inline`,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`}}var
|
|
565
|
+
`)?`multiline`:`inline`,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`}}var Yle=`(^|\\s)#([a-zA-Z][\\w/-]*)`;function Xle(){return new RegExp(Yle,`g`)}var b8=Xle(),Zle=/^[a-zA-Z][\w/-]*$/;function Qle(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=I6(i);b8.lastIndex=0;let o=[],s=0;for(;;){let n=b8.exec(e);if(n===null)break;let c=n[1]??``,l=n[2]??``,u=n.index+c.length;if(R6(a,u,1))continue;u>s&&o.push(L6(t,i,s,u));let d={type:`tag`,value:l},f=B6(t,i,u,u+1+l.length);f&&(d.position=f),o.push(d),s=u+1+l.length,r=!0}o.length===0?n.push(i):(s<e.length&&o.push(L6(t,i,s,e.length)),n.push(...o))}r&&(e.children=n)}var $le=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 x8(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(`
|
|
564
566
|
`,i);if(e===-1)return null;i=e+1}let a=t.indexOf(`
|
|
565
|
-
`,i),o=a===-1?t.length:a,s=i+r-1;return s<=o?s:null}function
|
|
567
|
+
`,i),o=a===-1?t.length:a,s=i+r-1;return s<=o?s:null}function eue(e,t){if(!e)return null;let n=x8(e.start,t),r=x8(e.end,t);return n===null||r===null||r<n?null:t.slice(n,r)}function tue(e,t){let n=eue(e.position,t);return{type:`rawMdxFallbackMdast`,originalType:e.type??`unknown`,value:n??``,unresolvedPosition:n===null,position:e.position}}function nue(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``,r=typeof process<`u`&&{}?.OK_DEBUG_POSITION_SLICE===`1`;T(e,(e,t,i)=>{if(i!==void 0&&typeof t==`number`&&typeof e.type==`string`&&!$le.has(e.type)){let r=tue(e,n);return i.children[t]=r,E}if(`children`in e&&Array.isArray(e.children)){let t=e;t.children.some(e=>e.type===`text`)&&(Kle(t,n),Qle(t,n))}if(Jle(e,n,r,i),e.type===`heading`&&i!==void 0&&typeof t==`number`){let n=e.position?.end?.line,r=i.children[t+1],a=r?.position?.start?.line;if(r?.type===`paragraph`&&typeof n==`number`&&typeof a==`number`&&a===n+1){let t=e;t.data??={},t.data.sourceContiguousNext=!0}}})}}function rue(e,t){let n={type:`mdxJsxFlowElement`,name:`MermaidFence`,attributes:[{type:`mdxJsxAttribute`,name:`chart`,value:e}],children:[]};return t&&(n.position=t),n}function iue(){return e=>{T(e,`code`,(e,t,n)=>{if(!n||t==null||e.lang!==`mermaid`)return;let r=rue(typeof e.value==`string`?e.value:``,e.position);n.children[t]=r})}}function S8(){let e=!1,t=``,n=0;return r=>{let i=aue(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 aue(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 C8(e,t,n){for(let r=t;r<n;r++)e[r]=` `}function oue(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 sue(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 w8(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 cue(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 lue(e){let t=S8(),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(C8(a,o,r),o=r,t<0)break;n=!1;continue}if(r!==null){let t=w8(e,o,r);if(C8(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=oue(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=cue(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(C8(a,t,i),o=i,n=r<0,n)break;continue}let u=sue(e,i);if(u===null||s===null)break;let d=w8(e,u,s),f=d??e.length;if(C8(a,i,f),o=f,r=d===null?s:null,r!==null)break}return{text:a.join(``),start:i}})}function uue(e){let t=[],n=0;for(let r=0;r<e.length;r++){let i=e[r];i===`
|
|
566
568
|
`?(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]===`
|
|
567
|
-
`&&(r+=1),n=r+1)}t.push({text:e.slice(n),start:n});let r=
|
|
569
|
+
`&&(r+=1),n=r+1)}t.push({text:e.slice(n),start:n});let r=lue(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 due(e,t,n,r){return r<=n||e.slice(n,r).trim().length===0?!1:t.slice(n,r).trim().length===0}function fue(e){return e.type===`link`||e.type===`linkReference`}function pue(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 mue(){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=uue(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),!fue(a)))continue;let o=a.position?.start.offset,s=a.position?.end.offset;o===void 0||s===void 0||due(n,r,o,s)&&pue(e,t,a,n)}};i(e)}}var T8=NI(),E8=QF(),D8=$F();function O8(){let e=this.data();e.micromarkExtensions||=[],e.fromMarkdownExtensions||=[],e.toMarkdownExtensions||=[];let t=e.micromarkExtensions;t.some(e=>e===T8)||t.push(T8);let n=e.fromMarkdownExtensions;n.some(e=>e===E8)||n.push(E8);let r=e.toMarkdownExtensions;r.some(e=>e===D8)||r.push(D8)}var hue=Object.assign(jue,{peek:()=>`$`}),gue=Object.assign(Mue,{peek:()=>`~`}),_ue=(()=>{for(let e of D8.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).`)})(),vue=/^[ \t]*(?:$|#{1,6}(?:[ \t]|[ \t]*$)|>|(?:[-+*]|\d{1,9}[.)])[ \t]|`{3,}|~{3,}|=+[ \t]*$|-+[ \t]*$|(?:\*[ \t]*){3,}$|(?:_[ \t]*){3,}$)/;function yue(e){let t=e;return t.type===`rawMdxFallback`?{type:`mdxJsxFlowElement`,name:null,attributes:[],children:[],data:{sourceRaw:t.value??``}}:e}var bue={text(e,t,n,r){if(typeof e.data?.sourceRaw==`string`&&i0(e.data.sourceRaw,e.value??``))return e.data.sourceRaw;let i=t6(e.data);if(i.kind===`malformed`&&typeof process<`u`&&{}?.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+=N8(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+=N8(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 N8(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+=L8(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+=L8(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`)return`<${e.url??``}>`;if(e.data?.sourceStyle===`gfm-autolink`){let t=e.children?.length===1?e.children[0]:null;if(t?.type===`text`&&typeof t.value==`string`)return t.value}let i=n.createTracker(r),a=n.enter(`link`),o=n.enter(`label`),s=i.move(`[`);s+=i.move(n.containerPhrasing(e,{before:s,after:`](`,...i.current()})),s+=i.move(`](`),o();let c=n.enter(`destinationRaw`),l=String(e.url??``),u=e.data?.sourceUrlForm===`angle-bracketed`,d=l.startsWith(`<`)&&l.endsWith(`>`),f=u&&!d?`<${l}>`:M8(l);if(s+=i.move(f),c(),e.title){let t=e.data?.sourceTitleMarker??`double`;s+=i.move(j8(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();let c=n.enter(`destinationRaw`);if(s+=i.move(M8(String(e.url??``))),c(),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`?`
|
|
568
570
|
`:` `;l+=s.move(u);let d=String(e.url??``);if(!d||/[\0- ]/.test(d)){let e=n.enter(`destinationLiteral`);l+=s.move(`<`),l+=s.move(n.safe(d,{before:l,after:`>`,...s.current()})),l+=s.move(`>`),e()}else{let e=n.enter(`destinationRaw`);l+=s.move(M8(d)),e()}if(e.title){let t=i===`multiline`?`
|
|
569
571
|
`:` `;l+=s.move(j8(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`?`\\
|
|
570
572
|
`:`
|
|
@@ -575,7 +577,7 @@ $2`).split(`
|
|
|
575
577
|
`).map(e=>e.length>0?`${c}${e}`:e).join(`
|
|
576
578
|
`):e}let m=`${u}${f}${d}${p}\n${n}\n${r.repeat(o)}`;return c?m.split(`
|
|
577
579
|
`).map(e=>e.length>0?`${c}${e}`:e).join(`
|
|
578
|
-
`):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`)?S0(l):l},inlineMath:
|
|
580
|
+
`):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`)?S0(l):l},inlineMath:hue,delete:gue,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:`
|
|
579
581
|
`,after:`
|
|
580
582
|
`}),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:`
|
|
581
583
|
`});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`,ee;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(`
|
|
@@ -589,14 +591,14 @@ $2`).split(`
|
|
|
589
591
|
|
|
590
592
|
`:`
|
|
591
593
|
`;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(`
|
|
592
|
-
`)},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=k8(i.attributes??[]);return!i.children||i.children.length===0?s?c?`<${s} ${c} />`:`<${s} />`:``:
|
|
593
|
-
]|$)`};return delete t._compiled,t});let a;try{a=e.safe(
|
|
594
|
-
`||e[r]===`\r`;let i=n.after.charCodeAt(0);return Number.isNaN(i)||i===10||i===13}function kue(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)&&Oue(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+=Due(i,o,s)?`\\${i}`.repeat(a-r):e.slice(r,a)}r=a;continue}n+=i,r+=1}return n}function L8(e,t,n){let r=n.startsWith(`_`)?`_`:`*`,i=t.before??``,a=t.after??``,o=e,s=o.charCodeAt(0);R8(i.charCodeAt(i.length-1),s,r)&&(o=z8(s)+o.slice(1));let c=o.charCodeAt(o.length-1);return R8(a.charCodeAt(0),c,r)&&(o=o.slice(0,-1)+z8(c)),o}function R8(e,t,n){return!(d(t)!==F8||n===`_`&&d(e)===void 0)}function z8(e){return`&#x${e.toString(16).toUpperCase()};`}function Aue(e,t,n,r){let i=e.value??``,a=e.data?.sourceDelimiter,o=typeof a==`string`&&/^\$+$/.test(a)?a.length:2;for(o===1&&!Mue(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 jue(e,t,n,r){let i=e.data?.sourceDelimiter===`~`?`~`:`~~`,a=n.createTracker(r),o=n.enter(`strikethrough`),s=a.move(i);return s+=L8(n.containerPhrasing(e,{...a.current(),before:s,after:`~`}),r,i),s+=a.move(i),o(),s}function Mue(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(`\\`))}var B8=[{mode:`protecting`,protect:k6,reservations:Cce},{mode:`protecting`,protect:_6,reservations:rce},{mode:`protecting`,protect:xce,reservations:yce},{mode:`serializer-only`,reservations:[{to:``}]}];new Set(B8.flatMap(({reservations:e})=>e.map(({to:e})=>e)));function Nue(e,t){switch(t.mode){case`protecting`:return t.protect(e);case`serializer-only`:return e}}function V8(e){return B8.reduce(Nue,e)}function H8(e){return e.data?.sourceRaw}function Pue(e){return e.type===`text`?e.value===``:e.type===`mdxJsxTextElement`?H8(e)===``:!1}function U8(e){return e.type===`paragraph`?(e.children??[]).every(Pue):!1}function W8(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 Fue(e){switch(e.type){case`table`:return W8(e)===0;case`code`:return e.data?.sourceStyle===`indented`&&/^\n*$/.test(e.value??``);case`thematicBreak`:return H8(e)===``;case`html`:return(e.value??``)===``;case`mdxJsxFlowElement`:return H8(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 Iue(e){let t=[];for(let n of e.children){if(n.type===`table`&&W8(n)===0){console.warn(JSON.stringify({event:`table-serialize-dropped-empty`,rows:(n.children??[]).length}));continue}Fue(n)||(n.type===`paragraph`&&n.children.length>0&&U8(n)&&(n.children=[]),t.push(n))}e.children=t}function Lue(e,t){let n=e,r=t;return n.type===`heading`&&n.data?.sourceContiguousNext===!0&&r.type===`paragraph`}var Rue=(e,t)=>{if(U8(e)||Lue(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},G8=/(?<!\\)\$(?=\S)([^$\n]*?[^\s$])\$(?!\d)/g;function zue(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;T(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`$`)===-1)return;let a=I6(e);G8.lastIndex=0;let o=[],s;for(;(s=G8.exec(i))!==null;){let e=s.index,t=e+s[0].length;if(R6(a,e,1)||R6(a,t-1,1)){G8.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(L6(n,e,l,r));let a={type:`inlineMath`,value:t[1]},o=B6(n,e,r,i);o&&(a.position=o),c.push(a),l=i}return l<i.length&&c.push(L6(n,e,l,i.length)),r.children.splice(t,1,...c),[E,t+c.length]})}}var Bue=new Set([`strong`,`emphasis`,`delete`,`link`,`mark`,`comment`]),Vue=`<br />`;function Hue(e){if(e?.type!==`break`)return!1;let t=e.data?.sourceRaw;return typeof t!=`string`||t.length===0}function Uue(e){e.data??={},e.data.sourceRaw=Vue,e.data.sourceStyle=`html`}function K8(e){if(e?.type!==`text`)return!1;let t=e.data?.sourceRaw;return typeof t!=`string`||t.length===0}var q8=/[ \t]+$/,J8=/^[ \t]*$/;function Wue(e){return e.some(e=>!(K8(e)&&J8.test(e.value)))}function Y8(e,t=!1){for(;e.length>0;){let n=e[e.length-1];if(Hue(n)){Uue(n);break}if(n&&Bue.has(n.type)&&`children`in n){let t=n.children;if(Y8(t,!0),t.length===0){e.pop();continue}}if(!t&&K8(n)&&q8.test(n.value)){let t=n.value.replace(q8,``);if(t.length>0){n.value=t;continue}if(Wue(e.slice(0,-1))){e.pop();continue}if(e.every(e=>K8(e)&&J8.test(e.value))){let t=e[0];t.value=t.value.charAt(0),e.splice(1)}}break}}var Gue=new Set([`paragraph`,`heading`,`tableCell`]);function Kue(e){let t=e=>{if(Gue.has(e.type)&&`children`in e&&Y8(e.children),`children`in e)for(let n of e.children)t(n)};t(e)}var X8={handlers:{tag:e=>`#${e.value}`},unsafe:[{character:`#`,inConstruct:[`phrasing`],before:`\\s`,after:`[a-zA-Z]`}]};function que(){let e=this.data();e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===X8)||e.toMarkdownExtensions.push(X8)}var Jue=new Set([`u`,`ins`]);function Yue(){return e=>{T(e,`mdxJsxTextElement`,(e,t,n)=>{if(n===void 0||t==null||e.name===null||!Jue.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})}}var Z8=/(?<!\uE102)<br[ \t]*\/?>/g,Xue=new Set([`mdxJsxTextElement`,`mdxJsxFlowElement`]);function Zue(e,t){let n=[],r=!1;for(let i of e.children){if(i.type!==`text`){n.push(i);continue}let e=i.value;Z8.lastIndex=0;let a=[],o=0;for(;;){let n=Z8.exec(e);if(n===null)break;let s=n.index;s>o&&a.push(L6(t,i,o,s));let c={type:`break`,data:{sourceStyle:`html`,sourceRaw:n[0]}},l=B6(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(L6(t,i,o,e.length)),n.push(...a))}r&&(e.children=n)}function Q8(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;T(e,e=>{if(Xue.has(e.type))return E;let t=e;Array.isArray(t.children)&&Zue(e,n)})}}var $8=33,e5=91,t5=93,n5=124,r5=35,Que=-1,$ue=-2;function i5(e){return e===$ue?` `:e===Que?` `:String.fromCharCode(e)}var ede={name:`wikiLink`,tokenize:(e,t,n)=>{let r=0,i=0,a=``;return o;function o(t){return t===e5?(e.enter(`wikiLink`),e.enter(`wikiLinkMarker`),e.consume(t),s):n(t)}function s(t){return t===e5?(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===e5?n(t):t===t5?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),d(t)):t===r5?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),l):t===n5?v0(a)?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),a+=i5(t),c)}function l(t){return t===null||t===-5||t===-4||t===-3||t===e5?n(t):t===t5?r===0?n(t):(e.exit(`wikiLinkAnchor`),d(t)):t===n5?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===e5?n(t):t===t5?i===0?n(t):(e.exit(`wikiLinkAlias`),d(t)):(e.consume(t),i++,u)}function d(t){return t===t5?(e.enter(`wikiLinkMarker`),e.consume(t),f):n(t)}function f(r){return r===t5?(e.consume(r),e.exit(`wikiLinkMarker`),e.exit(`wikiLink`),t):n(r)}}},tde={name:`wikiLinkEmbed`,tokenize:(e,t,n)=>{let r=0,i=0,a=``;return o;function o(t){return t===$8?(e.enter(`wikiLinkEmbed`),e.enter(`wikiLinkEmbedBang`),e.consume(t),e.exit(`wikiLinkEmbedBang`),s):n(t)}function s(t){return t===e5?(e.enter(`wikiLinkMarker`),e.consume(t),c):n(t)}function c(t){return t===e5?(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===e5?n(t):t===t5?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),f(t)):t===r5?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),u):t===n5?v0(a)?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),d):(e.consume(t),a+=i5(t),l)}function u(t){return t===null||t===-5||t===-4||t===-3||t===e5?n(t):t===t5?r===0?n(t):(e.exit(`wikiLinkAnchor`),f(t)):t===n5?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===e5?n(t):t===t5?i===0?n(t):(e.exit(`wikiLinkAlias`),f(t)):(e.consume(t),i++,d)}function f(t){return t===t5?(e.enter(`wikiLinkMarker`),e.consume(t),p):n(t)}function p(r){return r===t5?(e.consume(r),e.exit(`wikiLinkMarker`),e.exit(`wikiLinkEmbed`),t):n(r)}}};function nde(){return{text:{[e5]:ede,[$8]:tde}}}function rde(e){this.enter({type:`wikiLink`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function ide(e){this.enter({type:`wikiLinkEmbed`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function a5(e){return e.stack[e.stack.length-1]}function ade(e){let t=a5(this),n=this.sliceSerialize(e);t.data.target=n.trim(),n!==t.data.target&&(t.data.sourceTarget=n)}function ode(e){let t=a5(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 sde(e){let t=a5(this),n=this.sliceSerialize(e),r=n.trim();t.data.alias=r.length?r:null,n!==r&&(t.data.sourceAlias=n)}function cde(e){let t={target:e.data.target,anchor:e.data.anchor??null,alias:e.data.alias??null},n=h0(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 o5(e){cde(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 lde(e){o5(a5(this)),this.exit(e)}function ude(e){o5(a5(this)),this.exit(e)}var s5={enter:{wikiLink:rde,wikiLinkEmbed:ide},exit:{wikiLinkTarget:ade,wikiLinkAnchor:ode,wikiLinkAlias:sde,wikiLink:lde,wikiLinkEmbed:ude}};function c5(e){return(t,n,r,i)=>{let a=t.data,o=r.stack.includes(`tableCell`),s=e=>o?x0(e):e,c=a?.target??``,l=a?.anchor,u=a?.alias,d=`${e}${s(_0(a?.sourceTarget,c,`separatorAdjacent`))}`;if(l)d+=`#${s(_0(a?.sourceAnchor,l,`separatorAdjacent`))}`;else{let e=s(_0(a?.sourceAnchor,``,`separatorAdjacent`));e.length>0&&(d+=`#${e}`)}let f=u?_0(a?.sourceAlias,u,`alias`):_0(a?.sourceAlias,``,`alias`);if(f.length>0){let e=o&&!d.endsWith(`\\`)?`\\|`:`|`;d+=`${e}${s(f)}`}return`${d}]]`}}var l5={handlers:{wikiLink:c5(`[[`),wikiLinkEmbed:c5(`![[`)},unsafe:[{character:`[`,inConstruct:[`phrasing`]}]},u5=nde();function d5(){let e=this.data();e.micromarkExtensions||=[],e.micromarkExtensions.some(e=>e===u5)||e.micromarkExtensions.push(u5),e.fromMarkdownExtensions||=[],e.fromMarkdownExtensions.some(e=>e===s5)||e.fromMarkdownExtensions.push(s5),e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===l5)||e.toMarkdownExtensions.push(l5)}function dde(e){return e.children.some(e=>{let t=e.type;return t!==`yaml`&&t!==`toml`})?e:{...e,children:[...e.children,{type:`paragraph`,children:[]}]}}var fde=[{name:`remark-parse`,plugin:ge},{name:`escape-provenance`,plugin:Dle},{name:`remark-mdx-agnostic`,plugin:O8},{name:`remark-gfm`,plugin:ve},{name:`remark-math`,plugin:SF,options:{singleDollarTextMath:!1}},{name:`remark-wiki-link`,plugin:d5},{name:`remark-github-alerts`,plugin:uF,options:Fce},{name:`callout-transformer`,plugin:Nce},{name:`restore-from-mdx`,plugin:y6},{name:`void-br-promoter`,plugin:Q8},{name:`restore-entity-refs`,plugin:Sce},{name:`restore-backslash-escapes`,plugin:A6},{name:`details-accordion-promoter`,plugin:lle},{name:`div-align-promoter`,plugin:gle},{name:`image-promoter`,plugin:jle},{name:`indented-code-promoter`,plugin:Ile},{name:`math-promoter`,plugin:Wle},{name:`single-dollar-math-promoter`,plugin:zue},{name:`highlight-promoter`,plugin:Ale},{name:`underline-promoter`,plugin:Yue},{name:`mermaid-promoter`,plugin:rue},{name:`comment-promoter`,plugin:Vce},{name:`merged-post-parse-walker`,plugin:tue},{name:`empty-task-item-unmint`,plugin:xle},{name:`link-reference-destination`,plugin:Ule},{name:`non-rendering-context-demote`,plugin:pue},{name:`ensure-non-empty-doc`,plugin:()=>dde}];function pde(e){let t=le();for(let e of fde)t=`options`in e&&e.options!==void 0?t.use(e.plugin,e.options):t.use(e.plugin);return t=t.use(FP,{schema:e.schema,handlers:e.handlers}),t.freeze(),t}function mde(e){let t=le().use(oF,[`yaml`]).use(ve,{tablePipeAlign:!1}).use(SF,{singleDollarTextMath:!1}).use(O8).use(d5).use(que).use(SP,{bullet:`-`,fences:!0,rule:`-`,join:[Rue],...e.toMarkdownHandlers?{handlers:e.toMarkdownHandlers}:{}});return t.freeze(),t}function f5(e){return e.charCodeAt(0)===65279?{source:e.slice(1),hadBom:!0}:{source:e,hadBom:!1}}var p5=/^\n+$/,m5=/^\n{2,}$/;function h5(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);p5.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);m5.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 hde(e){if(typeof e!=`object`||!e)return;let t=e,n={};return t.bom===!0&&(n.bom=!0),typeof t.leading==`string`&&p5.test(t.leading)&&(n.leading=t.leading),typeof t.trailing==`string`&&m5.test(t.trailing)&&(n.trailing=t.trailing),n.bom||n.leading||n.trailing?n:void 0}function gde(e,t){let{source:n,hadBom:r}=f5(e),i=Z6(n),a=new ne(V8(i)),o=t.parse(a);a.value=i;let s=t.runSync(o,a);m8(s,i);let c=h5(s,i,r),l=c?rZ(s,c):void 0,u=t.stringify(s);return l?u.type.create({...u.attrs,sourceDocBoundary:l},u.content,u.marks):u}function _de(e,t){return g5(e,t,!1)}function vde(e,t){return g5(e,t,!0)}function g5(e,t,n){let{source:r,hadBom:i}=f5(e),a=Z6(r),o=new ne(V8(a)),s=t.parse(o);o.value=a;let c=t.runSync(s,o);n&&m8(c,a);let l=h5(c,a,i);return n&&l&&rZ(c,l),c}function yde(e,t,n){let r=LP(e,{schema:n.schema,nodeHandlers:n.pmNodeHandlers,markHandlers:n.pmMarkHandlers});_5(r),yle(r),Kue(r),Iue(r);let i=hde(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 _5(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)_5(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=n6(i)?i.escapedChars:null,s=n6(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)}}}function bde(){return!1}function xde(e){let t=e.lastIndexOf(`/`);return t===-1?``:t===0?`/`:e.slice(0,t)}function Sde(e,t){let n=e?`${e}/${t}`:t,r=n.startsWith(`/`),i=[];for(let e of n.split(`/`))if(!(e===``||e===`.`)){if(e===`..`){let e=i[i.length-1];i.length>0&&e!==`..`?i.pop():r||i.push(`..`);continue}i.push(e)}let a=i.join(`/`);return r?`/${a}`:a}function v5(e,t){if(typeof e!=`string`||e===``||!t||e.startsWith(`/`)||!b1(e))return e;let n=Sde(xde(t),e);return n===``||n===`..`||n.startsWith(`../`)?(bde()&&console.warn(`[resolve-image-url] doc-relative path escapes contentDir; emitting raw URL: ${e} (from sourcePath ${t})`),e):`/${n}`}function y5(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]}`}var Cde=class{schema;handlers;pmNodeHandlers;pmMarkHandlers;parseProcessor;serializeProcessor;parseCtx={current:{}};freshnessHolder={checker:void 0};constructor(e){this.schema=fT(e.extensions),this.handlers=Ode(this.schema,this.parseCtx),this.freshnessHolder.checker=e.deriveStructuralFreshness?$Z({parse:e=>this.parseWithFallback(e)}):void 0;let{nodeHandlers:t,markHandlers:n}=kde(this.schema,this.freshnessHolder);this.pmNodeHandlers=t,this.pmMarkHandlers=n,this.parseProcessor=pde({schema:this.schema,handlers:this.handlers,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers}),this.serializeProcessor=mde({toMarkdownHandlers:yue})}parse(e,t){if(!e.trim())return{type:`doc`,content:[{type:`paragraph`,content:[]}]};this.parseCtx.current=t??{};try{return gde(e,this.parseProcessor).toJSON()}finally{this.parseCtx.current={}}}parseToMdast(e){return e.trim()?_de(e,this.parseProcessor):{type:`root`,children:[]}}parseToEditorMdast(e){return e.trim()?vde(e,this.parseProcessor):{type:`root`,children:[]}}parseWithFallback(e,t){return e.trim()?Jse(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 yde(n,this.serializeProcessor,{schema:this.schema,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers})}finally{this.freshnessHolder.checker=r}}},b5=V3();function x5(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 i?.type===`boolean`?r[e]=t.value===`true`:r[e]=t.value;continue}let a=t.value.value;try{r[e]=JSON.parse(a)}catch{r[e]=a}}return r}function wde(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 Tde(e,t){return e.attrs.sourceDirty||wde(e)?!0:t?t.isDiverged(e.toJSON()):!1}function Ede(e){if(e.type!==`paragraph`)return!1;let t=e.children??[];return t.length===0?!0:t.every(e=>e.type===`text`&&e.value===``)}function S5(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 C5(e,t){if(e.length===0)return S5({type:`inlineCode`,value:``},t);if(e.every(e=>e.type===`text`))return S5({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:[C5(n.children,t)]}}return S5({type:`inlineCode`,value:w5(e)},t)}function w5(e){let t=``;for(let n of e)n.type===`text`?t+=n.value:`children`in n&&Array.isArray(n.children)?t+=w5(n.children):`value`in n&&typeof n.value==`string`&&(t+=n.value);return t}var Dde=Rp;function Ode(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=MP(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=MP(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=v5(r,t.current.sourcePath);return n.image.createAndFill({src:i,alt:e.alt??null,title:e.title??null,sourceUrl:i===r?null:r})},n.imageReference?i.imageReference=e=>n.imageReference.createAndFill({alt:e.alt??``,label:e.label??e.identifier??``,identifier:e.identifier??``,referenceType:e.referenceType??`shortcut`}):i.imageReference=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&&kQ(t.raw)!==null&&EQ(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=kQ(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=NP(a,e=>({sourceDelimiter:e.data?.sourceDelimiter===`~`?`~`:`~~`}))),r.highlight&&(i.mark=NP(r.highlight)),r.underline&&(i.underline=NP(r.underline,e=>({sourceForm:e.data?.sourceForm===`ins`?`ins`:`u`}))),r.comment&&(i.comment=NP(r.comment,e=>({sourceForm:e.data?.sourceForm??`percent`}))),n.commentBlock&&(i.commentBlock=MP(n.commentBlock,e=>({sourceForm:e.data?.sourceForm??`percent`,sourceLayout:e.data?.sourceLayout??`block`}))),r.emphasis&&(i.emphasis=NP(r.emphasis,e=>({sourceDelimiter:e.data?.sourceDelimiter??`*`}))),r.strong&&(i.strong=NP(r.strong,e=>({sourceDelimiter:e.data?.sourceDelimiter??`**`}))),n.heading&&(i.heading=MP(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=MP(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=MP(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;i.definition=i=>{let s={title:i.title??null};return n&&(s.identifier=i.identifier??``),s.label=i.label??i.identifier??``,e?s.url=i.url??``:t&&(s.href=i.url??``),r&&(s.sourceLayout=i.data?.sourceLayout??null),a&&(s.sourceTitleMarker=i.data?.sourceTitleMarker??null),o.createAndFill(s)}}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=b5.getOrWildcard(o),c=x5(e.attributes,s.props);if(o===`CommonMarkImage`&&typeof c.src==`string`){let e=c.src,n=v5(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?b5.get(i):void 0;if(o&&n.jsxInline){let e=x5(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=O0(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(_&&Dde.has(f)&&n.jsxComponent&&b5.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(_&&zp.has(f)&&n.jsxComponent&&b5.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(_&&Vp.has(f)&&n.jsxComponent&&b5.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(_&&Hp.has(f)&&n.jsxComponent&&b5.has(`WikiEmbedFile`)){let{resolveSize:e}=t.current,r=e&&m?e(o,m)??null:null,i=r===null?null:y5(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=MP(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 kde(e,t){let n={},r={},i=e.nodes,a=e.marks;i.paragraph&&(n.paragraph=RP(`paragraph`)),i.blockquote&&(n.blockquote=RP(`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}:{}})),i.heading&&(n.heading=RP(`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?!0:void 0,sourceLeadingIndent:e.attrs.sourceLeadingIndent??void 0,sourceInteriorSpacing:e.attrs.sourceInteriorSpacing??void 0}}))),i.codeBlock&&(n.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?!0:void 0,sourceFenceIndent:e.attrs.sourceFenceIndent??void 0,sourceInfoPadding:e.attrs.sourceInfoPadding??void 0,sourceIndents:e.attrs.sourceIndents??void 0}}}),i.thematicBreak&&(n.thematicBreak=e=>({type:`thematicBreak`,data:{sourceRaw:e.attrs.sourceRaw}})),i.hardBreak&&(n.hardBreak=e=>({type:`break`,data:{sourceStyle:e.attrs.hardBreakStyle,...typeof e.attrs.sourceRaw==`string`&&e.attrs.sourceRaw.length>0?{sourceRaw:e.attrs.sourceRaw}:{}}})),i.list&&(n.list=RP(`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}}))),i.listItem&&(n.listItem=(e,t,n)=>{let r=n.all(e),i=r.length>1&&Ede(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}}),i.table&&(n.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}),i.tableRow&&(n.tableRow=RP(`tableRow`));let o=(e,t)=>{let n={type:`tableCell`,children:p3(t)},r=e.attrs.sourcePadding;return typeof r==`object`&&r&&typeof r.left==`number`&&typeof r.right==`number`&&(n.data={sourcePadding:r}),n};if(i.tableCell&&(n.tableCell=(e,t,n)=>o(e,n.all(e))),i.tableHeader&&(n.tableHeader=(e,t,n)=>o(e,n.all(e))),i.image&&(n.image=e=>({type:`image`,url:e.attrs.sourceUrl??e.attrs.src,alt:e.attrs.alt,title:e.attrs.title})),i.imageReference&&(n.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`}}),i.htmlBlock&&(n.htmlBlock=e=>({type:`html`,value:e.attrs.content})),i.linkDefinition??i.linkRefDef){let e=i.linkDefinition?`linkDefinition`:`linkRefDef`;n[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);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(i.jsxComponent&&(n.jsxComponent=(e,n,r)=>{if(e.attrs.kind===`expression`)return{type:`html`,value:e.attrs.sourceRaw??``};let i=e.attrs.componentName||null,a=Array.isArray(e.attrs.attributes)?e.attrs.attributes:[];return!Tde(e,t.checker)&&e.attrs.sourceRaw?{type:`mdxJsxFlowElement`,name:i,attributes:a,children:[],data:{sourceRaw:String(e.attrs.sourceRaw)}}:b5.getOrWildcard(i??`*`).serialize(e,{all:e=>r.all(e),registry:b5,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.`)}})}),i.rawMdxFallback&&(n.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}}}}),i.jsxInline&&(n.jsxInline=e=>{let t=e.attrs.componentName||``;if(t&&e.attrs.sourceDirty)return sse(t,e,b5.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)}}}),i.mathInline&&(n.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}}:{}}}),i.wikiLink&&(n.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}]}}),i.tag&&(n.tag=e=>({type:`tag`,value:String(e.attrs.value??``)})),i.wikiLinkEmbed&&(n.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}]}}),a.emphasis&&(r.emphasis=zP(`emphasis`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),a.strong&&(r.strong=zP(`strong`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),a.code&&(r.code=(e,t,n)=>{let r=e.attrs.sourceFenceChar,i=e.attrs.sourceFenceLength;return C5(n,{sourceFenceChar:r,sourceFenceLength:i,sourcePadded:e.attrs.sourcePadded===!0?!0:void 0})}),a.strike??a.delete){let e=a.strike?`strike`:`delete`;r[e]=zP(`delete`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter===`~`?`~`:`~~`}}))}return a.highlight&&(r.highlight=zP(`mark`)),a.underline&&(r.underline=zP(`underline`,e=>({data:{sourceForm:e.attrs.sourceForm===`ins`?`ins`:`u`}}))),a.comment&&(r.comment=zP(`comment`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`}}))),i.commentBlock&&(n.commentBlock=RP(`commentBlock`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`,sourceLayout:e.attrs.sourceLayout===`inline`?`inline`:`block`}}))),i.footnoteReference&&(n.footnoteReference=e=>{let t=String(e.attrs.identifier??``);return{type:`footnoteReference`,identifier:t,label:e.attrs.label?String(e.attrs.label):t}}),i.footnoteDefinition&&(n.footnoteDefinition=RP(`footnoteDefinition`,e=>({identifier:String(e.attrs.identifier??``),label:e.attrs.label?String(e.attrs.label):String(e.attrs.identifier??``)}))),a.link&&(r.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}}),a.escapeMark&&(r.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}),a.sourceLiteral&&(r.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 i0(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:n,markHandlers:r}}var T5={default:!0,MD013:!1};function E5(e){return e??T5}function D5(e){let t=e.replace(/\\/g,`/`);for(;t.startsWith(`./`);)t=t.slice(2);let n=t.toLowerCase();for(let e of I$)if(n.endsWith(e))return t.slice(0,-e.length);return t}function O5(e){let t=(e===void 0?[]:Array.isArray(e)?e:[e]).map(e=>e.trim()).filter(e=>e.length>0),n=[],r=[],i=[],a=[],o=0;for(let e of t){let t=e.startsWith(`!`),s=t?e.slice(1):e;if(t||(o+=1),s.length===0){n.push({pattern:e,detail:`empty pattern`});continue}try{let e=(0,OV.default)(s,{dot:!0,strictBrackets:!0});(t?a:i).push(e)}catch(t){n.push({pattern:e,detail:t instanceof Error?t.message:String(t)});continue}if(s.endsWith(`/`))r.push({pattern:e,reason:`trailing-slash`});else if(s.startsWith(`/`))r.push({pattern:e,reason:`leading-slash`});else{let t=s.toLowerCase();I$.some(e=>t.endsWith(e))&&r.push({pattern:e,reason:`doc-extension`})}}let s=o===0;return{invalidPatterns:n,suspiciousPatterns:r,matches(e){if(e===void 0||e===``)return!1;let t=D5(e);return t===``||!(s||i.some(e=>e(t)))?!1:!a.some(e=>e(t))}}}function Ade(e,t){if(t.length===0)return[];let n=(e===void 0?[]:Array.isArray(e)?e:[e]).map(e=>e.trim()).filter(e=>e.length>0),r=t.map(D5).filter(e=>e!==``),i=[];for(let e of n){let t=e.startsWith(`!`)?e.slice(1):e;if(t.length===0)continue;let n;try{n=(0,OV.default)(t,{dot:!0,strictBrackets:!0})}catch{continue}r.some(e=>n(e))||i.push(e)}return i}var k5=/[*?[\]{}()+@!|]/;function jde(e){let t=e.indexOf(`{`);if(t===-1)return null;let n=e.indexOf(`}`,t);if(n===-1||e.indexOf(`{`,t+1)!==-1||e.indexOf(`}`,n+1)!==-1)return null;let r=e.slice(t+1,n).split(`,`);return r.length<2||r.some(e=>e.trim()===``||k5.test(e))?null:r.map(r=>e.slice(0,t)+r+e.slice(n+1))}function A5(e){if(e.endsWith(`/`)||e.startsWith(`/`))return{kind:`matches-nothing`,pattern:e};try{(0,OV.default)(e,{dot:!0,strictBrackets:!0})}catch{return{kind:`invalid`,pattern:e}}if(e===`**`||e===`**/*`)return{kind:`everything`};{let t=e.match(/^\*\*\/(.+)\/\*\*$/)?.[1];if(t!==void 0&&!k5.test(t))return{kind:`folder-anywhere`,folder:t};let n=e.match(/^(.+)\/\*\*\/(.+)\/\*\*$/),r=n?.[1],i=n?.[2];if(r!==void 0&&i!==void 0&&!k5.test(r)&&!k5.test(i))return{kind:`folder-recursive-nested`,root:r,folder:i}}for(let t of[`/**/*`,`/**`])if(e.endsWith(t)){let n=e.slice(0,-t.length);if(n.length>0&&!k5.test(n))return{kind:`folder-recursive`,folder:n}}if(e.endsWith(`/*`)){let t=e.slice(0,-2);if(t.length>0&&!k5.test(t))return{kind:`folder-direct`,folder:t}}if(e.startsWith(`**/`)){let t=e.slice(3);if(t.length>0&&!t.includes(`/`)&&!k5.test(t))return{kind:`name-anywhere`,name:t}}return k5.test(e)?{kind:`pattern`,pattern:e}:{kind:`exact`,target:e}}function Mde(e){let t=A5(e);if(t.kind!==`pattern`)return[t];let n=jde(e);if(n!==null){let e=n.map(A5);if(e.every(e=>e.kind!==`pattern`))return e}return[t]}function Nde(e){let t=(e===void 0?[]:Array.isArray(e)?e:[e]).map(e=>e.trim()).filter(e=>e.length>0),n=[],r=[];for(let e of t){let t=e.startsWith(`!`),i=t?e.slice(1):e;i.length!==0&&(t?r:n).push(...Mde(i))}return{includes:n,excludes:r}}function j5(e,t){let n=new Set,r=[];for(let i of e){if(i.enabled===!1||!i.schema||!O5(i.appliesTo).matches(t))continue;let e=i.key??i.file;n.has(e)||(n.add(e),r.push({file:i.file,schema:i.schema}))}return r}var M5={"draft-06":`http://json-schema.org/draft-06/schema#`,"draft-07":`http://json-schema.org/draft-07/schema#`,"2019-09":`https://json-schema.org/draft/2019-09/schema`,"2020-12":`https://json-schema.org/draft/2020-12/schema`},Pde=Object.keys(M5),Fde=`draft-07`,Ide=new Map(Pde.map(e=>[N5(M5[e]),e]));function N5(e){return e.replace(/^https?:\/\//,``).replace(/#$/,``)}function Lde(e){let t=e.$schema;return t===void 0?Fde:typeof t==`string`?Ide.get(N5(t))??null:null}var P5=new Map;function Rde(e){throw Error(`Unhandled FrontmatterSchemaDialect: ${JSON.stringify(e)}`)}function zde(e){let t=P5.get(e);if(t)return t;let n={allErrors:!0,strict:!1},r;switch(e){case`2020-12`:r=new EV.default(n);break;case`2019-09`:r=new TV.default(n);break;case`draft-06`:case`draft-07`:r=new wV.default(n);break;default:return Rde(e)}return(0,DV.default)(r),P5.set(e,r),r}function Bde(e){let{$schema:t,...n}=e;return n}function Vde(e,t){let n=zde(e),r=t.$id;return typeof r==`string`&&r!==``&&n.removeSchema(r),n.compile(Bde(t))}var F5=new Map,Hde=256;function Ude(e){let t=JSON.stringify(e),n=F5.get(t);if(n!==void 0)return n;let r=null,i=Lde(e);if(i!==null)try{r=Vde(i,e)}catch{r=null}return F5.size>=Hde&&F5.clear(),F5.set(t,r),r}function Wde(e){let t=new Map;if(!zd.test(e))return{data:{},keyLines:t};let{frontmatter:n}=Vd(e),r=Ud(n);if(r.trim()===``)return{data:{},keyLines:t};let i=wd(r,{uniqueKeys:!1});if(i.errors.length>0)return{data:{},keyLines:t};let a=i.toJS();if(typeof a!=`object`||!a||Array.isArray(a))return{data:{},keyLines:t};if(Hs(i.contents))for(let e of i.contents.items){let n=e.key;if(!Ws(n)||typeof n.value!=`string`||!n.range)continue;let i=0,a=Math.min(n.range[0],r.length);for(let e=0;e<a;e++)r.charCodeAt(e)===10&&i++;t.has(n.value)||t.set(n.value,i+1)}return{data:a,keyLines:t}}var Gde={"date-time":`an ISO 8601 datetime with an explicit UTC offset, for example "2026-09-23T00:00:00Z"`};function I5(e){let t=e.format;return typeof t==`string`?Gde[t]:void 0}function L5(e){if(e===void 0)return``;let t;if(typeof e==`string`)t=`"${e}"`;else try{t=JSON.stringify(e)??String(e)}catch{t=String(e)}return t.length>60&&(t=`${t.slice(0,57)}…`),` (got ${t})`}function Kde(e){if(!e.startsWith(`/`))return null;let t=e.slice(1).split(`/`)[0]??``;return t===``?null:t.replace(/~1/g,`/`).replace(/~0/g,`~`)}function qde(e){return e.split(`/`).slice(1).map(e=>e.replace(/~1/g,`/`).replace(/~0/g,`~`)).join(`.`)}function R5(e,t,n){if(t.length===0)return[];let r=n?.source??`frontmatter`,{data:i,keyLines:a}=Wde(e),o=e.split(`
|
|
595
|
-
`),s=e=>({start:{line:e,character:0},end:{line:e,character:o[e]?.length??0}}),c=[];for(let{schema:e,ruleId:n}of t){let t=
|
|
596
|
-
`),i=Xde(t);return n.map(e=>Qde(e,r,Zde(e,i)))}function Xde(e){let t=new Map;return Object.entries(e).forEach(([e,n],r)=>{let i=e.toUpperCase();if(i===`DEFAULT`)return;let a=null;if(n===`error`||n===`warning`)a=n;else if(typeof n==`object`&&n&&!Array.isArray(n)){let e=n.severity;(e===`error`||e===`warning`)&&(a=e)}a!==null&&t.set(i,{entryIndex:r,severity:a})}),t}function Zde(e,t){let n;for(let r of e.ruleNames){let e=t.get(r.toUpperCase());e!==void 0&&(n===void 0||e.entryIndex>n.entryIndex)&&(n=e)}return n?.severity??`warning`}function Qde(e,t,n){let[r,i]=e.errorRange??[1,null],a=e.lineNumber-1,o=(r??1)-1,s=t[a]?.length??0,c=i==null?s:Math.min(o+i,s),l=e.fixInfo?[$de(e.fixInfo,e.lineNumber,t)]:void 0;return{range:{start:{line:a,character:o},end:{line:a,character:Math.max(c,o)}},severity:n,source:`markdownlint`,code:e.ruleNames[0]??`MD000`,message:e.errorDetail?`${e.ruleDescription}: ${e.errorDetail}`:e.ruleDescription,...l?{fixes:l}:{}}}function $de(e,t,n){let r=e.lineNumber??t,i=r-1;if(e.deleteCount===-1){if(r<n.length)return{range:{start:{line:i,character:0},end:{line:i+1,character:0}},newText:``};if(i>0){let e=n[i-1]?.length??0;return{range:{start:{line:i-1,character:e},end:{line:i,character:n[i]?.length??0}},newText:``}}return{range:{start:{line:0,character:0},end:{line:0,character:n[0]?.length??0}},newText:``}}let a=(e.editColumn??1)-1;return{range:{start:{line:i,character:a},end:{line:i,character:a+Math.max(0,e.deleteCount??0)}},newText:e.insertText??``}}var B5=[`no-wiki-links`,`log-shape`,`index-shape`,`reserved-casing`,`frontmatter-required`,`frontmatter-recommended`,`frontmatter-provenance`,`frontmatter-computation`,`frontmatter-reserved-index`,`frontmatter-root-index`,`project-no-mdx`];function V5(e,t){return e?.[t]!==!1}var efe=[{id:`structure`,ids:[`no-wiki-links`,`log-shape`,`index-shape`,`reserved-casing`]},{id:`frontmatter`,ids:[`frontmatter-required`,`frontmatter-recommended`,`frontmatter-provenance`,`frontmatter-computation`,`frontmatter-reserved-index`,`frontmatter-root-index`]},{id:`project`,ids:[`project-no-mdx`]}];function tfe(e){throw Error(`Unhandled OkfRuleId variant: ${JSON.stringify(e)}`)}function nfe(e){throw Error(`Unhandled OkfRuleGroupId variant: ${JSON.stringify(e)}`)}var rfe=`.ok/okf`;function ife(e){return`${e.replace(/^frontmatter-/,``)}.schema.json`}function H5(e){return`${rfe}/${ife(e)}`}var afe={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — required frontmatter`,description:"The OKF v0.2 conformance floor. A bundle is conformant when every non-reserved .md file contains a parseable YAML frontmatter block whose `type` is non-empty. This schema is the whole of that floor: a concept carrying only `type` is fully conformant. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#11-conformance",type:`object`,required:[`type`],properties:{type:{type:`string`,pattern:`\\S`,description:"REQUIRED, and the only always-required key in OKF. A short string identifying the kind of concept; consumers use it for routing, filtering, and presentation. Type values are not registered centrally — pick something descriptive and self-explanatory (`BigQuery Table`, `BigQuery Dataset`, `API Endpoint`, `Metric`, `Playbook`, `Reference`, `Attested Computation`). Consumers must tolerate unknown types, typically by treating them as generic concepts. The `\\S` pattern is what makes §11 rule 2 mean what it says, and it replaces a `minLength` rather than joining one: a length check alone accepts a whitespace-only value that no consumer can route on, and having both would report one mistake twice. OKF v0.2 §4.1, §11."}}},ofe={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — recommended frontmatter`,description:"Shapes for the OKF v0.2 recommended keys. Every key here is optional, and nothing is constrained beyond the shape OKF states: declaring a key pins its YAML type when present (so `tags` written as a comma-separated string warns) and advertises it to agents at read time. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#41-frontmatter",type:`object`,properties:{title:{type:`string`,description:`Human-readable display name. If omitted, consumers MAY derive a title from the filename. OKF v0.2 §4.1.`},description:{type:`string`,description:"A single sentence summarizing the concept. Used by `index.md` generators, search snippets, and previews. OKF v0.2 §4.1."},resource:{type:`string`,format:`uri-reference`,description:"A URI that uniquely identifies the underlying asset the concept describes. Absent for concepts that describe abstract ideas rather than physical resources. Path-valued: an absolute URL, a bundle-relative path beginning with `/`, or an ordinary relative path — hence `uri-reference`, not `uri`, which would reject `/tables/customers.md`. OKF v0.2 §4.1, §6.2."},tags:{type:`array`,items:{type:`string`},description:`A YAML list of short strings for cross-cutting categorization. Tags stay a first-class concept through this field; OKF specifies no separate per-tag file format, so a consumer that wants a tag-browsing view synthesizes one by scanning frontmatter. OKF v0.2 §3.1, §4.1.`},timestamp:{description:"LEGACY (OKF v0.1), superseded by `generated.at` in v0.2 — one of the two deliberate breaking changes. Consumers MAY fall back to it when `generated` is absent; new documents SHOULD write `generated: { by, at }` instead. Documented here so agents are told what it is and what replaced it, but deliberately left unconstrained: v0.2 does not define it as a producer field, so validating its shape would be a rule OKF no longer has. OKF v0.2 §5.2, §13.1."}}},sfe={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — provenance, trust, and lifecycle frontmatter`,description:'The optional OKF v0.2 families that make "where did this come from", "how much should I trust it", and "is it still current" answerable from frontmatter alone. Every key is optional, and absence carries meaning rather than being an error: a concept with no `verified` is unverified, and a consumer must not reject it. Only `sources[].resource` and `generated.by` are required-when-their-parent-is-present, because those are the two fields OKF marks REQUIRED in this family; every other field is described but not mandated, so nothing else is enforced. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#5-provenance-trust-and-lifecycle',type:`object`,properties:{sources:{type:`array`,description:"The materials this concept derives from, external or internal to the bundle. Lineage is expressed through links rather than a dedicated field: when an entry's `resource` points at another OKF concept, the derivation edge already exists in the bundle graph, so a consumer may recurse into that source's own `sources`. OKF v0.2 §5.1.",items:{type:`object`,required:[`resource`],properties:{resource:{type:`string`,description:"REQUIRED within an entry. Either a concrete artifact a consumer can follow (an absolute URL, a bundle-relative path, or a path into a `references/` subdirectory) or a population or scope descriptor it cannot, for example `all queries in BigQuery project X`. Deliberately NOT format-constrained: a scope descriptor is prose, so a `uri-reference` check here would warn on conformant documents. OKF v0.2 §5.1, §6.2, §6.3."},id:{type:`string`,description:"Optional. A stable key used to attribute individual claims: a markdown footnote whose label is this id (`[^ga4-schema]`) attributes the claim it follows. SHOULD be present when the body cites the source. Keyed rather than positional because agents constantly rewrite these documents — a positional index misattributes silently the moment the list is reordered. OKF v0.2 §5.1."},title:{type:`string`,description:`Optional. Human-readable label for the source. OKF v0.2 §5.1.`},author:{type:`string`,description:"Optional credibility signal — an authority signal: who or what produced the source. OKF describes this as following the actor convention (§7), but its own examples use a `team:<id>` prefix that the three §7 forms do not cover, so no pattern is enforced. OKF v0.2 §5.1, §7."},usage_count:{type:`integer`,description:"Optional credibility signal — an adoption and liveness signal: how often `resource` was exercised (dashboard views, query executions, page reads) over `usage_window`. For a single artifact it is that artifact's own exercise count; for a scope descriptor it is the number of exercises within the scope that touch the concept. Coarse by design: comparable at the alive-versus-dead and order-of-magnitude level and against a source's own history, but not a precise cross-kind ranking. Read as liveness and trend, not as a score. OKF v0.2 §5.1."},last_modified:{type:`string`,format:`date-time`,description:"Optional credibility signal — a recency signal: when the source itself last changed, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-15T00:00:00Z`). Distinct from `generated.at`, which records when the concept was written. OKF v0.2 §5, §5.1."},usage_window:{type:`object`,description:"Optional per-entry override of the `usage_window` written as a sibling of `sources`. OKF v0.2 §5.1.",properties:{from:{type:`string`,format:`date-time`,description:"Start of the window framing this entry's `usage_count`, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-01T00:00:00Z`). OKF v0.2 §5, §5.1."},to:{type:`string`,format:`date-time`,description:"End of the window framing this entry's `usage_count`, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-30T00:00:00Z`). OKF v0.2 §5, §5.1."}}}}}},usage_window:{type:`object`,description:"Written once as a sibling of `sources`, this frames every `usage_count` in the list with a `{ from, to }` range. A single entry may carry its own `usage_window` to override it. OKF v0.2 §5, §5.1.",properties:{from:{type:`string`,format:`date-time`,description:"Start of the shared usage window, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-01T00:00:00Z`). OKF v0.2 §5, §5.1."},to:{type:`string`,format:`date-time`,description:"End of the shared usage window, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-30T00:00:00Z`). OKF v0.2 §5, §5.1."}}},generated:{type:`object`,required:[`by`],description:"How the current content was produced. Kept distinct from `verified` because who wrote a concept need not be who confirmed it. OKF v0.2 §5.2.",properties:{by:{type:`string`,description:"REQUIRED within `generated`. An actor in the OKF convention: `<producer>/<version>` for agents and tools (`reference_agent/gemini-2.5-pro`), `human:<id>` for a person (`human:ahormati`), or `process:<id>` for an automated process (`process:finance-nightly`). Consumers that classify trust key off the `human:` prefix, so producers MUST use it for hand-authored or human-confirmed content — a rule about which form to pick for which content, which frontmatter alone cannot check, so the three forms are documented here rather than enforced by a pattern. OKF v0.2 §5.2, §7."},at:{type:`string`,format:`date-time`,description:"An ISO 8601 datetime with an explicit UTC offset (`2026-06-30T14:00:00Z`) marking the content's last meaningful change. Consumers use it to tell a recent edit from a stale fact. Supersedes v0.1's top-level `timestamp`. OKF v0.2 §5, §5.2, §13.1."}}},verified:{description:'Who or what has confirmed the content against its sources or `resource` — a list of verification events. Multiple entries capture independent checks, for example a human sign-off plus a nightly process; "how recently" is the latest `at`. Independent of `generated.at`: content can change without re-confirmation, and facts can be re-confirmed without regeneration. A single verifier MAY be written as one bare `{ by, at }` mapping without the list dash, and consumers MUST treat that as a one-element list — hence the two accepted shapes here. Absence means unverified, which is a valid state, never a rejection. OKF v0.2 §5.2, §5.3, §11.',anyOf:[{type:`object`,description:`The bare single-verifier mapping form. OKF v0.2 §5.2.`,properties:{by:{type:`string`,description:"The verifying actor: `<producer>/<version>`, `human:<id>`, or `process:<id>`. A `human:` verifier is what raises the trust tier to human-reviewed; non-human verifiers alone yield machine-confirmed. OKF v0.2 §5.2, §5.3, §7."},at:{type:`string`,format:`date-time`,description:"An ISO 8601 datetime with an explicit UTC offset (`2026-07-01T09:00:00Z`) recording when the verification event happened. OKF v0.2 §5, §5.2."}}},{type:`array`,description:`The list form: one entry per independent verification event. OKF v0.2 §5.2.`,items:{type:`object`,properties:{by:{type:`string`,description:"The verifying actor: `<producer>/<version>`, `human:<id>`, or `process:<id>`. A `human:` verifier is what raises the trust tier to human-reviewed; non-human verifiers alone yield machine-confirmed. OKF v0.2 §5.2, §5.3, §7."},at:{type:`string`,format:`date-time`,description:"An ISO 8601 datetime with an explicit UTC offset (`2026-07-01T09:00:00Z`) recording when the verification event happened. OKF v0.2 §5, §5.2."}}}}]},status:{enum:[`draft`,`stable`,`deprecated`],description:"Lifecycle state. `draft` = not yet reviewed, possibly incomplete. `stable` = ready for consumption. `deprecated` = kept for links and history, no longer current. Absent means `stable`, so the key is only worth writing to say draft or deprecated. These three values are the whole set OKF defines, which is why this is the pack's only enum. OKF v0.2 §5.4."},stale_after:{type:`string`,format:`date-time`,description:"An absolute instant, an ISO 8601 datetime with an explicit UTC offset (`2026-12-31T00:00:00Z`): the concept is stale when `now >= stale_after`. Absolute rather than a relative TTL so staleness stays a plain comparison with no reference to when the concept was read. An instant in the past is a freshness signal for consumers, not a violation. OKF v0.2 §5, §5.5, §10.5."}}},cfe={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — Attested Computation frontmatter`,description:'Shapes for the OKF v0.2 computation keys, which turn a concept into a sanctioned way to compute a value so a consumer can confirm the agent ran the blessed computation instead of improvising its own. Provenance answers "where did this claim come from"; attestation answers "was this number produced the way we said it must be". This file also carries the one value-shaped rule in the pack: `runtime` is the single key OKF marks REQUIRED here, and only when `type` is `Attested Computation`. Ordinary concepts never match that condition and are unaffected, and no other key in the family is mandated. OKF records the computation and the means to check it and executes nothing itself; receipts and verdicts are runtime artifacts that are never stored in the bundle. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#10-attested-computations-concept',type:`object`,if:{required:[`type`],properties:{type:{const:`Attested Computation`,description:"The condition, not a constraint: everything in `then` applies only to documents whose `type` is exactly `Attested Computation`. An ordinary concept never matches, so nothing in this schema is ever asked of it. `type` is also required inside the condition so a document with no type at all fails the conformance floor once, rather than also being told it is missing a `runtime` for a type it never claimed."}}},then:{required:[`runtime`]},properties:{runtime:{type:`string`,description:"REQUIRED for `type: Attested Computation`. The single field that says how to run the computation, and therefore how the executor and attester interpret it and what `parameters` mean — a parameter is a SQL bind variable, a dbt var, or a Python argument depending on the runtime. Keeping `runtime` and `parameters` in one frontmatter is what makes the binding semantics self-evident. Example values: `bigquery`, `postgres`, `dbt`, `python`, `Looker`. Not a closed set, so no enum. OKF v0.2 §10.1, §10.2."},parameters:{type:`array`,description:`The typed, named holes the agent may fill. An agent MAY only supply values for these parameters; it MUST NOT author or edit the computation. That parameter-only surface is what makes "did the sanctioned thing run" a mechanical comparison rather than a judgement call. OKF v0.2 §10.2, §10.3.`,items:{type:`object`,properties:{name:{type:`string`,description:"The parameter name the computation binds, for example `year` bound as `@year` in BigQuery SQL or `{{ var('year') }}` in dbt. OKF v0.2 §10.2, §10.3."},type:{type:`string`,description:"The parameter's type, interpreted by `runtime` (`integer`, `string`, and so on). Deliberately not constrained to JSON Schema type names, because the vocabulary belongs to the runtime. OKF v0.2 §10.2."},required:{type:`boolean`,description:`Whether the agent must supply a value for this parameter. OKF v0.2 §10.2.`}}}},computation:{type:`string`,format:`uri-reference`,description:"Optional. A path to a file holding the computation, used instead of an inline body fence — best for a long or generated computation, or one already kept as a real file shared with non-OKF tooling. When absent, the body's `# Computation` fence IS the computation. Path-valued: an absolute URL, a bundle-relative path beginning with `/`, or a relative path. OKF v0.2 §6.2, §10.2, §10.3."},executor:{type:`object`,description:"How the computation is run. A runner — an agent, or deterministic consumer code — follows `resource`, and the run returns a receipt shaped by `receipt`. Binding the computation with the parameter values into the executable artifact is the consumer's job. OKF v0.2 §10.2, §10.5.",properties:{resource:{type:`string`,format:`uri-reference`,description:"Names the run instructions or code. What sits behind it — a Skill, a script, a container — is a packaging choice; OKF fixes the interface, not the packaging. Conventionally points into a `references/` subdirectory, for example `references/skills/run-on-bq.md`. OKF v0.2 §1, §6.2, §6.3, §10.2."},receipt:{type:`array`,items:{type:`string`},description:"Declares the fields a run must return — the evidence the attester inspects, for example `[job_id, executed_sql, result]` for BigQuery or `[run_id, compiled_sql, result]` for dbt. Because the attester compares the expanded, compiled artifact the receipt carries, a rewritten query, a swapped computation file, or a mutated dependency fails the check. The receipt itself is a runtime artifact and is never stored in the bundle. OKF v0.2 §10.2, §10.3, §10.5."}}},attester:{type:`object`,description:"The deterministic check that inspects a receipt and returns a verdict. Meant to run consumer-side. Distinct from `verified`: `verified` confirms the definition still matches policy and is recorded in the bundle, while attestation confirms a single run produced the value the sanctioned way and is not stored. OKF v0.2 §10.2, §10.6.",properties:{resource:{type:`string`,format:`uri-reference`,description:"Names code — no LLM — that takes a receipt and returns a verdict, independently re-deriving the binding of `computation` with the claimed parameter values to compare against what actually ran. Conventionally points into a `references/` subdirectory, for example `references/attesters/sql-equality.py`. OKF v0.2 §6.2, §6.3, §10.2, §10.3."}}}}},lfe={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — index files carry no frontmatter`,description:"`index.md` is a reserved filename at any level of the hierarchy and must not be used for a concept document. Index files contain no frontmatter, with exactly one exception — a bundle-root `index.md` may carry `okf_version` — which the scope carves out with a `!index` exclusion rather than a keyword here. `maxProperties: 0` is the mechanism rather than the boolean schema `false`, because a document with no frontmatter block validates as `{}` and `false` would reject that too, flagging the very documents that are correct. `log.md` is deliberately NOT covered: §9 constrains a log's date headings, ordering, and prose entries but never its frontmatter, and OKF's own reference bundle ships a `log.md` carrying `type` and `title`. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#8-index-files",type:`object`,maxProperties:0},ufe={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — bundle-root index.md`,description:"The bundle-root `index.md` is the only index file OKF permits frontmatter in, and `okf_version` is the key it names there. OKF states the declaration as a MAY, so it is not required here. Nor is the frontmatter closed to other keys: §8 grants the exception for `okf_version` specifically, but §11 tells consumers not to reject a bundle over unknown additional keys, and that ambiguity is resolved in favor of the looser reading. The one thing pinned is the value's shape, because a YAML float is provably lossy where a version string is not. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#12-versioning",type:`object`,properties:{okf_version:{type:`string`,pattern:`^[0-9]+\\.[0-9]+$`,description:'The OKF version this bundle targets, as `<major>.<minor>` — currently `"0.2"`. Quote it: unquoted `0.2` parses as a YAML number, so a consumer comparing version strings sees a float instead, and `0.10` would silently become `0.1`. A minor bump is backward-compatible additions; a major bump may rename required fields or change reserved filenames. Consumers that do not understand the declared version should attempt best-effort consumption rather than refusing the bundle. OKF v0.2 §12.'}}},U5=[`**`,`!**/{index,log}`],W5=[{id:`frontmatter-required`,appliesTo:U5,schema:afe},{id:`frontmatter-recommended`,appliesTo:U5,schema:ofe},{id:`frontmatter-provenance`,appliesTo:U5,schema:sfe},{id:`frontmatter-computation`,appliesTo:U5,schema:cfe},{id:`frontmatter-reserved-index`,appliesTo:[`**/index`,`!index`],schema:lfe},{id:`frontmatter-root-index`,appliesTo:[`index`],schema:ufe}],dfe=Object.fromEntries(B5.filter(e=>!W5.some(t=>t.id===e)).map(e=>[e,!1]));function G5(e,t){return t===void 0?[]:W5.filter(n=>V5(e,n.id)&&O5([...n.appliesTo]).matches(t))}function ffe(e){return W5.filter(t=>V5(e,t.id)).map(e=>({appliesTo:[...e.appliesTo],file:H5(e.id)}))}function pfe(e,t,n){let r=G5(t,n);return r.length===0?[]:R5(e,r.map(e=>({file:H5(e.id),schema:e.schema,ruleId:e.id})),{source:`okf`})}function K5(e,t){return SG(`okf:${e}`,(n,r)=>{try{t(n,r)}catch(t){console.warn(`[lint] OKF rule "${e}" failed${r.data.okfDocName?` on "${r.data.okfDocName}"`:``}`,t)}})}function q5(e,t,n){let r=O5(t);return K5(e,(e,t)=>{r.matches(t.data.okfDocName)&&n(e,t)})}var J5=e=>({line:e.line-1,character:e.column-1});function mfe(e,t){if(e&&`start`in e)return{start:J5(e.start),end:J5(e.end)};if(e){let n=J5(e);return{start:n,end:{line:n.line,character:t[n.line]?.length??0}}}return{start:{line:0,character:0},end:{line:0,character:t[0]?.length??0}}}function hfe(e,t){return{range:mfe(e.place,t),severity:`warning`,source:`okf`,code:e.ruleId??`okf`,message:e.reason}}function gfe(e,t,n){if(t.length===0)return[];let r=le().use(ge).use(ve).use(oF,[`yaml`]);for(let e of t)r.use(e);let i=new ne({value:e});n!==void 0&&(i.data.okfDocName=n);let a=r.parse(i);r.runSync(a,i);let o=e.split(`
|
|
597
|
-
`);return i.messages.map(e=>
|
|
598
|
-
`?(c+=1,l=1):l+=1;return{line:c,column:l}};for(let e of o.matchAll(Tfe)){let{index:i}=e;if((a===void 0?o[i-1]:n[a+i-1])===`!`)continue;let s=r&&a!==void 0?{start:u(i),end:u(i+e[0].length)}:void 0;t.message(Efe(e[0]),s)}})}),Ofe=[`index`,`log`],kfe=K5(`reserved-casing`,(e,t)=>{let n=t.data.okfDocName;if(n===void 0)return;let r=Y$(n),i=r.toLowerCase();Ofe.includes(i)&&r!==i&&t.message(`This file is named "${r}", but the Open Knowledge Format only recognizes "${i}". On a case-sensitive filesystem a consumer reads it as an ordinary concept document rather than the reserved file it is meant to be.`)}),X5=[{id:`no-wiki-links`,rule:Dfe},{id:`log-shape`,rule:wfe},{id:`index-shape`,rule:yfe},{id:`reserved-casing`,rule:kfe}],Afe=X5.map(e=>e.rule);function jfe(e){return e===void 0?Afe:X5.filter(t=>V5(e,t.id)).map(e=>e.rule)}var Mfe=Xa([P(),R(xm),no(M(),Ua())]),Nfe={id:`markdownlint`,sliceSchema:I({enabled:P(),rules:no(M(),Mfe)}),defaultSlice:{enabled:!1,rules:T5},async lint(e,t){return Yde(e,E5(t.rules))},fix(e,t){return Jde(e,E5(t.rules))}},Pfe=I({appliesTo:Xa([M(),F(M())]).optional(),file:M(),enabled:P().optional(),key:M().optional(),schema:no(M(),Ua()).optional()}),Z5=[Nfe,{id:`frontmatter`,sliceSchema:I({enabled:P(),schemas:F(Pfe)}),defaultSlice:{enabled:!1,schemas:[]},async lint(e,t,n){return R5(e,j5(t.schemas,n.docName))},frontmatter:{schemasForDoc:(e,t)=>j5(e.schemas,t),narrowSliceToFrontmatter:e=>e,advertisedMappings:e=>e.schemas}},{id:`okf`,sliceSchema:I({enabled:P(),rules:no(M(),P()).optional(),generate:I({index:P().optional()}).optional()}),defaultSlice:{enabled:!1},async lint(e,t,n){return[...gfe(e,jfe(t.rules),n.docName),...pfe(e,t.rules,n.docName)]},frontmatter:{schemasForDoc:(e,t)=>G5(e.rules,t),narrowSliceToFrontmatter:e=>({...e,rules:{...e.rules,...dfe}}),advertisedMappings:e=>ffe(e.rules)}}],Ffe={enabled:!0,plugins:Object.fromEntries(Z5.map(e=>[e.id,e.defaultSlice]))};function Ife(e,t){return e.enabled&&e.plugins[t]?.enabled===!0}function Lfe(e,t){if(!e?.enabled||t===void 0||t===``)return[];let n=[];for(let r of Z5){if(r.frontmatter===void 0)continue;let i=e.plugins[r.id];i?.enabled===!0&&n.push(...r.frontmatter.schemasForDoc(i,t))}return n}function Rfe(e){let t=Object.fromEntries(Z5.map(t=>{let n=e.plugins[t.id]??t.defaultSlice;return t.frontmatter===void 0?[t.id,{...n,enabled:!1}]:[t.id,t.frontmatter.narrowSliceToFrontmatter(n)]}));return{...e,plugins:t}}var zfe=new Set([`.markdownlint.json`,`.markdownlint.jsonc`]);function Bfe(e){return zfe.has(e)}I({docName:X2,summary:$2,content:M().optional(),...Q2}).loose(),I({docName:X2,summary:$2,markdown:M(),position:R([`append`,`prepend`,`replace`]).optional(),extension:R(I$).optional(),...Q2}).loose(),I({docName:X2,summary:$2,find:M().min(1),replace:M(),offset:N().int().nonnegative().optional(),...Q2}).loose(),I({docName:X2,connectionId:M().min(1),scope:R([`last`,`session`,`file`,`count`]).optional(),count:N().int().positive().optional(),...Q2}).loose().refine(e=>e.scope!==`count`||e.count!==void 0,{message:`count is required when scope is 'count'`,path:[`count`]});var Q5=I({value:M(),truncatedFrom:N().int().nonnegative().optional(),hint:M().optional()}).loose(),Vfe=Qa(`kind`,[I({kind:z(`inline`),content:M()}),I({kind:z(`truncated`),byteLength:N().int().nonnegative(),hint:M()})]),$5=I({kind:z(`content-divergence`),intendedBytes:N().int().nonnegative(),actualBytes:N().int().nonnegative(),byteDelta:N().int(),divergenceType:M().optional(),currentState:Vfe.optional(),hint:M().optional()}).loose(),Hfe=I({type:z(`orphan`),parentCandidates:F(M()),message:M()}).loose(),e7=I({kind:z(`disk-edit-reconciled`),intendedBytes:N().int().nonnegative(),actualBytes:N().int().nonnegative(),byteDelta:N().int(),mergeOutcome:M().optional(),hint:M().optional()}).loose();Qa(`kind`,[$5,e7]);var Ufe=I({kind:z(`mermaid-parse-error`),fenceIndex:N().int().positive(),fenceFirstLine:M(),message:M(),line:N().int().positive().optional()}).loose(),t7=I({href:M(),targetKind:M(),role:M(),sourceForm:M(),resolvedTarget:M().nullable(),reason:M(),resolutionMethod:M(),fallbackTarget:M().nullable().optional(),definition:I({line:N().int().nonnegative(),label:M()}).loose().optional()}).loose(),n7=F(Qa(`kind`,[$5,e7,Ufe,I({kind:z(`lint-violation`),source:M(),code:M(),message:M(),severity:R([`error`,`warning`,`info`,`hint`]),line:N().int().positive(),column:N().int().positive(),linkTarget:M().optional(),localTarget:t7.optional()}).loose()])).min(1),r7=F(I({href:M(),resolvedTo:M().nullable(),reason:R([`no-such-doc`,`no-such-file`,`unresolvable`]),localTarget:t7.optional()}).loose()),i7=I({reason:M().min(1),count:N().int().positive()}).loose();I({timestamp:M().min(1),summary:Q5.optional(),warnings:n7.optional()}).loose(),I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),hints:F(Hfe).optional(),summary:Q5.optional(),warnings:n7.optional(),brokenLinks:r7,brokenLinkSuppression:i7.optional()}).loose(),I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),summary:Q5.optional(),warnings:n7.optional(),brokenLinks:r7,brokenLinkSuppression:i7.optional()}).loose(),I({docName:M().min(1),scope:R([`last`,`session`,`count`]),undone:P()}).loose(),I({docs:F(I({docName:Z2,markdown:M(),position:R([`append`,`prepend`,`replace`]).optional(),extension:R(I$).optional(),summary:$2}).loose()).min(1).max(100),...Q2}).loose();var Wfe=I({type:y4,title:M(),detail:M().optional()}).loose(),Gfe=Qa(`status`,[I({status:z(`written`),docName:M().min(1),summary:Q5.optional(),warnings:n7.optional(),brokenLinks:r7,brokenLinkSuppression:i7.optional()}).loose(),I({status:z(`error`),docName:M().min(1),error:Wfe}).loose()]);I({timestamp:M().min(1),results:F(Gfe),written:N().int().nonnegative(),failed:N().int().nonnegative()}).loose(),I({docName:X2,patch:no(M(),Xa([Ad,Va()])),types:no(M(),R(Dd)).optional(),summary:$2,...Q2}).loose(),I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),appliedKeys:F(M()),summary:Q5.optional(),warnings:n7.optional(),brokenLinks:r7,brokenLinkSuppression:i7.optional()}).loose();function Kfe(e){return{enabled:e.enabled??!0,plugins:{markdownlint:{...e.markdownlint,rules:e.markdownlint.rules??T5},frontmatter:{enabled:e.frontmatter?.enabled??!1,schemas:e.frontmatter?.schemas??[]},okf:{enabled:e.okf?.enabled??!1,...e.okf?.rules===void 0?{}:{rules:e.okf.rules},generate:{index:e.okf?.generate?.index??!1}}}}}var qfe=Object.fromEntries(Z5.map(e=>[e.id,e.sliceSchema])),Jfe=I({effective:I({enabled:P(),plugins:I(qfe)}),configFile:M().nullable().optional(),configProblems:F(M()).optional()}),Yfe=Xa([P(),no(M(),Ua())]),Xfe=new Set([`__proto__`]),a7=M().min(1).max(256).refine(e=>!Xfe.has(e),{message:`schema property name cannot be __proto__`});I({ruleId:M().min(1).max(64).regex(/^[A-Za-z][A-Za-z0-9_-]*$/),value:Xa([Yfe,Va()])}),I({file:M().min(1).max(512),delete:z(!0).optional(),field:a7.optional(),parentPath:F(Xa([a7,I({items:z(!0)}).strict()])).max(8).optional(),removeField:z(!0).optional(),renameTo:a7.optional(),constraint:I({type:R([`string`,`number`,`boolean`,`array`,`object`]).nullable().optional(),enum:F(Xa([M(),N(),P()])).nullable().optional(),itemsEnum:F(Xa([M(),N(),P()])).nullable().optional(),itemsType:R([`string`,`number`,`boolean`,`object`]).nullable().optional(),pattern:M().nullable().optional(),format:M().nullable().optional(),description:M().max(2048).nullable().optional(),required:P().optional()}).optional()}).refine(e=>e.delete===void 0||e.field===void 0&&e.constraint===void 0&&e.removeField===void 0&&e.renameTo===void 0,{message:`delete cannot be combined with a field edit`}).refine(e=>[e.constraint,e.removeField,e.renameTo].filter(e=>e!==void 0).length<=1,{message:`constraint, removeField, and renameTo are mutually exclusive`}).refine(e=>e.removeField===void 0&&e.renameTo===void 0||e.field!==void 0,{message:`removeField and renameTo require field`}).refine(e=>e.parentPath===void 0||e.field!==void 0,{message:`parentPath requires field`}).refine(e=>e.field===void 0?e.constraint===void 0:e.constraint!==void 0||e.removeField!==void 0||e.renameTo!==void 0,{message:`field requires constraint, removeField, or renameTo`});var Zfe=I({schemas:F(M()),truncated:P()}).strict(),o7=I({line:N(),character:N()}),s7=I({start:o7,end:o7}),c7=I({range:s7,severity:R([`error`,`warning`,`info`,`hint`]),source:M(),code:M(),message:M(),fixes:F(I({range:s7,newText:M()})).optional(),frontmatterScope:R(_m).optional(),frontmatterProperty:M().optional()}),l7=F(M()).optional();I({files:F(I({file:M(),diagnostics:F(c7),ran:l7,warnings:F(M()).optional()})),fileCount:N(),errorCount:N(),warningCount:N(),warnings:F(M()),ran:l7});var Qfe=c7.extend({linkTarget:M().optional(),localTarget:t7.optional()}),$fe=I({files:F(I({file:M(),diagnostics:F(Qfe)})),fileCount:N(),errorCount:N(),warningCount:N(),warnings:F(M()),ran:l7,brokenLinkSuppression:i7.optional()}),u7=I({errorCount:N().int().nonnegative(),warningCount:N().int().nonnegative()}),epe=I({files:F(I({file:M(),lint:u7,links:u7})),fileCount:N().int().nonnegative(),errorCount:N().int().nonnegative(),warningCount:N().int().nonnegative(),warnings:F(M()),brokenLinkSuppression:i7.optional()});I({docName:X2,summary:$2,...Q2}).loose();var tpe=I({reason:R([`re-lint-threw`,`source-went-blind`]),message:M().min(1)}),npe=I({file:M(),fixedCount:N(),diagnostics:F(c7),errorCount:N(),warningCount:N(),ran:l7,warnings:F(M()).optional(),diagnosticsArePreFix:P().optional(),reLintFailure:tpe.optional()});function rpe(e){let t=e.trim().replace(/^\.\//,``);if(!t.startsWith(`.ok/schemas/`))return!1;let n=t.slice(12);return n.length>0&&!n.includes(`/`)&&!n.includes(`\\`)&&n!==`.`&&n!==`..`}function ipe(e){let t=e.trim().toLowerCase().split(`/`).pop()??``;return t.endsWith(`.schema.json`)&&t.length>12?!0:rpe(e)&&t.endsWith(`.json`)}var d7=[{id:`MD001`,alias:`heading-increment`,aliases:[`heading-increment`],name:`Heading levels should only increment by one level at a time`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md001.md`,tags:[`headings`],options:[{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`}]},{id:`MD003`,alias:`heading-style`,aliases:[`heading-style`],name:`Heading style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md003.md`,tags:[`headings`],options:[{key:`style`,type:`enum`,description:`Heading style`,enum:[`consistent`,`atx`,`atx_closed`,`setext`,`setext_with_atx`,`setext_with_atx_closed`],default:`consistent`}]},{id:`MD004`,alias:`ul-style`,aliases:[`ul-style`],name:`Unordered list style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md004.md`,tags:[`bullet`,`ul`],options:[{key:`style`,type:`enum`,description:`List style`,enum:[`consistent`,`asterisk`,`plus`,`dash`,`sublist`],default:`consistent`}]},{id:`MD005`,alias:`list-indent`,aliases:[`list-indent`],name:`Inconsistent indentation for list items at the same level`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md005.md`,tags:[`bullet`,`ul`,`indentation`],options:[]},{id:`MD007`,alias:`ul-indent`,aliases:[`ul-indent`],name:`Unordered list indentation`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md007.md`,tags:[`bullet`,`ul`,`indentation`],options:[{key:`indent`,type:`integer`,description:`Spaces for indent`,default:2,minimum:1},{key:`start_indented`,type:`boolean`,description:`Whether to indent the first level of the list`,default:!1},{key:`start_indent`,type:`integer`,description:`Spaces for first level indent (when start_indented is set)`,default:2,minimum:1}]},{id:`MD009`,alias:`no-trailing-spaces`,aliases:[`no-trailing-spaces`],name:`Trailing spaces`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md009.md`,tags:[`whitespace`],options:[{key:`br_spaces`,type:`integer`,description:`Spaces for line break`,default:2,minimum:0},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!1},{key:`list_item_empty_lines`,type:`boolean`,description:`Allow spaces for empty lines in list items`,default:!1},{key:`strict`,type:`boolean`,description:`Include unnecessary breaks`,default:!1}]},{id:`MD010`,alias:`no-hard-tabs`,aliases:[`no-hard-tabs`],name:`Hard tabs`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md010.md`,tags:[`whitespace`,`hard_tab`],options:[{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`ignore_code_languages`,type:`string-array`,description:`Fenced code languages to ignore`,default:[]},{key:`spaces_per_tab`,type:`integer`,description:`Number of spaces for each hard tab`,default:1,minimum:0}]},{id:`MD011`,alias:`no-reversed-links`,aliases:[`no-reversed-links`],name:`Reversed link syntax`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md011.md`,tags:[`links`],options:[]},{id:`MD012`,alias:`no-multiple-blanks`,aliases:[`no-multiple-blanks`],name:`Multiple consecutive blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md012.md`,tags:[`whitespace`,`blank_lines`],options:[{key:`maximum`,type:`integer`,description:`Consecutive blank lines`,default:1,minimum:1}]},{id:`MD013`,alias:`line-length`,aliases:[`line-length`],name:`Line length`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md013.md`,tags:[`line_length`],options:[{key:`line_length`,type:`integer`,description:`Number of characters`,default:80,minimum:1},{key:`heading_line_length`,type:`integer`,description:`Number of characters for headings`,default:80,minimum:1},{key:`code_block_line_length`,type:`integer`,description:`Number of characters for code blocks`,default:80,minimum:1},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`tables`,type:`boolean`,description:`Include tables`,default:!0},{key:`headings`,type:`boolean`,description:`Include headings`,default:!0},{key:`strict`,type:`boolean`,description:`Strict length checking`,default:!1},{key:`stern`,type:`boolean`,description:`Stern length checking`,default:!1}]},{id:`MD014`,alias:`commands-show-output`,aliases:[`commands-show-output`],name:`Dollar signs used before commands without showing output`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md014.md`,tags:[`code`],options:[]},{id:`MD018`,alias:`no-missing-space-atx`,aliases:[`no-missing-space-atx`],name:`No space after hash on atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md018.md`,tags:[`headings`,`atx`,`spaces`],options:[]},{id:`MD019`,alias:`no-multiple-space-atx`,aliases:[`no-multiple-space-atx`],name:`Multiple spaces after hash on atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md019.md`,tags:[`headings`,`atx`,`spaces`],options:[]},{id:`MD020`,alias:`no-missing-space-closed-atx`,aliases:[`no-missing-space-closed-atx`],name:`No space inside hashes on closed atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md020.md`,tags:[`headings`,`spaces`,`atx_closed`],options:[]},{id:`MD021`,alias:`no-multiple-space-closed-atx`,aliases:[`no-multiple-space-closed-atx`],name:`Multiple spaces inside hashes on closed atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md021.md`,tags:[`headings`,`spaces`,`atx_closed`],options:[]},{id:`MD022`,alias:`blanks-around-headings`,aliases:[`blanks-around-headings`],name:`Headings should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md022.md`,tags:[`headings`,`blank_lines`],options:[{key:`include_front_matter`,type:`boolean`,description:`Include front matter content`,default:!1},{key:`lines_above`,type:`unsupported`,description:`Blank lines above heading`,default:1},{key:`lines_below`,type:`unsupported`,description:`Blank lines below heading`,default:1}]},{id:`MD023`,alias:`heading-start-left`,aliases:[`heading-start-left`],name:`Headings must start at the beginning of the line`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md023.md`,tags:[`headings`,`spaces`],options:[]},{id:`MD024`,alias:`no-duplicate-heading`,aliases:[`no-duplicate-heading`],name:`Multiple headings with the same content`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md024.md`,tags:[`headings`],options:[{key:`siblings_only`,type:`boolean`,description:`Only check sibling headings`,default:!1}]},{id:`MD025`,alias:`single-title`,aliases:[`single-title`,`single-h1`],name:`Multiple top-level headings in the same document`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md025.md`,tags:[`headings`],options:[{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`},{key:`level`,type:`integer`,description:`Heading level`,default:1,minimum:1,maximum:6}]},{id:`MD026`,alias:`no-trailing-punctuation`,aliases:[`no-trailing-punctuation`],name:`Trailing punctuation in heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md026.md`,tags:[`headings`],options:[{key:`punctuation`,type:`string`,description:`Punctuation characters`,default:`.,;:!。,;:!`}]},{id:`MD027`,alias:`no-multiple-space-blockquote`,aliases:[`no-multiple-space-blockquote`],name:`Multiple spaces after blockquote symbol`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md027.md`,tags:[`indentation`,`whitespace`,`blockquote`],options:[{key:`list_items`,type:`boolean`,description:`Include list items`,default:!0}]},{id:`MD028`,alias:`no-blanks-blockquote`,aliases:[`no-blanks-blockquote`],name:`Blank line inside blockquote`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md028.md`,tags:[`whitespace`,`blockquote`],options:[]},{id:`MD029`,alias:`ol-prefix`,aliases:[`ol-prefix`],name:`Ordered list item prefix`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md029.md`,tags:[`ol`],options:[{key:`style`,type:`enum`,description:`List style`,enum:[`one`,`ordered`,`one_or_ordered`,`zero`],default:`one_or_ordered`}]},{id:`MD030`,alias:`list-marker-space`,aliases:[`list-marker-space`],name:`Spaces after list markers`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md030.md`,tags:[`ul`,`whitespace`,`ol`],options:[{key:`ul_single`,type:`integer`,description:`Spaces for single-line unordered list items`,default:1,minimum:1},{key:`ol_single`,type:`integer`,description:`Spaces for single-line ordered list items`,default:1,minimum:1},{key:`ul_multi`,type:`integer`,description:`Spaces for multi-line unordered list items`,default:1,minimum:1},{key:`ol_multi`,type:`integer`,description:`Spaces for multi-line ordered list items`,default:1,minimum:1}]},{id:`MD031`,alias:`blanks-around-fences`,aliases:[`blanks-around-fences`],name:`Fenced code blocks should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md031.md`,tags:[`blank_lines`,`code`],options:[{key:`list_items`,type:`boolean`,description:`Include list items`,default:!0}]},{id:`MD032`,alias:`blanks-around-lists`,aliases:[`blanks-around-lists`],name:`Lists should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md032.md`,tags:[`bullet`,`ul`,`blank_lines`,`ol`],options:[]},{id:`MD033`,alias:`no-inline-html`,aliases:[`no-inline-html`],name:`Inline HTML`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md033.md`,tags:[`html`],options:[{key:`allowed_elements`,type:`string-array`,description:`Allowed elements`,default:[]},{key:`table_allowed_elements`,type:`string-array`,description:`Allowed elements in tables`,default:[]}]},{id:`MD034`,alias:`no-bare-urls`,aliases:[`no-bare-urls`],name:`Bare URL used`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md034.md`,tags:[`links`,`url`],options:[]},{id:`MD035`,alias:`hr-style`,aliases:[`hr-style`],name:`Horizontal rule style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md035.md`,tags:[`hr`],options:[{key:`style`,type:`string`,description:`Horizontal rule style`,default:`consistent`}]},{id:`MD036`,alias:`no-emphasis-as-heading`,aliases:[`no-emphasis-as-heading`],name:`Emphasis used instead of a heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md036.md`,tags:[`headings`,`emphasis`],options:[{key:`punctuation`,type:`string`,description:`Punctuation characters`,default:`.,;:!?。,;:!?`}]},{id:`MD037`,alias:`no-space-in-emphasis`,aliases:[`no-space-in-emphasis`],name:`Spaces inside emphasis markers`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md037.md`,tags:[`whitespace`,`emphasis`],options:[]},{id:`MD038`,alias:`no-space-in-code`,aliases:[`no-space-in-code`],name:`Spaces inside code span elements`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md038.md`,tags:[`whitespace`,`code`],options:[]},{id:`MD039`,alias:`no-space-in-links`,aliases:[`no-space-in-links`],name:`Spaces inside link text`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md039.md`,tags:[`whitespace`,`links`],options:[]},{id:`MD040`,alias:`fenced-code-language`,aliases:[`fenced-code-language`],name:`Fenced code blocks should have a language specified`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md040.md`,tags:[`code`,`language`],options:[{key:`allowed_languages`,type:`string-array`,description:`List of languages`,default:[]},{key:`language_only`,type:`boolean`,description:`Require language only`,default:!1}]},{id:`MD041`,alias:`first-line-heading`,aliases:[`first-line-heading`,`first-line-h1`],name:`First line in a file should be a top-level heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md041.md`,tags:[`headings`],options:[{key:`allow_preamble`,type:`boolean`,description:`Allow content before first heading`,default:!1},{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`},{key:`level`,type:`integer`,description:`Heading level`,default:1,minimum:1,maximum:6}]},{id:`MD042`,alias:`no-empty-links`,aliases:[`no-empty-links`],name:`No empty links`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md042.md`,tags:[`links`],options:[]},{id:`MD043`,alias:`required-headings`,aliases:[`required-headings`],name:`Required heading structure`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md043.md`,tags:[`headings`],options:[{key:`headings`,type:`string-array`,description:`List of headings`,default:[]},{key:`match_case`,type:`boolean`,description:`Match case of headings`,default:!1}]},{id:`MD044`,alias:`proper-names`,aliases:[`proper-names`],name:`Proper names should have the correct capitalization`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md044.md`,tags:[`spelling`],options:[{key:`names`,type:`string-array`,description:`List of proper names`,default:[]},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`html_elements`,type:`boolean`,description:`Include HTML elements`,default:!0}]},{id:`MD045`,alias:`no-alt-text`,aliases:[`no-alt-text`],name:`Images should have alternate text (alt text)`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md045.md`,tags:[`accessibility`,`images`],options:[]},{id:`MD046`,alias:`code-block-style`,aliases:[`code-block-style`],name:`Code block style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md046.md`,tags:[`code`],options:[{key:`style`,type:`enum`,description:`Block style`,enum:[`consistent`,`fenced`,`indented`],default:`consistent`}]},{id:`MD047`,alias:`single-trailing-newline`,aliases:[`single-trailing-newline`],name:`Files should end with a single newline character`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md047.md`,tags:[`blank_lines`],options:[]},{id:`MD048`,alias:`code-fence-style`,aliases:[`code-fence-style`],name:`Code fence style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md048.md`,tags:[`code`],options:[{key:`style`,type:`enum`,description:`Code fence style`,enum:[`consistent`,`backtick`,`tilde`],default:`consistent`}]},{id:`MD049`,alias:`emphasis-style`,aliases:[`emphasis-style`],name:`Emphasis style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md049.md`,tags:[`emphasis`],options:[{key:`style`,type:`enum`,description:`Emphasis style`,enum:[`consistent`,`asterisk`,`underscore`],default:`consistent`}]},{id:`MD050`,alias:`strong-style`,aliases:[`strong-style`],name:`Strong style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md050.md`,tags:[`emphasis`],options:[{key:`style`,type:`enum`,description:`Strong style`,enum:[`consistent`,`asterisk`,`underscore`],default:`consistent`}]},{id:`MD051`,alias:`link-fragments`,aliases:[`link-fragments`],name:`Link fragments should be valid`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md051.md`,tags:[`links`],options:[{key:`ignore_case`,type:`boolean`,description:`Ignore case of fragments`,default:!1},{key:`ignored_pattern`,type:`string`,description:`Pattern for ignoring additional fragments`,default:``}]},{id:`MD052`,alias:`reference-links-images`,aliases:[`reference-links-images`],name:`Reference links and images should use a label that is defined`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md052.md`,tags:[`links`,`images`],options:[{key:`ignored_labels`,type:`string-array`,description:`Ignored link labels`,default:[`x`]},{key:`shortcut_syntax`,type:`boolean`,description:`Include shortcut syntax`,default:!1}]},{id:`MD053`,alias:`link-image-reference-definitions`,aliases:[`link-image-reference-definitions`],name:`Link and image reference definitions should be needed`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md053.md`,tags:[`links`,`images`],options:[{key:`ignored_definitions`,type:`string-array`,description:`Ignored definitions`,default:[`//`]}]},{id:`MD054`,alias:`link-image-style`,aliases:[`link-image-style`],name:`Link and image style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md054.md`,tags:[`links`,`images`],options:[{key:`autolink`,type:`boolean`,description:`Allow autolinks`,default:!0},{key:`inline`,type:`boolean`,description:`Allow inline links and images`,default:!0},{key:`full`,type:`boolean`,description:`Allow full reference links and images`,default:!0},{key:`collapsed`,type:`boolean`,description:`Allow collapsed reference links and images`,default:!0},{key:`shortcut`,type:`boolean`,description:`Allow shortcut reference links and images`,default:!0},{key:`url_inline`,type:`boolean`,description:`Allow URLs as inline links`,default:!0}]},{id:`MD055`,alias:`table-pipe-style`,aliases:[`table-pipe-style`],name:`Table pipe style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md055.md`,tags:[`table`],options:[{key:`style`,type:`enum`,description:`Table pipe style`,enum:[`consistent`,`leading_only`,`trailing_only`,`leading_and_trailing`,`no_leading_or_trailing`],default:`consistent`}]},{id:`MD056`,alias:`table-column-count`,aliases:[`table-column-count`],name:`Table column count`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md056.md`,tags:[`table`],options:[]},{id:`MD058`,alias:`blanks-around-tables`,aliases:[`blanks-around-tables`],name:`Tables should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md058.md`,tags:[`table`],options:[]},{id:`MD059`,alias:`descriptive-link-text`,aliases:[`descriptive-link-text`],name:`Link text should be descriptive`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md059.md`,tags:[`links`,`accessibility`],options:[{key:`prohibited_texts`,type:`string-array`,description:`Prohibited link texts`,default:[`click here`,`here`,`link`,`more`]}]},{id:`MD060`,alias:`table-column-style`,aliases:[`table-column-style`],name:`Table column style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md060.md`,tags:[`table`],options:[{key:`style`,type:`enum`,description:`Table column style`,enum:[`any`,`aligned`,`compact`,`tight`],default:`any`},{key:`aligned_delimiter`,type:`boolean`,description:`Aligned delimiter columns`,default:!1}]}],ape=(()=>{let e=new Map;for(let t of d7){e.set(t.id.toUpperCase(),t.id);for(let n of t.aliases)e.set(n.toUpperCase(),t.id)}return e})();function f7(e){return ape.get(e.toUpperCase())??null}function ope(e,t){let n=f7(t);if(n===null)return;let r;for(let[t,i]of Object.entries(e))f7(t)===n&&(r={key:t,value:i});return r}var spe=[`Headings`,`Lists`,`Whitespace`,`Code`,`Links & images`,`Style`],cpe=[[`headings`,`Headings`],[`bullet`,`Lists`],[`ul`,`Lists`],[`ol`,`Lists`],[`links`,`Links & images`],[`images`,`Links & images`],[`accessibility`,`Links & images`],[`code`,`Code`],[`language`,`Code`],[`emphasis`,`Style`],[`html`,`Style`],[`line_length`,`Whitespace`],[`whitespace`,`Whitespace`],[`hard_tab`,`Whitespace`],[`blank_lines`,`Whitespace`],[`indentation`,`Whitespace`]];function lpe(e){for(let[t,n]of cpe)if(e.tags.includes(t))return n;return`Style`}function upe(e){let t={lint:{errorCount:0,warningCount:0},links:{errorCount:0,warningCount:0}};for(let n of e){let e=n.source===`links`?t.links:t.lint;n.severity===`error`?e.errorCount+=1:e.warningCount+=1}return t}var dpe=`No documents were checked: this scope contains no admitted documents.`;function fpe(e){return e===dpe}async function ppe(e,t,n,r){if(!t.enabled)return[];let i=[];for(let a of Z5){if(!Ife(t,a.id))continue;let o=t.plugins[a.id];try{i.push(...await a.lint(e,o,{docName:n}))}catch(e){console.warn(`[lint] plugin "${a.id}" failed${n?` on "${n}"`:``}`,e),r?.({source:a.id,phase:`lint`,...n===void 0?{}:{docName:n},message:mpe(e)})}}return i}var p7=500;function mpe(e){let t=m7(e);return t.length>p7?`${t.slice(0,p7)}… (truncated)`:t}function m7(e,t=0){if(e instanceof Error)return e.cause===void 0||t>=3?e.message:`${e.message} (cause: ${m7(e.cause,t+1)})`;if(typeof e==`object`&&e)try{let t=JSON.stringify(e);if(t!==void 0)return t}catch{}return String(e)}var hpe=/\p{M}+/gu,gpe=/[^\p{L}\p{N}]+/gu,_pe=/^-+|-+$/g;function h7(e){return e.trim().normalize(`NFKD`).replace(hpe,``).toLowerCase().replace(gpe,`-`).replace(_pe,``)}function vpe(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function g7(e,t){let n=h7(e);return n?vpe(n,t):``}function _7(e,t){let n=h7(e);return t?`#${n}-${h7(t)}`:`#${n}`}var v7=new Set([`img`,`video`,`audio`,`mark`,`u`,`ins`]),ype=new Map(B3.flatMap(e=>e.surface===`compat`&&v7.has(e.rendersAs)?[[e.name,e]]:[]));function y7(e){let t={};for(let n of e.attributes){if(n.type!==`mdxJsxAttribute`)return null;let e=n.name.toLowerCase();if(!(e.length>=3&&e.startsWith(`on`)))if(n.value===null)t[n.name]=!0;else if(typeof n.value==`string`)t[n.name]=n.value;else return null}return t}function b7(e){let t=e.name;if(!t||!v7.has(t))return null;let n=y7(e);return n===null?null:{type:`element`,tagName:t,properties:n,children:[]}}function x7(e){let t=e.name;if(!t)return null;let n=ype.get(t);if(!n)return null;let r=y7(e);if(r===null)return null;let i=n.translateProps(r),a={};for(let[e,t]of Object.entries(i))(typeof t==`string`||typeof t==`boolean`)&&(a[e]=t);return{type:`element`,tagName:n.rendersAs,properties:a,children:[]}}var bpe=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-link`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:_7(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},xpe=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-embed`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:_7(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},Spe=(e,t)=>{let n=t,r=b7(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=x7(n);if(i){e.patch(t,i);let n=e.applyData(t,i);return n.tagName===`img`?{type:`element`,tagName:`p`,properties:{},children:[n]}:n}let a={type:`element`,tagName:`pre`,properties:{className:[`mdx-component`]},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]}]};return e.patch(t,a),e.applyData(t,a)},Cpe=(e,t)=>{let n=t,r=b7(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=x7(n);if(i)return e.patch(t,i),e.applyData(t,i);let a={type:`element`,tagName:`span`,properties:{className:[`mdx-inline`],dataJsxInline:``},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]};return e.patch(t,a),e.applyData(t,a)},wpe=(e,t)=>{let n=t,r=n.data.reason||`unknown`,i=n.value||``,a=r.replace(/--/g,`—`),o={type:`comment`,value:` Parse error: ${a} `},s={type:`element`,tagName:`pre`,properties:{className:[`mdx-fallback`],dataRawMdxFallback:``,dataReason:a},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:i}]}]};return e.patch(t,s),[o,e.applyData(t,s)]},Tpe=(e,t)=>{let n={type:`element`,tagName:`mark`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},Epe=(e,t)=>{let n=t,r={type:`element`,tagName:n.data?.sourceForm===`ins`?`ins`:`u`,properties:{},children:e.all(n)};return e.patch(t,r),e.applyData(t,r)};function S7(e){if(typeof e!=`object`||!e)return``;let t=e;return typeof t.value==`string`?t.value:Array.isArray(t.children)?t.children.map(S7).join(``):``}var C7={wikiLink:bpe,wikiLinkEmbed:xpe,mdxJsxFlowElement:Spe,mdxJsxTextElement:Cpe,rawMdxFallback:wpe,mark:Tpe,underline:Epe,tag:(e,t)=>{let n=t.value,r={type:`element`,tagName:`a`,properties:{className:[`tag`],dataTag:n,href:`#tag/${n}`},children:[{type:`text`,value:`#${n}`}]};return e.patch(t,r),e.applyData(t,r)},comment:(e,t)=>{let n={type:`comment`,value:S7(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},commentBlock:(e,t)=>{let n={type:`comment`,value:S7(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`sup`,properties:{id:`fnref-${n}`,dataFootnoteRef:``,dataFootnoteId:n,className:[`footnote-ref`]},children:[{type:`element`,tagName:`a`,properties:{href:`#fn-${n}`,className:[`footnote-ref-link`]},children:[{type:`text`,value:`[${n}]`}]}]};return e.patch(t,r),e.applyData(t,r)},footnoteDefinition:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`aside`,properties:{id:`fn-${n}`,dataFootnoteDef:``,dataFootnoteId:n,className:[`footnote-def`]},children:[{type:`element`,tagName:`div`,properties:{className:[`footnote-body`]},children:e.all(t)},{type:`element`,tagName:`a`,properties:{href:`#fnref-${n}`,className:[`footnote-backref`],ariaLabel:`Back to reference`},children:[{type:`text`,value:`↩`}]}]};return e.patch(t,r),e.applyData(t,r)}},Dpe=/url\s*\(\s*['"]?\s*(?:javascript|vbscript|data)\s*:/i,Ope=/\bexpression\s*\(/i,kpe=1e4;function Ape(e){return!(e.length>kpe||Dpe.test(e)||Ope.test(e))}function w7(e){for(let t of e.split(`,`)){let e=t.trim();if(e!==``&&!y1(e.split(/\s+/)[0]??``))return!1}return!0}var jpe={a:[`href`,`title`],img:[`src`,`alt`,`title`],video:[`src`,`title`],audio:[`src`,`title`],code:[`className`]},Mpe=new Set([`href`,`src`]),Npe=De(`<>`),T7=()=>e=>{T(e,`element`,e=>{let t=jpe[e.tagName.toLowerCase()],n=e.properties;if(!(!t||!n))for(let e of t){let t=n[e];if(Array.isArray(t)){let r=t.map(e=>typeof e==`string`?T6(e):e);r.some((e,n)=>e!==t[n])&&(n[e]=r);continue}if(typeof t!=`string`)continue;let r;if(Mpe.has(e))if(t===`<>`||t===Npe)r=``;else{let e=T6(t);r=e===t?t:De(e)}else r=T6(t);r!==t&&(n[e]=r)}})},E7=()=>e=>{T(e,`element`,e=>{let t=e.tagName.toLowerCase(),n=e.properties;if(!n)return;if(t===`a`||t===`area`||t===`link`||t===`base`){let e=n.href;typeof e==`string`&&!y1(e)&&delete n.href}if(t===`img`||t===`iframe`||t===`script`||t===`embed`||t===`source`||t===`audio`||t===`video`||t===`track`){let e=n.src;typeof e==`string`&&!y1(e)&&delete n.src}if(t===`form`){let e=n.action;typeof e==`string`&&!y1(e)&&delete n.action}if(t===`img`||t===`source`){let e=n.srcSet;typeof e==`string`&&!w7(e)&&delete n.srcSet;let t=n.srcset;typeof t==`string`&&!w7(t)&&delete n.srcset}if(t===`video`){let e=n.poster;typeof e==`string`&&!y1(e)&&delete n.poster}let r=n.style;typeof r==`string`&&!Ape(r)&&delete n.style})};function Ppe(e){let t=le().use(me,{handlers:C7}).use(T7).use(E7).use(wG),n=t.runSync(e);return String(t.stringify(n))}function Fpe(e){let t=/\r?\n|\r/g,n=[],r=0,i=t.exec(e);for(;i!==null;)n.push(D7(e.slice(r,i.index),r>0,!0),i[0]),r=i.index+i[0].length,i=t.exec(e);return n.push(D7(e.slice(r),r>0,!1)),n.join(``)}function D7(e,t,n){let r=0,i=e.length,a=e=>e===9||e===32;for(;t&&r<i&&a(e.charCodeAt(r));)r++;for(;n&&i>r&&a(e.charCodeAt(i-1));)i--;return i>r?e.slice(r,i):``}var O7=/\r?\n|\r/,Ipe=(e,t)=>{let n=Fpe(String(t.value));if(!O7.test(n)){let r={type:`text`,value:n};return e.patch(t,r),e.applyData(t,r)}let r=n.split(O7),i=[];for(let e=0;e<r.length;e++)e>0&&i.push({type:`element`,tagName:`br`,properties:{},children:[]}),r[e].length>0&&i.push({type:`text`,value:r[e]});return i};function Lpe(e){let t=le().use(ge).use(oF,[`yaml`]).use(O8).use(ve).use(d5).use(y6).use(Q8).use(A6).use(me,{handlers:{...C7,text:Ipe}}).use(T7).use(E7).use(wG);return String(t.processSync(_6(k6(e))))}var Rpe=le().use(ge).use(ve),zpe={paragraph:``,heading:``,tableCell:``,emphasis:``,strong:``,delete:``,link:``,linkReference:``,tableRow:` | `};function k7(e){return e.type===`break`?`
|
|
599
|
-
`:e.type===`html`?``:e.type===`image`?e.alt??``:`value`in e?e.value:`children`in e?e.children.map(k7).join(
|
|
600
|
-
`):``}function
|
|
594
|
+
`)},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=k8(i.attributes??[]);return!i.children||i.children.length===0?s?c?`<${s} ${c} />`:`<${s} />`:``:_ue({...i,attributes:(i.attributes??[]).map(xue),children:(i.children??[]).map(yue)},t,n,r)},mark(e,t,n,r){let i=n.createTracker(r),a=n.enter(`mark`),o=i.move(`==`);return o+=L8(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=k8(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&&!vue.test(e)?e:i===`none`||i===0?`>${e}`:typeof i==`number`&&i>=2&&!e.startsWith(` `)?`>${` `.repeat(i)}${e}`:`> ${e}`})}};function k8(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}={${A8(n.value)}}`):t.push(`${e}="${n.value}"`);continue}t.push(`${e}={${n.value.value}}`)}return t.join(` `)}function A8(e){return`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`}function xue(e){return e.type===`mdxJsxAttribute`&&typeof e.value==`string`&&e.value.includes(`"`)?{type:`mdxJsxAttribute`,name:e.name,value:{type:`mdxJsxAttributeValueExpression`,value:A8(e.value)}}:e}function j8(e,t,n=` `){return t===`single`?`${n}'${e.replace(/'/g,`\\'`)}'`:t===`paren`?`${n}(${e.replace(/[()]/g,`\\$&`)})`:`${n}"${e.replace(/"/g,`\\"`)}"`}function M8(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 Sue(e){return e.replace(/(?<!\\)&(?=(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z][A-Za-z0-9]*);)/g,(e,t)=>Cue(t)?e:`\\${e}`)}function Cue(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}var wue=/&#(?:x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);/g;function Tue(e){return e.replace(wue,e=>EQ(e)?``+e.slice(1):e)}function Eue(e){return/[\r\n][\t ]*$/.test(e)}function N8(e,t,n,r=!1){let{matched:i}=h6(t,{escapeAware:!1});if(i.length===0)return P8(e,t,n,r);let a=``,o=0,s=i=>{i>o&&(a+=P8(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),!Eue(n.before+a)&&(a+=t.slice(e.start,e.end),o=e.end);return s(t.length),a}function P8(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
|
|
595
|
+
]|$)`};return delete t._compiled,t});let a;try{a=e.safe(Tue(t),n)}finally{e.unsafe=i}return a=a.replaceAll(``,`\\&`),Sue(Aue(a,n))}var F8=1,Due=2;function I8(e){if(Number.isNaN(e))return`ws`;let t=d(e);return t===F8?`ws`:t===Due?`punct`:`other`}function Oue(e,t,n){let r=I8(t),i=I8(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 kue(e,t,n){let r=t;for(;r<e.length&&(e[r]===` `||e[r]===` `);)r++;if(r<e.length)return e[r]===`
|
|
596
|
+
`||e[r]===`\r`;let i=n.after.charCodeAt(0);return Number.isNaN(i)||i===10||i===13}function Aue(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)&&kue(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+=Oue(i,o,s)?`\\${i}`.repeat(a-r):e.slice(r,a)}r=a;continue}n+=i,r+=1}return n}function L8(e,t,n){let r=n.startsWith(`_`)?`_`:`*`,i=t.before??``,a=t.after??``,o=e,s=o.charCodeAt(0);R8(i.charCodeAt(i.length-1),s,r)&&(o=z8(s)+o.slice(1));let c=o.charCodeAt(o.length-1);return R8(a.charCodeAt(0),c,r)&&(o=o.slice(0,-1)+z8(c)),o}function R8(e,t,n){return!(d(t)!==F8||n===`_`&&d(e)===void 0)}function z8(e){return`&#x${e.toString(16).toUpperCase()};`}function jue(e,t,n,r){let i=e.value??``,a=e.data?.sourceDelimiter,o=typeof a==`string`&&/^\$+$/.test(a)?a.length:2;for(o===1&&!Nue(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 Mue(e,t,n,r){let i=e.data?.sourceDelimiter===`~`?`~`:`~~`,a=n.createTracker(r),o=n.enter(`strikethrough`),s=a.move(i);return s+=L8(n.containerPhrasing(e,{...a.current(),before:s,after:`~`}),r,i),s+=a.move(i),o(),s}function Nue(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(`\\`))}var B8=[{mode:`protecting`,protect:k6,reservations:wce},{mode:`protecting`,protect:_6,reservations:rce},{mode:`protecting`,protect:Sce,reservations:bce},{mode:`serializer-only`,reservations:[{to:``}]}];new Set(B8.flatMap(({reservations:e})=>e.map(({to:e})=>e)));function Pue(e,t){switch(t.mode){case`protecting`:return t.protect(e);case`serializer-only`:return e}}function V8(e){return B8.reduce(Pue,e)}function H8(e){return e.data?.sourceRaw}function Fue(e){return e.type===`text`?e.value===``:e.type===`mdxJsxTextElement`?H8(e)===``:!1}function U8(e){return e.type===`paragraph`?(e.children??[]).every(Fue):!1}function W8(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 Iue(e){switch(e.type){case`table`:return W8(e)===0;case`code`:return e.data?.sourceStyle===`indented`&&/^\n*$/.test(e.value??``);case`thematicBreak`:return H8(e)===``;case`html`:return(e.value??``)===``;case`mdxJsxFlowElement`:return H8(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 Lue(e){let t=[];for(let n of e.children){if(n.type===`table`&&W8(n)===0){console.warn(JSON.stringify({event:`table-serialize-dropped-empty`,rows:(n.children??[]).length}));continue}Iue(n)||(n.type===`paragraph`&&n.children.length>0&&U8(n)&&(n.children=[]),t.push(n))}e.children=t}function Rue(e,t){let n=e,r=t;return n.type===`heading`&&n.data?.sourceContiguousNext===!0&&r.type===`paragraph`}var zue=(e,t)=>{if(U8(e)||Rue(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},G8=/(?<!\\)\$(?=\S)([^$\n]*?[^\s$])\$(?!\d)/g;function Bue(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;T(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`$`)===-1)return;let a=I6(e);G8.lastIndex=0;let o=[],s;for(;(s=G8.exec(i))!==null;){let e=s.index,t=e+s[0].length;if(R6(a,e,1)||R6(a,t-1,1)){G8.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(L6(n,e,l,r));let a={type:`inlineMath`,value:t[1]},o=B6(n,e,r,i);o&&(a.position=o),c.push(a),l=i}return l<i.length&&c.push(L6(n,e,l,i.length)),r.children.splice(t,1,...c),[E,t+c.length]})}}var Vue=new Set([`strong`,`emphasis`,`delete`,`link`,`mark`,`comment`]),Hue=`<br />`;function Uue(e){if(e?.type!==`break`)return!1;let t=e.data?.sourceRaw;return typeof t!=`string`||t.length===0}function Wue(e){e.data??={},e.data.sourceRaw=Hue,e.data.sourceStyle=`html`}function K8(e){if(e?.type!==`text`)return!1;let t=e.data?.sourceRaw;return typeof t!=`string`||t.length===0}var q8=/[ \t]+$/,J8=/^[ \t]*$/;function Gue(e){return e.some(e=>!(K8(e)&&J8.test(e.value)))}function Y8(e,t=!1){for(;e.length>0;){let n=e[e.length-1];if(Uue(n)){Wue(n);break}if(n&&Vue.has(n.type)&&`children`in n){let t=n.children;if(Y8(t,!0),t.length===0){e.pop();continue}}if(!t&&K8(n)&&q8.test(n.value)){let t=n.value.replace(q8,``);if(t.length>0){n.value=t;continue}if(Gue(e.slice(0,-1))){e.pop();continue}if(e.every(e=>K8(e)&&J8.test(e.value))){let t=e[0];t.value=t.value.charAt(0),e.splice(1)}}break}}var Kue=new Set([`paragraph`,`heading`,`tableCell`]);function que(e){let t=e=>{if(Kue.has(e.type)&&`children`in e&&Y8(e.children),`children`in e)for(let n of e.children)t(n)};t(e)}var X8={handlers:{tag:e=>`#${e.value}`},unsafe:[{character:`#`,inConstruct:[`phrasing`],before:`\\s`,after:`[a-zA-Z]`}]};function Jue(){let e=this.data();e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===X8)||e.toMarkdownExtensions.push(X8)}var Yue=new Set([`u`,`ins`]);function Xue(){return e=>{T(e,`mdxJsxTextElement`,(e,t,n)=>{if(n===void 0||t==null||e.name===null||!Yue.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})}}var Z8=/(?<!\uE102)<br[ \t]*\/?>/g,Zue=new Set([`mdxJsxTextElement`,`mdxJsxFlowElement`]);function Que(e,t){let n=[],r=!1;for(let i of e.children){if(i.type!==`text`){n.push(i);continue}let e=i.value;Z8.lastIndex=0;let a=[],o=0;for(;;){let n=Z8.exec(e);if(n===null)break;let s=n.index;s>o&&a.push(L6(t,i,o,s));let c={type:`break`,data:{sourceStyle:`html`,sourceRaw:n[0]}},l=B6(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(L6(t,i,o,e.length)),n.push(...a))}r&&(e.children=n)}function Q8(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;T(e,e=>{if(Zue.has(e.type))return E;let t=e;Array.isArray(t.children)&&Que(e,n)})}}var $8=33,e5=91,t5=93,n5=124,r5=35,$ue=-1,ede=-2;function i5(e){return e===ede?` `:e===$ue?` `:String.fromCharCode(e)}var tde={name:`wikiLink`,tokenize:(e,t,n)=>{let r=0,i=0,a=``;return o;function o(t){return t===e5?(e.enter(`wikiLink`),e.enter(`wikiLinkMarker`),e.consume(t),s):n(t)}function s(t){return t===e5?(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===e5?n(t):t===t5?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),d(t)):t===r5?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),l):t===n5?v0(a)?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),a+=i5(t),c)}function l(t){return t===null||t===-5||t===-4||t===-3||t===e5?n(t):t===t5?r===0?n(t):(e.exit(`wikiLinkAnchor`),d(t)):t===n5?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===e5?n(t):t===t5?i===0?n(t):(e.exit(`wikiLinkAlias`),d(t)):(e.consume(t),i++,u)}function d(t){return t===t5?(e.enter(`wikiLinkMarker`),e.consume(t),f):n(t)}function f(r){return r===t5?(e.consume(r),e.exit(`wikiLinkMarker`),e.exit(`wikiLink`),t):n(r)}}},nde={name:`wikiLinkEmbed`,tokenize:(e,t,n)=>{let r=0,i=0,a=``;return o;function o(t){return t===$8?(e.enter(`wikiLinkEmbed`),e.enter(`wikiLinkEmbedBang`),e.consume(t),e.exit(`wikiLinkEmbedBang`),s):n(t)}function s(t){return t===e5?(e.enter(`wikiLinkMarker`),e.consume(t),c):n(t)}function c(t){return t===e5?(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===e5?n(t):t===t5?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),f(t)):t===r5?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),u):t===n5?v0(a)?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),d):(e.consume(t),a+=i5(t),l)}function u(t){return t===null||t===-5||t===-4||t===-3||t===e5?n(t):t===t5?r===0?n(t):(e.exit(`wikiLinkAnchor`),f(t)):t===n5?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===e5?n(t):t===t5?i===0?n(t):(e.exit(`wikiLinkAlias`),f(t)):(e.consume(t),i++,d)}function f(t){return t===t5?(e.enter(`wikiLinkMarker`),e.consume(t),p):n(t)}function p(r){return r===t5?(e.consume(r),e.exit(`wikiLinkMarker`),e.exit(`wikiLinkEmbed`),t):n(r)}}};function rde(){return{text:{[e5]:tde,[$8]:nde}}}function ide(e){this.enter({type:`wikiLink`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function ade(e){this.enter({type:`wikiLinkEmbed`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function a5(e){return e.stack[e.stack.length-1]}function ode(e){let t=a5(this),n=this.sliceSerialize(e);t.data.target=n.trim(),n!==t.data.target&&(t.data.sourceTarget=n)}function sde(e){let t=a5(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 cde(e){let t=a5(this),n=this.sliceSerialize(e),r=n.trim();t.data.alias=r.length?r:null,n!==r&&(t.data.sourceAlias=n)}function lde(e){let t={target:e.data.target,anchor:e.data.anchor??null,alias:e.data.alias??null},n=h0(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 o5(e){lde(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 ude(e){o5(a5(this)),this.exit(e)}function dde(e){o5(a5(this)),this.exit(e)}var s5={enter:{wikiLink:ide,wikiLinkEmbed:ade},exit:{wikiLinkTarget:ode,wikiLinkAnchor:sde,wikiLinkAlias:cde,wikiLink:ude,wikiLinkEmbed:dde}};function c5(e){return(t,n,r,i)=>{let a=t.data,o=r.stack.includes(`tableCell`),s=e=>o?x0(e):e,c=a?.target??``,l=a?.anchor,u=a?.alias,d=`${e}${s(_0(a?.sourceTarget,c,`separatorAdjacent`))}`;if(l)d+=`#${s(_0(a?.sourceAnchor,l,`separatorAdjacent`))}`;else{let e=s(_0(a?.sourceAnchor,``,`separatorAdjacent`));e.length>0&&(d+=`#${e}`)}let f=u?_0(a?.sourceAlias,u,`alias`):_0(a?.sourceAlias,``,`alias`);if(f.length>0){let e=o&&!d.endsWith(`\\`)?`\\|`:`|`;d+=`${e}${s(f)}`}return`${d}]]`}}var l5={handlers:{wikiLink:c5(`[[`),wikiLinkEmbed:c5(`![[`)},unsafe:[{character:`[`,inConstruct:[`phrasing`]}]},u5=rde();function d5(){let e=this.data();e.micromarkExtensions||=[],e.micromarkExtensions.some(e=>e===u5)||e.micromarkExtensions.push(u5),e.fromMarkdownExtensions||=[],e.fromMarkdownExtensions.some(e=>e===s5)||e.fromMarkdownExtensions.push(s5),e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===l5)||e.toMarkdownExtensions.push(l5)}function fde(e){return e.children.some(e=>{let t=e.type;return t!==`yaml`&&t!==`toml`})?e:{...e,children:[...e.children,{type:`paragraph`,children:[]}]}}var pde=[{name:`remark-parse`,plugin:ge},{name:`escape-provenance`,plugin:Ole},{name:`remark-mdx-agnostic`,plugin:O8},{name:`remark-gfm`,plugin:ve},{name:`remark-math`,plugin:SF,options:{singleDollarTextMath:!1}},{name:`remark-wiki-link`,plugin:d5},{name:`remark-github-alerts`,plugin:uF,options:Ice},{name:`callout-transformer`,plugin:Pce},{name:`restore-from-mdx`,plugin:y6},{name:`void-br-promoter`,plugin:Q8},{name:`restore-entity-refs`,plugin:Cce},{name:`restore-backslash-escapes`,plugin:A6},{name:`details-accordion-promoter`,plugin:ule},{name:`div-align-promoter`,plugin:_le},{name:`image-promoter`,plugin:Mle},{name:`indented-code-promoter`,plugin:Lle},{name:`math-promoter`,plugin:Gle},{name:`single-dollar-math-promoter`,plugin:Bue},{name:`highlight-promoter`,plugin:jle},{name:`underline-promoter`,plugin:Xue},{name:`mermaid-promoter`,plugin:iue},{name:`comment-promoter`,plugin:Hce},{name:`merged-post-parse-walker`,plugin:nue},{name:`empty-task-item-unmint`,plugin:Sle},{name:`link-reference-destination`,plugin:Wle},{name:`non-rendering-context-demote`,plugin:mue},{name:`ensure-non-empty-doc`,plugin:()=>fde}];function mde(e){let t=le();for(let e of pde)t=`options`in e&&e.options!==void 0?t.use(e.plugin,e.options):t.use(e.plugin);return t=t.use(FP,{schema:e.schema,handlers:e.handlers}),t.freeze(),t}function hde(e){let t=le().use(oF,[`yaml`]).use(ve,{tablePipeAlign:!1}).use(SF,{singleDollarTextMath:!1}).use(O8).use(d5).use(Jue).use(SP,{bullet:`-`,fences:!0,rule:`-`,join:[zue],...e.toMarkdownHandlers?{handlers:e.toMarkdownHandlers}:{}});return t.freeze(),t}function f5(e){return e.charCodeAt(0)===65279?{source:e.slice(1),hadBom:!0}:{source:e,hadBom:!1}}var p5=/^\n+$/,m5=/^\n{2,}$/;function h5(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);p5.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);m5.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 gde(e){if(typeof e!=`object`||!e)return;let t=e,n={};return t.bom===!0&&(n.bom=!0),typeof t.leading==`string`&&p5.test(t.leading)&&(n.leading=t.leading),typeof t.trailing==`string`&&m5.test(t.trailing)&&(n.trailing=t.trailing),n.bom||n.leading||n.trailing?n:void 0}function _de(e,t){let{source:n,hadBom:r}=f5(e),i=Z6(n),a=new ne(V8(i)),o=t.parse(a);a.value=i;let s=t.runSync(o,a);m8(s,i);let c=h5(s,i,r),l=c?rZ(s,c):void 0,u=t.stringify(s);return l?u.type.create({...u.attrs,sourceDocBoundary:l},u.content,u.marks):u}function vde(e,t){return g5(e,t,!1)}function yde(e,t){return g5(e,t,!0)}function g5(e,t,n){let{source:r,hadBom:i}=f5(e),a=Z6(r),o=new ne(V8(a)),s=t.parse(o);o.value=a;let c=t.runSync(s,o);n&&m8(c,a);let l=h5(c,a,i);return n&&l&&rZ(c,l),c}function bde(e,t,n){let r=LP(e,{schema:n.schema,nodeHandlers:n.pmNodeHandlers,markHandlers:n.pmMarkHandlers});_5(r),ble(r),que(r),Lue(r);let i=gde(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 _5(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)_5(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=n6(i)?i.escapedChars:null,s=n6(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)}}}function xde(){return!1}function Sde(e){let t=e.lastIndexOf(`/`);return t===-1?``:t===0?`/`:e.slice(0,t)}function Cde(e,t){let n=e?`${e}/${t}`:t,r=n.startsWith(`/`),i=[];for(let e of n.split(`/`))if(!(e===``||e===`.`)){if(e===`..`){let e=i[i.length-1];i.length>0&&e!==`..`?i.pop():r||i.push(`..`);continue}i.push(e)}let a=i.join(`/`);return r?`/${a}`:a}function v5(e,t){if(typeof e!=`string`||e===``||!t||e.startsWith(`/`)||!b1(e))return e;let n=Cde(Sde(t),e);return n===``||n===`..`||n.startsWith(`../`)?(xde()&&console.warn(`[resolve-image-url] doc-relative path escapes contentDir; emitting raw URL: ${e} (from sourcePath ${t})`),e):`/${n}`}function y5(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]}`}var wde=class{schema;handlers;pmNodeHandlers;pmMarkHandlers;parseProcessor;serializeProcessor;parseCtx={current:{}};freshnessHolder={checker:void 0};constructor(e){this.schema=fT(e.extensions),this.handlers=kde(this.schema,this.parseCtx),this.freshnessHolder.checker=e.deriveStructuralFreshness?$Z({parse:e=>this.parseWithFallback(e)}):void 0;let{nodeHandlers:t,markHandlers:n}=Ade(this.schema,this.freshnessHolder);this.pmNodeHandlers=t,this.pmMarkHandlers=n,this.parseProcessor=mde({schema:this.schema,handlers:this.handlers,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers}),this.serializeProcessor=hde({toMarkdownHandlers:bue})}parse(e,t){if(!e.trim())return{type:`doc`,content:[{type:`paragraph`,content:[]}]};this.parseCtx.current=t??{};try{return _de(e,this.parseProcessor).toJSON()}finally{this.parseCtx.current={}}}parseToMdast(e){return e.trim()?vde(e,this.parseProcessor):{type:`root`,children:[]}}parseToEditorMdast(e){return e.trim()?yde(e,this.parseProcessor):{type:`root`,children:[]}}parseWithFallback(e,t){return e.trim()?Jse(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 bde(n,this.serializeProcessor,{schema:this.schema,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers})}finally{this.freshnessHolder.checker=r}}},b5=V3();function x5(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 i?.type===`boolean`?r[e]=t.value===`true`:r[e]=t.value;continue}let a=t.value.value;try{r[e]=JSON.parse(a)}catch{r[e]=a}}return r}function Tde(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 Ede(e,t){return e.attrs.sourceDirty||Tde(e)?!0:t?t.isDiverged(e.toJSON()):!1}function Dde(e){if(e.type!==`paragraph`)return!1;let t=e.children??[];return t.length===0?!0:t.every(e=>e.type===`text`&&e.value===``)}function S5(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 C5(e,t){if(e.length===0)return S5({type:`inlineCode`,value:``},t);if(e.every(e=>e.type===`text`))return S5({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:[C5(n.children,t)]}}return S5({type:`inlineCode`,value:w5(e)},t)}function w5(e){let t=``;for(let n of e)n.type===`text`?t+=n.value:`children`in n&&Array.isArray(n.children)?t+=w5(n.children):`value`in n&&typeof n.value==`string`&&(t+=n.value);return t}var Ode=Rp;function kde(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=MP(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=MP(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=v5(r,t.current.sourcePath);return n.image.createAndFill({src:i,alt:e.alt??null,title:e.title??null,sourceUrl:i===r?null:r})},n.imageReference?i.imageReference=e=>n.imageReference.createAndFill({alt:e.alt??``,label:e.label??e.identifier??``,identifier:e.identifier??``,referenceType:e.referenceType??`shortcut`}):i.imageReference=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&&kQ(t.raw)!==null&&EQ(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=kQ(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=NP(a,e=>({sourceDelimiter:e.data?.sourceDelimiter===`~`?`~`:`~~`}))),r.highlight&&(i.mark=NP(r.highlight)),r.underline&&(i.underline=NP(r.underline,e=>({sourceForm:e.data?.sourceForm===`ins`?`ins`:`u`}))),r.comment&&(i.comment=NP(r.comment,e=>({sourceForm:e.data?.sourceForm??`percent`}))),n.commentBlock&&(i.commentBlock=MP(n.commentBlock,e=>({sourceForm:e.data?.sourceForm??`percent`,sourceLayout:e.data?.sourceLayout??`block`}))),r.emphasis&&(i.emphasis=NP(r.emphasis,e=>({sourceDelimiter:e.data?.sourceDelimiter??`*`}))),r.strong&&(i.strong=NP(r.strong,e=>({sourceDelimiter:e.data?.sourceDelimiter??`**`}))),n.heading&&(i.heading=MP(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=MP(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=MP(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;i.definition=i=>{let s={title:i.title??null};return n&&(s.identifier=i.identifier??``),s.label=i.label??i.identifier??``,e?s.url=i.url??``:t&&(s.href=i.url??``),r&&(s.sourceLayout=i.data?.sourceLayout??null),a&&(s.sourceTitleMarker=i.data?.sourceTitleMarker??null),o.createAndFill(s)}}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=b5.getOrWildcard(o),c=x5(e.attributes,s.props);if(o===`CommonMarkImage`&&typeof c.src==`string`){let e=c.src,n=v5(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?b5.get(i):void 0;if(o&&n.jsxInline){let e=x5(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=O0(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(_&&Ode.has(f)&&n.jsxComponent&&b5.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(_&&zp.has(f)&&n.jsxComponent&&b5.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(_&&Vp.has(f)&&n.jsxComponent&&b5.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(_&&Hp.has(f)&&n.jsxComponent&&b5.has(`WikiEmbedFile`)){let{resolveSize:e}=t.current,r=e&&m?e(o,m)??null:null,i=r===null?null:y5(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=MP(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 Ade(e,t){let n={},r={},i=e.nodes,a=e.marks;i.paragraph&&(n.paragraph=RP(`paragraph`)),i.blockquote&&(n.blockquote=RP(`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}:{}})),i.heading&&(n.heading=RP(`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?!0:void 0,sourceLeadingIndent:e.attrs.sourceLeadingIndent??void 0,sourceInteriorSpacing:e.attrs.sourceInteriorSpacing??void 0}}))),i.codeBlock&&(n.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?!0:void 0,sourceFenceIndent:e.attrs.sourceFenceIndent??void 0,sourceInfoPadding:e.attrs.sourceInfoPadding??void 0,sourceIndents:e.attrs.sourceIndents??void 0}}}),i.thematicBreak&&(n.thematicBreak=e=>({type:`thematicBreak`,data:{sourceRaw:e.attrs.sourceRaw}})),i.hardBreak&&(n.hardBreak=e=>({type:`break`,data:{sourceStyle:e.attrs.hardBreakStyle,...typeof e.attrs.sourceRaw==`string`&&e.attrs.sourceRaw.length>0?{sourceRaw:e.attrs.sourceRaw}:{}}})),i.list&&(n.list=RP(`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}}))),i.listItem&&(n.listItem=(e,t,n)=>{let r=n.all(e),i=r.length>1&&Dde(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}}),i.table&&(n.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}),i.tableRow&&(n.tableRow=RP(`tableRow`));let o=(e,t)=>{let n={type:`tableCell`,children:p3(t)},r=e.attrs.sourcePadding;return typeof r==`object`&&r&&typeof r.left==`number`&&typeof r.right==`number`&&(n.data={sourcePadding:r}),n};if(i.tableCell&&(n.tableCell=(e,t,n)=>o(e,n.all(e))),i.tableHeader&&(n.tableHeader=(e,t,n)=>o(e,n.all(e))),i.image&&(n.image=e=>({type:`image`,url:e.attrs.sourceUrl??e.attrs.src,alt:e.attrs.alt,title:e.attrs.title})),i.imageReference&&(n.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`}}),i.htmlBlock&&(n.htmlBlock=e=>({type:`html`,value:e.attrs.content})),i.linkDefinition??i.linkRefDef){let e=i.linkDefinition?`linkDefinition`:`linkRefDef`;n[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);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(i.jsxComponent&&(n.jsxComponent=(e,n,r)=>{if(e.attrs.kind===`expression`)return{type:`html`,value:e.attrs.sourceRaw??``};let i=e.attrs.componentName||null,a=Array.isArray(e.attrs.attributes)?e.attrs.attributes:[];return!Ede(e,t.checker)&&e.attrs.sourceRaw?{type:`mdxJsxFlowElement`,name:i,attributes:a,children:[],data:{sourceRaw:String(e.attrs.sourceRaw)}}:b5.getOrWildcard(i??`*`).serialize(e,{all:e=>r.all(e),registry:b5,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.`)}})}),i.rawMdxFallback&&(n.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}}}}),i.jsxInline&&(n.jsxInline=e=>{let t=e.attrs.componentName||``;if(t&&e.attrs.sourceDirty)return sse(t,e,b5.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)}}}),i.mathInline&&(n.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}}:{}}}),i.wikiLink&&(n.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}]}}),i.tag&&(n.tag=e=>({type:`tag`,value:String(e.attrs.value??``)})),i.wikiLinkEmbed&&(n.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}]}}),a.emphasis&&(r.emphasis=zP(`emphasis`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),a.strong&&(r.strong=zP(`strong`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),a.code&&(r.code=(e,t,n)=>{let r=e.attrs.sourceFenceChar,i=e.attrs.sourceFenceLength;return C5(n,{sourceFenceChar:r,sourceFenceLength:i,sourcePadded:e.attrs.sourcePadded===!0?!0:void 0})}),a.strike??a.delete){let e=a.strike?`strike`:`delete`;r[e]=zP(`delete`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter===`~`?`~`:`~~`}}))}return a.highlight&&(r.highlight=zP(`mark`)),a.underline&&(r.underline=zP(`underline`,e=>({data:{sourceForm:e.attrs.sourceForm===`ins`?`ins`:`u`}}))),a.comment&&(r.comment=zP(`comment`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`}}))),i.commentBlock&&(n.commentBlock=RP(`commentBlock`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`,sourceLayout:e.attrs.sourceLayout===`inline`?`inline`:`block`}}))),i.footnoteReference&&(n.footnoteReference=e=>{let t=String(e.attrs.identifier??``);return{type:`footnoteReference`,identifier:t,label:e.attrs.label?String(e.attrs.label):t}}),i.footnoteDefinition&&(n.footnoteDefinition=RP(`footnoteDefinition`,e=>({identifier:String(e.attrs.identifier??``),label:e.attrs.label?String(e.attrs.label):String(e.attrs.identifier??``)}))),a.link&&(r.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}}),a.escapeMark&&(r.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}),a.sourceLiteral&&(r.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 i0(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:n,markHandlers:r}}var T5={default:!0,MD013:!1};function E5(e){return e??T5}function D5(e){let t=e.replace(/\\/g,`/`);for(;t.startsWith(`./`);)t=t.slice(2);let n=t.toLowerCase();for(let e of I$)if(n.endsWith(e))return t.slice(0,-e.length);return t}function O5(e){let t=(e===void 0?[]:Array.isArray(e)?e:[e]).map(e=>e.trim()).filter(e=>e.length>0),n=[],r=[],i=[],a=[],o=0;for(let e of t){let t=e.startsWith(`!`),s=t?e.slice(1):e;if(t||(o+=1),s.length===0){n.push({pattern:e,detail:`empty pattern`});continue}try{let e=(0,OV.default)(s,{dot:!0,strictBrackets:!0});(t?a:i).push(e)}catch(t){n.push({pattern:e,detail:t instanceof Error?t.message:String(t)});continue}if(s.endsWith(`/`))r.push({pattern:e,reason:`trailing-slash`});else if(s.startsWith(`/`))r.push({pattern:e,reason:`leading-slash`});else{let t=s.toLowerCase();I$.some(e=>t.endsWith(e))&&r.push({pattern:e,reason:`doc-extension`})}}let s=o===0;return{invalidPatterns:n,suspiciousPatterns:r,matches(e){if(e===void 0||e===``)return!1;let t=D5(e);return t===``||!(s||i.some(e=>e(t)))?!1:!a.some(e=>e(t))}}}function jde(e,t){if(t.length===0)return[];let n=(e===void 0?[]:Array.isArray(e)?e:[e]).map(e=>e.trim()).filter(e=>e.length>0),r=t.map(D5).filter(e=>e!==``),i=[];for(let e of n){let t=e.startsWith(`!`)?e.slice(1):e;if(t.length===0)continue;let n;try{n=(0,OV.default)(t,{dot:!0,strictBrackets:!0})}catch{continue}r.some(e=>n(e))||i.push(e)}return i}var k5=/[*?[\]{}()+@!|]/;function Mde(e){let t=e.indexOf(`{`);if(t===-1)return null;let n=e.indexOf(`}`,t);if(n===-1||e.indexOf(`{`,t+1)!==-1||e.indexOf(`}`,n+1)!==-1)return null;let r=e.slice(t+1,n).split(`,`);return r.length<2||r.some(e=>e.trim()===``||k5.test(e))?null:r.map(r=>e.slice(0,t)+r+e.slice(n+1))}function A5(e){if(e.endsWith(`/`)||e.startsWith(`/`))return{kind:`matches-nothing`,pattern:e};try{(0,OV.default)(e,{dot:!0,strictBrackets:!0})}catch{return{kind:`invalid`,pattern:e}}if(e===`**`||e===`**/*`)return{kind:`everything`};{let t=e.match(/^\*\*\/(.+)\/\*\*$/)?.[1];if(t!==void 0&&!k5.test(t))return{kind:`folder-anywhere`,folder:t};let n=e.match(/^(.+)\/\*\*\/(.+)\/\*\*$/),r=n?.[1],i=n?.[2];if(r!==void 0&&i!==void 0&&!k5.test(r)&&!k5.test(i))return{kind:`folder-recursive-nested`,root:r,folder:i}}for(let t of[`/**/*`,`/**`])if(e.endsWith(t)){let n=e.slice(0,-t.length);if(n.length>0&&!k5.test(n))return{kind:`folder-recursive`,folder:n}}if(e.endsWith(`/*`)){let t=e.slice(0,-2);if(t.length>0&&!k5.test(t))return{kind:`folder-direct`,folder:t}}if(e.startsWith(`**/`)){let t=e.slice(3);if(t.length>0&&!t.includes(`/`)&&!k5.test(t))return{kind:`name-anywhere`,name:t}}return k5.test(e)?{kind:`pattern`,pattern:e}:{kind:`exact`,target:e}}function Nde(e){let t=A5(e);if(t.kind!==`pattern`)return[t];let n=Mde(e);if(n!==null){let e=n.map(A5);if(e.every(e=>e.kind!==`pattern`))return e}return[t]}function Pde(e){let t=(e===void 0?[]:Array.isArray(e)?e:[e]).map(e=>e.trim()).filter(e=>e.length>0),n=[],r=[];for(let e of t){let t=e.startsWith(`!`),i=t?e.slice(1):e;i.length!==0&&(t?r:n).push(...Nde(i))}return{includes:n,excludes:r}}function j5(e,t){let n=new Set,r=[];for(let i of e){if(i.enabled===!1||!i.schema||!O5(i.appliesTo).matches(t))continue;let e=i.key??i.file;n.has(e)||(n.add(e),r.push({file:i.file,schema:i.schema}))}return r}var M5={"draft-06":`http://json-schema.org/draft-06/schema#`,"draft-07":`http://json-schema.org/draft-07/schema#`,"2019-09":`https://json-schema.org/draft/2019-09/schema`,"2020-12":`https://json-schema.org/draft/2020-12/schema`},Fde=Object.keys(M5),Ide=`draft-07`,Lde=new Map(Fde.map(e=>[N5(M5[e]),e]));function N5(e){return e.replace(/^https?:\/\//,``).replace(/#$/,``)}function Rde(e){let t=e.$schema;return t===void 0?Ide:typeof t==`string`?Lde.get(N5(t))??null:null}var P5=new Map;function zde(e){throw Error(`Unhandled FrontmatterSchemaDialect: ${JSON.stringify(e)}`)}function Bde(e){let t=P5.get(e);if(t)return t;let n={allErrors:!0,strict:!1},r;switch(e){case`2020-12`:r=new EV.default(n);break;case`2019-09`:r=new TV.default(n);break;case`draft-06`:case`draft-07`:r=new wV.default(n);break;default:return zde(e)}return(0,DV.default)(r),P5.set(e,r),r}function Vde(e){let{$schema:t,...n}=e;return n}function Hde(e,t){let n=Bde(e),r=t.$id;return typeof r==`string`&&r!==``&&n.removeSchema(r),n.compile(Vde(t))}var F5=new Map,Ude=256;function Wde(e){let t=JSON.stringify(e),n=F5.get(t);if(n!==void 0)return n;let r=null,i=Rde(e);if(i!==null)try{r=Hde(i,e)}catch{r=null}return F5.size>=Ude&&F5.clear(),F5.set(t,r),r}function Gde(e){let t=new Map;if(!zd.test(e))return{data:{},keyLines:t};let{frontmatter:n}=Vd(e),r=Ud(n);if(r.trim()===``)return{data:{},keyLines:t};let i=wd(r,{uniqueKeys:!1});if(i.errors.length>0)return{data:{},keyLines:t};let a=i.toJS();if(typeof a!=`object`||!a||Array.isArray(a))return{data:{},keyLines:t};if(Hs(i.contents))for(let e of i.contents.items){let n=e.key;if(!Ws(n)||typeof n.value!=`string`||!n.range)continue;let i=0,a=Math.min(n.range[0],r.length);for(let e=0;e<a;e++)r.charCodeAt(e)===10&&i++;t.has(n.value)||t.set(n.value,i+1)}return{data:a,keyLines:t}}var Kde={"date-time":`an ISO 8601 datetime with an explicit UTC offset, for example "2026-09-23T00:00:00Z"`};function I5(e){let t=e.format;return typeof t==`string`?Kde[t]:void 0}function L5(e){if(e===void 0)return``;let t;if(typeof e==`string`)t=`"${e}"`;else try{t=JSON.stringify(e)??String(e)}catch{t=String(e)}return t.length>60&&(t=`${t.slice(0,57)}…`),` (got ${t})`}function qde(e){if(!e.startsWith(`/`))return null;let t=e.slice(1).split(`/`)[0]??``;return t===``?null:t.replace(/~1/g,`/`).replace(/~0/g,`~`)}function Jde(e){return e.split(`/`).slice(1).map(e=>e.replace(/~1/g,`/`).replace(/~0/g,`~`)).join(`.`)}function R5(e,t,n){if(t.length===0)return[];let r=n?.source??`frontmatter`,{data:i,keyLines:a}=Gde(e),o=e.split(`
|
|
597
|
+
`),s=e=>({start:{line:e,character:0},end:{line:e,character:o[e]?.length??0}}),c=[];for(let{schema:e,ruleId:n}of t){let t=Wde(e);if(t&&!t(i))for(let e of t.errors??[]){let t=e.keyword;if(t===`if`)continue;let o=0,l,u=`invalid`,d;if(t===`maxProperties`&&e.instancePath===``)l=`This document must not have frontmatter`;else if(t===`required`&&e.instancePath===``){let t=String(e.params.missingProperty??``);l=`Frontmatter property "${t}" is required`,u=`missing`,t!==``&&(d=t)}else if(e.instancePath===``)l=`Frontmatter ${e.message??`violates "${t}"`}`;else{let n=qde(e.instancePath);n!==null&&(o=a.get(n)??0);let r=Jde(e.instancePath),s=n!==null&&r===n?i[n]:void 0;if(t===`enum`)l=`Frontmatter property "${r}" must be one of: ${(e.params.allowedValues??[]).map(String).join(`, `)}${L5(s)}`;else if(t===`format`&&I5(e.params)!==void 0){let t=e.params.format;l=`Frontmatter property "${r}" must be ${I5(e.params)} (format "${String(t)}")${L5(s)}`}else l=`Frontmatter property "${r}" ${e.message??`violates "${t}"`}`}c.push({range:s(o),severity:`warning`,source:r,code:n??t,message:l,frontmatterScope:u,...d===void 0?{}:{frontmatterProperty:d}})}}return c}var z5=`doc`;function Yde(e,t){return xG(e,vG({strings:{[z5]:e},config:t})[z5]??[])}function Xde(e,t){let n=vG({strings:{[z5]:e},config:t})[z5]??[],r=e.split(`
|
|
598
|
+
`),i=Zde(t);return n.map(e=>$de(e,r,Qde(e,i)))}function Zde(e){let t=new Map;return Object.entries(e).forEach(([e,n],r)=>{let i=e.toUpperCase();if(i===`DEFAULT`)return;let a=null;if(n===`error`||n===`warning`)a=n;else if(typeof n==`object`&&n&&!Array.isArray(n)){let e=n.severity;(e===`error`||e===`warning`)&&(a=e)}a!==null&&t.set(i,{entryIndex:r,severity:a})}),t}function Qde(e,t){let n;for(let r of e.ruleNames){let e=t.get(r.toUpperCase());e!==void 0&&(n===void 0||e.entryIndex>n.entryIndex)&&(n=e)}return n?.severity??`warning`}function $de(e,t,n){let[r,i]=e.errorRange??[1,null],a=e.lineNumber-1,o=(r??1)-1,s=t[a]?.length??0,c=i==null?s:Math.min(o+i,s),l=e.fixInfo?[efe(e.fixInfo,e.lineNumber,t)]:void 0;return{range:{start:{line:a,character:o},end:{line:a,character:Math.max(c,o)}},severity:n,source:`markdownlint`,code:e.ruleNames[0]??`MD000`,message:e.errorDetail?`${e.ruleDescription}: ${e.errorDetail}`:e.ruleDescription,...l?{fixes:l}:{}}}function efe(e,t,n){let r=e.lineNumber??t,i=r-1;if(e.deleteCount===-1){if(r<n.length)return{range:{start:{line:i,character:0},end:{line:i+1,character:0}},newText:``};if(i>0){let e=n[i-1]?.length??0;return{range:{start:{line:i-1,character:e},end:{line:i,character:n[i]?.length??0}},newText:``}}return{range:{start:{line:0,character:0},end:{line:0,character:n[0]?.length??0}},newText:``}}let a=(e.editColumn??1)-1;return{range:{start:{line:i,character:a},end:{line:i,character:a+Math.max(0,e.deleteCount??0)}},newText:e.insertText??``}}var B5=[`no-wiki-links`,`log-shape`,`index-shape`,`reserved-casing`,`frontmatter-required`,`frontmatter-recommended`,`frontmatter-provenance`,`frontmatter-computation`,`frontmatter-reserved-index`,`frontmatter-root-index`,`project-no-mdx`];function V5(e,t){return e?.[t]!==!1}var tfe=[{id:`structure`,ids:[`no-wiki-links`,`log-shape`,`index-shape`,`reserved-casing`]},{id:`frontmatter`,ids:[`frontmatter-required`,`frontmatter-recommended`,`frontmatter-provenance`,`frontmatter-computation`,`frontmatter-reserved-index`,`frontmatter-root-index`]},{id:`project`,ids:[`project-no-mdx`]}];function nfe(e){throw Error(`Unhandled OkfRuleId variant: ${JSON.stringify(e)}`)}function rfe(e){throw Error(`Unhandled OkfRuleGroupId variant: ${JSON.stringify(e)}`)}var ife=`.ok/okf`;function afe(e){return`${e.replace(/^frontmatter-/,``)}.schema.json`}function H5(e){return`${ife}/${afe(e)}`}var ofe={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — required frontmatter`,description:"The OKF v0.2 conformance floor. A bundle is conformant when every non-reserved .md file contains a parseable YAML frontmatter block whose `type` is non-empty. This schema is the whole of that floor: a concept carrying only `type` is fully conformant. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#11-conformance",type:`object`,required:[`type`],properties:{type:{type:`string`,pattern:`\\S`,description:"REQUIRED, and the only always-required key in OKF. A short string identifying the kind of concept; consumers use it for routing, filtering, and presentation. Type values are not registered centrally — pick something descriptive and self-explanatory (`BigQuery Table`, `BigQuery Dataset`, `API Endpoint`, `Metric`, `Playbook`, `Reference`, `Attested Computation`). Consumers must tolerate unknown types, typically by treating them as generic concepts. The `\\S` pattern is what makes §11 rule 2 mean what it says, and it replaces a `minLength` rather than joining one: a length check alone accepts a whitespace-only value that no consumer can route on, and having both would report one mistake twice. OKF v0.2 §4.1, §11."}}},sfe={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — recommended frontmatter`,description:"Shapes for the OKF v0.2 recommended keys. Every key here is optional, and nothing is constrained beyond the shape OKF states: declaring a key pins its YAML type when present (so `tags` written as a comma-separated string warns) and advertises it to agents at read time. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#41-frontmatter",type:`object`,properties:{title:{type:`string`,description:`Human-readable display name. If omitted, consumers MAY derive a title from the filename. OKF v0.2 §4.1.`},description:{type:`string`,description:"A single sentence summarizing the concept. Used by `index.md` generators, search snippets, and previews. OKF v0.2 §4.1."},resource:{type:`string`,format:`uri-reference`,description:"A URI that uniquely identifies the underlying asset the concept describes. Absent for concepts that describe abstract ideas rather than physical resources. Path-valued: an absolute URL, a bundle-relative path beginning with `/`, or an ordinary relative path — hence `uri-reference`, not `uri`, which would reject `/tables/customers.md`. OKF v0.2 §4.1, §6.2."},tags:{type:`array`,items:{type:`string`},description:`A YAML list of short strings for cross-cutting categorization. Tags stay a first-class concept through this field; OKF specifies no separate per-tag file format, so a consumer that wants a tag-browsing view synthesizes one by scanning frontmatter. OKF v0.2 §3.1, §4.1.`},timestamp:{description:"LEGACY (OKF v0.1), superseded by `generated.at` in v0.2 — one of the two deliberate breaking changes. Consumers MAY fall back to it when `generated` is absent; new documents SHOULD write `generated: { by, at }` instead. Documented here so agents are told what it is and what replaced it, but deliberately left unconstrained: v0.2 does not define it as a producer field, so validating its shape would be a rule OKF no longer has. OKF v0.2 §5.2, §13.1."}}},cfe={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — provenance, trust, and lifecycle frontmatter`,description:'The optional OKF v0.2 families that make "where did this come from", "how much should I trust it", and "is it still current" answerable from frontmatter alone. Every key is optional, and absence carries meaning rather than being an error: a concept with no `verified` is unverified, and a consumer must not reject it. Only `sources[].resource` and `generated.by` are required-when-their-parent-is-present, because those are the two fields OKF marks REQUIRED in this family; every other field is described but not mandated, so nothing else is enforced. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#5-provenance-trust-and-lifecycle',type:`object`,properties:{sources:{type:`array`,description:"The materials this concept derives from, external or internal to the bundle. Lineage is expressed through links rather than a dedicated field: when an entry's `resource` points at another OKF concept, the derivation edge already exists in the bundle graph, so a consumer may recurse into that source's own `sources`. OKF v0.2 §5.1.",items:{type:`object`,required:[`resource`],properties:{resource:{type:`string`,description:"REQUIRED within an entry. Either a concrete artifact a consumer can follow (an absolute URL, a bundle-relative path, or a path into a `references/` subdirectory) or a population or scope descriptor it cannot, for example `all queries in BigQuery project X`. Deliberately NOT format-constrained: a scope descriptor is prose, so a `uri-reference` check here would warn on conformant documents. OKF v0.2 §5.1, §6.2, §6.3."},id:{type:`string`,description:"Optional. A stable key used to attribute individual claims: a markdown footnote whose label is this id (`[^ga4-schema]`) attributes the claim it follows. SHOULD be present when the body cites the source. Keyed rather than positional because agents constantly rewrite these documents — a positional index misattributes silently the moment the list is reordered. OKF v0.2 §5.1."},title:{type:`string`,description:`Optional. Human-readable label for the source. OKF v0.2 §5.1.`},author:{type:`string`,description:"Optional credibility signal — an authority signal: who or what produced the source. OKF describes this as following the actor convention (§7), but its own examples use a `team:<id>` prefix that the three §7 forms do not cover, so no pattern is enforced. OKF v0.2 §5.1, §7."},usage_count:{type:`integer`,description:"Optional credibility signal — an adoption and liveness signal: how often `resource` was exercised (dashboard views, query executions, page reads) over `usage_window`. For a single artifact it is that artifact's own exercise count; for a scope descriptor it is the number of exercises within the scope that touch the concept. Coarse by design: comparable at the alive-versus-dead and order-of-magnitude level and against a source's own history, but not a precise cross-kind ranking. Read as liveness and trend, not as a score. OKF v0.2 §5.1."},last_modified:{type:`string`,format:`date-time`,description:"Optional credibility signal — a recency signal: when the source itself last changed, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-15T00:00:00Z`). Distinct from `generated.at`, which records when the concept was written. OKF v0.2 §5, §5.1."},usage_window:{type:`object`,description:"Optional per-entry override of the `usage_window` written as a sibling of `sources`. OKF v0.2 §5.1.",properties:{from:{type:`string`,format:`date-time`,description:"Start of the window framing this entry's `usage_count`, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-01T00:00:00Z`). OKF v0.2 §5, §5.1."},to:{type:`string`,format:`date-time`,description:"End of the window framing this entry's `usage_count`, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-30T00:00:00Z`). OKF v0.2 §5, §5.1."}}}}}},usage_window:{type:`object`,description:"Written once as a sibling of `sources`, this frames every `usage_count` in the list with a `{ from, to }` range. A single entry may carry its own `usage_window` to override it. OKF v0.2 §5, §5.1.",properties:{from:{type:`string`,format:`date-time`,description:"Start of the shared usage window, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-01T00:00:00Z`). OKF v0.2 §5, §5.1."},to:{type:`string`,format:`date-time`,description:"End of the shared usage window, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-30T00:00:00Z`). OKF v0.2 §5, §5.1."}}},generated:{type:`object`,required:[`by`],description:"How the current content was produced. Kept distinct from `verified` because who wrote a concept need not be who confirmed it. OKF v0.2 §5.2.",properties:{by:{type:`string`,description:"REQUIRED within `generated`. An actor in the OKF convention: `<producer>/<version>` for agents and tools (`reference_agent/gemini-2.5-pro`), `human:<id>` for a person (`human:ahormati`), or `process:<id>` for an automated process (`process:finance-nightly`). Consumers that classify trust key off the `human:` prefix, so producers MUST use it for hand-authored or human-confirmed content — a rule about which form to pick for which content, which frontmatter alone cannot check, so the three forms are documented here rather than enforced by a pattern. OKF v0.2 §5.2, §7."},at:{type:`string`,format:`date-time`,description:"An ISO 8601 datetime with an explicit UTC offset (`2026-06-30T14:00:00Z`) marking the content's last meaningful change. Consumers use it to tell a recent edit from a stale fact. Supersedes v0.1's top-level `timestamp`. OKF v0.2 §5, §5.2, §13.1."}}},verified:{description:'Who or what has confirmed the content against its sources or `resource` — a list of verification events. Multiple entries capture independent checks, for example a human sign-off plus a nightly process; "how recently" is the latest `at`. Independent of `generated.at`: content can change without re-confirmation, and facts can be re-confirmed without regeneration. A single verifier MAY be written as one bare `{ by, at }` mapping without the list dash, and consumers MUST treat that as a one-element list — hence the two accepted shapes here. Absence means unverified, which is a valid state, never a rejection. OKF v0.2 §5.2, §5.3, §11.',anyOf:[{type:`object`,description:`The bare single-verifier mapping form. OKF v0.2 §5.2.`,properties:{by:{type:`string`,description:"The verifying actor: `<producer>/<version>`, `human:<id>`, or `process:<id>`. A `human:` verifier is what raises the trust tier to human-reviewed; non-human verifiers alone yield machine-confirmed. OKF v0.2 §5.2, §5.3, §7."},at:{type:`string`,format:`date-time`,description:"An ISO 8601 datetime with an explicit UTC offset (`2026-07-01T09:00:00Z`) recording when the verification event happened. OKF v0.2 §5, §5.2."}}},{type:`array`,description:`The list form: one entry per independent verification event. OKF v0.2 §5.2.`,items:{type:`object`,properties:{by:{type:`string`,description:"The verifying actor: `<producer>/<version>`, `human:<id>`, or `process:<id>`. A `human:` verifier is what raises the trust tier to human-reviewed; non-human verifiers alone yield machine-confirmed. OKF v0.2 §5.2, §5.3, §7."},at:{type:`string`,format:`date-time`,description:"An ISO 8601 datetime with an explicit UTC offset (`2026-07-01T09:00:00Z`) recording when the verification event happened. OKF v0.2 §5, §5.2."}}}}]},status:{enum:[`draft`,`stable`,`deprecated`],description:"Lifecycle state. `draft` = not yet reviewed, possibly incomplete. `stable` = ready for consumption. `deprecated` = kept for links and history, no longer current. Absent means `stable`, so the key is only worth writing to say draft or deprecated. These three values are the whole set OKF defines, which is why this is the pack's only enum. OKF v0.2 §5.4."},stale_after:{type:`string`,format:`date-time`,description:"An absolute instant, an ISO 8601 datetime with an explicit UTC offset (`2026-12-31T00:00:00Z`): the concept is stale when `now >= stale_after`. Absolute rather than a relative TTL so staleness stays a plain comparison with no reference to when the concept was read. An instant in the past is a freshness signal for consumers, not a violation. OKF v0.2 §5, §5.5, §10.5."}}},lfe={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — Attested Computation frontmatter`,description:'Shapes for the OKF v0.2 computation keys, which turn a concept into a sanctioned way to compute a value so a consumer can confirm the agent ran the blessed computation instead of improvising its own. Provenance answers "where did this claim come from"; attestation answers "was this number produced the way we said it must be". This file also carries the one value-shaped rule in the pack: `runtime` is the single key OKF marks REQUIRED here, and only when `type` is `Attested Computation`. Ordinary concepts never match that condition and are unaffected, and no other key in the family is mandated. OKF records the computation and the means to check it and executes nothing itself; receipts and verdicts are runtime artifacts that are never stored in the bundle. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#10-attested-computations-concept',type:`object`,if:{required:[`type`],properties:{type:{const:`Attested Computation`,description:"The condition, not a constraint: everything in `then` applies only to documents whose `type` is exactly `Attested Computation`. An ordinary concept never matches, so nothing in this schema is ever asked of it. `type` is also required inside the condition so a document with no type at all fails the conformance floor once, rather than also being told it is missing a `runtime` for a type it never claimed."}}},then:{required:[`runtime`]},properties:{runtime:{type:`string`,description:"REQUIRED for `type: Attested Computation`. The single field that says how to run the computation, and therefore how the executor and attester interpret it and what `parameters` mean — a parameter is a SQL bind variable, a dbt var, or a Python argument depending on the runtime. Keeping `runtime` and `parameters` in one frontmatter is what makes the binding semantics self-evident. Example values: `bigquery`, `postgres`, `dbt`, `python`, `Looker`. Not a closed set, so no enum. OKF v0.2 §10.1, §10.2."},parameters:{type:`array`,description:`The typed, named holes the agent may fill. An agent MAY only supply values for these parameters; it MUST NOT author or edit the computation. That parameter-only surface is what makes "did the sanctioned thing run" a mechanical comparison rather than a judgement call. OKF v0.2 §10.2, §10.3.`,items:{type:`object`,properties:{name:{type:`string`,description:"The parameter name the computation binds, for example `year` bound as `@year` in BigQuery SQL or `{{ var('year') }}` in dbt. OKF v0.2 §10.2, §10.3."},type:{type:`string`,description:"The parameter's type, interpreted by `runtime` (`integer`, `string`, and so on). Deliberately not constrained to JSON Schema type names, because the vocabulary belongs to the runtime. OKF v0.2 §10.2."},required:{type:`boolean`,description:`Whether the agent must supply a value for this parameter. OKF v0.2 §10.2.`}}}},computation:{type:`string`,format:`uri-reference`,description:"Optional. A path to a file holding the computation, used instead of an inline body fence — best for a long or generated computation, or one already kept as a real file shared with non-OKF tooling. When absent, the body's `# Computation` fence IS the computation. Path-valued: an absolute URL, a bundle-relative path beginning with `/`, or a relative path. OKF v0.2 §6.2, §10.2, §10.3."},executor:{type:`object`,description:"How the computation is run. A runner — an agent, or deterministic consumer code — follows `resource`, and the run returns a receipt shaped by `receipt`. Binding the computation with the parameter values into the executable artifact is the consumer's job. OKF v0.2 §10.2, §10.5.",properties:{resource:{type:`string`,format:`uri-reference`,description:"Names the run instructions or code. What sits behind it — a Skill, a script, a container — is a packaging choice; OKF fixes the interface, not the packaging. Conventionally points into a `references/` subdirectory, for example `references/skills/run-on-bq.md`. OKF v0.2 §1, §6.2, §6.3, §10.2."},receipt:{type:`array`,items:{type:`string`},description:"Declares the fields a run must return — the evidence the attester inspects, for example `[job_id, executed_sql, result]` for BigQuery or `[run_id, compiled_sql, result]` for dbt. Because the attester compares the expanded, compiled artifact the receipt carries, a rewritten query, a swapped computation file, or a mutated dependency fails the check. The receipt itself is a runtime artifact and is never stored in the bundle. OKF v0.2 §10.2, §10.3, §10.5."}}},attester:{type:`object`,description:"The deterministic check that inspects a receipt and returns a verdict. Meant to run consumer-side. Distinct from `verified`: `verified` confirms the definition still matches policy and is recorded in the bundle, while attestation confirms a single run produced the value the sanctioned way and is not stored. OKF v0.2 §10.2, §10.6.",properties:{resource:{type:`string`,format:`uri-reference`,description:"Names code — no LLM — that takes a receipt and returns a verdict, independently re-deriving the binding of `computation` with the claimed parameter values to compare against what actually ran. Conventionally points into a `references/` subdirectory, for example `references/attesters/sql-equality.py`. OKF v0.2 §6.2, §6.3, §10.2, §10.3."}}}}},ufe={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — index files carry no frontmatter`,description:"`index.md` is a reserved filename at any level of the hierarchy and must not be used for a concept document. Index files contain no frontmatter, with exactly one exception — a bundle-root `index.md` may carry `okf_version` — which the scope carves out with a `!index` exclusion rather than a keyword here. `maxProperties: 0` is the mechanism rather than the boolean schema `false`, because a document with no frontmatter block validates as `{}` and `false` would reject that too, flagging the very documents that are correct. `log.md` is deliberately NOT covered: §9 constrains a log's date headings, ordering, and prose entries but never its frontmatter, and OKF's own reference bundle ships a `log.md` carrying `type` and `title`. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#8-index-files",type:`object`,maxProperties:0},dfe={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — bundle-root index.md`,description:"The bundle-root `index.md` is the only index file OKF permits frontmatter in, and `okf_version` is the key it names there. OKF states the declaration as a MAY, so it is not required here. Nor is the frontmatter closed to other keys: §8 grants the exception for `okf_version` specifically, but §11 tells consumers not to reject a bundle over unknown additional keys, and that ambiguity is resolved in favor of the looser reading. The one thing pinned is the value's shape, because a YAML float is provably lossy where a version string is not. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#12-versioning",type:`object`,properties:{okf_version:{type:`string`,pattern:`^[0-9]+\\.[0-9]+$`,description:'The OKF version this bundle targets, as `<major>.<minor>` — currently `"0.2"`. Quote it: unquoted `0.2` parses as a YAML number, so a consumer comparing version strings sees a float instead, and `0.10` would silently become `0.1`. A minor bump is backward-compatible additions; a major bump may rename required fields or change reserved filenames. Consumers that do not understand the declared version should attempt best-effort consumption rather than refusing the bundle. OKF v0.2 §12.'}}},U5=[`**`,`!**/{index,log}`],W5=[{id:`frontmatter-required`,appliesTo:U5,schema:ofe},{id:`frontmatter-recommended`,appliesTo:U5,schema:sfe},{id:`frontmatter-provenance`,appliesTo:U5,schema:cfe},{id:`frontmatter-computation`,appliesTo:U5,schema:lfe},{id:`frontmatter-reserved-index`,appliesTo:[`**/index`,`!index`],schema:ufe},{id:`frontmatter-root-index`,appliesTo:[`index`],schema:dfe}],ffe=Object.fromEntries(B5.filter(e=>!W5.some(t=>t.id===e)).map(e=>[e,!1]));function G5(e,t){return t===void 0?[]:W5.filter(n=>V5(e,n.id)&&O5([...n.appliesTo]).matches(t))}function pfe(e){return W5.filter(t=>V5(e,t.id)).map(e=>({appliesTo:[...e.appliesTo],file:H5(e.id)}))}function mfe(e,t,n){let r=G5(t,n);return r.length===0?[]:R5(e,r.map(e=>({file:H5(e.id),schema:e.schema,ruleId:e.id})),{source:`okf`})}function K5(e,t){return SG(`okf:${e}`,(n,r)=>{try{t(n,r)}catch(t){console.warn(`[lint] OKF rule "${e}" failed${r.data.okfDocName?` on "${r.data.okfDocName}"`:``}`,t)}})}function q5(e,t,n){let r=O5(t);return K5(e,(e,t)=>{r.matches(t.data.okfDocName)&&n(e,t)})}var J5=e=>({line:e.line-1,character:e.column-1});function hfe(e,t){if(e&&`start`in e)return{start:J5(e.start),end:J5(e.end)};if(e){let n=J5(e);return{start:n,end:{line:n.line,character:t[n.line]?.length??0}}}return{start:{line:0,character:0},end:{line:0,character:t[0]?.length??0}}}function gfe(e,t){return{range:hfe(e.place,t),severity:`warning`,source:`okf`,code:e.ruleId??`okf`,message:e.reason}}function _fe(e,t,n){if(t.length===0)return[];let r=le().use(ge).use(ve).use(oF,[`yaml`]);for(let e of t)r.use(e);let i=new ne({value:e});n!==void 0&&(i.data.okfDocName=n);let a=r.parse(i);r.runSync(a,i);let o=e.split(`
|
|
599
|
+
`);return i.messages.map(e=>gfe(e,o))}var vfe=`**/index`;function yfe(e){let t=!1;return T(e,[`link`,`linkReference`],()=>(t=!0,!1)),t}var bfe=q5(`index-shape`,vfe,(e,t)=>{let n=!1;for(let r of e.children){if(r.type===`heading`){n=!0;continue}r.type===`list`&&!n&&t.message(`This index list is not under a section heading, so an Open Knowledge Format consumer reading the file as navigation has no name to file its entries under — an index is one or more heading-led sections of bulleted links.`,r)}T(e,`listItem`,e=>{e.children.some(e=>e.type===`list`)||yfe(e)||t.message(`This index entry has no link, so an Open Knowledge Format consumer reading the file as navigation has nowhere to follow it. Every entry in the format's own reference bundles is a link followed by a short description.`,e)})}),xfe=`**/log`,Sfe=/^\s*(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])(?!\d)/;function Cfe(e,t,n){let r=new Date(Date.UTC(e,t-1,n));return r.getUTCFullYear()===e&&r.getUTCMonth()===t-1&&r.getUTCDate()===n}var wfe=/^\s*\d{4}[-/.]\d{1,2}[-/.]\d{1,2}/;function Y5(e){let t=e.trim();return t.length>60?`${t.slice(0,59)}…`:t}var Tfe=q5(`log-shape`,xfe,(e,t)=>{let n;T(e,`heading`,e=>{if(e.depth!==2)return;let r=Oe(e),i=Sfe.exec(r);if(!i){t.message(wfe.test(r)?`Log date heading "${Y5(r)}" is not in ISO 8601 YYYY-MM-DD form, the one form an Open Knowledge Format log requires of its date headings.`:`Log entry heading "${Y5(r)}" is not a date, so it falls outside the dated-entry format an Open Knowledge Format consumer reads a log as — nothing under it reaches the change-history timeline.`,e);return}let a=`${i[1]}-${i[2]}-${i[3]}`;if(!Cfe(Number(i[1]),Number(i[2]),Number(i[3]))){t.message(`Log date heading "${a}" is not a real calendar date, so it is not ISO 8601 — the one form an Open Knowledge Format log requires of its date headings.`,e);return}n!==void 0&&a>n&&t.message(`Log date heading "${a}" is newer than the entry above it — an Open Knowledge Format log is a flat list of date-grouped entries, newest first.`,e),n=a})}),Efe=/\[\[[^[\]\n]+\]\]/g;function Dfe(e){let t=`Wiki-link ${e} won't resolve for an external Open Knowledge Format consumer — it renders as literal text and its graph edge is lost.`;return e.includes(`|`)?`${t} The alias "|" also splits a GFM table cell.`:t}var Ofe=K5(`no-wiki-links`,(e,t)=>{let n=typeof t.value==`string`?t.value:String(t.value);T(e,`text`,e=>{let r=e.position?.start,i=e.position?.end,a=r?.offset,o=a===void 0||i?.offset===void 0?e.value:n.slice(a,i.offset),s=0,c=r?.line??0,l=r?.column??0,u=e=>{for(;s<e;s+=1)o[s]===`
|
|
600
|
+
`?(c+=1,l=1):l+=1;return{line:c,column:l}};for(let e of o.matchAll(Efe)){let{index:i}=e;if((a===void 0?o[i-1]:n[a+i-1])===`!`)continue;let s=r&&a!==void 0?{start:u(i),end:u(i+e[0].length)}:void 0;t.message(Dfe(e[0]),s)}})}),kfe=[`index`,`log`],Afe=K5(`reserved-casing`,(e,t)=>{let n=t.data.okfDocName;if(n===void 0)return;let r=Y$(n),i=r.toLowerCase();kfe.includes(i)&&r!==i&&t.message(`This file is named "${r}", but the Open Knowledge Format only recognizes "${i}". On a case-sensitive filesystem a consumer reads it as an ordinary concept document rather than the reserved file it is meant to be.`)}),X5=[{id:`no-wiki-links`,rule:Ofe},{id:`log-shape`,rule:Tfe},{id:`index-shape`,rule:bfe},{id:`reserved-casing`,rule:Afe}],jfe=X5.map(e=>e.rule);function Mfe(e){return e===void 0?jfe:X5.filter(t=>V5(e,t.id)).map(e=>e.rule)}var Nfe=Xa([P(),R(xm),no(M(),Ua())]),Pfe={id:`markdownlint`,sliceSchema:I({enabled:P(),rules:no(M(),Nfe)}),defaultSlice:{enabled:!1,rules:T5},async lint(e,t){return Xde(e,E5(t.rules))},fix(e,t){return Yde(e,E5(t.rules))}},Ffe=I({appliesTo:Xa([M(),F(M())]).optional(),file:M(),enabled:P().optional(),key:M().optional(),schema:no(M(),Ua()).optional()}),Z5=[Pfe,{id:`frontmatter`,sliceSchema:I({enabled:P(),schemas:F(Ffe)}),defaultSlice:{enabled:!1,schemas:[]},async lint(e,t,n){return R5(e,j5(t.schemas,n.docName))},frontmatter:{schemasForDoc:(e,t)=>j5(e.schemas,t),narrowSliceToFrontmatter:e=>e,advertisedMappings:e=>e.schemas}},{id:`okf`,sliceSchema:I({enabled:P(),rules:no(M(),P()).optional(),generate:I({index:P().optional()}).optional()}),defaultSlice:{enabled:!1},async lint(e,t,n){return[..._fe(e,Mfe(t.rules),n.docName),...mfe(e,t.rules,n.docName)]},frontmatter:{schemasForDoc:(e,t)=>G5(e.rules,t),narrowSliceToFrontmatter:e=>({...e,rules:{...e.rules,...ffe}}),advertisedMappings:e=>pfe(e.rules)}}],Ife={enabled:!0,plugins:Object.fromEntries(Z5.map(e=>[e.id,e.defaultSlice]))};function Lfe(e,t){return e.enabled&&e.plugins[t]?.enabled===!0}function Rfe(e,t){if(!e?.enabled||t===void 0||t===``)return[];let n=[];for(let r of Z5){if(r.frontmatter===void 0)continue;let i=e.plugins[r.id];i?.enabled===!0&&n.push(...r.frontmatter.schemasForDoc(i,t))}return n}function zfe(e){let t=Object.fromEntries(Z5.map(t=>{let n=e.plugins[t.id]??t.defaultSlice;return t.frontmatter===void 0?[t.id,{...n,enabled:!1}]:[t.id,t.frontmatter.narrowSliceToFrontmatter(n)]}));return{...e,plugins:t}}var Bfe=new Set([`.markdownlint.json`,`.markdownlint.jsonc`]);function Vfe(e){return Bfe.has(e)}I({docName:X2,summary:$2,content:M().optional(),...Q2}).loose(),I({docName:X2,summary:$2,markdown:M(),position:R([`append`,`prepend`,`replace`]).optional(),extension:R(I$).optional(),...Q2}).loose(),I({docName:X2,summary:$2,find:M().min(1),replace:M(),offset:N().int().nonnegative().optional(),...Q2}).loose(),I({docName:X2,connectionId:M().min(1),scope:R([`last`,`session`,`file`,`count`]).optional(),count:N().int().positive().optional(),...Q2}).loose().refine(e=>e.scope!==`count`||e.count!==void 0,{message:`count is required when scope is 'count'`,path:[`count`]});var Q5=I({value:M(),truncatedFrom:N().int().nonnegative().optional(),hint:M().optional()}).loose(),Hfe=Qa(`kind`,[I({kind:z(`inline`),content:M()}),I({kind:z(`truncated`),byteLength:N().int().nonnegative(),hint:M()})]),$5=I({kind:z(`content-divergence`),intendedBytes:N().int().nonnegative(),actualBytes:N().int().nonnegative(),byteDelta:N().int(),divergenceType:M().optional(),currentState:Hfe.optional(),hint:M().optional()}).loose(),Ufe=I({type:z(`orphan`),parentCandidates:F(M()),message:M()}).loose(),e7=I({kind:z(`disk-edit-reconciled`),intendedBytes:N().int().nonnegative(),actualBytes:N().int().nonnegative(),byteDelta:N().int(),mergeOutcome:M().optional(),hint:M().optional()}).loose();Qa(`kind`,[$5,e7]);var Wfe=I({kind:z(`mermaid-parse-error`),fenceIndex:N().int().positive(),fenceFirstLine:M(),message:M(),line:N().int().positive().optional()}).loose(),t7=I({href:M(),targetKind:M(),role:M(),sourceForm:M(),resolvedTarget:M().nullable(),reason:M(),resolutionMethod:M(),fallbackTarget:M().nullable().optional(),definition:I({line:N().int().nonnegative(),label:M()}).loose().optional()}).loose(),n7=F(Qa(`kind`,[$5,e7,Wfe,I({kind:z(`lint-violation`),source:M(),code:M(),message:M(),severity:R([`error`,`warning`,`info`,`hint`]),line:N().int().positive(),column:N().int().positive(),linkTarget:M().optional(),localTarget:t7.optional()}).loose()])).min(1),r7=F(I({href:M(),resolvedTo:M().nullable(),reason:R([`no-such-doc`,`no-such-file`,`unresolvable`]),localTarget:t7.optional()}).loose()),i7=I({reason:M().min(1),count:N().int().positive()}).loose();I({timestamp:M().min(1),summary:Q5.optional(),warnings:n7.optional()}).loose(),I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),hints:F(Ufe).optional(),summary:Q5.optional(),warnings:n7.optional(),brokenLinks:r7,brokenLinkSuppression:i7.optional()}).loose(),I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),summary:Q5.optional(),warnings:n7.optional(),brokenLinks:r7,brokenLinkSuppression:i7.optional()}).loose(),I({docName:M().min(1),scope:R([`last`,`session`,`count`]),undone:P()}).loose(),I({docs:F(I({docName:Z2,markdown:M(),position:R([`append`,`prepend`,`replace`]).optional(),extension:R(I$).optional(),summary:$2}).loose()).min(1).max(100),...Q2}).loose();var Gfe=I({type:y4,title:M(),detail:M().optional()}).loose(),Kfe=Qa(`status`,[I({status:z(`written`),docName:M().min(1),summary:Q5.optional(),warnings:n7.optional(),brokenLinks:r7,brokenLinkSuppression:i7.optional()}).loose(),I({status:z(`error`),docName:M().min(1),error:Gfe}).loose()]);I({timestamp:M().min(1),results:F(Kfe),written:N().int().nonnegative(),failed:N().int().nonnegative()}).loose(),I({docName:X2,patch:no(M(),Xa([Ad,Va()])),types:no(M(),R(Dd)).optional(),summary:$2,...Q2}).loose(),I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),appliedKeys:F(M()),summary:Q5.optional(),warnings:n7.optional(),brokenLinks:r7,brokenLinkSuppression:i7.optional()}).loose();function qfe(e){return{enabled:e.enabled??!0,plugins:{markdownlint:{...e.markdownlint,rules:e.markdownlint.rules??T5},frontmatter:{enabled:e.frontmatter?.enabled??!1,schemas:e.frontmatter?.schemas??[]},okf:{enabled:e.okf?.enabled??!1,...e.okf?.rules===void 0?{}:{rules:e.okf.rules},generate:{index:e.okf?.generate?.index??!1}}}}}var Jfe=Object.fromEntries(Z5.map(e=>[e.id,e.sliceSchema])),Yfe=I({effective:I({enabled:P(),plugins:I(Jfe)}),configFile:M().nullable().optional(),configProblems:F(M()).optional()}),Xfe=Xa([P(),no(M(),Ua())]),Zfe=new Set([`__proto__`]),a7=M().min(1).max(256).refine(e=>!Zfe.has(e),{message:`schema property name cannot be __proto__`});I({ruleId:M().min(1).max(64).regex(/^[A-Za-z][A-Za-z0-9_-]*$/),value:Xa([Xfe,Va()])}),I({file:M().min(1).max(512),delete:z(!0).optional(),field:a7.optional(),parentPath:F(Xa([a7,I({items:z(!0)}).strict()])).max(8).optional(),removeField:z(!0).optional(),renameTo:a7.optional(),constraint:I({type:R([`string`,`number`,`boolean`,`array`,`object`]).nullable().optional(),enum:F(Xa([M(),N(),P()])).nullable().optional(),itemsEnum:F(Xa([M(),N(),P()])).nullable().optional(),itemsType:R([`string`,`number`,`boolean`,`object`]).nullable().optional(),pattern:M().nullable().optional(),format:M().nullable().optional(),description:M().max(2048).nullable().optional(),required:P().optional()}).optional()}).refine(e=>e.delete===void 0||e.field===void 0&&e.constraint===void 0&&e.removeField===void 0&&e.renameTo===void 0,{message:`delete cannot be combined with a field edit`}).refine(e=>[e.constraint,e.removeField,e.renameTo].filter(e=>e!==void 0).length<=1,{message:`constraint, removeField, and renameTo are mutually exclusive`}).refine(e=>e.removeField===void 0&&e.renameTo===void 0||e.field!==void 0,{message:`removeField and renameTo require field`}).refine(e=>e.parentPath===void 0||e.field!==void 0,{message:`parentPath requires field`}).refine(e=>e.field===void 0?e.constraint===void 0:e.constraint!==void 0||e.removeField!==void 0||e.renameTo!==void 0,{message:`field requires constraint, removeField, or renameTo`});var Qfe=I({schemas:F(M()),truncated:P()}).strict(),o7=I({line:N(),character:N()}),s7=I({start:o7,end:o7}),c7=I({range:s7,severity:R([`error`,`warning`,`info`,`hint`]),source:M(),code:M(),message:M(),fixes:F(I({range:s7,newText:M()})).optional(),frontmatterScope:R(_m).optional(),frontmatterProperty:M().optional()}),l7=F(M()).optional();I({files:F(I({file:M(),diagnostics:F(c7),ran:l7,warnings:F(M()).optional()})),fileCount:N(),errorCount:N(),warningCount:N(),warnings:F(M()),ran:l7});var $fe=c7.extend({linkTarget:M().optional(),localTarget:t7.optional()}),epe=I({files:F(I({file:M(),diagnostics:F($fe)})),fileCount:N(),errorCount:N(),warningCount:N(),warnings:F(M()),ran:l7,brokenLinkSuppression:i7.optional()}),u7=I({errorCount:N().int().nonnegative(),warningCount:N().int().nonnegative()}),tpe=I({files:F(I({file:M(),lint:u7,links:u7})),fileCount:N().int().nonnegative(),errorCount:N().int().nonnegative(),warningCount:N().int().nonnegative(),warnings:F(M()),brokenLinkSuppression:i7.optional()});I({docName:X2,summary:$2,...Q2}).loose();var npe=I({reason:R([`re-lint-threw`,`source-went-blind`]),message:M().min(1)}),rpe=I({file:M(),fixedCount:N(),diagnostics:F(c7),errorCount:N(),warningCount:N(),ran:l7,warnings:F(M()).optional(),diagnosticsArePreFix:P().optional(),reLintFailure:npe.optional()});function ipe(e){let t=e.trim().replace(/^\.\//,``);if(!t.startsWith(`.ok/schemas/`))return!1;let n=t.slice(12);return n.length>0&&!n.includes(`/`)&&!n.includes(`\\`)&&n!==`.`&&n!==`..`}function ape(e){let t=e.trim().toLowerCase().split(`/`).pop()??``;return t.endsWith(`.schema.json`)&&t.length>12?!0:ipe(e)&&t.endsWith(`.json`)}var d7=[{id:`MD001`,alias:`heading-increment`,aliases:[`heading-increment`],name:`Heading levels should only increment by one level at a time`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md001.md`,tags:[`headings`],options:[{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`}]},{id:`MD003`,alias:`heading-style`,aliases:[`heading-style`],name:`Heading style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md003.md`,tags:[`headings`],options:[{key:`style`,type:`enum`,description:`Heading style`,enum:[`consistent`,`atx`,`atx_closed`,`setext`,`setext_with_atx`,`setext_with_atx_closed`],default:`consistent`}]},{id:`MD004`,alias:`ul-style`,aliases:[`ul-style`],name:`Unordered list style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md004.md`,tags:[`bullet`,`ul`],options:[{key:`style`,type:`enum`,description:`List style`,enum:[`consistent`,`asterisk`,`plus`,`dash`,`sublist`],default:`consistent`}]},{id:`MD005`,alias:`list-indent`,aliases:[`list-indent`],name:`Inconsistent indentation for list items at the same level`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md005.md`,tags:[`bullet`,`ul`,`indentation`],options:[]},{id:`MD007`,alias:`ul-indent`,aliases:[`ul-indent`],name:`Unordered list indentation`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md007.md`,tags:[`bullet`,`ul`,`indentation`],options:[{key:`indent`,type:`integer`,description:`Spaces for indent`,default:2,minimum:1},{key:`start_indented`,type:`boolean`,description:`Whether to indent the first level of the list`,default:!1},{key:`start_indent`,type:`integer`,description:`Spaces for first level indent (when start_indented is set)`,default:2,minimum:1}]},{id:`MD009`,alias:`no-trailing-spaces`,aliases:[`no-trailing-spaces`],name:`Trailing spaces`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md009.md`,tags:[`whitespace`],options:[{key:`br_spaces`,type:`integer`,description:`Spaces for line break`,default:2,minimum:0},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!1},{key:`list_item_empty_lines`,type:`boolean`,description:`Allow spaces for empty lines in list items`,default:!1},{key:`strict`,type:`boolean`,description:`Include unnecessary breaks`,default:!1}]},{id:`MD010`,alias:`no-hard-tabs`,aliases:[`no-hard-tabs`],name:`Hard tabs`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md010.md`,tags:[`whitespace`,`hard_tab`],options:[{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`ignore_code_languages`,type:`string-array`,description:`Fenced code languages to ignore`,default:[]},{key:`spaces_per_tab`,type:`integer`,description:`Number of spaces for each hard tab`,default:1,minimum:0}]},{id:`MD011`,alias:`no-reversed-links`,aliases:[`no-reversed-links`],name:`Reversed link syntax`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md011.md`,tags:[`links`],options:[]},{id:`MD012`,alias:`no-multiple-blanks`,aliases:[`no-multiple-blanks`],name:`Multiple consecutive blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md012.md`,tags:[`whitespace`,`blank_lines`],options:[{key:`maximum`,type:`integer`,description:`Consecutive blank lines`,default:1,minimum:1}]},{id:`MD013`,alias:`line-length`,aliases:[`line-length`],name:`Line length`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md013.md`,tags:[`line_length`],options:[{key:`line_length`,type:`integer`,description:`Number of characters`,default:80,minimum:1},{key:`heading_line_length`,type:`integer`,description:`Number of characters for headings`,default:80,minimum:1},{key:`code_block_line_length`,type:`integer`,description:`Number of characters for code blocks`,default:80,minimum:1},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`tables`,type:`boolean`,description:`Include tables`,default:!0},{key:`headings`,type:`boolean`,description:`Include headings`,default:!0},{key:`strict`,type:`boolean`,description:`Strict length checking`,default:!1},{key:`stern`,type:`boolean`,description:`Stern length checking`,default:!1}]},{id:`MD014`,alias:`commands-show-output`,aliases:[`commands-show-output`],name:`Dollar signs used before commands without showing output`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md014.md`,tags:[`code`],options:[]},{id:`MD018`,alias:`no-missing-space-atx`,aliases:[`no-missing-space-atx`],name:`No space after hash on atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md018.md`,tags:[`headings`,`atx`,`spaces`],options:[]},{id:`MD019`,alias:`no-multiple-space-atx`,aliases:[`no-multiple-space-atx`],name:`Multiple spaces after hash on atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md019.md`,tags:[`headings`,`atx`,`spaces`],options:[]},{id:`MD020`,alias:`no-missing-space-closed-atx`,aliases:[`no-missing-space-closed-atx`],name:`No space inside hashes on closed atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md020.md`,tags:[`headings`,`spaces`,`atx_closed`],options:[]},{id:`MD021`,alias:`no-multiple-space-closed-atx`,aliases:[`no-multiple-space-closed-atx`],name:`Multiple spaces inside hashes on closed atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md021.md`,tags:[`headings`,`spaces`,`atx_closed`],options:[]},{id:`MD022`,alias:`blanks-around-headings`,aliases:[`blanks-around-headings`],name:`Headings should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md022.md`,tags:[`headings`,`blank_lines`],options:[{key:`include_front_matter`,type:`boolean`,description:`Include front matter content`,default:!1},{key:`lines_above`,type:`unsupported`,description:`Blank lines above heading`,default:1},{key:`lines_below`,type:`unsupported`,description:`Blank lines below heading`,default:1}]},{id:`MD023`,alias:`heading-start-left`,aliases:[`heading-start-left`],name:`Headings must start at the beginning of the line`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md023.md`,tags:[`headings`,`spaces`],options:[]},{id:`MD024`,alias:`no-duplicate-heading`,aliases:[`no-duplicate-heading`],name:`Multiple headings with the same content`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md024.md`,tags:[`headings`],options:[{key:`siblings_only`,type:`boolean`,description:`Only check sibling headings`,default:!1}]},{id:`MD025`,alias:`single-title`,aliases:[`single-title`,`single-h1`],name:`Multiple top-level headings in the same document`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md025.md`,tags:[`headings`],options:[{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`},{key:`level`,type:`integer`,description:`Heading level`,default:1,minimum:1,maximum:6}]},{id:`MD026`,alias:`no-trailing-punctuation`,aliases:[`no-trailing-punctuation`],name:`Trailing punctuation in heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md026.md`,tags:[`headings`],options:[{key:`punctuation`,type:`string`,description:`Punctuation characters`,default:`.,;:!。,;:!`}]},{id:`MD027`,alias:`no-multiple-space-blockquote`,aliases:[`no-multiple-space-blockquote`],name:`Multiple spaces after blockquote symbol`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md027.md`,tags:[`indentation`,`whitespace`,`blockquote`],options:[{key:`list_items`,type:`boolean`,description:`Include list items`,default:!0}]},{id:`MD028`,alias:`no-blanks-blockquote`,aliases:[`no-blanks-blockquote`],name:`Blank line inside blockquote`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md028.md`,tags:[`whitespace`,`blockquote`],options:[]},{id:`MD029`,alias:`ol-prefix`,aliases:[`ol-prefix`],name:`Ordered list item prefix`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md029.md`,tags:[`ol`],options:[{key:`style`,type:`enum`,description:`List style`,enum:[`one`,`ordered`,`one_or_ordered`,`zero`],default:`one_or_ordered`}]},{id:`MD030`,alias:`list-marker-space`,aliases:[`list-marker-space`],name:`Spaces after list markers`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md030.md`,tags:[`ul`,`whitespace`,`ol`],options:[{key:`ul_single`,type:`integer`,description:`Spaces for single-line unordered list items`,default:1,minimum:1},{key:`ol_single`,type:`integer`,description:`Spaces for single-line ordered list items`,default:1,minimum:1},{key:`ul_multi`,type:`integer`,description:`Spaces for multi-line unordered list items`,default:1,minimum:1},{key:`ol_multi`,type:`integer`,description:`Spaces for multi-line ordered list items`,default:1,minimum:1}]},{id:`MD031`,alias:`blanks-around-fences`,aliases:[`blanks-around-fences`],name:`Fenced code blocks should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md031.md`,tags:[`blank_lines`,`code`],options:[{key:`list_items`,type:`boolean`,description:`Include list items`,default:!0}]},{id:`MD032`,alias:`blanks-around-lists`,aliases:[`blanks-around-lists`],name:`Lists should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md032.md`,tags:[`bullet`,`ul`,`blank_lines`,`ol`],options:[]},{id:`MD033`,alias:`no-inline-html`,aliases:[`no-inline-html`],name:`Inline HTML`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md033.md`,tags:[`html`],options:[{key:`allowed_elements`,type:`string-array`,description:`Allowed elements`,default:[]},{key:`table_allowed_elements`,type:`string-array`,description:`Allowed elements in tables`,default:[]}]},{id:`MD034`,alias:`no-bare-urls`,aliases:[`no-bare-urls`],name:`Bare URL used`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md034.md`,tags:[`links`,`url`],options:[]},{id:`MD035`,alias:`hr-style`,aliases:[`hr-style`],name:`Horizontal rule style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md035.md`,tags:[`hr`],options:[{key:`style`,type:`string`,description:`Horizontal rule style`,default:`consistent`}]},{id:`MD036`,alias:`no-emphasis-as-heading`,aliases:[`no-emphasis-as-heading`],name:`Emphasis used instead of a heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md036.md`,tags:[`headings`,`emphasis`],options:[{key:`punctuation`,type:`string`,description:`Punctuation characters`,default:`.,;:!?。,;:!?`}]},{id:`MD037`,alias:`no-space-in-emphasis`,aliases:[`no-space-in-emphasis`],name:`Spaces inside emphasis markers`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md037.md`,tags:[`whitespace`,`emphasis`],options:[]},{id:`MD038`,alias:`no-space-in-code`,aliases:[`no-space-in-code`],name:`Spaces inside code span elements`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md038.md`,tags:[`whitespace`,`code`],options:[]},{id:`MD039`,alias:`no-space-in-links`,aliases:[`no-space-in-links`],name:`Spaces inside link text`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md039.md`,tags:[`whitespace`,`links`],options:[]},{id:`MD040`,alias:`fenced-code-language`,aliases:[`fenced-code-language`],name:`Fenced code blocks should have a language specified`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md040.md`,tags:[`code`,`language`],options:[{key:`allowed_languages`,type:`string-array`,description:`List of languages`,default:[]},{key:`language_only`,type:`boolean`,description:`Require language only`,default:!1}]},{id:`MD041`,alias:`first-line-heading`,aliases:[`first-line-heading`,`first-line-h1`],name:`First line in a file should be a top-level heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md041.md`,tags:[`headings`],options:[{key:`allow_preamble`,type:`boolean`,description:`Allow content before first heading`,default:!1},{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`},{key:`level`,type:`integer`,description:`Heading level`,default:1,minimum:1,maximum:6}]},{id:`MD042`,alias:`no-empty-links`,aliases:[`no-empty-links`],name:`No empty links`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md042.md`,tags:[`links`],options:[]},{id:`MD043`,alias:`required-headings`,aliases:[`required-headings`],name:`Required heading structure`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md043.md`,tags:[`headings`],options:[{key:`headings`,type:`string-array`,description:`List of headings`,default:[]},{key:`match_case`,type:`boolean`,description:`Match case of headings`,default:!1}]},{id:`MD044`,alias:`proper-names`,aliases:[`proper-names`],name:`Proper names should have the correct capitalization`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md044.md`,tags:[`spelling`],options:[{key:`names`,type:`string-array`,description:`List of proper names`,default:[]},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`html_elements`,type:`boolean`,description:`Include HTML elements`,default:!0}]},{id:`MD045`,alias:`no-alt-text`,aliases:[`no-alt-text`],name:`Images should have alternate text (alt text)`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md045.md`,tags:[`accessibility`,`images`],options:[]},{id:`MD046`,alias:`code-block-style`,aliases:[`code-block-style`],name:`Code block style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md046.md`,tags:[`code`],options:[{key:`style`,type:`enum`,description:`Block style`,enum:[`consistent`,`fenced`,`indented`],default:`consistent`}]},{id:`MD047`,alias:`single-trailing-newline`,aliases:[`single-trailing-newline`],name:`Files should end with a single newline character`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md047.md`,tags:[`blank_lines`],options:[]},{id:`MD048`,alias:`code-fence-style`,aliases:[`code-fence-style`],name:`Code fence style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md048.md`,tags:[`code`],options:[{key:`style`,type:`enum`,description:`Code fence style`,enum:[`consistent`,`backtick`,`tilde`],default:`consistent`}]},{id:`MD049`,alias:`emphasis-style`,aliases:[`emphasis-style`],name:`Emphasis style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md049.md`,tags:[`emphasis`],options:[{key:`style`,type:`enum`,description:`Emphasis style`,enum:[`consistent`,`asterisk`,`underscore`],default:`consistent`}]},{id:`MD050`,alias:`strong-style`,aliases:[`strong-style`],name:`Strong style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md050.md`,tags:[`emphasis`],options:[{key:`style`,type:`enum`,description:`Strong style`,enum:[`consistent`,`asterisk`,`underscore`],default:`consistent`}]},{id:`MD051`,alias:`link-fragments`,aliases:[`link-fragments`],name:`Link fragments should be valid`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md051.md`,tags:[`links`],options:[{key:`ignore_case`,type:`boolean`,description:`Ignore case of fragments`,default:!1},{key:`ignored_pattern`,type:`string`,description:`Pattern for ignoring additional fragments`,default:``}]},{id:`MD052`,alias:`reference-links-images`,aliases:[`reference-links-images`],name:`Reference links and images should use a label that is defined`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md052.md`,tags:[`links`,`images`],options:[{key:`ignored_labels`,type:`string-array`,description:`Ignored link labels`,default:[`x`]},{key:`shortcut_syntax`,type:`boolean`,description:`Include shortcut syntax`,default:!1}]},{id:`MD053`,alias:`link-image-reference-definitions`,aliases:[`link-image-reference-definitions`],name:`Link and image reference definitions should be needed`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md053.md`,tags:[`links`,`images`],options:[{key:`ignored_definitions`,type:`string-array`,description:`Ignored definitions`,default:[`//`]}]},{id:`MD054`,alias:`link-image-style`,aliases:[`link-image-style`],name:`Link and image style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md054.md`,tags:[`links`,`images`],options:[{key:`autolink`,type:`boolean`,description:`Allow autolinks`,default:!0},{key:`inline`,type:`boolean`,description:`Allow inline links and images`,default:!0},{key:`full`,type:`boolean`,description:`Allow full reference links and images`,default:!0},{key:`collapsed`,type:`boolean`,description:`Allow collapsed reference links and images`,default:!0},{key:`shortcut`,type:`boolean`,description:`Allow shortcut reference links and images`,default:!0},{key:`url_inline`,type:`boolean`,description:`Allow URLs as inline links`,default:!0}]},{id:`MD055`,alias:`table-pipe-style`,aliases:[`table-pipe-style`],name:`Table pipe style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md055.md`,tags:[`table`],options:[{key:`style`,type:`enum`,description:`Table pipe style`,enum:[`consistent`,`leading_only`,`trailing_only`,`leading_and_trailing`,`no_leading_or_trailing`],default:`consistent`}]},{id:`MD056`,alias:`table-column-count`,aliases:[`table-column-count`],name:`Table column count`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md056.md`,tags:[`table`],options:[]},{id:`MD058`,alias:`blanks-around-tables`,aliases:[`blanks-around-tables`],name:`Tables should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md058.md`,tags:[`table`],options:[]},{id:`MD059`,alias:`descriptive-link-text`,aliases:[`descriptive-link-text`],name:`Link text should be descriptive`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md059.md`,tags:[`links`,`accessibility`],options:[{key:`prohibited_texts`,type:`string-array`,description:`Prohibited link texts`,default:[`click here`,`here`,`link`,`more`]}]},{id:`MD060`,alias:`table-column-style`,aliases:[`table-column-style`],name:`Table column style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md060.md`,tags:[`table`],options:[{key:`style`,type:`enum`,description:`Table column style`,enum:[`any`,`aligned`,`compact`,`tight`],default:`any`},{key:`aligned_delimiter`,type:`boolean`,description:`Aligned delimiter columns`,default:!1}]}],ope=(()=>{let e=new Map;for(let t of d7){e.set(t.id.toUpperCase(),t.id);for(let n of t.aliases)e.set(n.toUpperCase(),t.id)}return e})();function f7(e){return ope.get(e.toUpperCase())??null}function spe(e,t){let n=f7(t);if(n===null)return;let r;for(let[t,i]of Object.entries(e))f7(t)===n&&(r={key:t,value:i});return r}var cpe=[`Headings`,`Lists`,`Whitespace`,`Code`,`Links & images`,`Style`],lpe=[[`headings`,`Headings`],[`bullet`,`Lists`],[`ul`,`Lists`],[`ol`,`Lists`],[`links`,`Links & images`],[`images`,`Links & images`],[`accessibility`,`Links & images`],[`code`,`Code`],[`language`,`Code`],[`emphasis`,`Style`],[`html`,`Style`],[`line_length`,`Whitespace`],[`whitespace`,`Whitespace`],[`hard_tab`,`Whitespace`],[`blank_lines`,`Whitespace`],[`indentation`,`Whitespace`]];function upe(e){for(let[t,n]of lpe)if(e.tags.includes(t))return n;return`Style`}function dpe(e){let t={lint:{errorCount:0,warningCount:0},links:{errorCount:0,warningCount:0}};for(let n of e){let e=n.source===`links`?t.links:t.lint;n.severity===`error`?e.errorCount+=1:e.warningCount+=1}return t}var fpe=`No documents were checked: this scope contains no admitted documents.`;function ppe(e){return e===fpe}async function mpe(e,t,n,r){if(!t.enabled)return[];let i=[];for(let a of Z5){if(!Lfe(t,a.id))continue;let o=t.plugins[a.id];try{i.push(...await a.lint(e,o,{docName:n}))}catch(e){console.warn(`[lint] plugin "${a.id}" failed${n?` on "${n}"`:``}`,e),r?.({source:a.id,phase:`lint`,...n===void 0?{}:{docName:n},message:hpe(e)})}}return i}var p7=500;function hpe(e){let t=m7(e);return t.length>p7?`${t.slice(0,p7)}… (truncated)`:t}function m7(e,t=0){if(e instanceof Error)return e.cause===void 0||t>=3?e.message:`${e.message} (cause: ${m7(e.cause,t+1)})`;if(typeof e==`object`&&e)try{let t=JSON.stringify(e);if(t!==void 0)return t}catch{}return String(e)}var gpe=/\p{M}+/gu,_pe=/[^\p{L}\p{N}]+/gu,vpe=/^-+|-+$/g;function h7(e){return e.trim().normalize(`NFKD`).replace(gpe,``).toLowerCase().replace(_pe,`-`).replace(vpe,``)}function ype(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function g7(e,t){let n=h7(e);return n?ype(n,t):``}function _7(e,t){let n=h7(e);return t?`#${n}-${h7(t)}`:`#${n}`}var v7=new Set([`img`,`video`,`audio`,`mark`,`u`,`ins`]),bpe=new Map(B3.flatMap(e=>e.surface===`compat`&&v7.has(e.rendersAs)?[[e.name,e]]:[]));function y7(e){let t={};for(let n of e.attributes){if(n.type!==`mdxJsxAttribute`)return null;let e=n.name.toLowerCase();if(!(e.length>=3&&e.startsWith(`on`)))if(n.value===null)t[n.name]=!0;else if(typeof n.value==`string`)t[n.name]=n.value;else return null}return t}function b7(e){let t=e.name;if(!t||!v7.has(t))return null;let n=y7(e);return n===null?null:{type:`element`,tagName:t,properties:n,children:[]}}function x7(e){let t=e.name;if(!t)return null;let n=bpe.get(t);if(!n)return null;let r=y7(e);if(r===null)return null;let i=n.translateProps(r),a={};for(let[e,t]of Object.entries(i))(typeof t==`string`||typeof t==`boolean`)&&(a[e]=t);return{type:`element`,tagName:n.rendersAs,properties:a,children:[]}}var xpe=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-link`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:_7(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},Spe=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-embed`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:_7(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},Cpe=(e,t)=>{let n=t,r=b7(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=x7(n);if(i){e.patch(t,i);let n=e.applyData(t,i);return n.tagName===`img`?{type:`element`,tagName:`p`,properties:{},children:[n]}:n}let a={type:`element`,tagName:`pre`,properties:{className:[`mdx-component`]},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]}]};return e.patch(t,a),e.applyData(t,a)},wpe=(e,t)=>{let n=t,r=b7(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=x7(n);if(i)return e.patch(t,i),e.applyData(t,i);let a={type:`element`,tagName:`span`,properties:{className:[`mdx-inline`],dataJsxInline:``},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]};return e.patch(t,a),e.applyData(t,a)},Tpe=(e,t)=>{let n=t,r=n.data.reason||`unknown`,i=n.value||``,a=r.replace(/--/g,`—`),o={type:`comment`,value:` Parse error: ${a} `},s={type:`element`,tagName:`pre`,properties:{className:[`mdx-fallback`],dataRawMdxFallback:``,dataReason:a},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:i}]}]};return e.patch(t,s),[o,e.applyData(t,s)]},Epe=(e,t)=>{let n={type:`element`,tagName:`mark`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},Dpe=(e,t)=>{let n=t,r={type:`element`,tagName:n.data?.sourceForm===`ins`?`ins`:`u`,properties:{},children:e.all(n)};return e.patch(t,r),e.applyData(t,r)};function S7(e){if(typeof e!=`object`||!e)return``;let t=e;return typeof t.value==`string`?t.value:Array.isArray(t.children)?t.children.map(S7).join(``):``}var C7={wikiLink:xpe,wikiLinkEmbed:Spe,mdxJsxFlowElement:Cpe,mdxJsxTextElement:wpe,rawMdxFallback:Tpe,mark:Epe,underline:Dpe,tag:(e,t)=>{let n=t.value,r={type:`element`,tagName:`a`,properties:{className:[`tag`],dataTag:n,href:`#tag/${n}`},children:[{type:`text`,value:`#${n}`}]};return e.patch(t,r),e.applyData(t,r)},comment:(e,t)=>{let n={type:`comment`,value:S7(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},commentBlock:(e,t)=>{let n={type:`comment`,value:S7(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`sup`,properties:{id:`fnref-${n}`,dataFootnoteRef:``,dataFootnoteId:n,className:[`footnote-ref`]},children:[{type:`element`,tagName:`a`,properties:{href:`#fn-${n}`,className:[`footnote-ref-link`]},children:[{type:`text`,value:`[${n}]`}]}]};return e.patch(t,r),e.applyData(t,r)},footnoteDefinition:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`aside`,properties:{id:`fn-${n}`,dataFootnoteDef:``,dataFootnoteId:n,className:[`footnote-def`]},children:[{type:`element`,tagName:`div`,properties:{className:[`footnote-body`]},children:e.all(t)},{type:`element`,tagName:`a`,properties:{href:`#fnref-${n}`,className:[`footnote-backref`],ariaLabel:`Back to reference`},children:[{type:`text`,value:`↩`}]}]};return e.patch(t,r),e.applyData(t,r)}},Ope=/url\s*\(\s*['"]?\s*(?:javascript|vbscript|data)\s*:/i,kpe=/\bexpression\s*\(/i,Ape=1e4;function jpe(e){return!(e.length>Ape||Ope.test(e)||kpe.test(e))}function w7(e){for(let t of e.split(`,`)){let e=t.trim();if(e!==``&&!y1(e.split(/\s+/)[0]??``))return!1}return!0}var Mpe={a:[`href`,`title`],img:[`src`,`alt`,`title`],video:[`src`,`title`],audio:[`src`,`title`],code:[`className`]},Npe=new Set([`href`,`src`]),Ppe=De(`<>`),T7=()=>e=>{T(e,`element`,e=>{let t=Mpe[e.tagName.toLowerCase()],n=e.properties;if(!(!t||!n))for(let e of t){let t=n[e];if(Array.isArray(t)){let r=t.map(e=>typeof e==`string`?T6(e):e);r.some((e,n)=>e!==t[n])&&(n[e]=r);continue}if(typeof t!=`string`)continue;let r;if(Npe.has(e))if(t===`<>`||t===Ppe)r=``;else{let e=T6(t);r=e===t?t:De(e)}else r=T6(t);r!==t&&(n[e]=r)}})},E7=()=>e=>{T(e,`element`,e=>{let t=e.tagName.toLowerCase(),n=e.properties;if(!n)return;if(t===`a`||t===`area`||t===`link`||t===`base`){let e=n.href;typeof e==`string`&&!y1(e)&&delete n.href}if(t===`img`||t===`iframe`||t===`script`||t===`embed`||t===`source`||t===`audio`||t===`video`||t===`track`){let e=n.src;typeof e==`string`&&!y1(e)&&delete n.src}if(t===`form`){let e=n.action;typeof e==`string`&&!y1(e)&&delete n.action}if(t===`img`||t===`source`){let e=n.srcSet;typeof e==`string`&&!w7(e)&&delete n.srcSet;let t=n.srcset;typeof t==`string`&&!w7(t)&&delete n.srcset}if(t===`video`){let e=n.poster;typeof e==`string`&&!y1(e)&&delete n.poster}let r=n.style;typeof r==`string`&&!jpe(r)&&delete n.style})};function Fpe(e){let t=le().use(me,{handlers:C7}).use(T7).use(E7).use(wG),n=t.runSync(e);return String(t.stringify(n))}function Ipe(e){let t=/\r?\n|\r/g,n=[],r=0,i=t.exec(e);for(;i!==null;)n.push(D7(e.slice(r,i.index),r>0,!0),i[0]),r=i.index+i[0].length,i=t.exec(e);return n.push(D7(e.slice(r),r>0,!1)),n.join(``)}function D7(e,t,n){let r=0,i=e.length,a=e=>e===9||e===32;for(;t&&r<i&&a(e.charCodeAt(r));)r++;for(;n&&i>r&&a(e.charCodeAt(i-1));)i--;return i>r?e.slice(r,i):``}var O7=/\r?\n|\r/,Lpe=(e,t)=>{let n=Ipe(String(t.value));if(!O7.test(n)){let r={type:`text`,value:n};return e.patch(t,r),e.applyData(t,r)}let r=n.split(O7),i=[];for(let e=0;e<r.length;e++)e>0&&i.push({type:`element`,tagName:`br`,properties:{},children:[]}),r[e].length>0&&i.push({type:`text`,value:r[e]});return i};function Rpe(e){let t=le().use(ge).use(oF,[`yaml`]).use(O8).use(ve).use(d5).use(y6).use(Q8).use(A6).use(me,{handlers:{...C7,text:Lpe}}).use(T7).use(E7).use(wG);return String(t.processSync(_6(k6(e))))}var zpe=le().use(ge).use(ve),Bpe={paragraph:``,heading:``,tableCell:``,emphasis:``,strong:``,delete:``,link:``,linkReference:``,tableRow:` | `};function k7(e){return e.type===`break`?`
|
|
601
|
+
`:e.type===`html`?``:e.type===`image`?e.alt??``:`value`in e?e.value:`children`in e?e.children.map(k7).join(Bpe[e.type]??`
|
|
602
|
+
`):``}function Vpe(e){try{return k7(zpe.parse(Se(e,{katex:!1}))).split(`
|
|
601
603
|
`).map(e=>e.replace(/\s+/g,` `).trim()).join(`
|
|
602
|
-
`)}catch(t){return console.warn(`[markdown-plain-text] markdown parse failed, falling back to raw text`,t),e}}for(let e of[{tagName:`Mirror`,attrName:`src`,resolution:`bare-doc-name`},{tagName:`Excalidraw`,attrName:`src`,resolution:`doc-relative`}]){let t=B3.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.`)}NI(),QF(),$F(),I({intents:F(I({satisfierId:M().min(1),desired:R([`present`,`absent`])}).loose()),...Q2,summary:$2}).loose();var Vpe=I({satisfierId:M(),agentId:M(),piece:M(),scope:M(),kind:M(),pathId:M().optional(),desired:R([`present`,`absent`]),action:R(Zo),errorId:M().optional()}).loose(),Hpe=I({kind:M(),satisfierIds:F(M()),agentIds:F(M()),pathId:M().optional(),blockedReason:M().optional()}).loose(),Upe=I({state:M(),strictness:F(R(Yo)).optional()}).loose(),Wpe=I({probes:I({env:R([`desktop`,`local-web`,`remote-web`]),satisfiers:no(M(),Upe)}).loose(),detection:I({detected:F(M()),probed:P()}).loose()}).loose(),Gpe=I({actions:F(Vpe),conflicts:F(Hpe),withheld:F(M()),snapshot:Wpe}).loose();I({entries:F(I({level:R([`info`,`warn`,`error`]),message:M().max(K4),event:M().optional(),fields:no(M(),Ua()).optional(),ts:N().optional(),sourceId:M().optional(),lineNumber:N().optional()}).loose()).max(100),droppedSinceLastFlush:N().int().min(0).optional()}).loose(),I({accepted:N().int().min(0)}).loose();var Kpe=I({exact:M().min(1),prefix:M(),suffix:M(),start:N().int().nonnegative(),end:N().int().nonnegative()}),qpe=F(Xa([M(),N().int().nonnegative()])),Jpe=Qa(`kind`,[I({kind:z(`body`)}),I({kind:z(`property`),key:M().min(1),path:qpe.default([])})]).default({kind:`body`}),Ype=R([`anchored`,`orphaned`,`resolved`]),A7=I({threadId:M().min(1),docName:M().min(1),target:Jpe,anchor:Kpe.nullable(),state:Ype,queued:P(),latestComment:M(),createdBy:M().min(1),createdAt:N(),updatedAt:N().optional()}),j7=I({docName:M(),instruction:M(),property:M().nullable(),passage:I({exact:M(),prefix:M(),suffix:M()}).nullable(),anchorLost:P(),passageRepeats:P()}).loose(),M7=I({threadId:M(),ok:z(!0)}),N7=I({threadId:M(),ok:z(!1),error:z(`not-found`)});I({threads:F(A7)}).loose();var Xpe=I({meta:A7,orphaned:P()}).loose(),Zpe=I({threadId:M()}).loose();I({meta:A7,payload:j7}).loose();var Qpe=I({results:F(Xa([M7.extend({meta:A7,payload:j7}),N7]))}).loose(),$pe=I({results:F(Xa([M7.extend({meta:A7}),N7]))}).loose(),eme=I({status:M().min(1),reason:M()}).loose(),tme=I({docName:M().min(1),content:M(),lifecycle:eme.nullable()}).loose(),P7=I({kind:R([`document`,`asset`,`folder`,`file`]).default(`document`),docName:M().min(1).optional(),docExt:M().min(1).default(`.md`),size:N().int().nonnegative(),modified:M().min(1),isSymlink:P().default(!1),canonicalDocName:M().nullable().default(null),targetPath:M().nullable().default(null),path:M().min(1).optional(),assetExt:M().min(1).optional(),mediaKind:R([`image`,`video`,`audio`,`pdf`,`text`,`mermaid`,`excalidraw`]).nullable().optional(),referencedBy:F(M().min(1)).optional(),hasChildren:P().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)`}),nme=I({documents:F(P7),truncated:P().optional()}).loose(),rme=I({source:M().min(1),anchor:M().nullable(),title:M(),snippet:M().nullable()}).loose(),ime=I({docName:M().min(1),backlinks:F(rme)}).loose(),ame=I({counts:no(M().min(1),N().int().nonnegative())}).loose();I({counts:no(M().min(1),N().int().nonnegative())}).loose();var ome=Qa(`kind`,[I({kind:z(`doc`),docName:M().min(1),anchor:M().nullable(),title:M(),snippet:M().nullable()}).loose(),I({kind:z(`external`),url:M().min(1),title:M(),snippet:M().nullable()}).loose()]),sme=I({role:M().min(1),sourceForm:M().min(1),targetKind:M().min(1),href:M(),resolvedTarget:M().nullable(),status:M().min(1),reason:M().nullable(),resolutionMethod:M().min(1),fallbackTarget:M().nullable().default(null),range:I({start:N().int().nonnegative(),end:N().int().nonnegative()}),line:N().int().nonnegative(),column:N().int().nonnegative(),definition:I({label:M(),line:N().int().nonnegative()}).nullable().default(null)}).loose(),cme=I({docName:M().min(1),forwardLinks:F(ome),localTargets:F(sme).optional()}).loose(),lme=Qa(`kind`,[I({id:M().min(1),kind:z(`doc`),docName:M().min(1),anchor:M().nullable(),label:M(),cluster:M().nullable(),category:M().nullable(),tags:F(M()).nullable(),managed:P().optional()}).loose(),I({id:M().min(1),kind:z(`external`),url:M().min(1),label:M()}).loose()]),ume=I({source:M().min(1),target:M().min(1)}).loose(),dme=I({nodes:F(lme),links:F(ume)}).loose(),fme=I({ts:N().int().min(0),url:M(),method:M(),ua:M().optional(),origin:M().optional(),referer:M().optional(),host:M().optional(),remote:M().optional(),secChUa:M().optional(),secChUaMobile:M().optional(),secChUaPlatform:M().optional(),secFetchSite:M().optional(),secFetchDest:M().optional(),secFetchMode:M().optional(),secFetchUser:M().optional()}).loose(),pme=I({app:Xa([z(`cursor`),z(`codex`),z(`claude`),Va()]),signals_fired:F(M())}).loose();I({entries:F(fme),count:N().int().min(0),detection:pme}).loose();var F7=I({path:M().min(1),code:R([`M`,`A`,`D`,`R`,`C`,`U`,`T`,`?`,`!`,` `]),origPath:M().min(1).optional(),syncScoped:P(),open:Qa(`kind`,[I({kind:z(`doc`),docName:M().min(1)}),I({kind:z(`asset`),path:M().min(1)})]).optional()}).loose();I({branch:M().nullable(),detached:P(),upstream:M().nullable(),staged:F(F7),notStaged:F(F7),untracked:F(F7),incoming:F(F7),truncated:P(),readable:P().default(!0)}).loose();var mme=R([`AWAITING_CHECKS`,`LOCKED`,`MERGEABLE`,`QUEUED`,`UNMERGEABLE`]),hme=R([`BEHIND`,`BLOCKED`,`CLEAN`,`DIRTY`,`DRAFT`,`HAS_HOOKS`,`UNKNOWN`,`UNSTABLE`]),gme=R([`APPROVED`,`CHANGES_REQUESTED`,`REVIEW_REQUIRED`]),_me=R([`ERROR`,`EXPECTED`,`FAILURE`,`PENDING`,`SUCCESS`]),vme=I({mergeQueue:I({position:N().int().nonnegative(),state:mme.nullable().catch(null)}).nullable().catch(null),autoMerge:P(),mergeState:hme.nullable().catch(null),reviewDecision:gme.nullable().catch(null),checks:_me.nullable().catch(null)}).loose(),yme=I({kind:R([`pull`,`issue`]),repo:M().min(1),number:N().int().positive(),title:M(),author:M().nullable(),createdAt:M(),lifecycle:R([`open`,`draft`,`merged`,`closed`,`completed`,`not-planned`]),additions:N().int().nonnegative().optional(),deletions:N().int().nonnegative().optional(),status:vme.optional()}).loose();I({url:M()}).loose();var bme=Qa(`ok`,[I({ok:z(!0),preview:yme}).loose(),I({ok:z(!1),reason:M()}).loose()]);I({writers:F(I({id:M().min(1),name:M().optional(),email:M().optional()}).loose()).optional(),summary:$2,...Q2}).loose(),I({checkpointRef:M().min(1)}).loose();var xme=I({v:N().int().optional(),id:M().min(1),name:M().min(1),colorSeed:M().optional(),docs:F(M()),summaries:F(M()).optional()}).loose();I({entries:F(I({sha:M().min(1),timestamp:M().min(1),author:M(),authorEmail:M(),type:R([`checkpoint`,`wip`,`upstream`,`park`]),message:M(),contributors:F(xme),checkpoint:Ua().nullable(),parentSha:M().nullable().optional()}).loose()),total:N().int().nonnegative().optional(),truncated:P().optional(),hasMore:P().optional()}).loose(),I({sha:M().regex(/^[0-9a-f]{40}$/i),content:M(),timestamp:M(),author:M()}).loose();var Sme=I({contentDir:M().min(1),pathSeparator:R([`/`,`\\`]),symlinkResolved:P()}).loose();F(Qa(`source`,[I({docName:M().min(1),timestamp:M().min(1),size:N().int().nonnegative(),source:z(`flat`)}).loose(),I({docName:M().min(1),timestamp:M().min(1),source:z(`timeline`),sha:M().min(1)}).loose()])).meta({description:"Flat array of rescue buffer entries; discriminated via `source`."});var Cme=I({domain:M().min(1),title:M().optional(),description:M().optional(),siteName:M().optional(),faviconDataUri:M().optional()}).loose();I({url:M()}).loose();var wme=Qa(`ok`,[I({ok:z(!0),metadata:Cme}).loose(),I({ok:z(!1),reason:M()}).loose()]),Tme=I({orphans:F(I({docName:M().min(1),title:M()}).loose())}).loose(),Eme=I({hubs:F(I({docName:M().min(1),title:M(),count:N().int().nonnegative()}).loose())}).loose(),Dme=I({source:M().min(1),title:M(),snippet:M().nullable()}).loose();I({deadLinks:F(I({target:M().min(1),sources:F(Dme)}).loose())}).loose(),I({target:I({docName:M().min(1),title:M(),aliases:F(M())}).loose(),mentions:F(I({source:M().min(1),excerpt:M(),offset:N().int().nonnegative()}).loose()),truncated:P()}).loose(),I({projectPath:M().min(1)}).loose();var Ome=R([`not-a-git-worktree`,`init-failed`]);Qa(`ok`,[I({ok:z(!0),projectPath:M().min(1)}).loose(),I({ok:z(!1),reason:Ome,message:M().min(1)}).loose()]),I({host:M().min(1).optional()}).loose(),I({host:M().min(1).optional(),token:M().min(1)}).loose(),I({host:M(),login:M()}).loose(),I({key:M().min(1)}).loose(),I({keyPresent:P()}).loose();var kme=R([`no_key`,`invalid_endpoint`,`rate_limit`,`timeout`,`http_error`,`network`,`dims_mismatch`,`malformed_response`]),Ame=Qa(`ok`,[I({ok:z(!0),endpoint:M().min(1),model:M().min(1),dimensions:N().int().positive()}).loose(),I({ok:z(!1),endpoint:M().min(1),model:M().min(1),reason:kme,status:N().int().optional()}).loose()]);I({name:M().refine(e=>e.trim().length>0,{message:`name must be non-empty`}),email:M().refine(e=>e.trim().length>0,{message:`email must be non-empty`})}).loose(),I({authenticated:P()}).loose(),I({channel:R([`login`,`gh-login`]).default(`login`)}).loose(),I({}).loose();var jme=I({stackIndex:N().int().min(0),ts:N().int().min(0),additions:N().int().min(0),deletions:N().int().min(0)}).loose(),Mme=I({docName:M().min(1),additionsTotal:N().int().min(0),deletionsTotal:N().int().min(0),lastTs:N().int().min(0),bursts:F(jme)}).loose(),Nme=I({displayName:M().min(1),color:M().min(1),icon:M().optional(),connectionId:M().min(1)}).loose(),Pme=I({sessionAlive:P(),agent:Nme.nullable(),files:F(Mme)}).loose(),Fme=I({diff:M(),before:M(),after:M(),properties:R0,generatedAt:N().int().min(0)}).loose();I({}).loose(),I({}).loose(),I({}).loose(),I({}).loose(),I({}).loose(),I({}).loose();var Ime=I({displayName:M().min(1),icon:M(),color:M().min(1),currentDoc:M().nullable(),mode:R([`idle`,`writing`]),ts:N().int().min(0)}).loose();I({presence:no(M().min(1),Ime)}).loose();var Lme=I({sessionId:M().min(1),agentType:M().min(1),ts:N().int().min(0),insertedChars:N().int().min(0),deletedChars:N().int().min(0)}).loose();I({effects:F(I({"doc.name":M().min(1),entries:F(Lme)}).loose())}).loose(),I({decisions:F(I({ts:N().int().min(0),decision:M().min(1),kind:M().min(1),"doc.name":M().min(1),pathRole:M().min(1)}).loose())}).loose(),no(M().min(1),P()).meta({description:`Flat boolean record keyed by agent-scheme name (claude / codex / cursor). True = installed.`}),I({path:M().min(1,`path must be non-empty`)}).loose(),I({}).loose();var Rme=I({fromDocName:M().min(1),toDocName:M().min(1)}).loose(),zme=I({fromPath:M().min(1),toPath:M().min(1)}).loose();I({}).loose(),I({path:M().min(1),...Q2,summary:$2}).loose();var Bme=I({docName:M().min(1)}).loose();I({path:M().min(1),...Q2,summary:$2}).loose();var Vme=I({path:M().min(1)}).loose();I({kind:R([`file`,`folder`]),path:M().min(1),...Q2,summary:$2}).loose();var Hme=I({kind:R([`file`,`folder`]),path:M().min(1),duplicatedDocNames:F(M().min(1))}).loose(),Ume=I({pages:F(I({docName:M().min(1),title:M(),docExt:M().min(1),size:N().int().nonnegative(),modified:M().min(1),icon:M().min(1).max(2048).optional()}).loose())}).loose(),Wme=I({level:N().int().min(1).max(6),text:M(),slug:M()}).loose(),Gme=I({docName:M().min(1),headings:F(Wme)}).loose(),Kme=I({docName:M().min(1),rewrites:N().int().nonnegative()}).loose();I({kind:R([`file`,`folder`,`asset`]),fromPath:M().min(1),toPath:M().min(1),...Q2,summary:$2}).loose();var qme=I({renamed:F(Rme),renamedAssets:F(zme),rewrittenDocs:F(Kme).optional(),summary:Q5.optional()}).loose();I({kind:R([`file`,`folder`,`asset`]),path:M().min(1),...Q2}).loose();var Jme=I({deletedDocNames:F(M().min(1))}).loose();I({kind:R([`file`,`folder`,`asset`]),path:M().min(1),...Q2,summary:$2}).loose();var Yme=I({deletedDocNames:F(M().min(1))}).loose();I({docName:M().min(1),commitSha:M().regex(/^[0-9a-f]{40}$/i,{message:`commitSha must be a 40-char git SHA`}),summary:$2,...Q2}).loose(),I({restoredFrom:M().min(1),timestamp:M().min(1),summary:Q5.optional(),warnings:n7.optional()}).loose();var Xme=/^#[0-9a-fA-F]{6}$/,Zme=I(Object.fromEntries(Sm.map(e=>[e,M().regex(Xme,`must be a #rrggbb hex color`)]))),I7=M().min(1).refine(Em,{message:`must contain a non-whitespace character`}),L7=I({name:I7,author:I7.optional(),variant:R([`dark`,`light`]),palette:Zme}).loose(),Qme=I({name:M().min(1),scheme:L7,stem:M().min(1).optional(),extension:R([`.yaml`,`.yml`]).optional()}).loose(),$me=I({id:M().min(1),filename:M().min(1)}).loose(),ehe=I({id:M().min(1),scheme:L7}).loose(),the=I({id:M().min(1),filename:M().min(1)}).loose(),nhe=Qa(`existed`,[I({existed:z(!1)}).loose(),I({existed:z(!0),filename:M().min(1),scheme:L7}).loose()]),rhe=I({themes:F(Qa(`ok`,[I({ok:z(!0),id:M().min(1),filename:M().min(1),scheme:L7}),I({ok:z(!1),filename:M().min(1),id:M().min(1).optional(),code:M().min(1),conflictingFilenames:F(M().min(1)).min(2).optional()})])),truncated:P()}).loose(),ihe=R([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),ahe=I({label:M().min(1),webUrl:ba().nullable()}).loose(),ohe=Qa(`checkStatus`,[I({checkStatus:z(`allowed`)}).loose(),I({checkStatus:z(`denied`),deniedReason:R([`no-collaborator`,`private-no-access`,`repo-not-found`,`not-authenticated`]),resolvedLogin:M().optional(),declaredLogin:M().optional(),declaredSource:M().optional()}).loose(),I({checkStatus:z(`unknown`),unknownError:R([`network`,`timeout`,`rate-limit`,`token-invalid`,`malformed-response`,`ssh-unverified`]).optional()}).loose()]),R7=R([`auth-403`,`auth-401`,`auth-scope-mismatch`,`auth-no-credential`,`auth-not-found-as-identity`,`semantic-protected-branch`]),she=R($f),che=R([`succeeded`,`up-to-date`,`conflict`,`refused`,`error`]);I({state:ihe,lastSyncUtc:M().nullable(),lastRunUtc:M().nullable().optional(),lastPullOkUtc:M().nullable().optional(),lastPushOkUtc:M().nullable().optional(),lastFetchUtc:M().nullable(),lastPushedSha:M().nullable(),ahead:N().int().min(0),behind:N().int().min(0),consecutiveFailures:N().int().min(0),consecutivePushFailures:N().int().min(0).optional(),conflictCount:N().int().min(0),hasRemote:P(),syncEnabled:P(),identityUnresolved:P(),remote:ahe.nullable().optional(),pushError:M().optional(),pushErrorCode:R7.optional(),pullError:M().optional(),pullErrorCode:R7.optional(),pausedReason:M().optional(),blockingPaths:F(M().min(1)).optional(),pushPermission:ohe.optional(),syncMode:she.optional(),lastPullUtc:M().nullable().optional(),lastPullOutcome:che.nullable().optional()}).loose(),I({action:R([`commit`]),paths:F(M().min(1)),commitSha:M().optional()}).loose(),I({action:R([`commit`])}).loose(),I({op:R([`sync`,`push`,`pull`,`fetch`]).optional()}).loose(),I({op:R([`sync`,`push`,`pull`,`fetch`])}).loose();var z7=R([`merge-native`,`working-tree`,`reconcile`]),B7=R([`merged-with-markers`,`refused-conflict-markers`,`refused-no-base`,`refused-too-large`,`disk-markers`,`stale-external-write`]),lhe=R([`mine`,`theirs`,`content`,`delete`]),uhe=I({conflicts:F(I({file:M().min(1),detectedAt:M().min(1),conflict:z7,reason:B7.optional().catch(void 0),conflictKind:R([`git`,`stale-external-write`]).optional(),docName:M().nullable(),theirsSha:M().optional(),baseSha:M().optional()}).loose())}).loose();I({file:M().min(1),strategy:R([`mine`,`theirs`,`content`,`delete`]),content:M().optional()}).loose().refine(e=>e.strategy!==`content`||e.content!==void 0,{message:`content must be provided when strategy is 'content' (an empty string keeps an empty file)`,path:[`content`]}),I({}).loose();var dhe=I({file:M().min(1),base:M(),ours:M(),theirs:M(),kind:R([`both-modified`,`delete-modify`,`modify-delete`]),conflict:z7,reason:B7.optional().catch(void 0),conflictKind:R([`git`,`stale-external-write`]).optional(),resolutionOptions:F(lhe)}).loose();I({plan:jo(e=>e!==void 0,{message:`plan is required`})}).loose(),I({plan:jo(e=>e!==void 0,{message:`plan is required`})}).loose(),I({result:jo(e=>e!==void 0,{message:`result is required`})}).loose(),I({packId:M().min(1)}).strict(),I({installedHosts:F(M()),skills:F(I({name:M().min(1),created:P()}).strict())}).strict();var fhe=I({path:M().min(1),summary:M().min(1)}).loose(),phe=I({files:N().int().nonnegative(),folders:N().int().nonnegative()}).loose();I({packs:F(I({id:M().min(1),name:M().min(1),description:M().min(1),defaultSubfolder:M().optional(),folders:F(fhe),entryCounts:phe}).loose())}).loose(),I({noOpen:P().optional(),out:M().min(1).optional()}).loose();var mhe=I({reason:R([`unsupported-platform`,`spawn-error`]),message:M()}).loose();Qa(`status`,[I({status:z(`installed`),outputPath:M(),size:N().int().nonnegative(),sha256:M(),skillVersion:M()}).loose(),I({status:z(`built`),outputPath:M(),size:N().int().nonnegative(),sha256:M(),skillVersion:M(),handoffError:mhe.optional()}).loose(),I({status:z(`failed`),buildError:M()}).loose(),I({status:z(`skip-current`),skillVersion:M(),recordedAt:M().optional()}).loose()]);var V7=R(We),H7=R(Ge);function hhe(e){return e===`agents`||Ge.includes(e)}var ghe=I({alwaysOn:N().int().nonnegative(),onTrigger:N().int().nonnegative(),onDemand:N().int().nonnegative()}).strict(),_he=[`.md`,`.mdx`,`.txt`],vhe=5e3,yhe=4;function U7(e){return Math.round(e/yhe)}function bhe(e){let t=e.lastIndexOf(`.`);return t===-1?!1:_he.includes(e.slice(t).toLowerCase())}function xhe(e){let t=U7((e.name??``).length+(e.description??``).length),n=U7(Vd(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/`)||bhe(t.relPath)&&(i+=t.content.length));return{alwaysOn:t,onTrigger:n,onDemand:U7(i)}}I({tags:F(I({name:M().min(1),count:N().int().nonnegative(),isLeaf:P()}).loose())}).loose();var She=I({docName:M().min(1),title:M(),matchingTags:F(M().min(1)),snippet:M().nullable()}).loose();I({name:M().min(1),docs:F(She)}).loose(),I({folder:Ua(),frontmatter_local:no(M(),Ua()).nullable(),warnings:F(M()).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:F(R([`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(),I({path:M(),frontmatter:no(M(),Ua()).optional()}).loose(),I({applied:Ua()}).loose();var W7=no(M(),Ua()).meta({description:`Free-form frontmatter map embedded in template payloads.`});I({template:I({name:M().min(1),folder:M(),scope:R([`local`,`inherited`]),path:M().min(1),frontmatter:W7,body:M()}).strict()}).strict();var Che=I({templates:F(I({name:M().min(1),title:M().optional(),description:M().optional(),path:M().min(1),source_folder:M()}).strict()),truncated:P()}).strict();I({folder:M(),name:M(),body:M().optional(),frontmatter:W7.optional(),...Q2,summary:$2}).strict(),I({path:M().min(1),created:P(),warnings:F(M())}).strict(),I({sourcePath:M().min(1),targetFolder:M(),name:M().optional(),title:M().optional(),deleteSource:P().optional(),...Q2,summary:$2}).strict(),I({path:M().min(1),created:P(),warnings:F(M())}).strict(),I({existed:P(),path:M().min(1)}).strict(),I({fromFolder:M(),fromName:M(),toFolder:M(),toName:M(),body:M().optional(),frontmatter:W7.optional(),...Q2,summary:$2}).strict(),I({from:M().min(1),to:M().min(1),committed:P()}).strict();var G7=R(af),whe=/^[a-z0-9-]+$/,The=/^[A-Za-z0-9_-]+$/,K7=I({name:M(),description:M(),metadata:I({pack:M()}).strict().optional()}).strict();I({skill:I({name:M().min(1),scope:G7,path:M().min(1),frontmatter:K7,body:M(),files:F(I({path:M().min(1),text:M().nullable()})).optional(),managed:P().optional()}).strict()}).strict();var Ehe=I({source:M().min(1),publisher:M().optional(),skill:M().optional(),marketplaceUrl:M().optional(),importedAt:M().min(1),autoUpdate:P().optional()}).strict(),Dhe=I({name:M().min(1),description:M().optional(),scope:G7,path:M().min(1),canonicalPath:M().min(1).optional(),filePaths:F(M()).optional(),absolutePath:M().min(1).optional(),installed:P(),hosts:F(M()),hostQualifier:M().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:F(M()).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:no(M(),M()).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:F(M()).optional().meta({description:`Hosts whose dir holds a DIFFERENT same-name skill (fork/conflict) — occupied, not this skill.`}),symlinkedHosts:F(M()).optional(),installableEditors:F(M()).optional(),hubOffered:P().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:P().optional(),customPlacements:F(I({path:M(),mode:R([`copy`,`link`])}).strict()).optional(),plugin:I({name:M().min(1),marketplace:M().min(1),provider:M().min(1),url:M().optional()}).strict().optional(),managed:P().optional(),origin:Ehe.optional(),pack:M().optional(),modified:P().optional(),revertable:P().optional(),ignored:P().optional(),size:ghe.optional()}).strict();I({name:M().min(1),scope:G7,apply:P().optional()}).strict(),I({line:M().min(1),gitignorePath:M().min(1),applied:P(),alreadyTracked:P().optional()}).strict();var Ohe=I({skills:F(Dhe),truncated:P()}).strict();I({scope:G7.default(`project`),name:M().meta({description:`Managed skill name to create or update.`}),body:M().optional(),frontmatter:K7,...Q2,summary:$2}).strict();var q7=F(R([`skill-name-vendor-word`,`skill-body-too-long`])).meta({description:"Machine-readable codes aligned 1:1 with `warnings` (`warnings[i]` is the display text for `warningCodes[i]`)."});I({path:M().min(1),created:P(),warnings:F(M()),warningCodes:q7}).strict(),I({scope:G7.default(`project`),name:M(),dryRun:P().optional(),setAutoUpdate:P().optional(),...Q2,summary:$2}).strict(),I({name:M().min(1),updated:P(),source:M().min(1),localBody:M().optional(),upstreamBody:M().optional(),gitTracked:P().optional(),warnings:F(M()),warningCodes:q7}).strict(),I({scope:G7.default(`project`),name:M(),...Q2,summary:$2}).strict(),I({name:M().min(1),baselineRef:M().min(1),restoredFiles:F(M()),warnings:F(M())}).strict();var J7=`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.`;I({existed:P(),path:M().min(1),warnings:F(M()).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. ${J7}`})}).strict(),I({scope:G7.default(`project`),fromName:M(),toName:M(),body:M().optional(),frontmatter:K7.optional(),...Q2,summary:$2}).strict(),I({from:M().min(1),to:M().min(1),committed:P(),warnings:F(M()).optional().meta({description:`Present when the rename itself completed but something beside it did not. ${J7}`})}).strict(),I({name:M(),toName:M().optional().meta({description:"Name for the skill at the destination scope; defaults to `name`. The SKILL.md `name` frontmatter is rewritten to match."}),fromScope:G7,toScope:G7,...Q2,summary:$2}).strict();var khe=[`nothing-written`,`destination-removed`,`destination-stray`,`destination-retained`,`destination-retained-blocking`,`destination-unreadable`,`partially-applied`];function Ahe(e){return typeof e==`string`&&khe.includes(e)}var jhe=[`intact`,`lossy`,`unknown`];function Mhe(e){return typeof e==`string`&&jhe.includes(e)}var Nhe=[`unreadable`,`occupant-unverifiable`];function Phe(e){return typeof e==`string`&&Nhe.includes(e)}var Fhe={"nothing-written":!1,"destination-removed":!1,"destination-stray":!1,"destination-retained":!0,"destination-retained-blocking":!0,"destination-unreadable":!1,"partially-applied":!1};function Y7(e){return Fhe[e]}function Ihe(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=Mhe(r)?r:void 0,s=Phe(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}:(Y7(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}}var Lhe=`The server reported warnings in a shape this build does not recognise; treat this result as unverified.`;function Rhe(e){if(e===void 0)return[];let t=Lhe;if(!Array.isArray(e))return[t];let n=e.filter(e=>typeof e==`string`);return n.length===e.length?n:[...n,t]}I({scope:G7,path:M().optional(),droppedLocations:F(M()).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:F(M()).optional().meta({description:`Present when the move itself completed but something beside it did not. ${J7}`})}).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."}),I({scope:G7,name:M(),toName:M(),...Q2,summary:$2}).strict(),I({name:M().min(1)}).strict(),I({name:M(),home:M().min(1)}).strict(),I({docName:M().min(1)}).strict();var X7=R([`reference`,`script`,`file`]);I({scope:G7.default(`project`),name:M(),path:M().min(1),content:M(),...Q2,summary:$2}).strict(),I({path:M().min(1),created:P(),kind:X7,content:P()}).strict(),I({scope:G7.default(`project`),name:M(),from:M().min(1),to:M().min(1),...Q2,summary:$2}).strict(),I({from:M().min(1),to:M().min(1),fromDocName:M().optional(),toDocName:M().optional()}).strict(),I({path:M().min(1),kind:X7,text:M()}).strict(),I({path:M().min(1),existed:P(),kind:X7}).strict();var Z7=Xa([H7,z(`agents`)]),Q7=M().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`}),$7=Xa([Z7,Q7]);I({scope:G7.default(`project`),name:M(),targets:F(Z7).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:F($7).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:F($7).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:R([`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:$7.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:P().optional(),setSource:M().min(1).optional(),place:I({dir:M().min(1).meta({description:`Project-relative directory the bundle dir is created under (e.g. ".windsurf/skills").`}),mode:R([`copy`,`link`])}).strict().optional(),convert:I({target:$7.meta({description:`The installed location to convert — an editor id, "agents", or a recorded custom placement path.`}),mode:R([`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:I({path:M().min(1).meta({description:`The recorded placement bundle path (e.g. ".windsurf/skills/my-skill").`})}).strict().optional(),...Q2,summary:$2,fork:I({editor:M().min(1),action:R([`align`,`make-source`,`rename`]),toName:M().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"}),I({name:M().min(1).meta({description:`Managed skill name installed or uninstalled.`}),hosts:F(M()).meta({description:`Editor ids the skill is projected into after the operation; [] is expected after uninstall.`}),scripts:P().meta({description:`True when the skill ships executable scripts, projected but never run.`}),warnings:F(M()).meta({description:`Non-fatal install/uninstall warnings from target projection.`}),warningCodes:F(R([`no-targets`,`scripts-present`,`name-conflict`,`no-description`,`skill-fork-name-unpatched`,`place-path-invalid`,`place-fork-refused`])).meta({description:"Machine-readable warning codes aligned with `warnings`."}),placedAt:M().optional(),sourceMovedTo:M().optional()}).strict(),I({scope:G7.default(`project`),name:M().meta({description:`Managed skill name to uninstall without deleting source.`})}).strict(),I({name:M().min(1).meta({description:`Managed skill name requested for uninstall.`}),uninstalled:P().meta({description:`True when an install marker existed and was removed; false for an idempotent no-op.`})}).strict();var zhe=I({targets:F(V7),configured:P(),folders:F(I({scope:G7,host:M(),root:M(),state:R([`own`,`linked`,`linked-parent`,`absent`]),target:M().optional(),drift:z(!0).optional(),expected:M().optional()}).strict()).optional()}).strict(),e9=I({action:z(`link`),scope:G7,root:M().min(1).meta({description:`The folder to link (e.g. ".codex/skills").`}),target:M().min(1).meta({description:`The root it merges into (e.g. ".agents/skills"). Required.`})}),t9=I({action:z(`unlink`),scope:G7,root:M().min(1).meta({description:`The linked folder to materialize back.`}),exclude:F(M().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(),n9=I({action:z(`add-root`),scope:G7,root:Q7.meta({description:`New custom skills root to declare (base-relative, e.g. ".team/skills").`})}).strict(),Bhe=Qa(`action`,[e9.extend({preview:P().optional().meta({description:`Return the merge plan only (moves, drops, removes, conflicts, strays) — nothing is written.`})}).strict(),t9,n9]);Qa(`action`,[e9.strict(),t9,n9]),I({folderAction:Bhe}).strict();var r9=I({moves:F(M()),drops:F(M()),removes:F(M()),replaces:F(M()),conflicts:F(M()),strays:F(M())}).strict();I({targets:F(V7),reprojected:F(I({name:M(),hosts:F(M())}).strict()),bundleHosts:F(M()),removedFrom:F(M()),folder:I({moved:F(M()),dropped:F(M()),linked:F(M())}).strict().optional(),preview:r9.optional()}).strict(),I({scope:G7.default(`project`),name:M(),version:M().regex(/^[0-9a-f]{40}$/i),...Q2,summary:$2}).strict(),I({name:M().min(1),version:M(),restoredFiles:F(M()),warnings:F(M())}).strict(),I({query:M().optional(),intent:R([`autocomplete`,`full_text`,`omnibar`]).optional(),ranking:R([`navigation`,`relevance`]).optional(),scopes:F(R([`page`,`folder`,`content`,`file`])).optional(),scope:M().optional(),limit:N().int().nonnegative().optional(),semantic:P().optional(),source:R([`omnibar`,`mcp`,`http`]).optional()}).loose();var Vhe=I({kind:R([`page`,`folder`,`content`,`file`]),path:M().min(1),title:M(),score:N(),signals:no(M(),Ua()),snippet:M().optional()}).loose(),Hhe=R([`applied`,`no_match`,`warming`,`incapable`,`provider_error`,`restart_required`,`query_too_short`]),i9=R([`warm`,`corpus`,`query`,`dimensions`,`configured_dimensions`]);function Uhe(e){return e?.providerErrorReason===`dimensions`?`restart_required`:e?.providerErrorReason===`configured_dimensions`?`incapable`:e?.providerError||e?.providerErrorReason?`provider_error`:null}function Whe(e){throw Error(`Unhandled SemanticProviderErrorReason variant: ${JSON.stringify(e)}`)}function Ghe(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 Whe(n)}}function Khe(e){throw Error(`Unhandled SemanticQueryOutcome variant: ${JSON.stringify(e)}`)}var a9=I({capable:P(),applied:P(),outcome:Hhe,providerErrorReason:i9.nullable().optional().catch(null),coverage:I({embedded:N().int().nonnegative(),total:N().int().nonnegative()})}).loose(),qhe=I({enabled:P(),keyPresent:P(),keyNotRequired:P(),keySource:R([`project`,`file`,`env`]).nullable(),keyHint:M().nullable(),ready:P(),capable:P(),providerError:P().optional(),providerErrorReason:i9.nullable().optional().catch(null),embedded:N().int().nonnegative(),total:N().int().nonnegative()}).loose();function Jhe(e){return!!(e?.enabled&&(e.keyPresent||e.keyNotRequired))}I({query:M(),intent:R([`autocomplete`,`full_text`,`omnibar`]),results:F(Vhe),elapsedMs:N().nonnegative(),semantic:a9.optional(),truncated:P().optional(),ready:P().optional()}).loose();var Yhe=I({version:M().min(1),recordedAt:M().min(1)}).loose();I({currentVersion:M().min(1),targets:no(M(),Yhe.nullable())}).loose(),I({scope:G7.default(`project`),source:M().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:M().min(1).optional().meta({description:`Specific skill name to import from a multi-skill source.`}),install:P().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection (the caller installs explicitly afterwards). Default true.`}),marketplace:P().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."}),...Q2,summary:$2}).strict(),I({scope:G7.default(`project`),source:M().min(1).meta({description:`External skill source: full skills.sh skill-page URL, GitHub owner/repo[/subpath], git URL, or local/file path.`}),skills:F(M().min(1)).min(1).max(100).meta({description:`Skill names to import from the source.`}),install:P().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection. Default true.`}),marketplace:P().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."}),...Q2,summary:$2}).strict(),I({results:F(I({requested:M(),status:R([`imported`,`already-imported`,`not-found`,`failed`]),name:M().optional(),collisionRenamedFrom:M().optional(),warnings:F(M()),warningCodes:q7,error:M().optional()}).loose()),imported:N(),alreadyImported:N(),failed:N()}).loose(),I({scope:G7.default(`project`),names:F(M().min(1)).min(1).max(100).meta({description:`Managed skill names to refresh from their recorded upstreams.`}),...Q2,summary:$2}).strict(),I({results:F(I({requested:M(),status:R([`updated`,`up-to-date`,`not-found`,`failed`]),source:M().optional(),warnings:F(M()),warningCodes:q7,error:M().optional()}).loose()),updated:N(),upToDate:N(),failed:N()}).loose();var Xhe=I({source:M(),ref:M().optional(),contentHash:M(),publisher:M().optional()}).loose();I({name:M().min(1).meta({description:`Managed skill name created or matched.`}),path:M().min(1).meta({description:`Store-relative path to the imported skill source.`}),created:P().meta({description:`True when this request created new source files.`}),alreadyImported:P().meta({description:`True when identical content was already present and no files changed.`}),collisionRenamedFrom:M().optional().meta({description:`Original source name when collision handling renamed the import.`}),provenance:Xhe,warnings:F(M()).meta({description:`Non-fatal import warnings, such as skipped unsupported files.`}),warningCodes:q7}).loose();var Zhe=`server-info`,Qhe=`branch-switched`,$he=`disk-ack`,ege=`config-validation-rejected`,tge=`config-ignore-nested-error`,o9=R([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`,`comments`,`lint-config`,`local-targets`]),nge=I({v:z(1),ch:z(Zhe),seq:N(),serverInstanceId:M().min(1),currentBranch:M().min(1).optional()}).loose(),rge=I({v:z(1),ch:z(Qhe),seq:N(),branch:M().min(1)}).loose(),ige=I({v:z(1),ch:o9,seq:N()}).loose(),age=I({v:z(1),ch:z($he),seq:N(),docName:M().min(1),sv:M().min(1)}).loose(),oge=I({v:z(1),ch:z(ege),seq:N(),docName:M().min(1),error:qne}).loose(),sge=I({v:z(1),ch:z(tge),seq:N(),path:M().min(1),error:M().min(1)}).loose(),cge=100,lge=500,uge=450,dge={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},s9=new WeakMap;function fge(e){return e===void 0||!Number.isFinite(e)?20:Math.max(1,Math.min(100,Math.trunc(e)))}function c9(e){return e.trim().toLowerCase()}var pge=/\.(?:md|mdx)$/;function mge(e,t){if(t!==`page`)return e;let n=e.replace(pge,``);return n.length>0?n:e}function l9(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function hge(e){let t=l9(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}}var u9=/[^\P{L}a-zàèéìòóù]|[^\P{Nd}0-9]|\p{Nl}/iu,d9=(()=>{let e=globalThis.Intl.Segmenter;return e?new e(`en`,{granularity:`word`}):null})();function gge(){let e=oJ({language:`english`}),t=e.tokenize.bind(e);return e.tokenize=(e,n,r,i)=>{let a=t(e,n,r,i);if(!d9||typeof e!=`string`||!u9.test(e))return a;let o=new Set(a);for(let{segment:t,isWordLike:n}of d9.segment(e)){if(!n||!u9.test(t))continue;let e=t.toLowerCase();o.has(e)||(o.add(e),a.push(e))}return a},e}function f9(e){let t=bJ({schema:dge,components:{tokenizer:gge()}});return e.length>0&&jJ(t,e),t}function _ge(e){let t={documents:e};return s9.set(t,f9(e)),t}function vge(e){let t=s9.get(e);if(t)return t;let n=f9(e.documents);return s9.set(e,n),n}function yge(e){return e===`autocomplete`?[`page`]:e===`full_text`?[`page`,`content`,`file`]:[`page`,`folder`,`file`]}function p9(e,t){return t.has(e.kind)?!0:e.kind===`page`&&t.has(`content`)}function bge(e,t){let n=c9(t);if(!n)return 0;let r=mge(n,e.kind),i=c9(e.title),a=c9(e.name),o=c9(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}var xge=.5;function m9(e,t){let n=bge(e,t);return n<=0?n:J2(e.path)?n*xge:n}function Sge(e){return e===`file`?-60:0}var Cge=1e3,wge=50,Tge=1,Ege=1;function Dge(e,t,n,r,i){let a=i>0?t/i:0,o=n/wge,s=r===`file`?-.001:0,c=Tge*a+Ege*o+s;return e*Cge+c}function h9(e,t,n,r){return e+t*20+n+Sge(r)}function g9(e,t,n,r,i,a){return e===`relevance`?h9(t,n,r,i):Dge(t,n,r,i,a)}function Oge(e,t){return t||(e===`full_text`?`relevance`:`navigation`)}function _9(e,t){let n=0;for(let r of e){let e=t.get(r.id)??0;e>n&&(n=e)}return n}function kge(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 Age(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function jge(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}}var Mge=/[-ក- -〿-ゟ゠-ヿ㐀-䶿一-鿿\uf900--\u1100-\u11ff\u3130-\u318f\ua960-\ua97f\uac00-\ud7ff]/;function Nge(e,t){let n=c9(t);return n.length<4||Mge.test(n)?0:+(e===`full_text`)}function Pge(e){let{lexical:t,fullText:n}=e.signals;return t>=lge?`lexical`:t===uge&&n<=0?`pathOnly`:`body`}function Fge(e){let t=[],n=[],r=[];for(let i of e){let e=Pge(i);e===`lexical`?t.length<cge&&t.push(i):e===`body`?n.length<6&&n.push(i):r.length<4&&r.push(i)}return[...t,...n,...r]}function v9(e,t,n){if(t===`relevance`)return e.slice(0,n);let r=Fge(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 Ige(e,t,n={}){let r=n.intent??`omnibar`,i=Oge(r,n.ranking),a=fge(n.limit),o=new Set(n.scopes??yge(r)),s=e.documents.filter(e=>p9(e,o)),c=c9(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=sY(vge(e),{term:c,properties:Age(r),boost:jge(r),tolerance:Nge(r,c),limit:Math.max(a*4,40)}),u=new Map(l.hits.filter(e=>p9(e.document,o)).map(e=>[e.document.id,e.score])),d=kge(s),f=new Map;for(let e of s)m9(e,c)>=0&&f.set(e.id,e);for(let e of l.hits)p9(e.document,o)&&f.set(e.document.id,e.document);if(!n.semantic){let e=_9(f.values(),u);return v9([...f.values()].map(t=>{let n=Math.max(0,m9(t,c)),r=u.get(t.id)??0,a=d.get(t.id)??0;return{document:t,score:g9(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 v9(Lge({scopedDocuments:s,candidates:f,fullTextScores:u,recency:d,normalizedQuery:c,ranking:i,semantic:n.semantic}),i,a)}function y9(e){let t=new Map;return e.forEach((e,n)=>{t.set(e,n+1)}),t}function Lge(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=_9(n.values(),r),h=[...n.values()].map(e=>{let t=Math.max(0,m9(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?g9(o,t,n,s,e.kind,m):h9(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=y9(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)),_=y9(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}))}function Rge(e){return e.created.length>0||e.packSkills?.some(e=>e.pending)===!0||e.requiredPlugins?.some(e=>e.pending)===!0}function zge(e){return`https://${e.host}/${e.owner}/${e.repo}.git`}function Bge(e,t){return!e||e.length===0?`true`:t.detached?`detached`:t.currentBranch===null||t.currentBranch===e?`true`:`false`}var b9=Symbol.for(`@inkeep/open-knowledge/skill-state-field-registry`),x9=globalThis;x9[b9]===void 0&&(x9[b9]=pr());var S9=x9[b9],C9=L({version:M().regex(/^\d+\.\d+\.\d+(?:[-+][\w.-]+)?$/,`version must match /^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$/`).register(S9,{description:`Recorded skill version for this target.`}),recordedAt:Ui().register(S9,{description:`ISO 8601 timestamp of the most recent successful write. Updated on every write, including reinstalls of the same version.`}),surface:R([`server-build-and-open`,`electron-build-and-open`,`cli-npx-skills-add`,`desktop-direct`,`cli-start`]).register(S9,{description:`Install-source surface that recorded this entry.`}).optional()}),Vge=L({enabled:P().register(S9,{description:`Whether this user-global skill bundle is opted in.`}),decidedAt:Ui().register(S9,{description:`ISO 8601 timestamp of the opt-in / opt-out decision.`})});L({schema:z(1).register(S9,{description:`Schema major version. Bumped only on breaking shape changes.`}),targets:L({"claude-cowork":C9.optional(),"cli-hosts":C9.optional()}).register(S9,{description:`Per-target install-state entries. Absent target = no recorded install.`}).default({}),bundles:no(M(),Vge).register(S9,{description:`Per-bundle opt-in decisions keyed by install name. Absent key = no recorded decision.`}).optional(),installsReported:F(M()).register(S9,{description:"Skill installs already reported to skills.sh from this machine, as `<owner/repo>#<skill>`. Append-only; presence suppresses a re-report."}).optional()});var w9=`bottom`,T9=e=>e*8+4,E9=T9(92),D9=T9(40);function Hge(e){return e===`right`||e===`bottom`?e:w9}function Uge(e){return typeof e!=`number`||!Number.isFinite(e)?E9:Math.max(D9,Math.round(e))}var Wge=new Set([`(connected)`,`(agent thread)`]);function Gge(e){return e!=null&&Wge.has(e)}var Kge=6e5,O9=class extends Error{chunksCompleted;totalChunks;bytesWritten;bytesRemaining;cause;constructor(e,t){let n=e instanceof Error?e.message:typeof e==`string`?e:`unknown error`;super(`chunked insert failed after ${t.chunksCompleted}/${t.totalChunks} chunks (${t.bytesWritten} bytes written, ${t.bytesRemaining} bytes lost): ${n}`),this.name=`ChunkedInsertError`,this.chunksCompleted=t.chunksCompleted,this.totalChunks=t.totalChunks,this.bytesWritten=t.bytesWritten,this.bytesRemaining=t.bytesRemaining,this.cause=e}};async function qge(e,t,n,r,i={}){let a=i.thresholdBytes??512e3,o=i.chunkSizeBytes??51200,s=i.origin,c=i.yieldFn??Jge,l=i.resolveOffset??(e=>e);if(r.length<=a){e.transact(()=>{t.insert(n,r)},s);return}let u=Math.ceil(r.length/o),d=0,f=n,p=0,m=0;for(;d<r.length;){let n=Math.min(d+o,r.length),i=r.slice(d,n);try{let n=l(f);e.transact(()=>{t.insert(n,i)},s)}catch(e){throw new O9(e,{chunksCompleted:p,totalChunks:u,bytesWritten:m,bytesRemaining:r.length-d})}p++,m+=i.length,f+=i.length,d=n,d<r.length&&await c()}}function Jge(){return new Promise(e=>{let t=globalThis;t.document?.hidden!==!0&&typeof t.requestAnimationFrame==`function`?t.requestAnimationFrame(()=>e()):setTimeout(()=>e(),0)})}function Yge(e){let t;try{t=new URL(e)}catch{return null}let n=t.pathname.match(/^\/video\/(\d+)/);if(n)return n[1]??null;let r=t.pathname.match(/^\/(\d+)/);return r?r[1]??null:null}function Xge(e){if(typeof e!=`string`||e.length===0)return e;let t=C3(e);if(t){let e=t.noCookie?`www.youtube-nocookie.com`:`www.youtube.com`,n=t.startSeconds===null?``:`?start=${t.startSeconds}`;return`https://${e}/embed/${t.id}${n}`}if(x3(e)){let t=Yge(e);return t?`https://player.vimeo.com/video/${t}`:e}let n=y3(e);if(n){let e=n.startRaw===null?``:`?t=${n.startRaw}`;return`https://www.loom.com/embed/${n.id}${e}`}return e}var Zge=`https://api.github.com/repos/inkeep/open-knowledge`;async function Qge(e){let{signal:t,...n}=e??{},r=t?AbortSignal.any([AbortSignal.timeout(5e3),t]):AbortSignal.timeout(5e3);try{let e=await fetch(Zge,{headers:{accept:`application/vnd.github+json`,"user-agent":`openknowledge.ai`},...n,signal:r});if(!e.ok)return console.warn(`[github-stars] GitHub API responded ${e.status}`),null;let t=await e.json();return typeof t.stargazers_count==`number`?t.stargazers_count:null}catch(e){return console.warn(`[github-stars] fetch failed: ${e instanceof Error?e.message:String(e)}`),null}}var $ge=/^(#{1,6})\s+(.+)$/;function e_e(e,t){let n=(e.endsWith(`\r`)?e.slice(0,-1):e).match($ge);if(!n)return null;let r=n[2].trim(),i=g7(r,t);return i?{level:n[1].length,text:r,slug:i}:null}var t_e=Array.from({length:256},(e,t)=>(t+256).toString(16).slice(1));function k9(){let e=globalThis.crypto;if(e&&typeof e.randomUUID==`function`)return e.randomUUID();let t=new Uint8Array(16);if(e&&typeof e.getRandomValues==`function`)e.getRandomValues(t);else for(let e=0;e<16;e++)t[e]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=t_e;return`${n[t[0]]}${n[t[1]]}${n[t[2]]}${n[t[3]]}-${n[t[4]]}${n[t[5]]}-${n[t[6]]}${n[t[7]]}-${n[t[8]]}${n[t[9]]}-${n[t[10]]}${n[t[11]]}${n[t[12]]}${n[t[13]]}${n[t[14]]}${n[t[15]]}`}var n_e={fileSystem:`File System`,gitUpstream:`Git (upstream)`,service:`OpenKnowledge (service)`,generator:`OpenKnowledge (generated)`},r_e=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],i_e={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`},a_e={cursor:`#FFFFFF`,windsurf:`#FFFFFF`},A9=[`#f0ece3`,`#fff5e1`,`#f9e1db`,`#f5def7`,`#ece2fb`,`#dce8fa`,`#DBF3FB`];function o_e(e,t=r_e){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}function s_e(e){let t=e.trim();if(!t)return`?`;let n=t.split(/[-\s]+/).filter(Boolean);if(!n.length)return`?`;if(n.length>=2)return n.slice(0,2).map(e=>e[0]??``).join(``).toUpperCase();let r=n[0],i=[r[0]];for(let e=1;e<r.length&&i.length<2;e++){let t=r[e-1],n=r[e];t===t.toLowerCase()&&n===n.toUpperCase()&&n!==n.toLowerCase()&&i.push(n)}return i.length>=2?i.join(``).toUpperCase():r.slice(0,2).toUpperCase()}function c_e(e){let t=e.trim();if(!t)return e;if(t.includes(` `)||!/[-_]/.test(t))return t;let n=t.split(/[-_]+/).filter(Boolean);return n.length?n.map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `):t}var l_e={"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 u_e(e){return e?l_e[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}function d_e(e){let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2;if(i===a)return[0,0,o*100];let s=i-a,c=o>.5?s/(2-i-a):s/(i+a),l;return l=i===t?((n-r)/s+(n<r?6:0))/6:i===n?((r-t)/s+2)/6:((t-n)/s+4)/6,[l*360,c*100,o*100]}function f_e(e,t,n){let r=t/100,i=n/100,a=r*Math.min(i,1-i),o=t=>{let n=(t+e/30)%12,r=i-a*Math.max(Math.min(n-3,9-n,1),-1);return Math.round(255*r).toString(16).padStart(2,`0`)};return`#${o(0)}${o(8)}${o(4)}`}function p_e(e){let[t]=d_e(e);return f_e(t,45,32)}var m_e=[`Curious`,`Brave`,`Clever`,`Swift`,`Gentle`,`Bright`,`Wise`,`Bold`,`Calm`,`Keen`],h_e=[`Bird`,`Cat`,`Dog`,`Fish`,`Mouse`,`Rabbit`,`Shrimp`,`Snail`,`Squirrel`,`Turtle`],j9=`ok-user-name-v3`,M9=`ok-user-color-v3`;function N9(e){return e[Math.floor(Math.random()*e.length)]}function g_e(){return`${N9(m_e)} ${N9(h_e)}`}function P9(){return N9(A9)}function F9(e){try{return localStorage.getItem(e)}catch{return null}}function I9(e,t){try{localStorage.setItem(e,t)}catch{}}function __e(){let e=new URLSearchParams(window.location.search).get(`coeditor`)||`standalone`,t=k9(),n=F9(j9),r=F9(M9);return n||(n=g_e(),I9(j9,n)),r||(r=P9(),I9(M9,r)),{name:n,color:r,coeditor:e,tabId:t}}function L9(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 v_e(e){return e===`.`||e===`..`?e:encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.codePointAt(0)?.toString(16).toUpperCase()}`)}function y_e(e){return e.split(`/`).map(v_e).join(`/`)}function R9(e){return e.split(`/`).map(L9).join(`/`)}function z9(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=L9(o.split(`/`).pop()??``).match(/\.([a-z0-9]+)$/i);if(s){let e=`.${(s[1]??``).toLowerCase()}`;if(!I$.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=L9(d[e]??``);if(e===f&&(t=df(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 b_e(e){throw Error(`Unhandled ClassifiedLinkTarget variant: ${JSON.stringify(e)}`)}var B9=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function V9(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function H9(e){return e.split(`/`).filter(Boolean)}function U9(e){let t=e.trim();return B9.test(t)||t.startsWith(`//`)}function x_e(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(U9(n))return{kind:`external`,url:n};let r=n.indexOf(`#`),i=R9(r<0?n:n.slice(0,r)),a=gf(i,t);if(a)return{kind:`doc`,docName:a,anchor:r<0?null:n.slice(r+1)};let o=hf(i,t);if(o)return{kind:`doc`,docName:o,anchor:r<0?null:n.slice(r+1)};let s=z9(n,t);if(s)return{kind:`doc`,docName:s.docName,anchor:s.anchor};let c=V9(i);return c&&c!==`md`&&c!==`mdx`?{kind:`asset`,url:n,ext:c,literal:!1}:null}function S_e(e,t){let n=e.trim();if(!n)return null;if(U9(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=V9(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r,literal:!0}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function C_e(e,t,n){let r=e.trim();if(!r||B9.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:L9(e));return c.length===0?null:c.join(`/`)}function w_e(e,t,n=null,r=`.md`){let i=H9(e);i.pop();let a=H9(t),o=0;for(;o<i.length&&o<a.length&&i[o]===a[o];)o+=1;let s=i.slice(o).map(()=>`..`),c=a.slice(o),l=[...s,...c].join(`/`);return l||=a.at(-1)??t,!l.startsWith(`./`)&&!l.startsWith(`../`)&&(l=`./${l}`),`${y_e(l)}${r}${n?`#${n}`:``}`}function T_e(e){if(!e)return{height:null,viewerFragment:``};let t=e.split(`&`).filter(e=>e.length>0),n=null,r=[];for(let e of t){let t=e.indexOf(`=`);if(t===-1){r.push(e);continue}let i=e.slice(0,t),a=e.slice(t+1);if(i===`height`){let e=Number.parseInt(a,10);!Number.isNaN(e)&&e>0&&(n=e);continue}r.push(e)}return{height:n,viewerFragment:r.join(`&`)}}var E_e=`unknown`;function D_e(e,t=Date.now()){let n=Date.parse(e);if(!Number.isFinite(n))return E_e;let r=Math.floor(Math.max(0,t-n)/1e3);if(r<60)return`${r}s ago`;let i=Math.floor(r/60);if(i<60)return`${i}m ago`;let a=Math.floor(i/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}function O_e(e){return e.replace(/[/\\:*?"<>|\0]/g,`-`).replace(/\s+/g,` `).replace(/-+/g,`-`).trim().replace(/^[-.\s]+|[-.\s]+$/g,``)}function W9(e){return`pagesBySlug`in e}function G9(e){return W9(e)?e.pages:e}function K9(e,t){return W9(e)?e.assetPaths??new Set:t??new Set}function q9(e,t){return W9(e)?e.filePaths??new Set:t??new Set}function J9(e,t){return e<t?-1:+(e>t)}function k_e(e,t){let n=new Map;for(let r of e){let e=t(r),i=n.get(e);e&&(i===void 0||J9(r,i)<0)&&n.set(e,r)}return n}function A_e(e,t){let n=new Map,r=[...e].sort(J9);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 j_e(e,t){let n=h7(e);if(!n)return;if(W9(t))return t.pagesBySlug.get(n);let r;for(let e of t)h7(e)===n&&(r===void 0||J9(e,r)<0)&&(r=e);return r}function M_e(e,t){if(e.includes(`/`))return;let n=h7(e);if(!n)return;if(W9(t))return t.pagesByBasename?.get(n);let r;for(let e of t){let t=e.lastIndexOf(`/`);h7(t===-1?e:e.slice(t+1))===n&&(r===void 0||J9(e,r)<0)&&(r=e)}return r}function Y9(e){let t=e.trim();if(!t)return[];let n=h7(t);return n.length>0&&n!==t?[n]:[]}function X9(e,t){let n=e.trim();if(!n)return;if(G9(t).has(n))return n;let r=n.replace(/\.(md|mdx)$/i,``);if(r!==n){let e=Z9(r,t);if(e!==void 0)return e}return Z9(n,t)}function Z9(e,t){let n=e.trim();if(!n)return;let r=G9(t);if(r.has(n))return n;let i=j_e(n,t);if(i)return i;for(let e of Y9(n))if(r.has(e))return e;return N_e(n,r)||M_e(n,t)}function N_e(e,t){let n=`${e}/index`;if(t.has(n))return n;let r=e.lastIndexOf(`/`),i=r===-1?e:e.slice(r+1),a=i?`${e}/${i}`:null;if(a&&t.has(a))return a}function Q9(e){let t=((e.trim().split(`#`)[0]??``).trim().split(`?`)[0]??``).trim();return t.startsWith(`/`)?t.slice(1):t}function $9(e,t,n){let r=Q9(e);if(!r)return null;let i=r.toLowerCase(),a=n?[t,n]:[t];for(let e of a){if(e.has(r))return r;for(let t of e)if(t.toLowerCase()===i)return t}if(r.includes(`/`))return null;let o=[];for(let e of a)for(let t of e){let e=t.lastIndexOf(`/`);(e===-1?t:t.slice(e+1)).toLowerCase()===i&&o.push(t)}return o.length===0?null:o.sort(J9)[0]??null}function P_e(...e){let t=new Set;for(let n of e)for(let e of n){let n=e.toLowerCase();t.add(`path:${n}`),t.add(`basename:${n.slice(n.lastIndexOf(`/`)+1)}`)}return t}function F_e(e,t,n,r){let i=e.trim();if(!i)return!1;let a=Q9(i).toLowerCase(),o=W9(t)?t.assetTargetKeys:void 0;if(o!==void 0){if(o.has(`path:${a}`)||!a.includes(`/`)&&o.has(`basename:${a}`))return!0}else if($9(i,K9(t,n),q9(t,r)))return!0;return X9(i,t)!==void 0}function I_e(e,t,n){let r=S_e(e,t);return r===null||r.kind!==`asset`||$9(r.url,K9(n),q9(n))!==null||X9(e,n)===void 0?r:{kind:`doc`,docName:e.trim(),anchor:t?.trim()||null}}export{Z5 as $,xT as $a,cee as $c,vX as $i,a2 as $n,Ine as $o,Pse as $r,jf as $s,r9 as $t,R$ as A,hj as Aa,$te as Ac,cQ as Ai,H0 as An,vg as Ao,o1 as Ar,th as As,moe as At,M0 as B,kie as Ba,Ds as Bc,w0 as Bi,lQ as Bn,Up as Bo,E0 as Br,Ane as Bs,Qme as Bt,Q$ as C,Kfe as Ca,Vd as Cc,Jhe as Ci,nfe as Cn,Rg as Co,gQ as Cr,gh as Cs,J$ as Ct,Bme as D,_7 as Da,Yte as Dc,x3 as Di,v$ as Dn,Hg as Do,L0 as Dr,dm as Ds,v4 as Dt,Vme as E,J4 as Ea,Ud as Ec,N0 as Ei,BY as En,Ug as Eo,V9 as Er,ip as Es,Qpe as Et,nme as F,Fk as Fa,tne as Fc,T$ as Fi,k_e as Fn,ere as Fo,D_e as Fr,jne as Fs,g1 as Ft,m3 as G,dD as Ga,R as Gc,T_e as Gi,hQ as Gn,nh as Go,Nse as Gr,tf as Gs,rhe as Gt,Zfe as H,DE as Ha,bte as Hc,Hge as Hi,x_e as Hn,hm as Ho,rse as Hr,Xf as Hs,L7 as Ht,tme as I,wk as Ia,rne as Ic,i1 as Ii,w_e as In,tre as Io,Qge as Ir,dp as Is,v1 as It,d1 as J,Vw as Ja,P as Jc,C3 as Ji,SQ as Jn,Xm as Jo,Mse as Jr,$d as Js,_4 as Jt,Eme as K,fD as Ka,Po as Kc,goe as Ki,a1 as Kn,Kp as Ko,Hse as Kr,ef as Ks,a9 as Kt,Hme as L,zk as La,kte as Lc,Rhe as Li,P_e as Ln,$ne as Lo,g7 as Lr,kne as Ls,whe as Lt,Zpe as M,uj as Ma,Uo as Mc,Bpe as Mi,AY as Mn,Gh as Mo,Ade as Mr,lne as Ms,spe as Mt,o9 as N,lj as Na,Wo as Nc,Ppe as Ni,G0 as Nn,G as No,y5 as Nr,Ene as Ns,U1 as Nt,Ffe as O,Z0 as Oa,Xte as Oc,ppe as Oi,QX as On,P_ as Oo,rX as Or,Fm as Os,b4 as Ot,P7 as P,KA as Pa,Qte as Pc,ise as Pi,A_e as Pn,Zne as Po,c_e as Pr,Im as Ps,qme as Pt,L$ as Q,bT as Qa,M as Qc,yX as Qi,o2 as Qn,bm as Qo,Rse as Qr,Mf as Qs,d4 as Qt,A$ as R,Bk as Ra,Ate as Rc,CZ as Ri,zge as Rn,Qne as Ro,__e as Rr,ah as Rs,n_e as Rt,O9 as S,f1 as Sa,Yf as Sc,y1 as Si,b_e as Sn,q as So,xhe as Sr,vm as Ss,q$ as St,$pe as T,_oe as Ta,Df as Tc,Y7 as Ti,Khe as Tn,zg as To,O0 as Tr,sm as Ts,Ume as Tt,bme as U,uE as Ua,Io as Uc,Uge as Ui,Uhe as Un,Sm as Uo,u_e as Ur,Qf as Us,ehe as Ut,cme as V,HE as Va,Ute as Vc,h8 as Vi,Bge as Vn,Vp as Vo,M$ as Vr,One as Vs,$me as Vt,A9 as W,PT as Wa,Go as Wc,y3 as Wi,mQ as Wn,Cm as Wo,Vse as Wr,Af as Ws,the as Wt,m1 as X,Uw as Xa,z as Xc,k9 as Xi,O5 as Xn,Jm as Xo,zse as Xr,Bd as Xs,c4 as Xt,p1 as Y,XE as Ya,ga as Yc,Rge as Yi,CQ as Yn,Ym as Yo,Bse as Yr,Qd as Ys,r4 as Yt,h1 as Z,Ww as Za,I as Zc,S4 as Zi,A2 as Zn,Gp as Zo,Fse as Zr,af as Zs,s4 as Zt,P$ as _,j0 as _a,Jf as _c,W$ as _i,D0 as _n,J as _o,R9 as _r,gp as _s,vhe as _t,Gpe as a,I_e as aa,sf as ac,C1 as ai,Ke as al,uhe as an,ZE as ao,r2 as ar,Zm as as,npe as at,_Q as b,Nde as ba,Cf as bc,b1 as bi,TZ as bn,K as bo,B0 as br,Np as bs,Tme as bt,k4 as c,Xge as ca,lf as cc,P4 as ci,Ze as cl,u0 as cn,nT as co,fX as cr,lp as cs,d7 as ct,rge as d,G4 as da,Ff as dc,U9 as di,Z$ as dn,GE as do,u$ as dr,qp as ds,Cde as dt,bY as ea,Ed as ec,Ase as ei,lee as el,V7 as en,rT as eo,n2 as er,Mp as es,q4 as et,sge as f,Ige as fa,uf as fc,ipe as fi,X$ as fn,CC as fo,upe as fr,Mm as fs,H1 as ft,nge as g,Ghe as ga,vf as gc,V5 as gi,$fe as gn,V_ as go,hge as gr,wne as gs,$0 as gt,age as h,Lfe as ha,Tf as hc,Bfe as hi,epe as hn,uC as ho,_ge as hr,kp as hs,Q0 as ht,Fme as i,$9 as ia,cf as ic,gY as ii,Ue as il,dhe as in,FT as io,O2 as ir,Qm as is,Jfe as it,Jme as j,sj as ja,Ms as jc,Lpe as ji,U0 as jn,W as jo,ope as jr,pp as js,K4 as jt,w9 as k,l9 as ka,Es as kc,w4 as ki,w$ as kn,h_ as ko,i$ as kr,op as ks,Xpe as kt,ame as l,O_e as la,Ld as lc,R4 as li,ze as ll,Che as ln,LT as lo,s_e as lr,zm as ls,j4 as lt,ige as m,Rfe as ma,kf as mc,b3 as mi,x4 as mn,AS as mo,V3 as mr,Rne as ms,B5 as mt,a_e as n,z9 as na,Xd as nc,Lse as ni,Ve as nl,H7 as nn,mT as no,i2 as nr,Rp as ns,dme as nt,M4 as o,X9 as oa,Rd as oc,fpe as oi,Ye as ol,The as on,bw as oo,t2 as or,pm as os,Ame as ot,oge as p,voe as pa,bf as pc,J2 as pi,Kge as pn,DS as po,S8 as pr,cne as ps,efe as pt,Xle as q,lD as qa,F as qc,T0 as qi,o_e as qn,qm as qo,jse as qr,Zd as qs,qhe as qt,Pme as r,E4 as ra,Gf as rc,Ihe as ri,He as rl,Ohe as rn,hT as ro,H2 as rr,$m as rs,wme as rt,N4 as s,f$ as sa,Nd as sc,I4 as si,Je as sl,B$ as sn,ZC as so,e2 as sr,fm as ss,G$ as st,i_e as t,C_e as ta,Nf as tc,Ise as ti,Ft as tl,zhe as tn,fT as to,U2 as tr,Hp as ts,T1 as tt,ime as u,e_e as ua,of as uc,z$ as ui,Yme as un,cD as uo,d$ as ur,zp as us,D9 as ut,N$ as v,sQ as va,Of as vc,Gge as vi,A0 as vn,tv as vo,p_e as vr,Yne as vs,K$ as vt,A7 as w,h7 as wa,df as wc,hhe as wi,tfe as wn,Ng as wo,j$ as wr,um as ws,Gme as wt,F$ as x,iQ as xa,xf as xc,F_e as xi,V2 as xn,I_ as xo,lpe as xr,lm as xs,E9 as xt,fQ as y,V0 as ya,pf as yc,q2 as yi,Sme as yn,iv as yo,H$ as yr,Dm as ys,U$ as yt,P0 as z,Dk as za,Ote as zc,v5 as zi,qge as zn,Pp as zo,Y9 as zr,sp as zs,nhe as zt};
|
|
604
|
+
`)}catch(t){return console.warn(`[markdown-plain-text] markdown parse failed, falling back to raw text`,t),e}}for(let e of[{tagName:`Mirror`,attrName:`src`,resolution:`bare-doc-name`},{tagName:`Excalidraw`,attrName:`src`,resolution:`doc-relative`}]){let t=B3.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.`)}NI(),QF(),$F(),I({intents:F(I({satisfierId:M().min(1),desired:R([`present`,`absent`])}).loose()),...Q2,summary:$2}).loose();var Hpe=I({satisfierId:M(),agentId:M(),piece:M(),scope:M(),kind:M(),pathId:M().optional(),desired:R([`present`,`absent`]),action:R(Zo),errorId:M().optional()}).loose(),Upe=I({kind:M(),satisfierIds:F(M()),agentIds:F(M()),pathId:M().optional(),blockedReason:M().optional()}).loose(),Wpe=I({state:M(),strictness:F(R(Yo)).optional()}).loose(),Gpe=I({probes:I({env:R([`desktop`,`local-web`,`remote-web`]),satisfiers:no(M(),Wpe)}).loose(),detection:I({detected:F(M()),probed:P()}).loose()}).loose(),Kpe=I({actions:F(Hpe),conflicts:F(Upe),withheld:F(M()),snapshot:Gpe}).loose();I({entries:F(I({level:R([`info`,`warn`,`error`]),message:M().max(K4),event:M().optional(),fields:no(M(),Ua()).optional(),ts:N().optional(),sourceId:M().optional(),lineNumber:N().optional()}).loose()).max(100),droppedSinceLastFlush:N().int().min(0).optional()}).loose(),I({accepted:N().int().min(0)}).loose();var qpe=I({exact:M().min(1),prefix:M(),suffix:M(),start:N().int().nonnegative(),end:N().int().nonnegative()}),Jpe=F(Xa([M(),N().int().nonnegative()])),Ype=Qa(`kind`,[I({kind:z(`body`)}),I({kind:z(`property`),key:M().min(1),path:Jpe.default([])})]).default({kind:`body`}),Xpe=R([`anchored`,`orphaned`,`resolved`]),A7=I({threadId:M().min(1),docName:M().min(1),target:Ype,anchor:qpe.nullable(),state:Xpe,queued:P(),latestComment:M(),createdBy:M().min(1),createdAt:N(),updatedAt:N().optional()}),j7=I({docName:M(),instruction:M(),property:M().nullable(),passage:I({exact:M(),prefix:M(),suffix:M()}).nullable(),anchorLost:P(),passageRepeats:P()}).loose(),M7=I({threadId:M(),ok:z(!0)}),N7=I({threadId:M(),ok:z(!1),error:z(`not-found`)});I({threads:F(A7)}).loose();var Zpe=I({meta:A7,orphaned:P()}).loose(),Qpe=I({threadId:M()}).loose();I({meta:A7,payload:j7}).loose();var $pe=I({results:F(Xa([M7.extend({meta:A7,payload:j7}),N7]))}).loose(),eme=I({results:F(Xa([M7.extend({meta:A7}),N7]))}).loose(),tme=I({status:M().min(1),reason:M()}).loose(),nme=I({docName:M().min(1),content:M(),lifecycle:tme.nullable()}).loose(),P7=I({kind:R([`document`,`asset`,`folder`,`file`]).default(`document`),docName:M().min(1).optional(),docExt:M().min(1).default(`.md`),size:N().int().nonnegative(),modified:M().min(1),isSymlink:P().default(!1),canonicalDocName:M().nullable().default(null),targetPath:M().nullable().default(null),path:M().min(1).optional(),assetExt:M().min(1).optional(),mediaKind:R([`image`,`video`,`audio`,`pdf`,`text`,`mermaid`,`excalidraw`]).nullable().optional(),referencedBy:F(M().min(1)).optional(),hasChildren:P().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)`}),rme=I({documents:F(P7),truncated:P().optional()}).loose(),ime=I({source:M().min(1),anchor:M().nullable(),title:M(),snippet:M().nullable()}).loose(),ame=I({docName:M().min(1),backlinks:F(ime)}).loose(),ome=I({counts:no(M().min(1),N().int().nonnegative())}).loose();I({counts:no(M().min(1),N().int().nonnegative())}).loose();var sme=Qa(`kind`,[I({kind:z(`doc`),docName:M().min(1),anchor:M().nullable(),title:M(),snippet:M().nullable()}).loose(),I({kind:z(`external`),url:M().min(1),title:M(),snippet:M().nullable()}).loose()]),cme=I({role:M().min(1),sourceForm:M().min(1),targetKind:M().min(1),href:M(),resolvedTarget:M().nullable(),status:M().min(1),reason:M().nullable(),resolutionMethod:M().min(1),fallbackTarget:M().nullable().default(null),range:I({start:N().int().nonnegative(),end:N().int().nonnegative()}),line:N().int().nonnegative(),column:N().int().nonnegative(),definition:I({label:M(),line:N().int().nonnegative()}).nullable().default(null)}).loose(),lme=I({docName:M().min(1),forwardLinks:F(sme),localTargets:F(cme).optional()}).loose(),ume=Qa(`kind`,[I({id:M().min(1),kind:z(`doc`),docName:M().min(1),anchor:M().nullable(),label:M(),cluster:M().nullable(),category:M().nullable(),tags:F(M()).nullable(),managed:P().optional()}).loose(),I({id:M().min(1),kind:z(`external`),url:M().min(1),label:M()}).loose()]),dme=I({source:M().min(1),target:M().min(1)}).loose(),fme=I({nodes:F(ume),links:F(dme)}).loose(),pme=I({ts:N().int().min(0),url:M(),method:M(),ua:M().optional(),origin:M().optional(),referer:M().optional(),host:M().optional(),remote:M().optional(),secChUa:M().optional(),secChUaMobile:M().optional(),secChUaPlatform:M().optional(),secFetchSite:M().optional(),secFetchDest:M().optional(),secFetchMode:M().optional(),secFetchUser:M().optional()}).loose(),mme=I({app:Xa([z(`cursor`),z(`codex`),z(`claude`),Va()]),signals_fired:F(M())}).loose();I({entries:F(pme),count:N().int().min(0),detection:mme}).loose();var F7=I({path:M().min(1),code:R([`M`,`A`,`D`,`R`,`C`,`U`,`T`,`?`,`!`,` `]),origPath:M().min(1).optional(),syncScoped:P(),open:Qa(`kind`,[I({kind:z(`doc`),docName:M().min(1)}),I({kind:z(`asset`),path:M().min(1)})]).optional()}).loose();I({branch:M().nullable(),detached:P(),upstream:M().nullable(),staged:F(F7),notStaged:F(F7),untracked:F(F7),incoming:F(F7),truncated:P(),readable:P().default(!0)}).loose();var hme=R([`AWAITING_CHECKS`,`LOCKED`,`MERGEABLE`,`QUEUED`,`UNMERGEABLE`]),gme=R([`BEHIND`,`BLOCKED`,`CLEAN`,`DIRTY`,`DRAFT`,`HAS_HOOKS`,`UNKNOWN`,`UNSTABLE`]),_me=R([`APPROVED`,`CHANGES_REQUESTED`,`REVIEW_REQUIRED`]),vme=R([`ERROR`,`EXPECTED`,`FAILURE`,`PENDING`,`SUCCESS`]),yme=I({mergeQueue:I({position:N().int().nonnegative(),state:hme.nullable().catch(null)}).nullable().catch(null),autoMerge:P(),mergeState:gme.nullable().catch(null),reviewDecision:_me.nullable().catch(null),checks:vme.nullable().catch(null)}).loose(),bme=I({kind:R([`pull`,`issue`]),repo:M().min(1),number:N().int().positive(),title:M(),author:M().nullable(),createdAt:M(),lifecycle:R([`open`,`draft`,`merged`,`closed`,`completed`,`not-planned`]),additions:N().int().nonnegative().optional(),deletions:N().int().nonnegative().optional(),status:yme.optional()}).loose();I({url:M()}).loose();var xme=Qa(`ok`,[I({ok:z(!0),preview:bme}).loose(),I({ok:z(!1),reason:M()}).loose()]);I({writers:F(I({id:M().min(1),name:M().optional(),email:M().optional()}).loose()).optional(),summary:$2,...Q2}).loose(),I({checkpointRef:M().min(1)}).loose();var Sme=I({v:N().int().optional(),id:M().min(1),name:M().min(1),colorSeed:M().optional(),docs:F(M()),summaries:F(M()).optional()}).loose();I({entries:F(I({sha:M().min(1),timestamp:M().min(1),author:M(),authorEmail:M(),type:R([`checkpoint`,`wip`,`upstream`,`park`]),message:M(),contributors:F(Sme),checkpoint:Ua().nullable(),parentSha:M().nullable().optional()}).loose()),total:N().int().nonnegative().optional(),truncated:P().optional(),hasMore:P().optional()}).loose(),I({sha:M().regex(/^[0-9a-f]{40}$/i),content:M(),timestamp:M(),author:M()}).loose();var Cme=I({contentDir:M().min(1),pathSeparator:R([`/`,`\\`]),symlinkResolved:P()}).loose();F(Qa(`source`,[I({docName:M().min(1),timestamp:M().min(1),size:N().int().nonnegative(),source:z(`flat`)}).loose(),I({docName:M().min(1),timestamp:M().min(1),source:z(`timeline`),sha:M().min(1)}).loose()])).meta({description:"Flat array of rescue buffer entries; discriminated via `source`."});var wme=I({domain:M().min(1),title:M().optional(),description:M().optional(),siteName:M().optional(),faviconDataUri:M().optional()}).loose();I({url:M()}).loose();var Tme=Qa(`ok`,[I({ok:z(!0),metadata:wme}).loose(),I({ok:z(!1),reason:M()}).loose()]),Eme=I({orphans:F(I({docName:M().min(1),title:M()}).loose())}).loose(),Dme=I({hubs:F(I({docName:M().min(1),title:M(),count:N().int().nonnegative()}).loose())}).loose(),Ome=I({source:M().min(1),title:M(),snippet:M().nullable()}).loose();I({deadLinks:F(I({target:M().min(1),sources:F(Ome)}).loose())}).loose(),I({target:I({docName:M().min(1),title:M(),aliases:F(M())}).loose(),mentions:F(I({source:M().min(1),excerpt:M(),offset:N().int().nonnegative()}).loose()),truncated:P()}).loose(),I({projectPath:M().min(1)}).loose();var kme=R([`not-a-git-worktree`,`init-failed`]);Qa(`ok`,[I({ok:z(!0),projectPath:M().min(1)}).loose(),I({ok:z(!1),reason:kme,message:M().min(1)}).loose()]),I({host:M().min(1).optional()}).loose(),I({host:M().min(1).optional(),token:M().min(1)}).loose(),I({host:M(),login:M()}).loose(),I({key:M().min(1)}).loose(),I({keyPresent:P()}).loose();var Ame=R([`no_key`,`invalid_endpoint`,`rate_limit`,`timeout`,`http_error`,`network`,`dims_mismatch`,`malformed_response`]),jme=Qa(`ok`,[I({ok:z(!0),endpoint:M().min(1),model:M().min(1),dimensions:N().int().positive()}).loose(),I({ok:z(!1),endpoint:M().min(1),model:M().min(1),reason:Ame,status:N().int().optional()}).loose()]);I({name:M().refine(e=>e.trim().length>0,{message:`name must be non-empty`}),email:M().refine(e=>e.trim().length>0,{message:`email must be non-empty`})}).loose(),I({authenticated:P()}).loose(),I({channel:R([`login`,`gh-login`]).default(`login`)}).loose(),I({}).loose();var Mme=I({stackIndex:N().int().min(0),ts:N().int().min(0),additions:N().int().min(0),deletions:N().int().min(0)}).loose(),Nme=I({docName:M().min(1),additionsTotal:N().int().min(0),deletionsTotal:N().int().min(0),lastTs:N().int().min(0),bursts:F(Mme)}).loose(),Pme=I({displayName:M().min(1),color:M().min(1),icon:M().optional(),connectionId:M().min(1)}).loose(),Fme=I({sessionAlive:P(),agent:Pme.nullable(),files:F(Nme)}).loose(),Ime=I({diff:M(),before:M(),after:M(),properties:R0,generatedAt:N().int().min(0)}).loose();I({}).loose(),I({}).loose(),I({}).loose(),I({}).loose(),I({}).loose(),I({}).loose();var Lme=I({displayName:M().min(1),icon:M(),color:M().min(1),currentDoc:M().nullable(),mode:R([`idle`,`writing`]),ts:N().int().min(0)}).loose();I({presence:no(M().min(1),Lme)}).loose();var Rme=I({sessionId:M().min(1),agentType:M().min(1),ts:N().int().min(0),insertedChars:N().int().min(0),deletedChars:N().int().min(0)}).loose();I({effects:F(I({"doc.name":M().min(1),entries:F(Rme)}).loose())}).loose(),I({decisions:F(I({ts:N().int().min(0),decision:M().min(1),kind:M().min(1),"doc.name":M().min(1),pathRole:M().min(1)}).loose())}).loose(),no(M().min(1),P()).meta({description:`Flat boolean record keyed by agent-scheme name (claude / codex / cursor). True = installed.`}),I({path:M().min(1,`path must be non-empty`)}).loose(),I({}).loose();var zme=I({fromDocName:M().min(1),toDocName:M().min(1)}).loose(),Bme=I({fromPath:M().min(1),toPath:M().min(1)}).loose();I({}).loose(),I({path:M().min(1),...Q2,summary:$2}).loose();var Vme=I({docName:M().min(1)}).loose();I({path:M().min(1),...Q2,summary:$2}).loose();var Hme=I({path:M().min(1)}).loose();I({kind:R([`file`,`folder`]),path:M().min(1),...Q2,summary:$2}).loose();var Ume=I({kind:R([`file`,`folder`]),path:M().min(1),duplicatedDocNames:F(M().min(1))}).loose(),Wme=I({pages:F(I({docName:M().min(1),title:M(),docExt:M().min(1),size:N().int().nonnegative(),modified:M().min(1),icon:M().min(1).max(2048).optional()}).loose())}).loose(),Gme=I({level:N().int().min(1).max(6),text:M(),slug:M()}).loose(),Kme=I({docName:M().min(1),headings:F(Gme)}).loose(),qme=I({docName:M().min(1),rewrites:N().int().nonnegative()}).loose();I({kind:R([`file`,`folder`,`asset`]),fromPath:M().min(1),toPath:M().min(1),...Q2,summary:$2}).loose();var Jme=I({renamed:F(zme),renamedAssets:F(Bme),rewrittenDocs:F(qme).optional(),summary:Q5.optional()}).loose();I({kind:R([`file`,`folder`,`asset`]),path:M().min(1),...Q2}).loose();var Yme=I({deletedDocNames:F(M().min(1))}).loose();I({kind:R([`file`,`folder`,`asset`]),path:M().min(1),...Q2,summary:$2}).loose();var Xme=I({deletedDocNames:F(M().min(1))}).loose();I({docName:M().min(1),commitSha:M().regex(/^[0-9a-f]{40}$/i,{message:`commitSha must be a 40-char git SHA`}),summary:$2,...Q2}).loose(),I({restoredFrom:M().min(1),timestamp:M().min(1),summary:Q5.optional(),warnings:n7.optional()}).loose();var Zme=/^#[0-9a-fA-F]{6}$/,Qme=I(Object.fromEntries(Sm.map(e=>[e,M().regex(Zme,`must be a #rrggbb hex color`)]))),I7=M().min(1).refine(Em,{message:`must contain a non-whitespace character`}),L7=I({name:I7,author:I7.optional(),variant:R([`dark`,`light`]),palette:Qme}).loose(),$me=I({name:M().min(1),scheme:L7,stem:M().min(1).optional(),extension:R([`.yaml`,`.yml`]).optional()}).loose(),ehe=I({id:M().min(1),filename:M().min(1)}).loose(),the=I({id:M().min(1),scheme:L7}).loose(),nhe=I({id:M().min(1),filename:M().min(1)}).loose(),rhe=Qa(`existed`,[I({existed:z(!1)}).loose(),I({existed:z(!0),filename:M().min(1),scheme:L7}).loose()]),ihe=I({themes:F(Qa(`ok`,[I({ok:z(!0),id:M().min(1),filename:M().min(1),scheme:L7}),I({ok:z(!1),filename:M().min(1),id:M().min(1).optional(),code:M().min(1),conflictingFilenames:F(M().min(1)).min(2).optional()})])),truncated:P()}).loose(),ahe=R([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),ohe=I({label:M().min(1),webUrl:ba().nullable()}).loose(),she=Qa(`checkStatus`,[I({checkStatus:z(`allowed`)}).loose(),I({checkStatus:z(`denied`),deniedReason:R([`no-collaborator`,`private-no-access`,`repo-not-found`,`not-authenticated`]),resolvedLogin:M().optional(),declaredLogin:M().optional(),declaredSource:M().optional()}).loose(),I({checkStatus:z(`unknown`),unknownError:R([`network`,`timeout`,`rate-limit`,`token-invalid`,`malformed-response`,`ssh-unverified`]).optional()}).loose()]),R7=R([`auth-403`,`auth-401`,`auth-scope-mismatch`,`auth-no-credential`,`auth-not-found-as-identity`,`semantic-protected-branch`]),che=R($f),lhe=R([`succeeded`,`up-to-date`,`conflict`,`refused`,`error`]);I({state:ahe,lastSyncUtc:M().nullable(),lastRunUtc:M().nullable().optional(),lastPullOkUtc:M().nullable().optional(),lastPushOkUtc:M().nullable().optional(),lastFetchUtc:M().nullable(),lastPushedSha:M().nullable(),ahead:N().int().min(0),behind:N().int().min(0),consecutiveFailures:N().int().min(0),consecutivePushFailures:N().int().min(0).optional(),conflictCount:N().int().min(0),hasRemote:P(),syncEnabled:P(),identityUnresolved:P(),remote:ohe.nullable().optional(),pushError:M().optional(),pushErrorCode:R7.optional(),pullError:M().optional(),pullErrorCode:R7.optional(),pausedReason:M().optional(),blockingPaths:F(M().min(1)).optional(),pushPermission:she.optional(),syncMode:che.optional(),lastPullUtc:M().nullable().optional(),lastPullOutcome:lhe.nullable().optional()}).loose(),I({action:R([`commit`]),paths:F(M().min(1)),commitSha:M().optional()}).loose(),I({action:R([`commit`])}).loose(),I({op:R([`sync`,`push`,`pull`,`fetch`]).optional()}).loose(),I({op:R([`sync`,`push`,`pull`,`fetch`])}).loose();var z7=R([`merge-native`,`working-tree`,`reconcile`]),B7=R([`merged-with-markers`,`refused-conflict-markers`,`refused-no-base`,`refused-too-large`,`disk-markers`,`stale-external-write`]),uhe=R([`mine`,`theirs`,`content`,`delete`]),dhe=I({conflicts:F(I({file:M().min(1),detectedAt:M().min(1),conflict:z7,reason:B7.optional().catch(void 0),conflictKind:R([`git`,`stale-external-write`]).optional(),docName:M().nullable(),theirsSha:M().optional(),baseSha:M().optional()}).loose())}).loose();I({file:M().min(1),strategy:R([`mine`,`theirs`,`content`,`delete`]),content:M().optional()}).loose().refine(e=>e.strategy!==`content`||e.content!==void 0,{message:`content must be provided when strategy is 'content' (an empty string keeps an empty file)`,path:[`content`]}),I({}).loose();var fhe=I({file:M().min(1),base:M(),ours:M(),theirs:M(),kind:R([`both-modified`,`delete-modify`,`modify-delete`]),conflict:z7,reason:B7.optional().catch(void 0),conflictKind:R([`git`,`stale-external-write`]).optional(),resolutionOptions:F(uhe)}).loose();I({plan:jo(e=>e!==void 0,{message:`plan is required`})}).loose(),I({plan:jo(e=>e!==void 0,{message:`plan is required`})}).loose(),I({result:jo(e=>e!==void 0,{message:`result is required`})}).loose(),I({packId:M().min(1)}).strict(),I({installedHosts:F(M()),skills:F(I({name:M().min(1),created:P()}).strict())}).strict();var phe=I({path:M().min(1),summary:M().min(1)}).loose(),mhe=I({files:N().int().nonnegative(),folders:N().int().nonnegative()}).loose();I({packs:F(I({id:M().min(1),name:M().min(1),description:M().min(1),defaultSubfolder:M().optional(),folders:F(phe),entryCounts:mhe}).loose())}).loose(),I({noOpen:P().optional(),out:M().min(1).optional()}).loose();var hhe=I({reason:R([`unsupported-platform`,`spawn-error`]),message:M()}).loose();Qa(`status`,[I({status:z(`installed`),outputPath:M(),size:N().int().nonnegative(),sha256:M(),skillVersion:M()}).loose(),I({status:z(`built`),outputPath:M(),size:N().int().nonnegative(),sha256:M(),skillVersion:M(),handoffError:hhe.optional()}).loose(),I({status:z(`failed`),buildError:M()}).loose(),I({status:z(`skip-current`),skillVersion:M(),recordedAt:M().optional()}).loose()]);var V7=R(We),H7=R(Ge);function ghe(e){return e===`agents`||Ge.includes(e)}var _he=I({alwaysOn:N().int().nonnegative(),onTrigger:N().int().nonnegative(),onDemand:N().int().nonnegative()}).strict(),vhe=[`.md`,`.mdx`,`.txt`],yhe=5e3,bhe=4;function U7(e){return Math.round(e/bhe)}function xhe(e){let t=e.lastIndexOf(`.`);return t===-1?!1:vhe.includes(e.slice(t).toLowerCase())}function She(e){let t=U7((e.name??``).length+(e.description??``).length),n=U7(Vd(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/`)||xhe(t.relPath)&&(i+=t.content.length));return{alwaysOn:t,onTrigger:n,onDemand:U7(i)}}I({tags:F(I({name:M().min(1),count:N().int().nonnegative(),isLeaf:P()}).loose())}).loose();var Che=I({docName:M().min(1),title:M(),matchingTags:F(M().min(1)),snippet:M().nullable()}).loose();I({name:M().min(1),docs:F(Che)}).loose(),I({folder:Ua(),frontmatter_local:no(M(),Ua()).nullable(),warnings:F(M()).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:F(R([`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(),I({path:M(),frontmatter:no(M(),Ua()).optional()}).loose(),I({applied:Ua()}).loose();var W7=no(M(),Ua()).meta({description:`Free-form frontmatter map embedded in template payloads.`});I({template:I({name:M().min(1),folder:M(),scope:R([`local`,`inherited`]),path:M().min(1),frontmatter:W7,body:M()}).strict()}).strict();var whe=I({templates:F(I({name:M().min(1),title:M().optional(),description:M().optional(),path:M().min(1),source_folder:M()}).strict()),truncated:P()}).strict();I({folder:M(),name:M(),body:M().optional(),frontmatter:W7.optional(),...Q2,summary:$2}).strict(),I({path:M().min(1),created:P(),warnings:F(M())}).strict(),I({sourcePath:M().min(1),targetFolder:M(),name:M().optional(),title:M().optional(),deleteSource:P().optional(),...Q2,summary:$2}).strict(),I({path:M().min(1),created:P(),warnings:F(M())}).strict(),I({existed:P(),path:M().min(1)}).strict(),I({fromFolder:M(),fromName:M(),toFolder:M(),toName:M(),body:M().optional(),frontmatter:W7.optional(),...Q2,summary:$2}).strict(),I({from:M().min(1),to:M().min(1),committed:P()}).strict();var G7=R(af),The=/^[a-z0-9-]+$/,Ehe=/^[A-Za-z0-9_-]+$/,K7=I({name:M(),description:M(),metadata:I({pack:M()}).strict().optional()}).strict();I({skill:I({name:M().min(1),scope:G7,path:M().min(1),frontmatter:K7,body:M(),files:F(I({path:M().min(1),text:M().nullable()})).optional(),managed:P().optional()}).strict()}).strict();var Dhe=I({source:M().min(1),publisher:M().optional(),skill:M().optional(),marketplaceUrl:M().optional(),importedAt:M().min(1),autoUpdate:P().optional()}).strict(),Ohe=I({name:M().min(1),description:M().optional(),scope:G7,path:M().min(1),canonicalPath:M().min(1).optional(),filePaths:F(M()).optional(),absolutePath:M().min(1).optional(),installed:P(),hosts:F(M()),hostQualifier:M().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:F(M()).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:no(M(),M()).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:F(M()).optional().meta({description:`Hosts whose dir holds a DIFFERENT same-name skill (fork/conflict) — occupied, not this skill.`}),symlinkedHosts:F(M()).optional(),installableEditors:F(M()).optional(),hubOffered:P().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:P().optional(),customPlacements:F(I({path:M(),mode:R([`copy`,`link`])}).strict()).optional(),plugin:I({name:M().min(1),marketplace:M().min(1),provider:M().min(1),url:M().optional()}).strict().optional(),managed:P().optional(),origin:Dhe.optional(),pack:M().optional(),modified:P().optional(),revertable:P().optional(),ignored:P().optional(),size:_he.optional()}).strict();I({name:M().min(1),scope:G7,apply:P().optional()}).strict(),I({line:M().min(1),gitignorePath:M().min(1),applied:P(),alreadyTracked:P().optional()}).strict();var khe=I({skills:F(Ohe),truncated:P()}).strict();I({scope:G7.default(`project`),name:M().meta({description:`Managed skill name to create or update.`}),body:M().optional(),frontmatter:K7,...Q2,summary:$2}).strict();var q7=F(R([`skill-name-vendor-word`,`skill-body-too-long`])).meta({description:"Machine-readable codes aligned 1:1 with `warnings` (`warnings[i]` is the display text for `warningCodes[i]`)."});I({path:M().min(1),created:P(),warnings:F(M()),warningCodes:q7}).strict(),I({scope:G7.default(`project`),name:M(),dryRun:P().optional(),setAutoUpdate:P().optional(),...Q2,summary:$2}).strict(),I({name:M().min(1),updated:P(),source:M().min(1),localBody:M().optional(),upstreamBody:M().optional(),gitTracked:P().optional(),warnings:F(M()),warningCodes:q7}).strict(),I({scope:G7.default(`project`),name:M(),...Q2,summary:$2}).strict(),I({name:M().min(1),baselineRef:M().min(1),restoredFiles:F(M()),warnings:F(M())}).strict();var J7=`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.`;I({existed:P(),path:M().min(1),warnings:F(M()).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. ${J7}`})}).strict(),I({scope:G7.default(`project`),fromName:M(),toName:M(),body:M().optional(),frontmatter:K7.optional(),...Q2,summary:$2}).strict(),I({from:M().min(1),to:M().min(1),committed:P(),warnings:F(M()).optional().meta({description:`Present when the rename itself completed but something beside it did not. ${J7}`})}).strict(),I({name:M(),toName:M().optional().meta({description:"Name for the skill at the destination scope; defaults to `name`. The SKILL.md `name` frontmatter is rewritten to match."}),fromScope:G7,toScope:G7,...Q2,summary:$2}).strict();var Ahe=[`nothing-written`,`destination-removed`,`destination-stray`,`destination-retained`,`destination-retained-blocking`,`destination-unreadable`,`partially-applied`];function jhe(e){return typeof e==`string`&&Ahe.includes(e)}var Mhe=[`intact`,`lossy`,`unknown`];function Nhe(e){return typeof e==`string`&&Mhe.includes(e)}var Phe=[`unreadable`,`occupant-unverifiable`];function Fhe(e){return typeof e==`string`&&Phe.includes(e)}var Ihe={"nothing-written":!1,"destination-removed":!1,"destination-stray":!1,"destination-retained":!0,"destination-retained-blocking":!0,"destination-unreadable":!1,"partially-applied":!1};function Y7(e){return Ihe[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=jhe(n)?n:void 0,o=Nhe(r)?r:void 0,s=Fhe(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}:(Y7(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}}var Rhe=`The server reported warnings in a shape this build does not recognise; treat this result as unverified.`;function zhe(e){if(e===void 0)return[];let t=Rhe;if(!Array.isArray(e))return[t];let n=e.filter(e=>typeof e==`string`);return n.length===e.length?n:[...n,t]}I({scope:G7,path:M().optional(),droppedLocations:F(M()).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:F(M()).optional().meta({description:`Present when the move itself completed but something beside it did not. ${J7}`})}).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."}),I({scope:G7,name:M(),toName:M(),...Q2,summary:$2}).strict(),I({name:M().min(1)}).strict(),I({name:M(),home:M().min(1)}).strict(),I({docName:M().min(1)}).strict();var X7=R([`reference`,`script`,`file`]);I({scope:G7.default(`project`),name:M(),path:M().min(1),content:M(),...Q2,summary:$2}).strict(),I({path:M().min(1),created:P(),kind:X7,content:P()}).strict(),I({scope:G7.default(`project`),name:M(),from:M().min(1),to:M().min(1),...Q2,summary:$2}).strict(),I({from:M().min(1),to:M().min(1),fromDocName:M().optional(),toDocName:M().optional()}).strict(),I({path:M().min(1),kind:X7,text:M()}).strict(),I({path:M().min(1),existed:P(),kind:X7}).strict();var Z7=Xa([H7,z(`agents`)]),Q7=M().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`}),$7=Xa([Z7,Q7]);I({scope:G7.default(`project`),name:M(),targets:F(Z7).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:F($7).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:F($7).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:R([`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:$7.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:P().optional(),setSource:M().min(1).optional(),place:I({dir:M().min(1).meta({description:`Project-relative directory the bundle dir is created under (e.g. ".windsurf/skills").`}),mode:R([`copy`,`link`])}).strict().optional(),convert:I({target:$7.meta({description:`The installed location to convert — an editor id, "agents", or a recorded custom placement path.`}),mode:R([`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:I({path:M().min(1).meta({description:`The recorded placement bundle path (e.g. ".windsurf/skills/my-skill").`})}).strict().optional(),...Q2,summary:$2,fork:I({editor:M().min(1),action:R([`align`,`make-source`,`rename`]),toName:M().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"}),I({name:M().min(1).meta({description:`Managed skill name installed or uninstalled.`}),hosts:F(M()).meta({description:`Editor ids the skill is projected into after the operation; [] is expected after uninstall.`}),scripts:P().meta({description:`True when the skill ships executable scripts, projected but never run.`}),warnings:F(M()).meta({description:`Non-fatal install/uninstall warnings from target projection.`}),warningCodes:F(R([`no-targets`,`scripts-present`,`name-conflict`,`no-description`,`skill-fork-name-unpatched`,`place-path-invalid`,`place-fork-refused`])).meta({description:"Machine-readable warning codes aligned with `warnings`."}),placedAt:M().optional(),sourceMovedTo:M().optional()}).strict(),I({scope:G7.default(`project`),name:M().meta({description:`Managed skill name to uninstall without deleting source.`})}).strict(),I({name:M().min(1).meta({description:`Managed skill name requested for uninstall.`}),uninstalled:P().meta({description:`True when an install marker existed and was removed; false for an idempotent no-op.`})}).strict();var Bhe=I({targets:F(V7),configured:P(),folders:F(I({scope:G7,host:M(),root:M(),state:R([`own`,`linked`,`linked-parent`,`absent`]),target:M().optional(),drift:z(!0).optional(),expected:M().optional()}).strict()).optional()}).strict(),e9=I({action:z(`link`),scope:G7,root:M().min(1).meta({description:`The folder to link (e.g. ".codex/skills").`}),target:M().min(1).meta({description:`The root it merges into (e.g. ".agents/skills"). Required.`})}),t9=I({action:z(`unlink`),scope:G7,root:M().min(1).meta({description:`The linked folder to materialize back.`}),exclude:F(M().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(),n9=I({action:z(`add-root`),scope:G7,root:Q7.meta({description:`New custom skills root to declare (base-relative, e.g. ".team/skills").`})}).strict(),Vhe=Qa(`action`,[e9.extend({preview:P().optional().meta({description:`Return the merge plan only (moves, drops, removes, conflicts, strays) — nothing is written.`})}).strict(),t9,n9]);Qa(`action`,[e9.strict(),t9,n9]),I({folderAction:Vhe}).strict();var r9=I({moves:F(M()),drops:F(M()),removes:F(M()),replaces:F(M()),conflicts:F(M()),strays:F(M())}).strict();I({targets:F(V7),reprojected:F(I({name:M(),hosts:F(M())}).strict()),bundleHosts:F(M()),removedFrom:F(M()),folder:I({moved:F(M()),dropped:F(M()),linked:F(M())}).strict().optional(),preview:r9.optional()}).strict(),I({scope:G7.default(`project`),name:M(),version:M().regex(/^[0-9a-f]{40}$/i),...Q2,summary:$2}).strict(),I({name:M().min(1),version:M(),restoredFiles:F(M()),warnings:F(M())}).strict(),I({query:M().optional(),intent:R([`autocomplete`,`full_text`,`omnibar`]).optional(),ranking:R([`navigation`,`relevance`]).optional(),scopes:F(R([`page`,`folder`,`content`,`file`])).optional(),scope:M().optional(),limit:N().int().nonnegative().optional(),semantic:P().optional(),source:R([`omnibar`,`mcp`,`http`]).optional()}).loose();var Hhe=I({kind:R([`page`,`folder`,`content`,`file`]),path:M().min(1),title:M(),score:N(),signals:no(M(),Ua()),snippet:M().optional()}).loose(),Uhe=R([`applied`,`no_match`,`warming`,`incapable`,`provider_error`,`restart_required`,`query_too_short`]),i9=R([`warm`,`corpus`,`query`,`dimensions`,`configured_dimensions`]);function Whe(e){return e?.providerErrorReason===`dimensions`?`restart_required`:e?.providerErrorReason===`configured_dimensions`?`incapable`:e?.providerError||e?.providerErrorReason?`provider_error`:null}function Ghe(e){throw Error(`Unhandled SemanticProviderErrorReason variant: ${JSON.stringify(e)}`)}function Khe(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 Ghe(n)}}function qhe(e){throw Error(`Unhandled SemanticQueryOutcome variant: ${JSON.stringify(e)}`)}var a9=I({capable:P(),applied:P(),outcome:Uhe,providerErrorReason:i9.nullable().optional().catch(null),coverage:I({embedded:N().int().nonnegative(),total:N().int().nonnegative()})}).loose(),Jhe=I({enabled:P(),keyPresent:P(),keyNotRequired:P(),keySource:R([`project`,`file`,`env`]).nullable(),keyHint:M().nullable(),ready:P(),capable:P(),providerError:P().optional(),providerErrorReason:i9.nullable().optional().catch(null),embedded:N().int().nonnegative(),total:N().int().nonnegative()}).loose();function Yhe(e){return!!(e?.enabled&&(e.keyPresent||e.keyNotRequired))}I({query:M(),intent:R([`autocomplete`,`full_text`,`omnibar`]),results:F(Hhe),elapsedMs:N().nonnegative(),semantic:a9.optional(),truncated:P().optional(),ready:P().optional()}).loose();var Xhe=I({version:M().min(1),recordedAt:M().min(1)}).loose();I({currentVersion:M().min(1),targets:no(M(),Xhe.nullable())}).loose(),I({scope:G7.default(`project`),source:M().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:M().min(1).optional().meta({description:`Specific skill name to import from a multi-skill source.`}),install:P().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection (the caller installs explicitly afterwards). Default true.`}),marketplace:P().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."}),...Q2,summary:$2}).strict(),I({scope:G7.default(`project`),source:M().min(1).meta({description:`External skill source: full skills.sh skill-page URL, GitHub owner/repo[/subpath], git URL, or local/file path.`}),skills:F(M().min(1)).min(1).max(100).meta({description:`Skill names to import from the source.`}),install:P().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection. Default true.`}),marketplace:P().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."}),...Q2,summary:$2}).strict(),I({results:F(I({requested:M(),status:R([`imported`,`already-imported`,`not-found`,`failed`]),name:M().optional(),collisionRenamedFrom:M().optional(),warnings:F(M()),warningCodes:q7,error:M().optional()}).loose()),imported:N(),alreadyImported:N(),failed:N()}).loose(),I({scope:G7.default(`project`),names:F(M().min(1)).min(1).max(100).meta({description:`Managed skill names to refresh from their recorded upstreams.`}),...Q2,summary:$2}).strict(),I({results:F(I({requested:M(),status:R([`updated`,`up-to-date`,`not-found`,`failed`]),source:M().optional(),warnings:F(M()),warningCodes:q7,error:M().optional()}).loose()),updated:N(),upToDate:N(),failed:N()}).loose();var Zhe=I({source:M(),ref:M().optional(),contentHash:M(),publisher:M().optional()}).loose();I({name:M().min(1).meta({description:`Managed skill name created or matched.`}),path:M().min(1).meta({description:`Store-relative path to the imported skill source.`}),created:P().meta({description:`True when this request created new source files.`}),alreadyImported:P().meta({description:`True when identical content was already present and no files changed.`}),collisionRenamedFrom:M().optional().meta({description:`Original source name when collision handling renamed the import.`}),provenance:Zhe,warnings:F(M()).meta({description:`Non-fatal import warnings, such as skipped unsupported files.`}),warningCodes:q7}).loose();var Qhe=`server-info`,$he=`branch-switched`,ege=`disk-ack`,tge=`config-validation-rejected`,nge=`config-ignore-nested-error`,o9=R([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`,`comments`,`lint-config`,`local-targets`]),rge=I({v:z(1),ch:z(Qhe),seq:N(),serverInstanceId:M().min(1),currentBranch:M().min(1).optional()}).loose(),ige=I({v:z(1),ch:z($he),seq:N(),branch:M().min(1)}).loose(),age=I({v:z(1),ch:o9,seq:N()}).loose(),oge=I({v:z(1),ch:z(ege),seq:N(),docName:M().min(1),sv:M().min(1)}).loose(),sge=I({v:z(1),ch:z(tge),seq:N(),docName:M().min(1),error:qne}).loose(),cge=I({v:z(1),ch:z(nge),seq:N(),path:M().min(1),error:M().min(1)}).loose(),lge=100,uge=500,dge=450,fge={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},s9=new WeakMap;function pge(e){return e===void 0||!Number.isFinite(e)?20:Math.max(1,Math.min(100,Math.trunc(e)))}function c9(e){return e.trim().toLowerCase()}var mge=/\.(?:md|mdx)$/;function hge(e,t){if(t!==`page`)return e;let n=e.replace(mge,``);return n.length>0?n:e}function l9(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function gge(e){let t=l9(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}}var u9=/[^\P{L}a-zàèéìòóù]|[^\P{Nd}0-9]|\p{Nl}/iu,d9=(()=>{let e=globalThis.Intl.Segmenter;return e?new e(`en`,{granularity:`word`}):null})();function _ge(){let e=oJ({language:`english`}),t=e.tokenize.bind(e);return e.tokenize=(e,n,r,i)=>{let a=t(e,n,r,i);if(!d9||typeof e!=`string`||!u9.test(e))return a;let o=new Set(a);for(let{segment:t,isWordLike:n}of d9.segment(e)){if(!n||!u9.test(t))continue;let e=t.toLowerCase();o.has(e)||(o.add(e),a.push(e))}return a},e}function f9(e){let t=bJ({schema:fge,components:{tokenizer:_ge()}});return e.length>0&&jJ(t,e),t}function vge(e){let t={documents:e};return s9.set(t,f9(e)),t}function yge(e){let t=s9.get(e);if(t)return t;let n=f9(e.documents);return s9.set(e,n),n}function bge(e){return e===`autocomplete`?[`page`]:e===`full_text`?[`page`,`content`,`file`]:[`page`,`folder`,`file`]}function p9(e,t){return t.has(e.kind)?!0:e.kind===`page`&&t.has(`content`)}function xge(e,t){let n=c9(t);if(!n)return 0;let r=hge(n,e.kind),i=c9(e.title),a=c9(e.name),o=c9(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}var Sge=.5;function m9(e,t){let n=xge(e,t);return n<=0?n:J2(e.path)?n*Sge:n}function Cge(e){return e===`file`?-60:0}var wge=1e3,Tge=50,Ege=1,Dge=1;function Oge(e,t,n,r,i){let a=i>0?t/i:0,o=n/Tge,s=r===`file`?-.001:0,c=Ege*a+Dge*o+s;return e*wge+c}function h9(e,t,n,r){return e+t*20+n+Cge(r)}function g9(e,t,n,r,i,a){return e===`relevance`?h9(t,n,r,i):Oge(t,n,r,i,a)}function kge(e,t){return t||(e===`full_text`?`relevance`:`navigation`)}function _9(e,t){let n=0;for(let r of e){let e=t.get(r.id)??0;e>n&&(n=e)}return n}function Age(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 jge(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function Mge(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}}var Nge=/[-ក- -〿-ゟ゠-ヿ㐀-䶿一-鿿\uf900--\u1100-\u11ff\u3130-\u318f\ua960-\ua97f\uac00-\ud7ff]/;function Pge(e,t){let n=c9(t);return n.length<4||Nge.test(n)?0:+(e===`full_text`)}function Fge(e){let{lexical:t,fullText:n}=e.signals;return t>=uge?`lexical`:t===dge&&n<=0?`pathOnly`:`body`}function Ige(e){let t=[],n=[],r=[];for(let i of e){let e=Fge(i);e===`lexical`?t.length<lge&&t.push(i):e===`body`?n.length<6&&n.push(i):r.length<4&&r.push(i)}return[...t,...n,...r]}function v9(e,t,n){if(t===`relevance`)return e.slice(0,n);let r=Ige(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 Lge(e,t,n={}){let r=n.intent??`omnibar`,i=kge(r,n.ranking),a=pge(n.limit),o=new Set(n.scopes??bge(r)),s=e.documents.filter(e=>p9(e,o)),c=c9(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=sY(yge(e),{term:c,properties:jge(r),boost:Mge(r),tolerance:Pge(r,c),limit:Math.max(a*4,40)}),u=new Map(l.hits.filter(e=>p9(e.document,o)).map(e=>[e.document.id,e.score])),d=Age(s),f=new Map;for(let e of s)m9(e,c)>=0&&f.set(e.id,e);for(let e of l.hits)p9(e.document,o)&&f.set(e.document.id,e.document);if(!n.semantic){let e=_9(f.values(),u);return v9([...f.values()].map(t=>{let n=Math.max(0,m9(t,c)),r=u.get(t.id)??0,a=d.get(t.id)??0;return{document:t,score:g9(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 v9(Rge({scopedDocuments:s,candidates:f,fullTextScores:u,recency:d,normalizedQuery:c,ranking:i,semantic:n.semantic}),i,a)}function y9(e){let t=new Map;return e.forEach((e,n)=>{t.set(e,n+1)}),t}function Rge(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=_9(n.values(),r),h=[...n.values()].map(e=>{let t=Math.max(0,m9(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?g9(o,t,n,s,e.kind,m):h9(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=y9(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)),_=y9(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}))}function zge(e){return e.created.length>0||e.packSkills?.some(e=>e.pending)===!0||e.requiredPlugins?.some(e=>e.pending)===!0}function Bge(e){return`https://${e.host}/${e.owner}/${e.repo}.git`}function Vge(e,t){return!e||e.length===0?`true`:t.detached?`detached`:t.currentBranch===null||t.currentBranch===e?`true`:`false`}var b9=Symbol.for(`@inkeep/open-knowledge/skill-state-field-registry`),x9=globalThis;x9[b9]===void 0&&(x9[b9]=pr());var S9=x9[b9],C9=L({version:M().regex(/^\d+\.\d+\.\d+(?:[-+][\w.-]+)?$/,`version must match /^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$/`).register(S9,{description:`Recorded skill version for this target.`}),recordedAt:Ui().register(S9,{description:`ISO 8601 timestamp of the most recent successful write. Updated on every write, including reinstalls of the same version.`}),surface:R([`server-build-and-open`,`electron-build-and-open`,`cli-npx-skills-add`,`desktop-direct`,`cli-start`]).register(S9,{description:`Install-source surface that recorded this entry.`}).optional()}),Hge=L({enabled:P().register(S9,{description:`Whether this user-global skill bundle is opted in.`}),decidedAt:Ui().register(S9,{description:`ISO 8601 timestamp of the opt-in / opt-out decision.`})});L({schema:z(1).register(S9,{description:`Schema major version. Bumped only on breaking shape changes.`}),targets:L({"claude-cowork":C9.optional(),"cli-hosts":C9.optional()}).register(S9,{description:`Per-target install-state entries. Absent target = no recorded install.`}).default({}),bundles:no(M(),Hge).register(S9,{description:`Per-bundle opt-in decisions keyed by install name. Absent key = no recorded decision.`}).optional(),installsReported:F(M()).register(S9,{description:"Skill installs already reported to skills.sh from this machine, as `<owner/repo>#<skill>`. Append-only; presence suppresses a re-report."}).optional()});var w9=`bottom`,T9=e=>e*8+4,E9=T9(92),D9=T9(40);function Uge(e){return e===`right`||e===`bottom`?e:w9}function Wge(e){return typeof e!=`number`||!Number.isFinite(e)?E9:Math.max(D9,Math.round(e))}var Gge=new Set([`(connected)`,`(agent thread)`]);function Kge(e){return e!=null&&Gge.has(e)}var qge=6e5,O9=class extends Error{chunksCompleted;totalChunks;bytesWritten;bytesRemaining;cause;constructor(e,t){let n=e instanceof Error?e.message:typeof e==`string`?e:`unknown error`;super(`chunked insert failed after ${t.chunksCompleted}/${t.totalChunks} chunks (${t.bytesWritten} bytes written, ${t.bytesRemaining} bytes lost): ${n}`),this.name=`ChunkedInsertError`,this.chunksCompleted=t.chunksCompleted,this.totalChunks=t.totalChunks,this.bytesWritten=t.bytesWritten,this.bytesRemaining=t.bytesRemaining,this.cause=e}};async function Jge(e,t,n,r,i={}){let a=i.thresholdBytes??512e3,o=i.chunkSizeBytes??51200,s=i.origin,c=i.yieldFn??Yge,l=i.resolveOffset??(e=>e);if(r.length<=a){e.transact(()=>{t.insert(n,r)},s);return}let u=Math.ceil(r.length/o),d=0,f=n,p=0,m=0;for(;d<r.length;){let n=Math.min(d+o,r.length),i=r.slice(d,n);try{let n=l(f);e.transact(()=>{t.insert(n,i)},s)}catch(e){throw new O9(e,{chunksCompleted:p,totalChunks:u,bytesWritten:m,bytesRemaining:r.length-d})}p++,m+=i.length,f+=i.length,d=n,d<r.length&&await c()}}function Yge(){return new Promise(e=>{let t=globalThis;t.document?.hidden!==!0&&typeof t.requestAnimationFrame==`function`?t.requestAnimationFrame(()=>e()):setTimeout(()=>e(),0)})}function Xge(e){let t;try{t=new URL(e)}catch{return null}let n=t.pathname.match(/^\/video\/(\d+)/);if(n)return n[1]??null;let r=t.pathname.match(/^\/(\d+)/);return r?r[1]??null:null}function Zge(e){if(typeof e!=`string`||e.length===0)return e;let t=C3(e);if(t){let e=t.noCookie?`www.youtube-nocookie.com`:`www.youtube.com`,n=t.startSeconds===null?``:`?start=${t.startSeconds}`;return`https://${e}/embed/${t.id}${n}`}if(x3(e)){let t=Xge(e);return t?`https://player.vimeo.com/video/${t}`:e}let n=y3(e);if(n){let e=n.startRaw===null?``:`?t=${n.startRaw}`;return`https://www.loom.com/embed/${n.id}${e}`}return e}var Qge=`https://api.github.com/repos/inkeep/open-knowledge`;async function $ge(e){let{signal:t,...n}=e??{},r=t?AbortSignal.any([AbortSignal.timeout(5e3),t]):AbortSignal.timeout(5e3);try{let e=await fetch(Qge,{headers:{accept:`application/vnd.github+json`,"user-agent":`openknowledge.ai`},...n,signal:r});if(!e.ok)return console.warn(`[github-stars] GitHub API responded ${e.status}`),null;let t=await e.json();return typeof t.stargazers_count==`number`?t.stargazers_count:null}catch(e){return console.warn(`[github-stars] fetch failed: ${e instanceof Error?e.message:String(e)}`),null}}var e_e=/^(#{1,6})\s+(.+)$/;function t_e(e,t){let n=(e.endsWith(`\r`)?e.slice(0,-1):e).match(e_e);if(!n)return null;let r=n[2].trim(),i=g7(r,t);return i?{level:n[1].length,text:r,slug:i}:null}var n_e=Array.from({length:256},(e,t)=>(t+256).toString(16).slice(1));function k9(){let e=globalThis.crypto;if(e&&typeof e.randomUUID==`function`)return e.randomUUID();let t=new Uint8Array(16);if(e&&typeof e.getRandomValues==`function`)e.getRandomValues(t);else for(let e=0;e<16;e++)t[e]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=n_e;return`${n[t[0]]}${n[t[1]]}${n[t[2]]}${n[t[3]]}-${n[t[4]]}${n[t[5]]}-${n[t[6]]}${n[t[7]]}-${n[t[8]]}${n[t[9]]}-${n[t[10]]}${n[t[11]]}${n[t[12]]}${n[t[13]]}${n[t[14]]}${n[t[15]]}`}var r_e={fileSystem:`File System`,gitUpstream:`Git (upstream)`,service:`OpenKnowledge (service)`,generator:`OpenKnowledge (generated)`},i_e=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],a_e={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`},o_e={cursor:`#FFFFFF`,windsurf:`#FFFFFF`},A9=[`#f0ece3`,`#fff5e1`,`#f9e1db`,`#f5def7`,`#ece2fb`,`#dce8fa`,`#DBF3FB`];function s_e(e,t=i_e){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}function c_e(e){let t=e.trim();if(!t)return`?`;let n=t.split(/[-\s]+/).filter(Boolean);if(!n.length)return`?`;if(n.length>=2)return n.slice(0,2).map(e=>e[0]??``).join(``).toUpperCase();let r=n[0],i=[r[0]];for(let e=1;e<r.length&&i.length<2;e++){let t=r[e-1],n=r[e];t===t.toLowerCase()&&n===n.toUpperCase()&&n!==n.toLowerCase()&&i.push(n)}return i.length>=2?i.join(``).toUpperCase():r.slice(0,2).toUpperCase()}function l_e(e){let t=e.trim();if(!t)return e;if(t.includes(` `)||!/[-_]/.test(t))return t;let n=t.split(/[-_]+/).filter(Boolean);return n.length?n.map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `):t}var u_e={"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 d_e(e){return e?u_e[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}function f_e(e){let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2;if(i===a)return[0,0,o*100];let s=i-a,c=o>.5?s/(2-i-a):s/(i+a),l;return l=i===t?((n-r)/s+(n<r?6:0))/6:i===n?((r-t)/s+2)/6:((t-n)/s+4)/6,[l*360,c*100,o*100]}function p_e(e,t,n){let r=t/100,i=n/100,a=r*Math.min(i,1-i),o=t=>{let n=(t+e/30)%12,r=i-a*Math.max(Math.min(n-3,9-n,1),-1);return Math.round(255*r).toString(16).padStart(2,`0`)};return`#${o(0)}${o(8)}${o(4)}`}function m_e(e){let[t]=f_e(e);return p_e(t,45,32)}var h_e=[`Curious`,`Brave`,`Clever`,`Swift`,`Gentle`,`Bright`,`Wise`,`Bold`,`Calm`,`Keen`],g_e=[`Bird`,`Cat`,`Dog`,`Fish`,`Mouse`,`Rabbit`,`Shrimp`,`Snail`,`Squirrel`,`Turtle`],j9=`ok-user-name-v3`,M9=`ok-user-color-v3`;function N9(e){return e[Math.floor(Math.random()*e.length)]}function P9(){return`${N9(h_e)} ${N9(g_e)}`}function __e(){return N9(A9)}function F9(e){try{return localStorage.getItem(e)}catch{return null}}function I9(e,t){try{localStorage.setItem(e,t)}catch{}}function v_e(){let e=new URLSearchParams(window.location.search).get(`coeditor`)||`standalone`,t=k9(),n=F9(j9),r=F9(M9);return n||(n=P9(),I9(j9,n)),r||(r=__e(),I9(M9,r)),{name:n,color:r,coeditor:e,tabId:t}}function L9(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 y_e(e){return e===`.`||e===`..`?e:encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.codePointAt(0)?.toString(16).toUpperCase()}`)}function b_e(e){return e.split(`/`).map(y_e).join(`/`)}function R9(e){return e.split(`/`).map(L9).join(`/`)}function z9(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=L9(o.split(`/`).pop()??``).match(/\.([a-z0-9]+)$/i);if(s){let e=`.${(s[1]??``).toLowerCase()}`;if(!I$.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=L9(d[e]??``);if(e===f&&(t=df(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 x_e(e){throw Error(`Unhandled ClassifiedLinkTarget variant: ${JSON.stringify(e)}`)}var B9=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function V9(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function H9(e){return e.split(`/`).filter(Boolean)}function U9(e){let t=e.trim();return B9.test(t)||t.startsWith(`//`)}function S_e(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(U9(n))return{kind:`external`,url:n};let r=n.indexOf(`#`),i=R9(r<0?n:n.slice(0,r)),a=gf(i,t);if(a)return{kind:`doc`,docName:a,anchor:r<0?null:n.slice(r+1)};let o=hf(i,t);if(o)return{kind:`doc`,docName:o,anchor:r<0?null:n.slice(r+1)};let s=z9(n,t);if(s)return{kind:`doc`,docName:s.docName,anchor:s.anchor};let c=V9(i);return c&&c!==`md`&&c!==`mdx`?{kind:`asset`,url:n,ext:c,literal:!1}:null}function C_e(e,t){let n=e.trim();if(!n)return null;if(U9(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=V9(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r,literal:!0}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function w_e(e,t,n){let r=e.trim();if(!r||B9.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:L9(e));return c.length===0?null:c.join(`/`)}function T_e(e,t,n=null,r=`.md`){let i=H9(e);i.pop();let a=H9(t),o=0;for(;o<i.length&&o<a.length&&i[o]===a[o];)o+=1;let s=i.slice(o).map(()=>`..`),c=a.slice(o),l=[...s,...c].join(`/`);return l||=a.at(-1)??t,!l.startsWith(`./`)&&!l.startsWith(`../`)&&(l=`./${l}`),`${b_e(l)}${r}${n?`#${n}`:``}`}function E_e(e){if(!e)return{height:null,viewerFragment:``};let t=e.split(`&`).filter(e=>e.length>0),n=null,r=[];for(let e of t){let t=e.indexOf(`=`);if(t===-1){r.push(e);continue}let i=e.slice(0,t),a=e.slice(t+1);if(i===`height`){let e=Number.parseInt(a,10);!Number.isNaN(e)&&e>0&&(n=e);continue}r.push(e)}return{height:n,viewerFragment:r.join(`&`)}}var D_e=`unknown`;function O_e(e,t=Date.now()){let n=Date.parse(e);if(!Number.isFinite(n))return D_e;let r=Math.floor(Math.max(0,t-n)/1e3);if(r<60)return`${r}s ago`;let i=Math.floor(r/60);if(i<60)return`${i}m ago`;let a=Math.floor(i/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}function k_e(e){return e.replace(/[/\\:*?"<>|\0]/g,`-`).replace(/\s+/g,` `).replace(/-+/g,`-`).trim().replace(/^[-.\s]+|[-.\s]+$/g,``)}function W9(e){return`pagesBySlug`in e}function G9(e){return W9(e)?e.pages:e}function K9(e,t){return W9(e)?e.assetPaths??new Set:t??new Set}function q9(e,t){return W9(e)?e.filePaths??new Set:t??new Set}function J9(e,t){return e<t?-1:+(e>t)}function A_e(e,t){let n=new Map;for(let r of e){let e=t(r),i=n.get(e);e&&(i===void 0||J9(r,i)<0)&&n.set(e,r)}return n}function j_e(e,t){let n=new Map,r=[...e].sort(J9);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 M_e(e,t){let n=h7(e);if(!n)return;if(W9(t))return t.pagesBySlug.get(n);let r;for(let e of t)h7(e)===n&&(r===void 0||J9(e,r)<0)&&(r=e);return r}function N_e(e,t){if(e.includes(`/`))return;let n=h7(e);if(!n)return;if(W9(t))return t.pagesByBasename?.get(n);let r;for(let e of t){let t=e.lastIndexOf(`/`);h7(t===-1?e:e.slice(t+1))===n&&(r===void 0||J9(e,r)<0)&&(r=e)}return r}function Y9(e){let t=e.trim();if(!t)return[];let n=h7(t);return n.length>0&&n!==t?[n]:[]}function X9(e,t){let n=e.trim();if(!n)return;if(G9(t).has(n))return n;let r=n.replace(/\.(md|mdx)$/i,``);if(r!==n){let e=Z9(r,t);if(e!==void 0)return e}return Z9(n,t)}function Z9(e,t){let n=e.trim();if(!n)return;let r=G9(t);if(r.has(n))return n;let i=M_e(n,t);if(i)return i;for(let e of Y9(n))if(r.has(e))return e;return P_e(n,r)||N_e(n,t)}function P_e(e,t){let n=`${e}/index`;if(t.has(n))return n;let r=e.lastIndexOf(`/`),i=r===-1?e:e.slice(r+1),a=i?`${e}/${i}`:null;if(a&&t.has(a))return a}function Q9(e){let t=((e.trim().split(`#`)[0]??``).trim().split(`?`)[0]??``).trim();return t.startsWith(`/`)?t.slice(1):t}function $9(e,t,n){let r=Q9(e);if(!r)return null;let i=r.toLowerCase(),a=n?[t,n]:[t];for(let e of a){if(e.has(r))return r;for(let t of e)if(t.toLowerCase()===i)return t}if(r.includes(`/`))return null;let o=[];for(let e of a)for(let t of e){let e=t.lastIndexOf(`/`);(e===-1?t:t.slice(e+1)).toLowerCase()===i&&o.push(t)}return o.length===0?null:o.sort(J9)[0]??null}function F_e(...e){let t=new Set;for(let n of e)for(let e of n){let n=e.toLowerCase();t.add(`path:${n}`),t.add(`basename:${n.slice(n.lastIndexOf(`/`)+1)}`)}return t}function I_e(e,t,n,r){let i=e.trim();if(!i)return!1;let a=Q9(i).toLowerCase(),o=W9(t)?t.assetTargetKeys:void 0;if(o!==void 0){if(o.has(`path:${a}`)||!a.includes(`/`)&&o.has(`basename:${a}`))return!0}else if($9(i,K9(t,n),q9(t,r)))return!0;return X9(i,t)!==void 0}function L_e(e,t,n){let r=C_e(e,t);return r===null||r.kind!==`asset`||$9(r.url,K9(n),q9(n))!==null||X9(e,n)===void 0?r:{kind:`doc`,docName:e.trim(),anchor:t?.trim()||null}}export{Z5 as $,xT as $a,cee as $c,vX as $i,a2 as $n,Ine as $o,Pse as $r,jf as $s,r9 as $t,R$ as A,hj as Aa,$te as Ac,cQ as Ai,H0 as An,vg as Ao,o1 as Ar,th as As,moe as At,M0 as B,kie as Ba,Ds as Bc,w0 as Bi,lQ as Bn,Up as Bo,E0 as Br,Ane as Bs,$me as Bt,Q$ as C,qfe as Ca,Vd as Cc,Yhe as Ci,rfe as Cn,Rg as Co,gQ as Cr,gh as Cs,J$ as Ct,Vme as D,_7 as Da,Yte as Dc,x3 as Di,v$ as Dn,Hg as Do,L0 as Dr,dm as Ds,v4 as Dt,Hme as E,J4 as Ea,Ud as Ec,N0 as Ei,BY as En,Ug as Eo,V9 as Er,ip as Es,$pe as Et,rme as F,Fk as Fa,tne as Fc,T$ as Fi,A_e as Fn,ere as Fo,O_e as Fr,jne as Fs,g1 as Ft,m3 as G,dD as Ga,R as Gc,E_e as Gi,hQ as Gn,nh as Go,Nse as Gr,tf as Gs,ihe as Gt,Qfe as H,DE as Ha,bte as Hc,Uge as Hi,S_e as Hn,hm as Ho,rse as Hr,Xf as Hs,L7 as Ht,nme as I,wk as Ia,rne as Ic,i1 as Ii,T_e as In,tre as Io,$ge as Ir,dp as Is,v1 as It,d1 as J,Vw as Ja,P as Jc,C3 as Ji,SQ as Jn,Xm as Jo,Mse as Jr,$d as Js,_4 as Jt,Dme as K,fD as Ka,Po as Kc,goe as Ki,a1 as Kn,Kp as Ko,Hse as Kr,ef as Ks,a9 as Kt,Ume as L,zk as La,kte as Lc,zhe as Li,F_e as Ln,$ne as Lo,g7 as Lr,kne as Ls,The as Lt,Qpe as M,uj as Ma,Uo as Mc,Vpe as Mi,AY as Mn,Gh as Mo,jde as Mr,lne as Ms,cpe as Mt,o9 as N,lj as Na,Wo as Nc,Fpe as Ni,G0 as Nn,G as No,y5 as Nr,Ene as Ns,U1 as Nt,Ife as O,Z0 as Oa,Xte as Oc,mpe as Oi,QX as On,P_ as Oo,rX as Or,Fm as Os,b4 as Ot,P7 as P,KA as Pa,Qte as Pc,ise as Pi,j_e as Pn,Zne as Po,l_e as Pr,Im as Ps,Jme as Pt,L$ as Q,bT as Qa,M as Qc,yX as Qi,o2 as Qn,bm as Qo,Rse as Qr,Mf as Qs,d4 as Qt,A$ as R,Bk as Ra,Ate as Rc,CZ as Ri,Bge as Rn,Qne as Ro,v_e as Rr,ah as Rs,r_e as Rt,O9 as S,f1 as Sa,Yf as Sc,y1 as Si,x_e as Sn,q as So,She as Sr,vm as Ss,q$ as St,eme as T,_oe as Ta,Df as Tc,Y7 as Ti,qhe as Tn,zg as To,O0 as Tr,sm as Ts,Wme as Tt,xme as U,uE as Ua,Io as Uc,Wge as Ui,Whe as Un,Sm as Uo,d_e as Ur,Qf as Us,the as Ut,lme as V,HE as Va,Ute as Vc,h8 as Vi,Vge as Vn,Vp as Vo,M$ as Vr,One as Vs,ehe as Vt,A9 as W,PT as Wa,Go as Wc,y3 as Wi,mQ as Wn,Cm as Wo,Vse as Wr,Af as Ws,nhe as Wt,m1 as X,Uw as Xa,z as Xc,k9 as Xi,O5 as Xn,Jm as Xo,zse as Xr,Bd as Xs,c4 as Xt,p1 as Y,XE as Ya,ga as Yc,zge as Yi,CQ as Yn,Ym as Yo,Bse as Yr,Qd as Ys,r4 as Yt,h1 as Z,Ww as Za,I as Zc,S4 as Zi,A2 as Zn,Gp as Zo,Fse as Zr,af as Zs,s4 as Zt,P$ as _,j0 as _a,Jf as _c,W$ as _i,D0 as _n,J as _o,R9 as _r,gp as _s,yhe as _t,Kpe as a,L_e as aa,sf as ac,C1 as ai,Ke as al,dhe as an,ZE as ao,r2 as ar,Zm as as,rpe as at,_Q as b,Pde as ba,Cf as bc,b1 as bi,TZ as bn,K as bo,B0 as br,Np as bs,Eme as bt,k4 as c,Zge as ca,lf as cc,P4 as ci,Ze as cl,u0 as cn,nT as co,fX as cr,lp as cs,d7 as ct,ige as d,G4 as da,Ff as dc,U9 as di,Z$ as dn,GE as do,u$ as dr,qp as ds,wde as dt,bY as ea,Ed as ec,Ase as ei,lee as el,V7 as en,rT as eo,n2 as er,Mp as es,q4 as et,cge as f,Lge as fa,uf as fc,ape as fi,X$ as fn,CC as fo,dpe as fr,Mm as fs,H1 as ft,rge as g,Khe as ga,vf as gc,V5 as gi,epe as gn,V_ as go,gge as gr,wne as gs,$0 as gt,oge as h,Rfe as ha,Tf as hc,Vfe as hi,tpe as hn,uC as ho,vge as hr,kp as hs,Q0 as ht,Ime as i,$9 as ia,cf as ic,gY as ii,Ue as il,fhe as in,FT as io,O2 as ir,Qm as is,Yfe as it,Yme as j,sj as ja,Ms as jc,Rpe as ji,U0 as jn,W as jo,spe as jr,pp as js,K4 as jt,w9 as k,l9 as ka,Es as kc,w4 as ki,w$ as kn,h_ as ko,i$ as kr,op as ks,Zpe as kt,ome as l,k_e as la,Ld as lc,R4 as li,ze as ll,whe as ln,LT as lo,c_e as lr,zm as ls,j4 as lt,age as m,zfe as ma,kf as mc,b3 as mi,x4 as mn,AS as mo,V3 as mr,Rne as ms,B5 as mt,o_e as n,z9 as na,Xd as nc,Lse as ni,Ve as nl,H7 as nn,mT as no,i2 as nr,Rp as ns,fme as nt,M4 as o,X9 as oa,Rd as oc,ppe as oi,Ye as ol,Ehe as on,bw as oo,t2 as or,pm as os,jme as ot,sge as p,voe as pa,bf as pc,J2 as pi,qge as pn,DS as po,S8 as pr,cne as ps,tfe as pt,Zle as q,lD as qa,F as qc,T0 as qi,s_e as qn,qm as qo,jse as qr,Zd as qs,Jhe as qt,Fme as r,E4 as ra,Gf as rc,Lhe as ri,He as rl,khe as rn,hT as ro,H2 as rr,$m as rs,Tme as rt,N4 as s,f$ as sa,Nd as sc,I4 as si,Je as sl,B$ as sn,ZC as so,e2 as sr,fm as ss,G$ as st,a_e as t,w_e as ta,Nf as tc,Ise as ti,Ft as tl,Bhe as tn,fT as to,U2 as tr,Hp as ts,T1 as tt,ame as u,t_e as ua,of as uc,z$ as ui,Xme as un,cD as uo,d$ as ur,zp as us,D9 as ut,N$ as v,sQ as va,Of as vc,Kge as vi,A0 as vn,tv as vo,m_e as vr,Yne as vs,K$ as vt,A7 as w,h7 as wa,df as wc,ghe as wi,nfe as wn,Ng as wo,j$ as wr,um as ws,Kme as wt,F$ as x,iQ as xa,xf as xc,I_e as xi,V2 as xn,I_ as xo,upe as xr,lm as xs,E9 as xt,fQ as y,V0 as ya,pf as yc,q2 as yi,Cme as yn,iv as yo,H$ as yr,Dm as ys,U$ as yt,P0 as z,Dk as za,Ote as zc,v5 as zi,Jge as zn,Pp as zo,Y9 as zr,sp as zs,rhe as zt};
|