@inkeep/open-knowledge 0.86.13-beta.7 → 0.86.13-beta.9
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/assets/skills/project/references/linking.md +1 -1
- package/dist/cli.mjs +60 -60
- package/dist/constants-MkX1_7dG.mjs +1 -0
- package/dist/{dist-BmGKbb5v.mjs → dist-B2mNPHPS.mjs} +1 -1
- package/dist/dist-v2lkJBLz.mjs +2213 -0
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +240 -240
- package/dist/{init-DS83zNJg.mjs → init-DcmVBoE-.mjs} +64 -64
- package/dist/init-Udt9RQTb.mjs +1 -0
- package/dist/{launch-json-removal-BedPjyEk.mjs → launch-json-removal-CHhPsbmP.mjs} +1 -1
- package/dist/{loader-Y1qsx7iK.mjs → loader-D8aRCnDL.mjs} +1 -1
- package/dist/loader-MSLOcQCZ.mjs +1 -0
- package/dist/{md-manager-BGnqyqi1-j5JtqA4V.mjs → md-manager-BGnqyqi1-C2aCFGjW.mjs} +173 -173
- package/dist/{open-browser-Dtph3PJv.mjs → open-browser-Ccrfb4Zg.mjs} +1 -1
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-D7WB5XGp.mjs → preview-BJ6gs2RH.mjs} +1 -1
- package/dist/preview-CntWf8G9.mjs +1 -0
- package/dist/public/assets/{AccountSection-BVvQP8wu.js → AccountSection-DtjsHl4P.js} +1 -1
- package/dist/public/assets/{ActivityModeContent-CqWgOtPv.js → ActivityModeContent-ue0cjhAi.js} +1 -1
- package/dist/public/assets/{AddPropertiesButton-9Whmx-r4.js → AddPropertiesButton-Bpz_-y_I.js} +2 -2
- package/dist/public/assets/{AgentConnectionsSection-V1XIxXWn.js → AgentConnectionsSection-BCB6XaTz.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-BAoGGQLw.js → AgentDiffPane-DieBkA8J.js} +1 -1
- package/dist/public/assets/{AgentIconCluster-BEGR8gsd.js → AgentIconCluster-DTUoJV92.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-i1OS6YZc.js → AgentThreadClientBinder-z_UNgldk.js} +1 -1
- package/dist/public/assets/{AppMenubar-D2cojoe2.js → AppMenubar-BZN-gKUW.js} +1 -1
- package/dist/public/assets/{AttachmentsSection-CRvJt4Um.js → AttachmentsSection-D0ANkE-3.js} +1 -1
- package/dist/public/assets/{AuthModal-DFNZnQuX.js → AuthModal-BbqjE98j.js} +2 -2
- package/dist/public/assets/{BugReportHistory-BVxLhZnU.js → BugReportHistory-CRwm-OT7.js} +1 -1
- package/dist/public/assets/{BugReportHistoryDialog-B3DqNwzj.js → BugReportHistoryDialog-B5nXNcUV.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-B6B811CW.js → CodeMirrorPropInput-Dkw0G_gY.js} +4 -4
- package/dist/public/assets/{ConsentDialogBody-yhQ0MBLP.js → ConsentDialogBody-Bhk0Sdzj.js} +1 -1
- package/dist/public/assets/{ContentRulesSection-DKMjTgvf.js → ContentRulesSection-DrL9S92F.js} +1 -1
- package/dist/public/assets/{DiffViewBoundary-G84zg4aW.js → DiffViewBoundary-BSQYq_58.js} +1 -1
- package/dist/public/assets/{DocumentContext-Bgu1O1jH.js → DocumentContext-BT4R__b_.js} +28 -28
- package/dist/public/assets/{EditorModeToggle-DBhBKluO.js → EditorModeToggle-BrSFayGL.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-BVGoOqw4.js → ExcalidrawDocEditor-Cw7cxWTm.js} +1 -1
- package/dist/public/assets/FeedbackForm-Bqmfw-XS.js +1 -0
- package/dist/public/assets/{GraphPanel-CZaSd77y.js → GraphPanel-Bq6fUIBW.js} +1 -1
- package/dist/public/assets/{ImageAttachments-DA_IO7l-.js → ImageAttachments-BkNRauWd.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-B2fWoj-i.js → ImportSkillDialog-Cqcp5gZh.js} +1 -1
- package/dist/public/assets/{LinkPreviewsSection-Di9GNnsl.js → LinkPreviewsSection-D7bkvkE6.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-cF--We5r.js → LintConfigEditor-B86O_7x_.js} +1 -1
- package/dist/public/assets/{LintingSection-DOLNP1BE.js → LintingSection-BokrC8-Q.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-8I47_E0r.js → ManagedArtifactProperties-XJly8z5W.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-yyVotSha.js +1 -0
- package/dist/public/assets/{McpConsentDialogBody-PdwC87Hm.js → McpConsentDialogBody-dC3XBwW8.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-DZGMDLM_.js → MermaidDocEditor-BYZqgvF7.js} +1 -1
- package/dist/public/assets/{NetworkAccessSection-BKPX0RQb.js → NetworkAccessSection-CVAEH3yW.js} +1 -1
- package/dist/public/assets/{OkCliPathRow-C6EY6HcU.js → OkCliPathRow-cjhrrwZ3.js} +1 -1
- package/dist/public/assets/{OkignoreSection-D-T6Z6dG.js → OkignoreSection-GTDGySNc.js} +1 -1
- package/dist/public/assets/{PageListContext-CLxDIn56.js → PageListContext-HSyJOlMQ.js} +1 -1
- package/dist/public/assets/{ProjectTemplatesSection-CDlx8JGk.js → ProjectTemplatesSection-BJbZ6ugB.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-DIHb-w_S.js → PropertyDisplayRow-DvzKSJ4l.js} +1 -1
- package/dist/public/assets/{PublishToGitHubDialog-B_FwTSpj.js → PublishToGitHubDialog-CncGO5IH.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-BPF2tZVE.js → RegisteredAgentIcon-BTIzsPkU.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-Dg2IkIA3.js → ReportBugDialogBody-C3o-b5FB.js} +1 -1
- package/dist/public/assets/{ReportBugMenuTrigger-Ci3sZ7ND.js → ReportBugMenuTrigger-BSic8aEj.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-4q3RhsgM.js → SchemaConfigEditor-XhXJlVUd.js} +1 -1
- package/dist/public/assets/{SearchSection-CT4lGY8n.js → SearchSection-C2fJ-AZD.js} +1 -1
- package/dist/public/assets/{SessionsHost-DsoCAke2.js → SessionsHost-w8sD1wRy.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-D_rR3yws.js → SettingsDialogBody-CptWw-8n.js} +2 -2
- package/dist/public/assets/{ShareReceiveMissDialog-B3Ka8Ew4.js → ShareReceiveMissDialog-BqbonvaU.js} +1 -1
- package/dist/public/assets/{SharingSection-JalgaNUI.js → SharingSection-C2DBGTBH.js} +1 -1
- package/dist/public/assets/{SkillCostValue-BXNJ1Tm_.js → SkillCostValue-B-ShSIvZ.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-DpXrK2i-.js → SkillEditBanner-BzyZ3-Ju.js} +1 -1
- package/dist/public/assets/{SkillForkDialog-CizHc05K.js → SkillForkDialog-T24C2iFH.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-DDMeuUUL.js → SkillInstallMenu-CVZobEsw.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-BCqN9HRT.js → SkillOriginInline-Cs841f5S.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-C3OYGj04.js → SkillToolbarControls-PlEcYJis.js} +1 -1
- package/dist/public/assets/{SkillsManagerSection-C3olYKp8.js → SkillsManagerSection-zB4Uxwuv.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-D7F4vLiq.js → SlidesToolbarControls-DONal-Wm.js} +1 -1
- package/dist/public/assets/{SourceEditor-1iVWbn2b.js → SourceEditor-CspQKnvE.js} +1 -1
- package/dist/public/assets/{SpellingSettings-CkbtGI2P.js → SpellingSettings-DYJq-G4I.js} +1 -1
- package/dist/public/assets/{SyncSection-BWizU8W7.js → SyncSection-az1Jic0z.js} +1 -1
- package/dist/public/assets/{SyncStatusBadge-Dq6snLd8.js → SyncStatusBadge-oD2nm86o.js} +1 -1
- package/dist/public/assets/{TemplateRow-DnL_ZwrM.js → TemplateRow-FUuKGsGA.js} +1 -1
- package/dist/public/assets/{TerminalLaunchContext-B3McB-vb.js → TerminalLaunchContext-CI-TpGRC.js} +1 -1
- package/dist/public/assets/{TerminalPanel-CQlOB1Fu.js → TerminalPanel-C-9jJEyf.js} +1 -1
- package/dist/public/assets/{TerminalSection-vsjRf3fK.js → TerminalSection-Bf1m8ylg.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-1aEv3-5a.js → TerminalWindowApp-B1e5eVxf.js} +1 -1
- package/dist/public/assets/{TextDocEditor-CTl1OGJ2.js → TextDocEditor--crQL7j8.js} +1 -1
- package/dist/public/assets/{ThemePluginSection-Dg9mwDpx.js → ThemePluginSection-B4bn24Mz.js} +1 -1
- package/dist/public/assets/{ThreadView-XFBxMvdh.js → ThreadView-DuI0ePSb.js} +3 -3
- package/dist/public/assets/{TimelineDiffPane-U187joMr.js → TimelineDiffPane-CGC7pH5m.js} +1 -1
- package/dist/public/assets/{agent-connections-D3CCdbtf.js → agent-connections-D0ME1tAk.js} +1 -1
- package/dist/public/assets/{agent-registry-CIU-Kw1G.js → agent-registry-ozT_yaRC.js} +1 -1
- package/dist/public/assets/{bridge-J-D0yfAt.js → bridge-2KtDdwjE.js} +1 -1
- package/dist/public/assets/{card-hDaniKMv.js → card--B2B-S7V.js} +1 -1
- package/dist/public/assets/{catalog-BinlaYrt.js → catalog-nLe25VOf.js} +1 -1
- package/dist/public/assets/{channel-cli-copy-JyS-Y0NW.js → channel-cli-copy-ByGlYcy3.js} +1 -1
- package/dist/public/assets/{client-version-wtJeBeRf.js → client-version-o0-e6Xg8.js} +1 -1
- package/dist/public/assets/{comment-chips-ChoSGZhD.js → comment-chips-BYzSWjE3.js} +3 -3
- package/dist/public/assets/{config-errors-D_yVSvNT.js → config-errors-DDAH9fqy.js} +1 -1
- package/dist/public/assets/{config-provider-CiwHZgiM.js → config-provider-BcgiYSim.js} +1 -1
- package/dist/public/assets/config-schema-C37da9RL.js +1 -0
- package/dist/public/assets/{constants-editors-CfabqCeY.js → constants-editors-DmmORwNP.js} +1 -1
- package/dist/public/assets/constants-product-BVSOzxVs.js +1 -0
- package/dist/public/assets/{css-color-to-hex-DLoRfF4H.js → css-color-to-hex-DQ05tiK8.js} +1 -1
- package/dist/public/assets/{doc-undo-manager-BkVml-pO.js → doc-undo-manager-B-Erku0G.js} +1 -1
- package/dist/public/assets/{documents-events-BLdDDkgL.js → documents-events-ddyuXdQl.js} +1 -1
- package/dist/public/assets/field-controls-fZhMOzql.js +1 -0
- package/dist/public/assets/{field-controls-QW3Zq7gs.js → field-controls-oxASn1fW.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-CW5EohSW.js → file-tree-adapter-D27t3A4R.js} +1 -1
- package/dist/public/assets/{folder-config-api-CJ0YtcMT.js → folder-config-api-DzTd2s-r.js} +1 -1
- package/dist/public/assets/globals-G6Xf2xYI.css +1 -0
- package/dist/public/assets/{ime-composition-gK1nUjUW.js → ime-composition-CVvlqJvS.js} +1 -1
- package/dist/public/assets/index-DGrnzC_B.js +2205 -0
- package/dist/public/assets/{lint-config-client-CzUiAfZa.js → lint-config-client-BuUP6NLf.js} +1 -1
- package/dist/public/assets/{lint-plugins-WikiN2fX.js → lint-plugins-yQ5R3Dg-.js} +1 -1
- package/dist/public/assets/{markdown-lint-awUbUFP1.js → markdown-lint-CBp7xF-c.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-DsVyNt4Y.js → markdownlint-rule-browser-as77OQBK.js} +1 -1
- package/dist/public/assets/navigation-targets-pcYc32Il.js +1 -0
- package/dist/public/assets/{page-list-cache-B9RqU_KB.js → page-list-cache-C-bM1SMu.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-CfOGwcVY.js → pending-receive-nav-store-BV9hiWqU.js} +1 -1
- package/dist/public/assets/{platform-labels-DN5Bj-9B.js → platform-labels-HfQVVl4d.js} +1 -1
- package/dist/public/assets/{preferred-session-events-BnES3CJg.js → preferred-session-events-CnOr_7vC.js} +1 -1
- package/dist/public/assets/progress-CIQy-NPJ.js +10 -0
- package/dist/public/assets/{project-paths-Bf9WziK0.js → project-paths-CdWSGc1m.js} +1 -1
- package/dist/public/assets/{restart-collab-server-CEDAvS-U.js → restart-collab-server-BnTUUg07.js} +1 -1
- package/dist/public/assets/{saved-themes-client-xjluD_xq.js → saved-themes-client-CnQnBq4q.js} +1 -1
- package/dist/public/assets/{schema-section-D_Cucwam.js → schema-section-BCpxeE0s.js} +1 -1
- package/dist/public/assets/{schemas-api-DIKsrZIF.js → schemas-api-CzJwuc5a.js} +1 -1
- package/dist/public/assets/{schemas-cc1-yd7Jnf8d.js → schemas-cc1-B3Jf9JeC.js} +1 -1
- package/dist/public/assets/{selection-context-BrHLE7Lq.js → selection-context-CP5ebTKT.js} +1 -1
- package/dist/public/assets/{sign-in-terminal-events-D9AR7Mb5.js → sign-in-terminal-events-DcDyDZ6M.js} +1 -1
- package/dist/public/assets/{skill-scope-CfyUkpZa.js → skill-scope-DtQ3PicT.js} +1 -1
- package/dist/public/assets/{skill-targets-schema-CQo7KF-N.js → skill-targets-schema-D6kA7J61.js} +1 -1
- package/dist/public/assets/{skills-api-BJWscOmZ.js → skills-api-DvWR87JW.js} +1 -1
- package/dist/public/assets/{src-MgZQzOCn.js → src-BUcEmKCH.js} +1 -1
- package/dist/public/assets/storage-scope-DIpOO45g.js +1 -0
- package/dist/public/assets/{tag-pill-input-CpqGo9X9.js → tag-pill-input-pJw3xLYa.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-OCgrT_rG.js → target-navigation-intent-B9dIW1Bq.js} +1 -1
- package/dist/public/assets/{telemetry-impl-tOpPF19w.js → telemetry-impl-Bou1hrP6.js} +1 -1
- package/dist/public/assets/{telemetry-startup-B556Mu54.js → telemetry-startup-tSXZexaZ.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-DmCMwCpY.js → terminal-launch-events-NfdixyJK.js} +1 -1
- package/dist/public/assets/{thread-client-C1l-VKKx.js → thread-client-Bqra55t5.js} +1 -1
- package/dist/public/assets/typing-burst-detector-adZ2R93j.js +8 -0
- package/dist/public/assets/{uninstall-BhKucRvy.js → uninstall-BNoyrj3Z.js} +1 -1
- package/dist/public/assets/{use-activity-panel-Coug5SFo.js → use-activity-panel-B0NYKsaf.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-DbLCAv5T.js → use-apply-config-color-theme-CCEfjhx6.js} +1 -1
- package/dist/public/assets/{use-collab-url-QvSzKabe.js → use-collab-url-lY_vUcZf.js} +1 -1
- package/dist/public/assets/{use-conflicts-DNiHZHRG.js → use-conflicts-CbOb-v8_.js} +1 -1
- package/dist/public/assets/{use-git-sync-status-D7jzQObo.js → use-git-sync-status-B0CLaMkV.js} +1 -1
- package/dist/public/assets/{use-installed-clis-DAeDvnHP.js → use-installed-clis-BqTMhT_v.js} +2 -2
- package/dist/public/assets/{use-live-xterm-theme-CfinBKDY.js → use-live-xterm-theme-B01fmTZm.js} +1 -1
- package/dist/public/assets/{use-open-skill-B_t5wgnE.js → use-open-skill-B7ZDbwPM.js} +1 -1
- package/dist/public/assets/{use-semantic-search-status-rn1T1N4H.js → use-semantic-search-status-BDGrlrdq.js} +1 -1
- package/dist/public/assets/{use-skill-origin-CLlPwrcN.js → use-skill-origin-DaM89Ogz.js} +1 -1
- package/dist/public/assets/{use-skill-targets-DQ4dL6NQ.js → use-skill-targets-DM75u-dx.js} +1 -1
- package/dist/public/assets/{use-skills-CoZ4zzvv.js → use-skills-C2Qanq6V.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-DoP_cmB-.js → use-terminal-enabled-MD4VMEe5.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-y3DAK3rE.js → use-timeline-entry-diff-DBiVVCYO.js} +2 -2
- package/dist/public/assets/{use-workspace-BaTgM_V-.js → use-workspace-D0A0ZmBO.js} +1 -1
- package/dist/public/index.html +72 -72
- package/dist/public/uninstall.html +3 -3
- package/dist/registry-probes-Bi3J6EAt.mjs +17 -0
- package/dist/removal-file-path-Ca9-pX6Q.mjs +1 -0
- package/dist/{repair-launch-json-CqL7MbsW.mjs → repair-launch-json-CwPWeO2c.mjs} +1 -1
- package/dist/repair-mcp-configs-DNzXqCJ8.mjs +1 -0
- package/dist/src-C63FVPx1.mjs +1 -0
- package/dist/src-DgPsVo-K.mjs +16 -0
- package/dist/{start-DBS7SlTn.mjs → start-Bd1cuWOs.mjs} +3 -3
- package/dist/start-DqnTaf73.mjs +1 -0
- package/package.json +4 -4
- package/dist/constants-Cu2M0SgL.mjs +0 -1
- package/dist/dist-BCF9Elq9.mjs +0 -2212
- package/dist/init-C_89v3Le.mjs +0 -1
- package/dist/loader-D_glh6x6.mjs +0 -1
- package/dist/preview-CHrr1wqj.mjs +0 -1
- package/dist/public/assets/FeedbackForm-BUy2zQy5.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-BJVzJ5Oi.js +0 -1
- package/dist/public/assets/config-schema-CB4GNK5W.js +0 -1
- package/dist/public/assets/constants-product-B7cMRfgm.js +0 -1
- package/dist/public/assets/field-controls-B2JH6eAk.js +0 -1
- package/dist/public/assets/globals-BddzEyvs.css +0 -1
- package/dist/public/assets/index-DwTpR-kG.js +0 -2205
- package/dist/public/assets/navigation-targets-CcY2FHJZ.js +0 -1
- package/dist/public/assets/progress-CXFLjUA1.js +0 -10
- package/dist/public/assets/storage-scope-D7iYzqgX.js +0 -1
- package/dist/public/assets/typing-burst-detector-uKwEIRfB.js +0 -8
- package/dist/registry-probes-C324p0fU.mjs +0 -17
- package/dist/removal-file-path-Hkd3h7jX.mjs +0 -1
- package/dist/repair-mcp-configs-BqF2is4H.mjs +0 -1
- package/dist/src-B4gueXu4.mjs +0 -1
- package/dist/src-CfD3HYk7.mjs +0 -16
- package/dist/start-CkRDxU9K.mjs +0 -1
- /package/dist/public/assets/{globals-BfTv_Hnc.js → globals-aghZx9Sb.js} +0 -0
package/dist/public/assets/{lint-config-client-CzUiAfZa.js → lint-config-client-BuUP6NLf.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{a as r,i,n as a}from"./markdown-lint-
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{a as r,i,n as a}from"./markdown-lint-CBp7xF-c.js";var o=n(),s=e(t(),1),c=`open-knowledge:lint-config-changed`;function l(){window.dispatchEvent(new CustomEvent(c))}function u(e){let t=()=>e();return window.addEventListener(c,t),()=>window.removeEventListener(c,t)}async function d(e){try{let t=e===void 0?``:`?doc=${encodeURIComponent(e)}`,n=await fetch(`/api/lint/config${t}`);if(!n.ok)return null;let r=await n.json().catch(()=>null),a=i.safeParse(r);return a.success?a.data:(console.warn(`[lint] lint-config response failed schema validation`,a.error.issues),null)}catch{return null}}async function f(e){return(await d(e))?.effective??null}var p=3e4;async function m(e){let t=new AbortController,n=setTimeout(()=>t.abort(),p);try{let n=await fetch(`/api/lint/fix`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({docName:e}),signal:t.signal});if(!n.ok){let e=await n.json().catch(()=>null);return{ok:!1,errorDetail:typeof e?.title==`string`?e.title:null,status:n.status,problemType:typeof e?.type==`string`?e.type:null}}let i=await n.json().catch(()=>null),a=r.safeParse(i);return a.success?{ok:!0,result:a.data}:(console.warn(`[lint] fix response failed schema validation`,a.error.issues),{ok:!1,errorDetail:null,status:n.status,problemType:null})}catch(t){return console.warn(`[lint] fix request failed`,e,t instanceof Error?t.message:t),{ok:!1,errorDetail:null,status:null,problemType:null}}finally{clearTimeout(n)}}async function h(e,t){try{let n=await fetch(`/api/lint/markdownlint-config`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ruleId:e,value:t})});if(!n.ok){let e=await n.json().catch(()=>null);return{ok:!1,errorDetail:typeof e?.title==`string`?e.title:null}}let r=await n.json().catch(()=>null),a=i.safeParse(r);return a.success?{ok:!0,response:a.data}:{ok:!1,errorDetail:null}}catch{return{ok:!1,errorDetail:null}}}async function g(e){try{let t=await fetch(`/api/lint/frontmatter-schema`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e)});if(!t.ok){let e=await t.json().catch(()=>null);return{ok:!1,errorDetail:typeof e?.title==`string`?e.title:null}}let n=i.safeParse(await t.json().catch(()=>null));return n.success?{ok:!0,response:n.data}:{ok:!1,errorDetail:null}}catch{return{ok:!1,errorDetail:null}}}function _(e){return e.length>0?e:void 0}async function v(e,t,n,r=[]){return g({file:e,field:t,constraint:n,parentPath:_(r)})}async function y(){try{let e=await fetch(`/api/lint/frontmatter-schemas`);if(!e.ok)return[];let t=await e.json().catch(()=>null),n=a.safeParse(t);return n.success?n.data.schemas:(console.warn(`[lint] frontmatter-schemas response failed schema validation`,n.error.issues),[])}catch{return[]}}async function b(e){let t=await g({file:e});return t.ok&&l(),t}async function x(e,t,n=[]){return g({file:e,field:t,removeField:!0,parentPath:_(n)})}async function S(e,t,n,r=[]){return g({file:e,field:t,renameTo:n,parentPath:_(r)})}async function C(e){let t=await g({file:e,delete:!0});return t.ok&&l(),t}function w(){let e=(0,o.c)(6),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0];let[n,r]=(0,s.useState)(t),i;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>{y().then(r)},e[1]=i):i=e[1];let a=i,c,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{let e=!1,t=()=>{y().then(t=>{e||r(t)})};t();let n=u(t);return()=>{e=!0,n()}},l=[],e[2]=c,e[3]=l):(c=e[2],l=e[3]),(0,s.useEffect)(c,l);let d;return e[4]===n?d=e[5]:(d={schemas:n,refresh:a},e[4]=n,e[5]=d),d}function T(e){let t=(0,o.c)(5),[n,r]=(0,s.useState)(null),i,a;t[0]===e?(i=t[1],a=t[2]):(i=()=>{if(!e){r(null);return}let t=!1,n=()=>{d(e).then(e=>{t||r(e)})};n();let i=u(n);return()=>{t=!0,i()}},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,s.useEffect)(i,a);let c;return t[3]===n?c=t[4]:(c={data:n},t[3]=n,t[4]=c),c}function E(){let e=(0,o.c)(4),[t,n]=(0,s.useState)(null),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=!1,t=()=>{d().then(t=>{e||n(t)})};t();let r=u(t);return()=>{e=!0,r()}},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,s.useEffect)(r,i);let a;return e[2]===t?a=e[3]:(a={data:t},e[2]=t,e[3]=a),a}export{m as a,u as c,E as d,v as f,f as i,T as l,C as n,x as o,h as p,l as r,S as s,b as t,w as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./lint-plugin-meta-CtDE2R0v.js";import{FrontmatterPluginSection as t,MarkdownlintPluginSection as n,OkfPluginSection as r}from"./LintingSection-
|
|
1
|
+
import{t as e}from"./lint-plugin-meta-CtDE2R0v.js";import{FrontmatterPluginSection as t,MarkdownlintPluginSection as n,OkfPluginSection as r}from"./LintingSection-BokrC8-Q.js";var i={markdownlint:n,frontmatter:t,okf:r},a=e.map(e=>({...e,Section:i[e.id]}));export{a as LINT_PLUGIN_UI};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./markdownit-Czp42FlT.js","./chunk-CYidjpOJ.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a as e,i as t,n,o as r,r as i,t as a}from"./chunk-CYidjpOJ.js";import{t as o}from"./preload-helper-Chd9yIcd.js";import{a as s,b as c,f as l,g as u,i as d,p as f,r as p,t as m,u as h,v as g,y as _}from"./schemas-B93JY9Ef.js";import{d as v,s as y,u as b}from"./_envelope-q8XHEv4O-C-Qnl5Tu.js";import{At as x,Bt as S,Dt as C,_t as w,gt as T,kt as E,mt as D,zt as O}from"./schemas-api-DIKsrZIF.js";import{t as k}from"./doc-extensions-CcO7K8uD-DG9uHV54.js";import{b as A,x as ee}from"./saved-themes-client-xjluD_xq.js";import{A as j,E as M,M as N,O as P,R as F,a as I,c as L,d as R,f as z,i as B,j as V,k as H,l as U,n as W,o as G,p as K,r as te,s as ne,t as q,u as re,v as J}from"./lib-CY2yz3tg.js";import{n as ie,t as ae}from"./syntax-sfl_d8Li.js";import{n as oe,t as se}from"./markdownit-Czp42FlT.js";var ce=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??=this._items.reduce((e,t)=>`${e}${t}`,``)}get names(){return this._names??=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i<t.length;)s(n,t[i]),n.push(e[++i]);return new r(n)}e._=i;var a=new r(`+`);function o(e,...t){let n=[p(e[0])],i=0;for(;i<t.length;)n.push(a),s(n,t[i]),n.push(a,p(e[++i]));return c(n),new r(n)}e.str=o;function s(e,t){t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push(d(t))}e.addCodeArg=s;function c(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=l(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]=`+`}t++}}function l(e,t){if(t===`""`)return e;if(e===`""`)return t;if(typeof e==`string`)return t instanceof n||e[e.length-1]!==`"`?void 0:typeof t==`string`?t[0]===`"`?e.slice(0,-1)+t.slice(1):void 0:`${e.slice(0,-1)}${t}"`;if(typeof t==`string`&&t[0]===`"`&&!(e instanceof n))return`"${e}${t.slice(1)}`}function u(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`}e.strConcat=u;function d(e){return typeof e==`number`||typeof e==`boolean`||e===null?e:p(Array.isArray(e)?e.join(`,`):e)}function f(e){return new r(p(e))}e.stringify=f;function p(e){return JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}e.safeStringify=p;function m(t){return typeof t==`string`&&e.IDENTIFIER.test(t)?new r(`.${t}`):i`[${t}]`}e.getProperty=m;function h(t){if(typeof t==`string`&&e.IDENTIFIER.test(t))return new r(`${t}`);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}e.getEsmExportName=h;function g(e){return new r(e.toString())}e.regexpCode=g})),le=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=ce(),n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var i=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=i;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=a;var o=(0,t._)`\n`;e.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?o:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),Y=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var t=ce(),n=le(),r=ce();Object.defineProperty(e,`_`,{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,`str`,{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,`strConcat`,{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,`nil`,{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,`getProperty`,{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,`regexpCode`,{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,`Name`,{enumerable:!0,get:function(){return r.Name}});var i=le();Object.defineProperty(e,`Scope`,{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,`ValueScope`,{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,`ValueScopeName`,{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,`varKinds`,{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(`>`),GTE:new t._Code(`>=`),LT:new t._Code(`<`),LTE:new t._Code(`<=`),EQ:new t._Code(`===`),NEQ:new t._Code(`!==`),NOT:new t._Code(`!`),OR:new t._Code(`||`),AND:new t._Code(`&&`),ADD:new t._Code(`+`)};var a=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},o=class extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&=k(this.rhs,e,t),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=k(this.rhs,e,n),this}get names(){return O(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},l=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},u=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},d=class extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},f=class extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=k(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},p=class extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(A(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>D(e,t.names),{})}},m=class extends p{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},h=class extends p{},g=class extends m{};g.kind=`else`;var _=class e extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new g(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(ee(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=k(this.condition,e,t),this}get names(){let e=super.names;return O(e,this.condition),this.else&&D(e,this.else.names),e}};_.kind=`if`;var v=class extends m{};v.kind=`for`;var y=class extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=k(this.iteration,e,t),this}get names(){return D(super.names,this.iteration.names)}},b=class extends v{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return O(O(super.names,this.from),this.to)}},x=class extends v{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=k(this.iterable,e,t),this}get names(){return D(super.names,this.iterable.names)}},S=class extends m{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};S.kind=`func`;var C=class extends p{render(e){return`return `+super.render(e)}};C.kind=`return`;var w=class extends m{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&D(e,this.catch.names),this.finally&&D(e,this.finally.names),e}},T=class extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};T.kind=`catch`;var E=class extends m{render(e){return`finally`+super.render(e)}};E.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
2
|
+
import{a as e,i as t,n,o as r,r as i,t as a}from"./chunk-CYidjpOJ.js";import{t as o}from"./preload-helper-Chd9yIcd.js";import{a as s,b as c,f as l,g as u,i as d,p as f,r as p,t as m,u as h,v as g,y as _}from"./schemas-B93JY9Ef.js";import{d as v,s as y,u as b}from"./_envelope-q8XHEv4O-C-Qnl5Tu.js";import{At as x,Bt as S,Dt as C,_t as w,gt as T,kt as E,mt as D,zt as O}from"./schemas-api-CzJwuc5a.js";import{t as k}from"./doc-extensions-CcO7K8uD-DG9uHV54.js";import{b as A,x as ee}from"./saved-themes-client-CnQnBq4q.js";import{A as j,E as M,M as N,O as P,R as F,a as I,c as L,d as R,f as z,i as B,j as V,k as H,l as U,n as W,o as G,p as K,r as te,s as ne,t as q,u as re,v as J}from"./lib-CY2yz3tg.js";import{n as ie,t as ae}from"./syntax-sfl_d8Li.js";import{n as oe,t as se}from"./markdownit-Czp42FlT.js";var ce=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??=this._items.reduce((e,t)=>`${e}${t}`,``)}get names(){return this._names??=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i<t.length;)s(n,t[i]),n.push(e[++i]);return new r(n)}e._=i;var a=new r(`+`);function o(e,...t){let n=[p(e[0])],i=0;for(;i<t.length;)n.push(a),s(n,t[i]),n.push(a,p(e[++i]));return c(n),new r(n)}e.str=o;function s(e,t){t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push(d(t))}e.addCodeArg=s;function c(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=l(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]=`+`}t++}}function l(e,t){if(t===`""`)return e;if(e===`""`)return t;if(typeof e==`string`)return t instanceof n||e[e.length-1]!==`"`?void 0:typeof t==`string`?t[0]===`"`?e.slice(0,-1)+t.slice(1):void 0:`${e.slice(0,-1)}${t}"`;if(typeof t==`string`&&t[0]===`"`&&!(e instanceof n))return`"${e}${t.slice(1)}`}function u(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`}e.strConcat=u;function d(e){return typeof e==`number`||typeof e==`boolean`||e===null?e:p(Array.isArray(e)?e.join(`,`):e)}function f(e){return new r(p(e))}e.stringify=f;function p(e){return JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}e.safeStringify=p;function m(t){return typeof t==`string`&&e.IDENTIFIER.test(t)?new r(`.${t}`):i`[${t}]`}e.getProperty=m;function h(t){if(typeof t==`string`&&e.IDENTIFIER.test(t))return new r(`${t}`);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}e.getEsmExportName=h;function g(e){return new r(e.toString())}e.regexpCode=g})),le=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=ce(),n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var i=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=i;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=a;var o=(0,t._)`\n`;e.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?o:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),Y=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var t=ce(),n=le(),r=ce();Object.defineProperty(e,`_`,{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,`str`,{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,`strConcat`,{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,`nil`,{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,`getProperty`,{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,`regexpCode`,{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,`Name`,{enumerable:!0,get:function(){return r.Name}});var i=le();Object.defineProperty(e,`Scope`,{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,`ValueScope`,{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,`ValueScopeName`,{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,`varKinds`,{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(`>`),GTE:new t._Code(`>=`),LT:new t._Code(`<`),LTE:new t._Code(`<=`),EQ:new t._Code(`===`),NEQ:new t._Code(`!==`),NOT:new t._Code(`!`),OR:new t._Code(`||`),AND:new t._Code(`&&`),ADD:new t._Code(`+`)};var a=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},o=class extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&=k(this.rhs,e,t),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=k(this.rhs,e,n),this}get names(){return O(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},l=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},u=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},d=class extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},f=class extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=k(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},p=class extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(A(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>D(e,t.names),{})}},m=class extends p{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},h=class extends p{},g=class extends m{};g.kind=`else`;var _=class e extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new g(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(ee(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=k(this.condition,e,t),this}get names(){let e=super.names;return O(e,this.condition),this.else&&D(e,this.else.names),e}};_.kind=`if`;var v=class extends m{};v.kind=`for`;var y=class extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=k(this.iteration,e,t),this}get names(){return D(super.names,this.iteration.names)}},b=class extends v{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return O(O(super.names,this.from),this.to)}},x=class extends v{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=k(this.iterable,e,t),this}get names(){return D(super.names,this.iterable.names)}},S=class extends m{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};S.kind=`func`;var C=class extends p{render(e){return`return `+super.render(e)}};C.kind=`return`;var w=class extends m{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&D(e,this.catch.names),this.finally&&D(e,this.finally.names),e}},T=class extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};T.kind=`catch`;var E=class extends m{render(e){return`finally`+super.render(e)}};E.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
3
3
|
`:``},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let i=this._scope.toName(t);return n!==void 0&&r&&(this._constants[i.str]=n),this._leafNode(new o(e,i,n)),i}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,n){return this._leafNode(new s(e,t,n))}add(t,n){return this._leafNode(new c(t,e.operators.ADD,n))}code(e){return typeof e==`function`?e():e!==t.nil&&this._leafNode(new f(e)),this}object(...e){let n=[`{`];for(let[r,i]of e)n.length>1&&n.push(`,`),n.push(r),(r!==i||this.opts.es5)&&(n.push(`:`),(0,t.addCodeArg)(n,i));return n.push(`}`),new t._Code(n)}if(e,t,n){if(this._blockNode(new _(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error(`CodeGen: "else" body without "then" body`);return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(_,g)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new y(e),t)}forRange(e,t,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.let){let o=this._scope.toName(e);return this._for(new b(a,o,t,r),()=>i(o))}forOf(e,r,i,a=n.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let e=r instanceof t.Name?r:this.var(`_arr`,r);return this.forRange(`_i`,0,(0,t._)`${e}.length`,n=>{this.var(o,(0,t._)`${e}[${n}]`),i(o)})}return this._for(new x(`of`,a,o,r),()=>i(o))}forIn(e,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${r})`,i);let o=this._scope.toName(e);return this._for(new x(`in`,a,o,r),()=>i(o))}endFor(){return this._endBlockNode(v)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new u(e))}return(e){let t=new C;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error(`CodeGen: "return" should have one node`);return this._endBlockNode(C)}try(e,t,n){if(!t&&!n)throw Error(`CodeGen: "try" without "catch" and "finally"`);let r=new w;if(this._blockNode(r),this.code(e),t){let e=this.name(`e`);this._currNode=r.catch=new T(e),t(e)}return n&&(this._currNode=r.finally=new E,this.code(n)),this._endBlockNode(T,E)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error(`CodeGen: not in self-balancing block`);let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,n=t.nil,r,i){return this._blockNode(new S(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof _))throw Error(`CodeGen: "else" without "if"`);return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function D(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function O(e,n){return n instanceof t._CodeOrName?D(e,n.names):e}function k(e,n,r){if(e instanceof t.Name)return i(e);if(!a(e))return e;return new t._Code(e._items.reduce((e,n)=>(n instanceof t.Name&&(n=i(n)),n instanceof t._Code?e.push(...n._items):e.push(n),e),[]));function i(e){let t=r[e.str];return t===void 0||n[e.str]!==1?e:(delete n[e.str],t)}function a(e){return e instanceof t._Code&&e._items.some(e=>e instanceof t.Name&&n[e.str]===1&&r[e.str]!==void 0)}}function A(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function ee(e){return typeof e==`boolean`||typeof e==`number`||e===null?!e:(0,t._)`!${I(e)}`}e.not=ee;var j=F(e.operators.AND);function M(...e){return e.reduce(j)}e.and=M;var N=F(e.operators.OR);function P(...e){return e.reduce(N)}e.or=P;function F(e){return(n,r)=>n===t.nil?r:r===t.nil?n:(0,t._)`${I(n)} ${e} ${I(r)}`}function I(e){return e instanceof t.Name?e:(0,t._)`(${e})`}})),X=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;var t=Y(),n=ce();function r(e){let t={};for(let n of e)t[n]=!0;return t}e.toHash=r;function i(e,t){return typeof t==`boolean`?t:Object.keys(t).length===0?!0:(a(e,t),!o(t,e.self.RULES.all))}e.alwaysValidSchema=i;function a(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema||typeof t==`boolean`)return;let i=r.RULES.keywords;for(let n in t)i[n]||x(e,`unknown keyword: "${n}"`)}e.checkUnknownRules=a;function o(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(t[n])return!0;return!1}e.schemaHasRules=o;function s(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(n!==`$ref`&&t.all[n])return!0;return!1}e.schemaHasRulesButRef=s;function c({topSchemaRef:e,schemaPath:n},r,i,a){if(!a){if(typeof r==`number`||typeof r==`boolean`)return r;if(typeof r==`string`)return(0,t._)`${r}`}return(0,t._)`${e}${n}${(0,t.getProperty)(i)}`}e.schemaRefOrVal=c;function l(e){return f(decodeURIComponent(e))}e.unescapeFragment=l;function u(e){return encodeURIComponent(d(e))}e.escapeFragment=u;function d(e){return typeof e==`number`?`${e}`:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.escapeJsonPointer=d;function f(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}e.unescapeJsonPointer=f;function p(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}e.eachItem=p;function m({mergeNames:e,mergeToName:n,mergeValues:r,resultToName:i}){return(a,o,s,c)=>{let l=s===void 0?o:s instanceof t.Name?(o instanceof t.Name?e(a,o,s):n(a,o,s),s):o instanceof t.Name?(n(a,s,o),o):r(o,s);return c===t.Name&&!(l instanceof t.Name)?i(a,l):l}}e.mergeEvaluated={props:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>{e.if((0,t._)`${n} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,t._)`${r} || {}`).code((0,t._)`Object.assign(${r}, ${n})`))}),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>{n===!0?e.assign(r,!0):(e.assign(r,(0,t._)`${r} || {}`),g(e,r,n))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:h}),items:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>e.assign(r,(0,t._)`${n} === true ? true : ${r} > ${n} ? ${r} : ${n}`)),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>e.assign(r,n===!0?!0:(0,t._)`${r} > ${n} ? ${r} : ${n}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var(`items`,t)})};function h(e,n){if(n===!0)return e.var(`props`,!0);let r=e.var(`props`,(0,t._)`{}`);return n!==void 0&&g(e,r,n),r}e.evaluatedPropsToName=h;function g(e,n,r){Object.keys(r).forEach(r=>e.assign((0,t._)`${n}${(0,t.getProperty)(r)}`,!0))}e.setEvaluated=g;var _={};function v(e,t){return e.scopeValue(`func`,{ref:t,code:_[t.code]||(_[t.code]=new n._Code(t.code))})}e.useFunc=v;var y;(function(e){e[e.Num=0]=`Num`,e[e.Str=1]=`Str`})(y||(e.Type=y={}));function b(e,n,r){if(e instanceof t.Name){let i=n===y.Num;return r?i?(0,t._)`"[" + ${e} + "]"`:(0,t._)`"['" + ${e} + "']"`:i?(0,t._)`"/" + ${e}`:(0,t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,t.getProperty)(e).toString():`/`+d(e)}e.getErrorPath=b;function x(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}}e.checkStrictMode=x})),ue=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Y();e.default={data:new t.Name(`data`),valCxt:new t.Name(`valCxt`),instancePath:new t.Name(`instancePath`),parentData:new t.Name(`parentData`),parentDataProperty:new t.Name(`parentDataProperty`),rootData:new t.Name(`rootData`),dynamicAnchors:new t.Name(`dynamicAnchors`),vErrors:new t.Name(`vErrors`),errors:new t.Name(`errors`),this:new t.Name(`this`),self:new t.Name(`self`),scope:new t.Name(`scope`),json:new t.Name(`json`),jsonPos:new t.Name(`jsonPos`),jsonLen:new t.Name(`jsonLen`),jsonPart:new t.Name(`jsonPart`)}})),de=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;var t=Y(),n=X(),r=ue();e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,t.str)`"${e}" keyword must be ${n} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`};function i(n,r=e.keywordError,i,a){let{it:o}=n,{gen:s,compositeRule:u,allErrors:f}=o,p=d(n,r,i);a??(u||f)?c(s,p):l(o,(0,t._)`[${p}]`)}e.reportError=i;function a(t,n=e.keywordError,i){let{it:a}=t,{gen:o,compositeRule:s,allErrors:u}=a;c(o,d(t,n,i)),s||u||l(a,r.default.vErrors)}e.reportExtraError=a;function o(e,n){e.assign(r.default.errors,n),e.if((0,t._)`${r.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,t._)`${r.default.vErrors}.length`,n),()=>e.assign(r.default.vErrors,null)))}e.resetErrorsCount=o;function s({gen:e,keyword:n,schemaValue:i,data:a,errsCount:o,it:s}){if(o===void 0)throw Error(`ajv implementation error`);let c=e.name(`err`);e.forRange(`i`,o,r.default.errors,o=>{e.const(c,(0,t._)`${r.default.vErrors}[${o}]`),e.if((0,t._)`${c}.instancePath === undefined`,()=>e.assign((0,t._)`${c}.instancePath`,(0,t.strConcat)(r.default.instancePath,s.errorPath))),e.assign((0,t._)`${c}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${n}`),s.opts.verbose&&(e.assign((0,t._)`${c}.schema`,i),e.assign((0,t._)`${c}.data`,a))})}e.extendErrors=s;function c(e,n){let i=e.const(`err`,n);e.if((0,t._)`${r.default.vErrors} === null`,()=>e.assign(r.default.vErrors,(0,t._)`[${i}]`),(0,t._)`${r.default.vErrors}.push(${i})`),e.code((0,t._)`${r.default.errors}++`)}function l(e,n){let{gen:r,validateName:i,schemaEnv:a}=e;a.$async?r.throw((0,t._)`new ${e.ValidationError}(${n})`):(r.assign((0,t._)`${i}.errors`,n),r.return(!1))}var u={keyword:new t.Name(`keyword`),schemaPath:new t.Name(`schemaPath`),params:new t.Name(`params`),propertyName:new t.Name(`propertyName`),message:new t.Name(`message`),schema:new t.Name(`schema`),parentSchema:new t.Name(`parentSchema`)};function d(e,n,r){let{createErrors:i}=e.it;return i===!1?(0,t._)`{}`:f(e,n,r)}function f(e,t,n={}){let{gen:r,it:i}=e,a=[p(i,n),m(e,n)];return h(e,t,a),r.object(...a)}function p({errorPath:e},{instancePath:i}){let a=i?(0,t.str)`${e}${(0,n.getErrorPath)(i,n.Type.Str)}`:e;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,a)]}function m({keyword:e,it:{errSchemaPath:r}},{schemaPath:i,parentSchema:a}){let o=a?r:(0,t.str)`${r}/${e}`;return i&&(o=(0,t.str)`${o}${(0,n.getErrorPath)(i,n.Type.Str)}`),[u.schemaPath,o]}function h(e,{params:n,message:i},a){let{keyword:o,data:s,schemaValue:c,it:l}=e,{opts:d,propertyName:f,topSchemaRef:p,schemaPath:m}=l;a.push([u.keyword,o],[u.params,typeof n==`function`?n(e):n||(0,t._)`{}`]),d.messages&&a.push([u.message,typeof i==`function`?i(e):i]),d.verbose&&a.push([u.schema,c],[u.parentSchema,(0,t._)`${p}${m}`],[r.default.data,s]),f&&a.push([u.propertyName,f])}})),fe=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=de(),n=Y(),r=ue(),i={message:`boolean schema is false`};function a(e){let{gen:t,schema:i,validateName:a}=e;i===!1?s(e,!1):typeof i==`object`&&i.$async===!0?t.return(r.default.data):(t.assign((0,n._)`${a}.errors`,null),t.return(!0))}e.topBoolOrEmptySchema=a;function o(e,t){let{gen:n,schema:r}=e;r===!1?(n.var(t,!1),s(e)):n.var(t,!0)}e.boolOrEmptySchema=o;function s(e,n){let{gen:r,data:a}=e,o={gen:r,keyword:`false schema`,data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,t.reportError)(o,i,void 0,n)}})),pe=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getRules=e.isJSONType=void 0;var t=new Set([`string`,`number`,`integer`,`boolean`,`null`,`object`,`array`]);function n(e){return typeof e==`string`&&t.has(e)}e.isJSONType=n;function r(){let e={number:{type:`number`,rules:[]},string:{type:`string`,rules:[]},array:{type:`array`,rules:[]},object:{type:`object`,rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=r})),me=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:e,self:t},r){let i=t.RULES.types[r];return i&&i!==!0&&n(e,i)}e.schemaHasRulesForType=t;function n(e,t){return t.rules.some(t=>r(e,t))}e.shouldUseGroup=n;function r(e,t){return e[t.keyword]!==void 0||t.definition.implements?.some(t=>e[t]!==void 0)}e.shouldUseRule=r})),he=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;var t=pe(),n=me(),r=de(),i=Y(),a=X(),o;(function(e){e[e.Correct=0]=`Correct`,e[e.Wrong=1]=`Wrong`})(o||(e.DataType=o={}));function s(e){let t=c(e.type);if(t.includes(`null`)){if(e.nullable===!1)throw Error(`type: null contradicts nullable: false`)}else{if(!t.length&&e.nullable!==void 0)throw Error(`"nullable" cannot be used without "type"`);e.nullable===!0&&t.push(`null`)}return t}e.getSchemaTypes=s;function c(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(t.isJSONType))return n;throw Error(`type must be JSONType or JSONType[]: `+n.join(`,`))}e.getJSONTypes=c;function l(e,t){let{gen:r,data:i,opts:a}=e,s=d(t,a.coerceTypes),c=t.length>0&&!(s.length===0&&t.length===1&&(0,n.schemaHasRulesForType)(e,t[0]));if(c){let n=h(t,i,a.strictNumbers,o.Wrong);r.if(n,()=>{s.length?f(e,t,s):_(e)})}return c}e.coerceAndCheckDataType=l;var u=new Set([`string`,`number`,`integer`,`boolean`,`null`]);function d(e,t){return t?e.filter(e=>u.has(e)||t===`array`&&e===`array`):[]}function f(e,t,n){let{gen:r,data:a,opts:o}=e,s=r.let(`dataType`,(0,i._)`typeof ${a}`),c=r.let(`coerced`,(0,i._)`undefined`);o.coerceTypes===`array`&&r.if((0,i._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,i._)`${a}[0]`).assign(s,(0,i._)`typeof ${a}`).if(h(t,a,o.strictNumbers),()=>r.assign(c,a))),r.if((0,i._)`${c} !== undefined`);for(let e of n)(u.has(e)||e===`array`&&o.coerceTypes===`array`)&&l(e);r.else(),_(e),r.endIf(),r.if((0,i._)`${c} !== undefined`,()=>{r.assign(a,c),p(e,c)});function l(e){switch(e){case`string`:r.elseIf((0,i._)`${s} == "number" || ${s} == "boolean"`).assign(c,(0,i._)`"" + ${a}`).elseIf((0,i._)`${a} === null`).assign(c,(0,i._)`""`);return;case`number`:r.elseIf((0,i._)`${s} == "boolean" || ${a} === null
|
|
4
4
|
|| (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
|
|
5
5
|
|| (${s} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(c,(0,i._)`+${a}`);return;case`boolean`:r.elseIf((0,i._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(c,!1).elseIf((0,i._)`${a} === "true" || ${a} === 1`).assign(c,!0);return;case`null`:r.elseIf((0,i._)`${a} === "" || ${a} === 0 || ${a} === false`),r.assign(c,null);return;case`array`:r.elseIf((0,i._)`${s} === "string" || ${s} === "number"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{i as o,n as s,t as c}from"./tooltip-DBqLYfio.js";import{n as l,r as u,t as d}from"./collapsible-BKbszYZV.js";import{t as f}from"./checkbox-CKD8LETI.js";import{t as p}from"./label-CvMpFFbN.js";import{i as m,n as h,o as g,s as _,t as v}from"./select-Bu4Wm3Rf.js";import{t as y}from"./switch-BKZTXkzu.js";import{t as ee}from"./button-DzgjsZzC.js";import{n as b}from"./dist-BGzUo_18.js";import{t as x}from"./arrow-up-right-nJaICi16.js";import{t as te}from"./chevron-right-Bofu4lib.js";import{t as S}from"./info-CyR0W2SK.js";import{t as ne}from"./rotate-ccw-Zi1IjIg9.js";import{t as C}from"./badge-DmdA1C7r.js";import{r as w}from"./field-DFJgKWGh.js";import{t as T}from"./input-C-Qm8YDT.js";import{t as E}from"./external-link-CldCnbtR.js";import{_ as D,g as O,l as k,o as A}from"./markdown-lint-awUbUFP1.js";import{t as j}from"./skeleton-C73NNmDC.js";import{d as M,p as N,r as re}from"./lint-config-client-CzUiAfZa.js";import{t as P}from"./tag-pill-input-CpqGo9X9.js";var F=a(),I=e(n(),1),L=t(),R={};function ie(e){let t=(0,F.c)(5),n=R[e.ruleId];if(n!==void 0){let r;return t[0]!==n||t[1]!==e?(r=(0,L.jsx)(n,{...e}),t[0]=n,t[1]=e,t[2]=r):r=t[2],r}let r;return t[3]===e?r=t[4]:(r=(0,L.jsx)(z,{...e}),t[3]=e,t[4]=r),r}function z(e){let t=(0,F.c)(65),{ruleId:n,spec:i,value:a,disabled:o,onChange:s}=e,c=`rule-option-${n}-${i.key}`,l=`${c}-description`,u;t[0]!==c||t[1]!==i.key||t[2]!==i.type?(u=i.type===`unsupported`?(0,L.jsx)(`span`,{className:`font-mono text-sm font-medium`,children:i.key}):(0,L.jsx)(p,{htmlFor:c,className:`font-mono text-sm font-medium`,children:i.key}),t[0]=c,t[1]=i.key,t[2]=i.type,t[3]=u):u=t[3];let d;t[4]===i.default?d=t[5]:(d=i.default===void 0?null:(0,L.jsxs)(L.Fragment,{children:[` · `,(0,L.jsx)(r,{id:`KtACeE`,values:{0:H(i.default)},components:{0:(0,L.jsx)(`code`,{className:`font-mono`})}})]}),t[4]=i.default,t[5]=d);let f;t[6]!==l||t[7]!==i.description||t[8]!==d?(f=(0,L.jsxs)(w,{id:l,children:[i.description,d]}),t[6]=l,t[7]=i.description,t[8]=d,t[9]=f):f=t[9];let m;t[10]!==u||t[11]!==f?(m=(0,L.jsxs)(`div`,{className:`min-w-0 space-y-0.5`,children:[u,f]}),t[10]=u,t[11]=f,t[12]=m):m=t[12];let h=m,g=o===!0,_;t[13]!==c||t[14]!==l||t[15]!==s||t[16]!==g?(_={controlId:c,descriptionId:l,disabled:g,onChange:s},t[13]=c,t[14]=l,t[15]=s,t[16]=g,t[17]=_):_=t[17];let v=_;switch(i.type){case`boolean`:{let e;t[18]!==v||t[19]!==i||t[20]!==a?(e=(0,L.jsx)(U,{...v,spec:i,value:a}),t[18]=v,t[19]=i,t[20]=a,t[21]=e):e=t[21];let n;return t[22]!==c||t[23]!==h||t[24]!==e?(n=(0,L.jsx)(B,{testId:c,header:h,children:e}),t[22]=c,t[23]=h,t[24]=e,t[25]=n):n=t[25],n}case`enum`:{let e;t[26]!==v||t[27]!==i||t[28]!==a?(e=(0,L.jsx)(W,{...v,spec:i,value:a}),t[26]=v,t[27]=i,t[28]=a,t[29]=e):e=t[29];let n;return t[30]!==c||t[31]!==h||t[32]!==e?(n=(0,L.jsx)(B,{testId:c,header:h,children:e}),t[30]=c,t[31]=h,t[32]=e,t[33]=n):n=t[33],n}case`integer`:{let e;t[34]!==v||t[35]!==i||t[36]!==a?(e=(0,L.jsx)(G,{...v,spec:i,value:a}),t[34]=v,t[35]=i,t[36]=a,t[37]=e):e=t[37];let n;return t[38]!==c||t[39]!==h||t[40]!==e?(n=(0,L.jsx)(B,{testId:c,header:h,children:e}),t[38]=c,t[39]=h,t[40]=e,t[41]=n):n=t[41],n}case`string`:{let e;t[42]!==v||t[43]!==i||t[44]!==a?(e=(0,L.jsx)(K,{...v,spec:i,value:a}),t[42]=v,t[43]=i,t[44]=a,t[45]=e):e=t[45];let n;return t[46]!==c||t[47]!==h||t[48]!==e?(n=(0,L.jsx)(V,{testId:c,header:h,children:e}),t[46]=c,t[47]=h,t[48]=e,t[49]=n):n=t[49],n}case`string-array`:{let e;t[50]!==v||t[51]!==i||t[52]!==a?(e=(0,L.jsx)(q,{...v,spec:i,value:a}),t[50]=v,t[51]=i,t[52]=a,t[53]=e):e=t[53];let n;return t[54]!==c||t[55]!==h||t[56]!==e?(n=(0,L.jsx)(V,{testId:c,header:h,children:e}),t[54]=c,t[55]=h,t[56]=e,t[57]=n):n=t[57],n}case`unsupported`:{let e=`${c}-unsupported`,n;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,L.jsx)(r,{id:`NQXwDy`}),t[58]=n):n=t[58];let i;t[59]===e?i=t[60]:(i=(0,L.jsx)(C,{variant:`gray`,"data-testid":e,children:n}),t[59]=e,t[60]=i);let a;return t[61]!==c||t[62]!==h||t[63]!==i?(a=(0,L.jsx)(B,{testId:c,header:h,children:i}),t[61]=c,t[62]=h,t[63]=i,t[64]=a):a=t[64],a}default:return i}}function B(e){let t=(0,F.c)(6),{testId:n,header:r,children:i}=e,a;t[0]===i?a=t[1]:(a=(0,L.jsx)(`div`,{className:`shrink-0`,children:i}),t[0]=i,t[1]=a);let o;return t[2]!==r||t[3]!==a||t[4]!==n?(o=(0,L.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,"data-testid":n,children:[r,a]}),t[2]=r,t[3]=a,t[4]=n,t[5]=o):o=t[5],o}function V(e){let t=(0,F.c)(4),{testId:n,header:r,children:i}=e,a;return t[0]!==i||t[1]!==r||t[2]!==n?(a=(0,L.jsxs)(`div`,{className:`space-y-1.5`,"data-testid":n,children:[r,i]}),t[0]=i,t[1]=r,t[2]=n,t[3]=a):a=t[3],a}function H(e){return JSON.stringify(e)}function U(e){let t=(0,F.c)(8),{spec:n,value:r,controlId:i,descriptionId:a,disabled:o,onChange:s}=e,c=typeof r==`boolean`?r:n.default??!1,l;t[0]===s?l=t[1]:(l=e=>s(e),t[0]=s,t[1]=l);let u;return t[2]!==c||t[3]!==i||t[4]!==a||t[5]!==o||t[6]!==l?(u=(0,L.jsx)(y,{id:i,checked:c,disabled:o,"aria-describedby":a,onCheckedChange:l}),t[2]=c,t[3]=i,t[4]=a,t[5]=o,t[6]=l,t[7]=u):u=t[7],u}function W(e){let t=(0,F.c)(16),{spec:n,value:r,controlId:i,descriptionId:a,disabled:o,onChange:s}=e,c=typeof r==`string`?r:n.default??``,l;t[0]===s?l=t[1]:(l=e=>s(e),t[0]=s,t[1]=l);let u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,L.jsx)(_,{}),t[2]=u):u=t[2];let d;t[3]!==i||t[4]!==a?(d=(0,L.jsx)(g,{id:i,"aria-describedby":a,className:`w-48`,children:u}),t[3]=i,t[4]=a,t[5]=d):d=t[5];let f;t[6]===n.enum?f=t[7]:(f=n.enum.map(ae),t[6]=n.enum,t[7]=f);let p;t[8]===f?p=t[9]:(p=(0,L.jsx)(h,{children:f}),t[8]=f,t[9]=p);let m;return t[10]!==c||t[11]!==o||t[12]!==l||t[13]!==d||t[14]!==p?(m=(0,L.jsxs)(v,{value:c,onValueChange:l,disabled:o,children:[d,p]}),t[10]=c,t[11]=o,t[12]=l,t[13]=d,t[14]=p,t[15]=m):m=t[15],m}function ae(e){return(0,L.jsx)(m,{value:e,children:e},e)}function G(e){let t=(0,F.c)(22),{spec:n,value:r,controlId:i,descriptionId:a,disabled:o,onChange:s}=e,c=typeof r==`number`?r:n.default,l=c===void 0?``:String(c),[u,d]=(0,I.useState)(l),f=(0,I.useRef)(c),p,m;t[0]===c?(p=t[1],m=t[2]):(p=()=>{f.current!==c&&(d(c===void 0?``:String(c)),f.current=c)},m=[c],t[0]=c,t[1]=p,t[2]=m),(0,I.useEffect)(p,m);let h;t[3]!==c||t[4]!==l||t[5]!==s||t[6]!==u||t[7]!==n.maximum||t[8]!==n.minimum?(h=()=>{if(u.trim()===``){d(l);return}let e=Number(u);if(!Number.isFinite(e)){d(l);return}let t=Math.round(e);n.minimum!==void 0&&t<n.minimum&&(t=n.minimum),n.maximum!==void 0&&t>n.maximum&&(t=n.maximum),d(String(t)),t!==c&&s(t)},t[3]=c,t[4]=l,t[5]=s,t[6]=u,t[7]=n.maximum,t[8]=n.minimum,t[9]=h):h=t[9];let g=h,_;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>d(e.target.value),t[10]=_):_=t[10];let v;t[11]===g?v=t[12]:(v=e=>{e.key===`Enter`&&(e.preventDefault(),g())},t[11]=g,t[12]=v);let y;return t[13]!==g||t[14]!==i||t[15]!==a||t[16]!==o||t[17]!==u||t[18]!==n.maximum||t[19]!==n.minimum||t[20]!==v?(y=(0,L.jsx)(T,{id:i,type:`number`,value:u,min:n.minimum,max:n.maximum,disabled:o,"aria-describedby":a,onChange:_,onBlur:g,onKeyDown:v,className:`h-8 w-28 text-sm tabular-nums`}),t[13]=g,t[14]=i,t[15]=a,t[16]=o,t[17]=u,t[18]=n.maximum,t[19]=n.minimum,t[20]=v,t[21]=y):y=t[21],y}function K(e){let t=(0,F.c)(17),{spec:n,value:r,controlId:i,descriptionId:a,disabled:o,onChange:s}=e,c=typeof r==`string`?r:n.default??``,[l,u]=(0,I.useState)(c),d=(0,I.useRef)(c),f,p;t[0]===c?(f=t[1],p=t[2]):(f=()=>{d.current!==c&&(u(c),d.current=c)},p=[c],t[0]=c,t[1]=f,t[2]=p),(0,I.useEffect)(f,p);let m;t[3]!==c||t[4]!==s||t[5]!==l?(m=()=>{l!==c&&s(l)},t[3]=c,t[4]=s,t[5]=l,t[6]=m):m=t[6];let h=m,g;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(g=e=>u(e.target.value),t[7]=g):g=t[7];let _;t[8]===h?_=t[9]:(_=e=>{e.key===`Enter`&&(e.preventDefault(),h())},t[8]=h,t[9]=_);let v;return t[10]!==h||t[11]!==i||t[12]!==a||t[13]!==o||t[14]!==l||t[15]!==_?(v=(0,L.jsx)(T,{id:i,value:l,disabled:o,"aria-describedby":a,onChange:g,onBlur:h,onKeyDown:_,className:`h-8 font-mono text-sm`}),t[10]=h,t[11]=i,t[12]=a,t[13]=o,t[14]=l,t[15]=_,t[16]=v):v=t[16],v}function q(e){let t=(0,F.c)(11),{spec:n,value:r,controlId:i,descriptionId:a,disabled:o,onChange:s}=e,c;t[0]!==n||t[1]!==r?(c=Array.isArray(r)?r.filter(J):[...n.default??[]],t[0]=n,t[1]=r,t[2]=c):c=t[2];let l=c,u;t[3]===s?u=t[4]:(u=e=>s(e),t[3]=s,t[4]=u);let d;return t[5]!==i||t[6]!==a||t[7]!==o||t[8]!==l||t[9]!==u?(d=(0,L.jsx)(P,{id:i,value:l,grammar:`free-text`,disabled:o,"aria-describedby":a,onChange:u}),t[5]=i,t[6]=a,t[7]=o,t[8]=l,t[9]=u,t[10]=d):d=t[10],d}function J(e){return typeof e==`string`}function oe(e){let t=(0,F.c)(53),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{hideConfigSourceNote:a,initialRuleQuery:o}=n,s=a===void 0?!1:a,{_:c}=i(),{data:m}=M(),h=m!==null,g;t[2]===m?.effective.plugins.markdownlint.rules?g=t[3]:(g=m?.effective.plugins.markdownlint.rules??{},t[2]=m?.effective.plugins.markdownlint.rules,t[3]=g);let _=g,v=m?.configFile??null,[y,ee]=(0,I.useState)(o?.query??``),[x,ne]=(0,I.useState)(!1),C=o?.nonce,w=o?.query,E,D;t[4]!==C||t[5]!==w?(E=()=>{C===void 0||w===void 0||ee(w)},D=[C,w],t[4]=C,t[5]=w,t[6]=E,t[7]=D):(E=t[6],D=t[7]),(0,I.useEffect)(E,D);let P;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(P=[],t[8]=P):P=t[8];let[R,ie]=(0,I.useState)(P),z;t[9]===c?z=t[10]:(z=function(e,t){N(e,t).then(e=>{if(!e.ok){b.error(e.errorDetail??c({id:`2G-56b`}));return}re()})},t[9]=c,t[10]=z);let B=z,V;t[11]!==x||t[12]!==y?(V=y.trim()!==``||x,t[11]=x,t[12]=y,t[13]=V):V=t[13];let H=V,U;if(t[14]!==c||t[15]!==R||t[16]!==v||t[17]!==H||t[18]!==s||t[19]!==x||t[20]!==h||t[21]!==_||t[22]!==y||t[23]!==B){let e;t[25]!==v||t[26]!==x||t[27]!==_||t[28]!==y?(e=e=>le(e,y)&&(!x||se(_,v,e.id)),t[25]=v,t[26]=x,t[27]=_,t[28]=y,t[29]=e):e=t[29];let n=A.filter(e),i=k.map(e=>({category:e,entries:n.filter(t=>O(t)===e)})).filter(Y),a;t[30]!==v||t[31]!==s||t[32]!==h?(a=!s&&(h?v?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`markdownlint-config-source-note`,children:(0,L.jsx)(r,{id:`V2Gmie`,values:{configFile:v},components:{0:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})}):(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,L.jsx)(r,{id:`Z6rrjc`,components:{0:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})}),(0,L.jsxs)(`p`,{className:`flex items-start gap-1.5 rounded-md border border-dashed p-2.5 text-sm text-muted-foreground`,"data-testid":`markdownlint-no-file-disclaimer`,children:[(0,L.jsx)(S,{"aria-hidden":!0,className:`mt-0.5 size-4 shrink-0`}),(0,L.jsx)(`span`,{children:(0,L.jsx)(r,{id:`Te6sK2`,components:{0:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})})]})]}):(0,L.jsxs)(`div`,{className:`space-y-2`,"aria-busy":`true`,"data-testid":`markdownlint-rule-browser-config-loading`,children:[(0,L.jsx)(j,{className:`h-4 w-full`}),(0,L.jsx)(j,{className:`h-4 w-2/3`})]})),t[30]=v,t[31]=s,t[32]=h,t[33]=a):a=t[33];let o;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`markdownlint-rule-browser-legend`,children:(0,L.jsx)(r,{id:`zYp8Sr`,components:{0:(0,L.jsx)(`span`,{className:`font-medium text-foreground`}),1:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})}),t[34]=o):o=t[34];let m;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(m=e=>ee(e.target.value),t[35]=m):m=t[35];let g;t[36]===c?g=t[37]:(g=c({id:`l-4nnw`}),t[36]=c,t[37]=g);let b;t[38]===c?b=t[39]:(b=c({id:`yf5auF`}),t[38]=c,t[39]=b);let C;t[40]!==y||t[41]!==g||t[42]!==b?(C=(0,L.jsx)(T,{value:y,onChange:m,placeholder:g,"aria-label":b,className:`h-8`,"data-testid":`markdownlint-rule-search`}),t[40]=y,t[41]=g,t[42]=b,t[43]=C):C=t[43];let w;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>ne(e===!0),t[44]=w):w=t[44];let E;t[45]===x?E=t[46]:(E=(0,L.jsx)(f,{id:`markdownlint-only-modified`,checked:x,onCheckedChange:w,"data-testid":`markdownlint-only-modified`}),t[45]=x,t[46]=E);let D;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,L.jsx)(p,{htmlFor:`markdownlint-only-modified`,className:`text-sm font-normal`,children:(0,L.jsx)(r,{id:`ccNps_`})}),t[47]=D):D=t[47];let M;t[48]===E?M=t[49]:(M=(0,L.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[E,D]}),t[48]=E,t[49]=M);let N;t[50]!==C||t[51]!==M?(N=(0,L.jsxs)(`div`,{className:`flex items-center gap-4`,children:[C,M]}),t[50]=C,t[51]=M,t[52]=N):N=t[52],U=(0,L.jsxs)(`div`,{className:`space-y-3`,"data-testid":`settings-linting-markdownlint-rules`,children:[a,o,N,i.length===0?(0,L.jsx)(`p`,{className:`rounded-md border border-dashed p-3 text-sm text-muted-foreground`,"data-testid":`markdownlint-rule-browser-empty`,children:(0,L.jsx)(r,{id:`RfilGt`})}):(0,L.jsx)(`div`,{className:`space-y-2`,children:i.map(e=>{let{category:t,entries:n}=e,i=n.filter(e=>ue($(_,e.id))).length;return(0,L.jsxs)(d,{open:H||!R.includes(t),onOpenChange:e=>ie(e?R.filter(e=>e!==t):[...R,t]),children:[(0,L.jsxs)(u,{className:`group flex w-full items-center gap-2 rounded-md px-1.5 py-1.5 text-sm font-medium hover:bg-muted/50`,"data-testid":`markdownlint-rule-category-${Q(t)}`,children:[(0,L.jsx)(te,{className:`size-4 shrink-0 text-muted-foreground transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`}),(0,L.jsx)(Z,{category:t}),(0,L.jsx)(`span`,{className:`ms-auto text-xs font-normal text-muted-foreground tabular-nums`,children:(0,L.jsx)(r,{id:`NgZwB0`,values:{0:n.length,enabledCount:i}})})]}),(0,L.jsx)(l,{children:(0,L.jsx)(`div`,{className:`mt-1 divide-y rounded-md border`,children:n.map(e=>(0,L.jsx)(X,{rule:e,value:$(_,e.id),modified:se(_,v,e.id),ready:h,onWrite:t=>B(e.id,t)},e.id))})})]},t)})})]}),t[14]=c,t[15]=R,t[16]=v,t[17]=H,t[18]=s,t[19]=x,t[20]=h,t[21]=_,t[22]=y,t[23]=B,t[24]=U}else U=t[24];return U}function Y(e){return e.entries.length>0}function X(e){let t=(0,F.c)(96),{rule:n,value:a,modified:f,ready:p,onWrite:m}=e,{_:h}=i(),g;t[0]===a?g=t[1]:(g=ue(a),t[0]=a,t[1]=g);let _=g,v;t[2]===a?v=t[3]:(v=ce(a),t[2]=a,t[3]=v);let b=v,S,w,T,D,O,k,A;if(t[4]!==n.id||t[5]!==n.name||t[6]!==a){w=de(a),S=d,A=`markdownlint-rule-row-${n.id}`,O=`flex items-center justify-between gap-3 px-3 py-2`;let e=`markdownlint-rule-expand-${n.id}`,i;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,L.jsx)(te,{className:`size-4 shrink-0 text-muted-foreground transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`}),t[14]=i):i=t[14];let o;t[15]===n.name?o=t[16]:(o=(0,L.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm text-foreground`,children:n.name}),t[15]=n.name,t[16]=o),t[17]!==o||t[18]!==e?(k=(0,L.jsxs)(u,{className:`group flex min-w-0 flex-1 items-center gap-1.5 rounded-md py-0.5 text-left hover:bg-muted/50`,"data-testid":e,children:[i,o]}),t[17]=o,t[18]=e,t[19]=k):k=t[19],T=`flex shrink-0 items-center gap-2`,D=w.length>0?(0,L.jsx)(`span`,{id:`settings-linting-markdownlint-options-${n.id}`,className:`text-xs text-muted-foreground`,title:w.join(`, `),"data-testid":`settings-linting-markdownlint-options-${n.id}`,children:(0,L.jsx)(r,{id:`G-h6qN`,values:{0:w.length}})}):null,t[4]=n.id,t[5]=n.name,t[6]=a,t[7]=S,t[8]=w,t[9]=T,t[10]=D,t[11]=O,t[12]=k,t[13]=A}else S=t[7],w=t[8],T=t[9],D=t[10],O=t[11],k=t[12],A=t[13];let j;t[20]!==n.id||t[21]!==b?(j=b===null?null:(0,L.jsx)(C,{variant:`gray`,"data-testid":`markdownlint-rule-severity-${n.id}`,children:b}),t[20]=n.id,t[21]=b,t[22]=j):j=t[22];let M;t[23]!==f||t[24]!==n.id?(M=f?(0,L.jsx)(C,{variant:`outline`,"data-testid":`markdownlint-rule-modified-${n.id}`,children:(0,L.jsx)(r,{id:`tgWuMB`})}):null,t[23]=f,t[24]=n.id,t[25]=M):M=t[25];let N;t[26]!==h||t[27]!==f||t[28]!==m||t[29]!==p||t[30]!==n.id?(N=f?(0,L.jsxs)(c,{children:[(0,L.jsx)(o,{asChild:!0,children:(0,L.jsx)(ee,{variant:`ghost`,size:`icon`,className:`h-5 w-5 shrink-0 text-muted-foreground opacity-60 hover:opacity-100`,disabled:!p,"aria-label":h({id:`50ORFs`,values:{0:n.id}}),onClick:()=>m(null),children:(0,L.jsx)(ne,{className:`size-3.5`})})}),(0,L.jsx)(s,{children:(0,L.jsx)(r,{id:`L-rMC9`})})]}):null,t[26]=h,t[27]=f,t[28]=m,t[29]=p,t[30]=n.id,t[31]=N):N=t[31];let re=`markdownlint-rule-toggle-${n.id}`,P=!p,I;t[32]!==h||t[33]!==_||t[34]!==n.name?(I=h(_?{id:`y5UgU8`,values:{0:n.name}}:{id:`FZtBeR`,values:{0:n.name}}),t[32]=h,t[33]=_,t[34]=n.name,t[35]=I):I=t[35];let R=w.length>0?`settings-linting-markdownlint-options-${n.id}`:void 0,z;t[36]!==m||t[37]!==a?(z=e=>m(fe(a,e)),t[36]=m,t[37]=a,t[38]=z):z=t[38];let B=`markdownlint-rule-toggle-${n.id}`,V;t[39]!==_||t[40]!==re||t[41]!==P||t[42]!==I||t[43]!==R||t[44]!==z||t[45]!==B?(V=(0,L.jsx)(y,{id:re,checked:_,disabled:P,"aria-label":I,"aria-describedby":R,onCheckedChange:z,"data-testid":B}),t[39]=_,t[40]=re,t[41]=P,t[42]=I,t[43]=R,t[44]=z,t[45]=B,t[46]=V):V=t[46];let H;t[47]!==N||t[48]!==V||t[49]!==T||t[50]!==D||t[51]!==j||t[52]!==M?(H=(0,L.jsxs)(`div`,{className:T,children:[D,j,M,N,V]}),t[47]=N,t[48]=V,t[49]=T,t[50]=D,t[51]=j,t[52]=M,t[53]=H):H=t[53];let U;t[54]!==H||t[55]!==O||t[56]!==k?(U=(0,L.jsxs)(`div`,{className:O,children:[k,H]}),t[54]=H,t[55]=O,t[56]=k,t[57]=U):U=t[57];let W;t[58]!==n.alias||t[59]!==n.id?(W=(0,L.jsxs)(`span`,{className:`font-mono`,children:[n.id,` · `,n.alias]}),t[58]=n.alias,t[59]=n.id,t[60]=W):W=t[60];let ae=n.docUrl,G,K;t[61]===n.docUrl?(G=t[62],K=t[63]):(G=e=>E(e,n.docUrl),K=e=>E(e,n.docUrl),t[61]=n.docUrl,t[62]=G,t[63]=K);let q;t[64]!==h||t[65]!==n.id?(q=h({id:`iv452l`,values:{0:n.id}}),t[64]=h,t[65]=n.id,t[66]=q):q=t[66];let J,oe;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,L.jsx)(r,{id:`TvY_XA`}),oe=(0,L.jsx)(x,{"aria-hidden":!0,className:`size-3`}),t[67]=J,t[68]=oe):(J=t[67],oe=t[68]);let Y;t[69]!==n.docUrl||t[70]!==G||t[71]!==K||t[72]!==q?(Y=(0,L.jsxs)(`a`,{href:ae,target:`_blank`,rel:`noopener noreferrer`,onClick:G,onAuxClick:K,"aria-label":q,className:`inline-flex items-center gap-0.5 text-muted-foreground underline-offset-2 hover:text-foreground hover:underline`,children:[J,oe]}),t[69]=n.docUrl,t[70]=G,t[71]=K,t[72]=q,t[73]=Y):Y=t[73];let X;t[74]!==W||t[75]!==Y?(X=(0,L.jsxs)(`p`,{className:`text-1sm text-muted-foreground`,children:[W,` · `,Y]}),t[74]=W,t[75]=Y,t[76]=X):X=t[76];let Z;if(t[77]!==m||t[78]!==p||t[79]!==n.id||t[80]!==n.options||t[81]!==a){let e;t[83]!==m||t[84]!==p||t[85]!==n.id||t[86]!==a?(e=e=>(0,L.jsx)(ie,{ruleId:n.id,spec:e,value:me(a,e.key),disabled:!p,onChange:t=>m(pe(a,e.key,t))},e.key),t[83]=m,t[84]=p,t[85]=n.id,t[86]=a,t[87]=e):e=t[87],Z=n.options.map(e),t[77]=m,t[78]=p,t[79]=n.id,t[80]=n.options,t[81]=a,t[82]=Z}else Z=t[82];let Q;t[88]!==X||t[89]!==Z?(Q=(0,L.jsx)(l,{className:`overflow-hidden data-[state=open]:animate-[collapsible-down_150ms_ease-out] data-[state=closed]:animate-[collapsible-up_150ms_ease-in]`,children:(0,L.jsxs)(`div`,{className:`space-y-3 px-3 pb-3 pt-1`,children:[X,Z]})}),t[88]=X,t[89]=Z,t[90]=Q):Q=t[90];let $;return t[91]!==S||t[92]!==U||t[93]!==Q||t[94]!==A?($=(0,L.jsxs)(S,{"data-testid":A,children:[U,Q]}),t[91]=S,t[92]=U,t[93]=Q,t[94]=A,t[95]=$):$=t[95],$}function Z(e){let t=(0,F.c)(6),{category:n}=e;switch(n){case`Headings`:{let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`PKjGhT`}),t[0]=e):e=t[0],e}case`Lists`:{let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`h16FyT`}),t[1]=e):e=t[1],e}case`Whitespace`:{let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`iIaSUD`}),t[2]=e):e=t[2],e}case`Code`:{let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`EWPtMO`}),t[3]=e):e=t[3],e}case`Links & images`:{let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`-kbIAr`}),t[4]=e):e=t[4],e}case`Style`:{let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`1CalO6`}),t[5]=e):e=t[5],e}default:return n}}function Q(e){return e.toLowerCase().replace(/[^a-z]+/g,`-`).replace(/^-|-$/g,``)}function $(e,t){let n=D(e,t);return n===void 0?e.default??!0:n.value}function se(e,t,n){return t!==null&&D(e,n)!==void 0}function ce(e){return typeof e==`string`?e:null}function le(e,t){let n=t.trim().toLowerCase();return n===``?!0:e.id.toLowerCase().includes(n)||e.alias.toLowerCase().includes(n)||e.name.toLowerCase().includes(n)}function ue(e){return typeof e!=`object`||!e?e!==!1:e.enabled!==!1}function de(e){return typeof e!=`object`||!e?[]:Object.keys(e).filter(e=>e!==`enabled`)}function fe(e,t){if(typeof e!=`object`||!e)return t;let n={};for(let t of Object.keys(e))t!==`enabled`&&(n[t]=e[t]);return Object.keys(n).length===0?t:t?n:{...n,enabled:!1}}function pe(e,t,n){return typeof e==`object`&&e?{...e,[t]:n}:e===!1?{enabled:!1,[t]:n}:{[t]:n}}function me(e,t){if(!(typeof e!=`object`||!e))return e[t]}export{oe as t};
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{i as o,n as s,t as c}from"./tooltip-DBqLYfio.js";import{n as l,r as u,t as d}from"./collapsible-BKbszYZV.js";import{t as f}from"./checkbox-CKD8LETI.js";import{t as p}from"./label-CvMpFFbN.js";import{i as m,n as h,o as g,s as _,t as v}from"./select-Bu4Wm3Rf.js";import{t as y}from"./switch-BKZTXkzu.js";import{t as ee}from"./button-DzgjsZzC.js";import{n as b}from"./dist-BGzUo_18.js";import{t as x}from"./arrow-up-right-nJaICi16.js";import{t as te}from"./chevron-right-Bofu4lib.js";import{t as S}from"./info-CyR0W2SK.js";import{t as ne}from"./rotate-ccw-Zi1IjIg9.js";import{t as C}from"./badge-DmdA1C7r.js";import{r as w}from"./field-DFJgKWGh.js";import{t as T}from"./input-C-Qm8YDT.js";import{t as E}from"./external-link-CldCnbtR.js";import{_ as D,g as O,l as k,o as A}from"./markdown-lint-CBp7xF-c.js";import{t as j}from"./skeleton-C73NNmDC.js";import{d as M,p as N,r as re}from"./lint-config-client-BuUP6NLf.js";import{t as P}from"./tag-pill-input-pJw3xLYa.js";var F=a(),I=e(n(),1),L=t(),R={};function ie(e){let t=(0,F.c)(5),n=R[e.ruleId];if(n!==void 0){let r;return t[0]!==n||t[1]!==e?(r=(0,L.jsx)(n,{...e}),t[0]=n,t[1]=e,t[2]=r):r=t[2],r}let r;return t[3]===e?r=t[4]:(r=(0,L.jsx)(z,{...e}),t[3]=e,t[4]=r),r}function z(e){let t=(0,F.c)(65),{ruleId:n,spec:i,value:a,disabled:o,onChange:s}=e,c=`rule-option-${n}-${i.key}`,l=`${c}-description`,u;t[0]!==c||t[1]!==i.key||t[2]!==i.type?(u=i.type===`unsupported`?(0,L.jsx)(`span`,{className:`font-mono text-sm font-medium`,children:i.key}):(0,L.jsx)(p,{htmlFor:c,className:`font-mono text-sm font-medium`,children:i.key}),t[0]=c,t[1]=i.key,t[2]=i.type,t[3]=u):u=t[3];let d;t[4]===i.default?d=t[5]:(d=i.default===void 0?null:(0,L.jsxs)(L.Fragment,{children:[` · `,(0,L.jsx)(r,{id:`KtACeE`,values:{0:H(i.default)},components:{0:(0,L.jsx)(`code`,{className:`font-mono`})}})]}),t[4]=i.default,t[5]=d);let f;t[6]!==l||t[7]!==i.description||t[8]!==d?(f=(0,L.jsxs)(w,{id:l,children:[i.description,d]}),t[6]=l,t[7]=i.description,t[8]=d,t[9]=f):f=t[9];let m;t[10]!==u||t[11]!==f?(m=(0,L.jsxs)(`div`,{className:`min-w-0 space-y-0.5`,children:[u,f]}),t[10]=u,t[11]=f,t[12]=m):m=t[12];let h=m,g=o===!0,_;t[13]!==c||t[14]!==l||t[15]!==s||t[16]!==g?(_={controlId:c,descriptionId:l,disabled:g,onChange:s},t[13]=c,t[14]=l,t[15]=s,t[16]=g,t[17]=_):_=t[17];let v=_;switch(i.type){case`boolean`:{let e;t[18]!==v||t[19]!==i||t[20]!==a?(e=(0,L.jsx)(U,{...v,spec:i,value:a}),t[18]=v,t[19]=i,t[20]=a,t[21]=e):e=t[21];let n;return t[22]!==c||t[23]!==h||t[24]!==e?(n=(0,L.jsx)(B,{testId:c,header:h,children:e}),t[22]=c,t[23]=h,t[24]=e,t[25]=n):n=t[25],n}case`enum`:{let e;t[26]!==v||t[27]!==i||t[28]!==a?(e=(0,L.jsx)(W,{...v,spec:i,value:a}),t[26]=v,t[27]=i,t[28]=a,t[29]=e):e=t[29];let n;return t[30]!==c||t[31]!==h||t[32]!==e?(n=(0,L.jsx)(B,{testId:c,header:h,children:e}),t[30]=c,t[31]=h,t[32]=e,t[33]=n):n=t[33],n}case`integer`:{let e;t[34]!==v||t[35]!==i||t[36]!==a?(e=(0,L.jsx)(G,{...v,spec:i,value:a}),t[34]=v,t[35]=i,t[36]=a,t[37]=e):e=t[37];let n;return t[38]!==c||t[39]!==h||t[40]!==e?(n=(0,L.jsx)(B,{testId:c,header:h,children:e}),t[38]=c,t[39]=h,t[40]=e,t[41]=n):n=t[41],n}case`string`:{let e;t[42]!==v||t[43]!==i||t[44]!==a?(e=(0,L.jsx)(K,{...v,spec:i,value:a}),t[42]=v,t[43]=i,t[44]=a,t[45]=e):e=t[45];let n;return t[46]!==c||t[47]!==h||t[48]!==e?(n=(0,L.jsx)(V,{testId:c,header:h,children:e}),t[46]=c,t[47]=h,t[48]=e,t[49]=n):n=t[49],n}case`string-array`:{let e;t[50]!==v||t[51]!==i||t[52]!==a?(e=(0,L.jsx)(q,{...v,spec:i,value:a}),t[50]=v,t[51]=i,t[52]=a,t[53]=e):e=t[53];let n;return t[54]!==c||t[55]!==h||t[56]!==e?(n=(0,L.jsx)(V,{testId:c,header:h,children:e}),t[54]=c,t[55]=h,t[56]=e,t[57]=n):n=t[57],n}case`unsupported`:{let e=`${c}-unsupported`,n;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,L.jsx)(r,{id:`NQXwDy`}),t[58]=n):n=t[58];let i;t[59]===e?i=t[60]:(i=(0,L.jsx)(C,{variant:`gray`,"data-testid":e,children:n}),t[59]=e,t[60]=i);let a;return t[61]!==c||t[62]!==h||t[63]!==i?(a=(0,L.jsx)(B,{testId:c,header:h,children:i}),t[61]=c,t[62]=h,t[63]=i,t[64]=a):a=t[64],a}default:return i}}function B(e){let t=(0,F.c)(6),{testId:n,header:r,children:i}=e,a;t[0]===i?a=t[1]:(a=(0,L.jsx)(`div`,{className:`shrink-0`,children:i}),t[0]=i,t[1]=a);let o;return t[2]!==r||t[3]!==a||t[4]!==n?(o=(0,L.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,"data-testid":n,children:[r,a]}),t[2]=r,t[3]=a,t[4]=n,t[5]=o):o=t[5],o}function V(e){let t=(0,F.c)(4),{testId:n,header:r,children:i}=e,a;return t[0]!==i||t[1]!==r||t[2]!==n?(a=(0,L.jsxs)(`div`,{className:`space-y-1.5`,"data-testid":n,children:[r,i]}),t[0]=i,t[1]=r,t[2]=n,t[3]=a):a=t[3],a}function H(e){return JSON.stringify(e)}function U(e){let t=(0,F.c)(8),{spec:n,value:r,controlId:i,descriptionId:a,disabled:o,onChange:s}=e,c=typeof r==`boolean`?r:n.default??!1,l;t[0]===s?l=t[1]:(l=e=>s(e),t[0]=s,t[1]=l);let u;return t[2]!==c||t[3]!==i||t[4]!==a||t[5]!==o||t[6]!==l?(u=(0,L.jsx)(y,{id:i,checked:c,disabled:o,"aria-describedby":a,onCheckedChange:l}),t[2]=c,t[3]=i,t[4]=a,t[5]=o,t[6]=l,t[7]=u):u=t[7],u}function W(e){let t=(0,F.c)(16),{spec:n,value:r,controlId:i,descriptionId:a,disabled:o,onChange:s}=e,c=typeof r==`string`?r:n.default??``,l;t[0]===s?l=t[1]:(l=e=>s(e),t[0]=s,t[1]=l);let u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,L.jsx)(_,{}),t[2]=u):u=t[2];let d;t[3]!==i||t[4]!==a?(d=(0,L.jsx)(g,{id:i,"aria-describedby":a,className:`w-48`,children:u}),t[3]=i,t[4]=a,t[5]=d):d=t[5];let f;t[6]===n.enum?f=t[7]:(f=n.enum.map(ae),t[6]=n.enum,t[7]=f);let p;t[8]===f?p=t[9]:(p=(0,L.jsx)(h,{children:f}),t[8]=f,t[9]=p);let m;return t[10]!==c||t[11]!==o||t[12]!==l||t[13]!==d||t[14]!==p?(m=(0,L.jsxs)(v,{value:c,onValueChange:l,disabled:o,children:[d,p]}),t[10]=c,t[11]=o,t[12]=l,t[13]=d,t[14]=p,t[15]=m):m=t[15],m}function ae(e){return(0,L.jsx)(m,{value:e,children:e},e)}function G(e){let t=(0,F.c)(22),{spec:n,value:r,controlId:i,descriptionId:a,disabled:o,onChange:s}=e,c=typeof r==`number`?r:n.default,l=c===void 0?``:String(c),[u,d]=(0,I.useState)(l),f=(0,I.useRef)(c),p,m;t[0]===c?(p=t[1],m=t[2]):(p=()=>{f.current!==c&&(d(c===void 0?``:String(c)),f.current=c)},m=[c],t[0]=c,t[1]=p,t[2]=m),(0,I.useEffect)(p,m);let h;t[3]!==c||t[4]!==l||t[5]!==s||t[6]!==u||t[7]!==n.maximum||t[8]!==n.minimum?(h=()=>{if(u.trim()===``){d(l);return}let e=Number(u);if(!Number.isFinite(e)){d(l);return}let t=Math.round(e);n.minimum!==void 0&&t<n.minimum&&(t=n.minimum),n.maximum!==void 0&&t>n.maximum&&(t=n.maximum),d(String(t)),t!==c&&s(t)},t[3]=c,t[4]=l,t[5]=s,t[6]=u,t[7]=n.maximum,t[8]=n.minimum,t[9]=h):h=t[9];let g=h,_;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>d(e.target.value),t[10]=_):_=t[10];let v;t[11]===g?v=t[12]:(v=e=>{e.key===`Enter`&&(e.preventDefault(),g())},t[11]=g,t[12]=v);let y;return t[13]!==g||t[14]!==i||t[15]!==a||t[16]!==o||t[17]!==u||t[18]!==n.maximum||t[19]!==n.minimum||t[20]!==v?(y=(0,L.jsx)(T,{id:i,type:`number`,value:u,min:n.minimum,max:n.maximum,disabled:o,"aria-describedby":a,onChange:_,onBlur:g,onKeyDown:v,className:`h-8 w-28 text-sm tabular-nums`}),t[13]=g,t[14]=i,t[15]=a,t[16]=o,t[17]=u,t[18]=n.maximum,t[19]=n.minimum,t[20]=v,t[21]=y):y=t[21],y}function K(e){let t=(0,F.c)(17),{spec:n,value:r,controlId:i,descriptionId:a,disabled:o,onChange:s}=e,c=typeof r==`string`?r:n.default??``,[l,u]=(0,I.useState)(c),d=(0,I.useRef)(c),f,p;t[0]===c?(f=t[1],p=t[2]):(f=()=>{d.current!==c&&(u(c),d.current=c)},p=[c],t[0]=c,t[1]=f,t[2]=p),(0,I.useEffect)(f,p);let m;t[3]!==c||t[4]!==s||t[5]!==l?(m=()=>{l!==c&&s(l)},t[3]=c,t[4]=s,t[5]=l,t[6]=m):m=t[6];let h=m,g;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(g=e=>u(e.target.value),t[7]=g):g=t[7];let _;t[8]===h?_=t[9]:(_=e=>{e.key===`Enter`&&(e.preventDefault(),h())},t[8]=h,t[9]=_);let v;return t[10]!==h||t[11]!==i||t[12]!==a||t[13]!==o||t[14]!==l||t[15]!==_?(v=(0,L.jsx)(T,{id:i,value:l,disabled:o,"aria-describedby":a,onChange:g,onBlur:h,onKeyDown:_,className:`h-8 font-mono text-sm`}),t[10]=h,t[11]=i,t[12]=a,t[13]=o,t[14]=l,t[15]=_,t[16]=v):v=t[16],v}function q(e){let t=(0,F.c)(11),{spec:n,value:r,controlId:i,descriptionId:a,disabled:o,onChange:s}=e,c;t[0]!==n||t[1]!==r?(c=Array.isArray(r)?r.filter(J):[...n.default??[]],t[0]=n,t[1]=r,t[2]=c):c=t[2];let l=c,u;t[3]===s?u=t[4]:(u=e=>s(e),t[3]=s,t[4]=u);let d;return t[5]!==i||t[6]!==a||t[7]!==o||t[8]!==l||t[9]!==u?(d=(0,L.jsx)(P,{id:i,value:l,grammar:`free-text`,disabled:o,"aria-describedby":a,onChange:u}),t[5]=i,t[6]=a,t[7]=o,t[8]=l,t[9]=u,t[10]=d):d=t[10],d}function J(e){return typeof e==`string`}function oe(e){let t=(0,F.c)(53),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{hideConfigSourceNote:a,initialRuleQuery:o}=n,s=a===void 0?!1:a,{_:c}=i(),{data:m}=M(),h=m!==null,g;t[2]===m?.effective.plugins.markdownlint.rules?g=t[3]:(g=m?.effective.plugins.markdownlint.rules??{},t[2]=m?.effective.plugins.markdownlint.rules,t[3]=g);let _=g,v=m?.configFile??null,[y,ee]=(0,I.useState)(o?.query??``),[x,ne]=(0,I.useState)(!1),C=o?.nonce,w=o?.query,E,D;t[4]!==C||t[5]!==w?(E=()=>{C===void 0||w===void 0||ee(w)},D=[C,w],t[4]=C,t[5]=w,t[6]=E,t[7]=D):(E=t[6],D=t[7]),(0,I.useEffect)(E,D);let P;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(P=[],t[8]=P):P=t[8];let[R,ie]=(0,I.useState)(P),z;t[9]===c?z=t[10]:(z=function(e,t){N(e,t).then(e=>{if(!e.ok){b.error(e.errorDetail??c({id:`2G-56b`}));return}re()})},t[9]=c,t[10]=z);let B=z,V;t[11]!==x||t[12]!==y?(V=y.trim()!==``||x,t[11]=x,t[12]=y,t[13]=V):V=t[13];let H=V,U;if(t[14]!==c||t[15]!==R||t[16]!==v||t[17]!==H||t[18]!==s||t[19]!==x||t[20]!==h||t[21]!==_||t[22]!==y||t[23]!==B){let e;t[25]!==v||t[26]!==x||t[27]!==_||t[28]!==y?(e=e=>le(e,y)&&(!x||se(_,v,e.id)),t[25]=v,t[26]=x,t[27]=_,t[28]=y,t[29]=e):e=t[29];let n=A.filter(e),i=k.map(e=>({category:e,entries:n.filter(t=>O(t)===e)})).filter(Y),a;t[30]!==v||t[31]!==s||t[32]!==h?(a=!s&&(h?v?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`markdownlint-config-source-note`,children:(0,L.jsx)(r,{id:`V2Gmie`,values:{configFile:v},components:{0:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})}):(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,L.jsx)(r,{id:`Z6rrjc`,components:{0:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})}),(0,L.jsxs)(`p`,{className:`flex items-start gap-1.5 rounded-md border border-dashed p-2.5 text-sm text-muted-foreground`,"data-testid":`markdownlint-no-file-disclaimer`,children:[(0,L.jsx)(S,{"aria-hidden":!0,className:`mt-0.5 size-4 shrink-0`}),(0,L.jsx)(`span`,{children:(0,L.jsx)(r,{id:`Te6sK2`,components:{0:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})})]})]}):(0,L.jsxs)(`div`,{className:`space-y-2`,"aria-busy":`true`,"data-testid":`markdownlint-rule-browser-config-loading`,children:[(0,L.jsx)(j,{className:`h-4 w-full`}),(0,L.jsx)(j,{className:`h-4 w-2/3`})]})),t[30]=v,t[31]=s,t[32]=h,t[33]=a):a=t[33];let o;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`markdownlint-rule-browser-legend`,children:(0,L.jsx)(r,{id:`zYp8Sr`,components:{0:(0,L.jsx)(`span`,{className:`font-medium text-foreground`}),1:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})}),t[34]=o):o=t[34];let m;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(m=e=>ee(e.target.value),t[35]=m):m=t[35];let g;t[36]===c?g=t[37]:(g=c({id:`l-4nnw`}),t[36]=c,t[37]=g);let b;t[38]===c?b=t[39]:(b=c({id:`yf5auF`}),t[38]=c,t[39]=b);let C;t[40]!==y||t[41]!==g||t[42]!==b?(C=(0,L.jsx)(T,{value:y,onChange:m,placeholder:g,"aria-label":b,className:`h-8`,"data-testid":`markdownlint-rule-search`}),t[40]=y,t[41]=g,t[42]=b,t[43]=C):C=t[43];let w;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>ne(e===!0),t[44]=w):w=t[44];let E;t[45]===x?E=t[46]:(E=(0,L.jsx)(f,{id:`markdownlint-only-modified`,checked:x,onCheckedChange:w,"data-testid":`markdownlint-only-modified`}),t[45]=x,t[46]=E);let D;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,L.jsx)(p,{htmlFor:`markdownlint-only-modified`,className:`text-sm font-normal`,children:(0,L.jsx)(r,{id:`ccNps_`})}),t[47]=D):D=t[47];let M;t[48]===E?M=t[49]:(M=(0,L.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[E,D]}),t[48]=E,t[49]=M);let N;t[50]!==C||t[51]!==M?(N=(0,L.jsxs)(`div`,{className:`flex items-center gap-4`,children:[C,M]}),t[50]=C,t[51]=M,t[52]=N):N=t[52],U=(0,L.jsxs)(`div`,{className:`space-y-3`,"data-testid":`settings-linting-markdownlint-rules`,children:[a,o,N,i.length===0?(0,L.jsx)(`p`,{className:`rounded-md border border-dashed p-3 text-sm text-muted-foreground`,"data-testid":`markdownlint-rule-browser-empty`,children:(0,L.jsx)(r,{id:`RfilGt`})}):(0,L.jsx)(`div`,{className:`space-y-2`,children:i.map(e=>{let{category:t,entries:n}=e,i=n.filter(e=>ue($(_,e.id))).length;return(0,L.jsxs)(d,{open:H||!R.includes(t),onOpenChange:e=>ie(e?R.filter(e=>e!==t):[...R,t]),children:[(0,L.jsxs)(u,{className:`group flex w-full items-center gap-2 rounded-md px-1.5 py-1.5 text-sm font-medium hover:bg-muted/50`,"data-testid":`markdownlint-rule-category-${Q(t)}`,children:[(0,L.jsx)(te,{className:`size-4 shrink-0 text-muted-foreground transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`}),(0,L.jsx)(Z,{category:t}),(0,L.jsx)(`span`,{className:`ms-auto text-xs font-normal text-muted-foreground tabular-nums`,children:(0,L.jsx)(r,{id:`NgZwB0`,values:{0:n.length,enabledCount:i}})})]}),(0,L.jsx)(l,{children:(0,L.jsx)(`div`,{className:`mt-1 divide-y rounded-md border`,children:n.map(e=>(0,L.jsx)(X,{rule:e,value:$(_,e.id),modified:se(_,v,e.id),ready:h,onWrite:t=>B(e.id,t)},e.id))})})]},t)})})]}),t[14]=c,t[15]=R,t[16]=v,t[17]=H,t[18]=s,t[19]=x,t[20]=h,t[21]=_,t[22]=y,t[23]=B,t[24]=U}else U=t[24];return U}function Y(e){return e.entries.length>0}function X(e){let t=(0,F.c)(96),{rule:n,value:a,modified:f,ready:p,onWrite:m}=e,{_:h}=i(),g;t[0]===a?g=t[1]:(g=ue(a),t[0]=a,t[1]=g);let _=g,v;t[2]===a?v=t[3]:(v=ce(a),t[2]=a,t[3]=v);let b=v,S,w,T,D,O,k,A;if(t[4]!==n.id||t[5]!==n.name||t[6]!==a){w=de(a),S=d,A=`markdownlint-rule-row-${n.id}`,O=`flex items-center justify-between gap-3 px-3 py-2`;let e=`markdownlint-rule-expand-${n.id}`,i;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,L.jsx)(te,{className:`size-4 shrink-0 text-muted-foreground transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`}),t[14]=i):i=t[14];let o;t[15]===n.name?o=t[16]:(o=(0,L.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm text-foreground`,children:n.name}),t[15]=n.name,t[16]=o),t[17]!==o||t[18]!==e?(k=(0,L.jsxs)(u,{className:`group flex min-w-0 flex-1 items-center gap-1.5 rounded-md py-0.5 text-left hover:bg-muted/50`,"data-testid":e,children:[i,o]}),t[17]=o,t[18]=e,t[19]=k):k=t[19],T=`flex shrink-0 items-center gap-2`,D=w.length>0?(0,L.jsx)(`span`,{id:`settings-linting-markdownlint-options-${n.id}`,className:`text-xs text-muted-foreground`,title:w.join(`, `),"data-testid":`settings-linting-markdownlint-options-${n.id}`,children:(0,L.jsx)(r,{id:`G-h6qN`,values:{0:w.length}})}):null,t[4]=n.id,t[5]=n.name,t[6]=a,t[7]=S,t[8]=w,t[9]=T,t[10]=D,t[11]=O,t[12]=k,t[13]=A}else S=t[7],w=t[8],T=t[9],D=t[10],O=t[11],k=t[12],A=t[13];let j;t[20]!==n.id||t[21]!==b?(j=b===null?null:(0,L.jsx)(C,{variant:`gray`,"data-testid":`markdownlint-rule-severity-${n.id}`,children:b}),t[20]=n.id,t[21]=b,t[22]=j):j=t[22];let M;t[23]!==f||t[24]!==n.id?(M=f?(0,L.jsx)(C,{variant:`outline`,"data-testid":`markdownlint-rule-modified-${n.id}`,children:(0,L.jsx)(r,{id:`tgWuMB`})}):null,t[23]=f,t[24]=n.id,t[25]=M):M=t[25];let N;t[26]!==h||t[27]!==f||t[28]!==m||t[29]!==p||t[30]!==n.id?(N=f?(0,L.jsxs)(c,{children:[(0,L.jsx)(o,{asChild:!0,children:(0,L.jsx)(ee,{variant:`ghost`,size:`icon`,className:`h-5 w-5 shrink-0 text-muted-foreground opacity-60 hover:opacity-100`,disabled:!p,"aria-label":h({id:`50ORFs`,values:{0:n.id}}),onClick:()=>m(null),children:(0,L.jsx)(ne,{className:`size-3.5`})})}),(0,L.jsx)(s,{children:(0,L.jsx)(r,{id:`L-rMC9`})})]}):null,t[26]=h,t[27]=f,t[28]=m,t[29]=p,t[30]=n.id,t[31]=N):N=t[31];let re=`markdownlint-rule-toggle-${n.id}`,P=!p,I;t[32]!==h||t[33]!==_||t[34]!==n.name?(I=h(_?{id:`y5UgU8`,values:{0:n.name}}:{id:`FZtBeR`,values:{0:n.name}}),t[32]=h,t[33]=_,t[34]=n.name,t[35]=I):I=t[35];let R=w.length>0?`settings-linting-markdownlint-options-${n.id}`:void 0,z;t[36]!==m||t[37]!==a?(z=e=>m(fe(a,e)),t[36]=m,t[37]=a,t[38]=z):z=t[38];let B=`markdownlint-rule-toggle-${n.id}`,V;t[39]!==_||t[40]!==re||t[41]!==P||t[42]!==I||t[43]!==R||t[44]!==z||t[45]!==B?(V=(0,L.jsx)(y,{id:re,checked:_,disabled:P,"aria-label":I,"aria-describedby":R,onCheckedChange:z,"data-testid":B}),t[39]=_,t[40]=re,t[41]=P,t[42]=I,t[43]=R,t[44]=z,t[45]=B,t[46]=V):V=t[46];let H;t[47]!==N||t[48]!==V||t[49]!==T||t[50]!==D||t[51]!==j||t[52]!==M?(H=(0,L.jsxs)(`div`,{className:T,children:[D,j,M,N,V]}),t[47]=N,t[48]=V,t[49]=T,t[50]=D,t[51]=j,t[52]=M,t[53]=H):H=t[53];let U;t[54]!==H||t[55]!==O||t[56]!==k?(U=(0,L.jsxs)(`div`,{className:O,children:[k,H]}),t[54]=H,t[55]=O,t[56]=k,t[57]=U):U=t[57];let W;t[58]!==n.alias||t[59]!==n.id?(W=(0,L.jsxs)(`span`,{className:`font-mono`,children:[n.id,` · `,n.alias]}),t[58]=n.alias,t[59]=n.id,t[60]=W):W=t[60];let ae=n.docUrl,G,K;t[61]===n.docUrl?(G=t[62],K=t[63]):(G=e=>E(e,n.docUrl),K=e=>E(e,n.docUrl),t[61]=n.docUrl,t[62]=G,t[63]=K);let q;t[64]!==h||t[65]!==n.id?(q=h({id:`iv452l`,values:{0:n.id}}),t[64]=h,t[65]=n.id,t[66]=q):q=t[66];let J,oe;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,L.jsx)(r,{id:`TvY_XA`}),oe=(0,L.jsx)(x,{"aria-hidden":!0,className:`size-3`}),t[67]=J,t[68]=oe):(J=t[67],oe=t[68]);let Y;t[69]!==n.docUrl||t[70]!==G||t[71]!==K||t[72]!==q?(Y=(0,L.jsxs)(`a`,{href:ae,target:`_blank`,rel:`noopener noreferrer`,onClick:G,onAuxClick:K,"aria-label":q,className:`inline-flex items-center gap-0.5 text-muted-foreground underline-offset-2 hover:text-foreground hover:underline`,children:[J,oe]}),t[69]=n.docUrl,t[70]=G,t[71]=K,t[72]=q,t[73]=Y):Y=t[73];let X;t[74]!==W||t[75]!==Y?(X=(0,L.jsxs)(`p`,{className:`text-1sm text-muted-foreground`,children:[W,` · `,Y]}),t[74]=W,t[75]=Y,t[76]=X):X=t[76];let Z;if(t[77]!==m||t[78]!==p||t[79]!==n.id||t[80]!==n.options||t[81]!==a){let e;t[83]!==m||t[84]!==p||t[85]!==n.id||t[86]!==a?(e=e=>(0,L.jsx)(ie,{ruleId:n.id,spec:e,value:me(a,e.key),disabled:!p,onChange:t=>m(pe(a,e.key,t))},e.key),t[83]=m,t[84]=p,t[85]=n.id,t[86]=a,t[87]=e):e=t[87],Z=n.options.map(e),t[77]=m,t[78]=p,t[79]=n.id,t[80]=n.options,t[81]=a,t[82]=Z}else Z=t[82];let Q;t[88]!==X||t[89]!==Z?(Q=(0,L.jsx)(l,{className:`overflow-hidden data-[state=open]:animate-[collapsible-down_150ms_ease-out] data-[state=closed]:animate-[collapsible-up_150ms_ease-in]`,children:(0,L.jsxs)(`div`,{className:`space-y-3 px-3 pb-3 pt-1`,children:[X,Z]})}),t[88]=X,t[89]=Z,t[90]=Q):Q=t[90];let $;return t[91]!==S||t[92]!==U||t[93]!==Q||t[94]!==A?($=(0,L.jsxs)(S,{"data-testid":A,children:[U,Q]}),t[91]=S,t[92]=U,t[93]=Q,t[94]=A,t[95]=$):$=t[95],$}function Z(e){let t=(0,F.c)(6),{category:n}=e;switch(n){case`Headings`:{let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`PKjGhT`}),t[0]=e):e=t[0],e}case`Lists`:{let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`h16FyT`}),t[1]=e):e=t[1],e}case`Whitespace`:{let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`iIaSUD`}),t[2]=e):e=t[2],e}case`Code`:{let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`EWPtMO`}),t[3]=e):e=t[3],e}case`Links & images`:{let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`-kbIAr`}),t[4]=e):e=t[4],e}case`Style`:{let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(r,{id:`1CalO6`}),t[5]=e):e=t[5],e}default:return n}}function Q(e){return e.toLowerCase().replace(/[^a-z]+/g,`-`).replace(/^-|-$/g,``)}function $(e,t){let n=D(e,t);return n===void 0?e.default??!0:n.value}function se(e,t,n){return t!==null&&D(e,n)!==void 0}function ce(e){return typeof e==`string`?e:null}function le(e,t){let n=t.trim().toLowerCase();return n===``?!0:e.id.toLowerCase().includes(n)||e.alias.toLowerCase().includes(n)||e.name.toLowerCase().includes(n)}function ue(e){return typeof e!=`object`||!e?e!==!1:e.enabled!==!1}function de(e){return typeof e!=`object`||!e?[]:Object.keys(e).filter(e=>e!==`enabled`)}function fe(e,t){if(typeof e!=`object`||!e)return t;let n={};for(let t of Object.keys(e))t!==`enabled`&&(n[t]=e[t]);return Object.keys(n).length===0?t:t?n:{...n,enabled:!1}}function pe(e,t,n){return typeof e==`object`&&e?{...e,[t]:n}:e===!1?{enabled:!1,[t]:n}:{[t]:n}}function me(e,t){if(!(typeof e!=`object`||!e))return e[t]}export{oe as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as e,h as t,p as n,y as r}from"./constants-upload-CVKO8P4d.js";import{C as i,S as a,_ as o,b as s,d as c,g as l,h as u,m as d,v as f,w as p,x as m,y as h}from"./constants-cc1-Bt4QPTUe.js";import{t as g}from"./doc-extensions-CcO7K8uD-DG9uHV54.js";import{r as _}from"./doc-paths-cEiFVCxr.js";import{o as v,r as y}from"./file-tree-utils-BPUSn1l0.js";var b=524288;function x(e,t=b){return typeof e==`number`&&Number.isFinite(e)&&e>t}var ee=10485760,te=/(^|\P{M})(\p{M}+)/gu,ne=/^(?![\p{Script_Extensions=Latin}\p{Script_Extensions=Greek}\p{Script_Extensions=Cyrillic}\p{Script_Extensions=Arabic}\p{Script_Extensions=Hebrew}])\p{L}$/u,re=/\p{DI}/gu,ie=/[^\p{L}\p{M}\p{N}]+/gu,ae=/^-+|-+$/g;function oe(e,t,n){return ne.test(t)?t+n.replace(re,``):t}function S(e){return e.trim().normalize(`NFKD`).replace(te,oe).normalize(`NFC`).toLowerCase().replace(ie,`-`).replace(ae,``)}function se(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function ce(e,t){let n=S(e);return n?se(n,t):``}function le(e,t){let n=S(e);return t?`#${n}-${S(t)}`:`#${n}`}var ue={document:{unicode:`NFC`,case:`sensitive`},folder:{unicode:`NFC`,case:`sensitive`},file:{unicode:`NFC`,case:`insensitive`}};function C(e,t){let n=ue[e],r=t.normalize(n.unicode);return n.case===`insensitive`?r.toLowerCase():r}function w(e){return C(`file`,e)}function T(e,t){return e<t?-1:+(e>t)}function E(e,t){let n=t.split(`/`),r=n.length-1;return n.map((t,n)=>C(n===r?e:`folder`,t)).join(`/`)}var D=Symbol.for(`@inkeep/open-knowledge-core/target-namespace`),de=class extends Set{kind;[D]=!0;byKey=new Map;constructor(e,t){super(),this.kind=e;for(let e of t)this.add(e)}add(e){if(super.has(e))return this;super.add(e);let t=E(this.kind,e),n=this.byKey.get(t);if(n===void 0)return this.byKey.set(t,[e]),this;let r=0;for(;r<n.length&&T(n[r],e)<0;)r++;return n.splice(r,0,e),this}delete(e){if(!super.delete(e))return!1;let t=E(this.kind,e),n=this.byKey.get(t);return n===void 0?!0:(n.splice(n.indexOf(e),1),n.length===0&&this.byKey.delete(t),!0)}clear(){super.clear(),this.byKey.clear()}lookup(e){if(super.has(e))return{kind:`exact`,name:e};let t=this.byKey.get(E(this.kind,e));if(t===void 0)return{kind:`absent`};let n=t[0];return t.length===1?{kind:`equivalent`,name:n}:{kind:`ambiguous`,name:n,candidates:[...t]}}resolve(e){return super.has(e)?e:this.byKey.get(E(this.kind,e))?.[0]}};function O(e,t=[]){return new de(e,t)}function fe(e){return e[D]===!0}function k(e,t){return fe(e)?e.resolve(t):e.has(t)?t:void 0}function pe(e,t){let n=e;return n[D]===!0&&n.kind===t}function A(e,t){return pe(t,e)?t:O(e,t)}function j(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 me(e){return e===`.`||e===`..`?e:encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.codePointAt(0)?.toString(16).toUpperCase()}`)}function he(e){return e.split(`/`).map(me).join(`/`)}function M(e){return e.split(`/`).map(j).join(`/`)}function N(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(`#`),a=r>=0?n.slice(0,r):n,o=r>=0?n.slice(r+1):null,s=(a.split(`?`)[0]??``).trim();if(!s)return null;let c=j(s.split(`/`).pop()??``).match(/\.([a-z0-9]+)$/i);if(c){let e=`.${(c[1]??``).toLowerCase()}`;if(!g.includes(e))return null}let l=s.startsWith(`/`),u=l?s.slice(1):s,d=l?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[],f=u.split(`/`),p=f.length-1;for(let e=0;e<f.length;e++){let t=j(f[e]??``);if(e===p&&(t=i(t)),t===`..`){if(d.length===0)return null;d.pop()}else t!==`.`&&t!==``&&d.push(t)}return d.length===0?null:{docName:d.join(`/`),anchor:o||null}}function ge(e){throw Error(`Unhandled ClassifiedLinkTarget variant: ${JSON.stringify(e)}`)}var P=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function F(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function I(e){return e.split(`/`).filter(Boolean)}function L(e){let t=e.trim();return P.test(t)||t.startsWith(`//`)}function _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(L(n))return{kind:`external`,url:n};let r=n.indexOf(`#`),i=M(r<0?n:n.slice(0,r)),a=h(i,t);if(a)return{kind:`doc`,docName:a,anchor:r<0?null:n.slice(r+1)};let o=s(i,t);if(o)return{kind:`doc`,docName:o,anchor:r<0?null:n.slice(r+1)};let c=N(n,t);if(c)return{kind:`doc`,docName:c.docName,anchor:c.anchor};let l=F(i);return l&&l!==`md`&&l!==`mdx`?{kind:`asset`,url:n,ext:l,literal:!1}:null}function ve(e,t){let n=e.trim();if(!n)return null;if(L(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=F(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r,literal:!0}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function ye(e,t,n){let r=e.trim();if(!r||P.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:j(e));return c.length===0?null:c.join(`/`)}function be(e,t,n=null,r=`.md`){let i=I(e);i.pop();let a=I(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}`),`${he(l)}${r}${n?`#${n}`:``}`}function R(e){return`pagesBySlug`in e}function z(e){return R(e)?e.pages:e}function xe(e,t){return R(e)?e.assetPaths??new Set:t??new Set}function B(e,t){return R(e)?e.filePaths??new Set:t??new Set}function Se(e,t){let n=new Map;for(let r of e){let e=t(r),i=n.get(e);e&&(i===void 0||T(r,i)<0)&&n.set(e,r)}return n}function Ce(e,t){let n=new Map,r=[...e].sort(T);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 we(e,t){let n=S(e);if(!n)return;if(R(t))return t.pagesBySlug.get(n);let r;for(let e of t)S(e)===n&&(r===void 0||T(e,r)<0)&&(r=e);return r}function Te(e,t){if(e.includes(`/`))return;let n=S(e);if(!n)return;if(R(t))return t.pagesByBasename?.get(n);let r;for(let e of t){let t=e.lastIndexOf(`/`);S(t===-1?e:e.slice(t+1))===n&&(r===void 0||T(e,r)<0)&&(r=e)}return r}function V(e){let t=e.trim();if(!t)return[];let n=S(t);return n.length>0&&n!==t?[n]:[]}function H(e,t){let n=e.trim();if(!n)return;let r=k(z(t),n);if(r!==void 0)return r;let i=n.replace(/\.(md|mdx)$/i,``);if(i!==n){let e=U(i,t);if(e!==void 0)return e}return U(n,t)}function U(e,t){let n=e.trim();if(!n)return;let r=z(t),i=k(r,n);if(i!==void 0)return i;let a=we(n,t);if(a)return a;for(let e of V(n)){let t=k(r,e);if(t!==void 0)return t}return Ee(n,r)||Te(n,t)}function Ee(e,t){let n=k(t,`${e}/index`);if(n!==void 0)return n;let r=e.lastIndexOf(`/`),i=r===-1?e:e.slice(r+1);return i?k(t,`${e}/${i}`):void 0}function W(e){let t=((e.trim().split(`#`)[0]??``).trim().split(`?`)[0]??``).trim();return t.startsWith(`/`)?t.slice(1):t}function De(e){let t=new Map;for(let n of e){let e=w(n),r=t.get(e);(r===void 0||T(n,r)<0)&&t.set(e,n)}return t}function Oe(e){let t=A(`file`,e),n;return e=>{let r=t.resolve(e);return r===void 0?(n??=De(t),n.get(w(e))):r}}function G(e,t,n){let r=W(e);if(!r)return null;let i=n?[t,n]:[t];for(let e of i){let t=Oe(e)(r);if(t!==void 0)return t}if(r.includes(`/`))return null;let a=C(`file`,r),o=[];for(let e of i)for(let t of e){let e=t.lastIndexOf(`/`);C(`file`,e===-1?t:t.slice(e+1))===a&&o.push(t)}return o.length===0?null:o.sort(T)[0]??null}function ke(...e){let t=new Set;for(let n of e)for(let e of n)t.add(`path:${w(e)}`),t.add(`basename:${C(`file`,e.slice(e.lastIndexOf(`/`)+1))}`);return t}function Ae(e,t,n,r){let i=e.trim();if(!i)return!1;let a=W(i),o=R(t)?t.assetTargetKeys:void 0;if(o!==void 0){if(o.has(`path:${w(a)}`)||!a.includes(`/`)&&o.has(`basename:${C(`file`,a)}`))return!0}else if(G(i,xe(t,n),B(t,r)))return!0;return H(i,t)!==void 0}function je(e,t,n){let r=ve(e,t);return r===null||r.kind!==`asset`||G(r.url,xe(n),B(n))!==null||H(e,n)===void 0?r:{kind:`doc`,docName:e.trim(),anchor:t?.trim()||null}}function Me(e){return e.scope===`project`?i(K(e)):a(e.scope,e.name,e.hostQualifier)}function K(e){return e.canonicalPath??e.path}function Ne(e,t){return e.scope===`project`?`${K(e).replace(/\/SKILL\.mdx?$/i,``)}/${i(t)}`:m(e.scope,e.name,t,e.hostQualifier)}function q(e){let t=l(e);return t?.kind===`skill`?t.name:null}function J(e){let t=e.trim();return{normalizedTarget:t.replace(/^\.\/+/,``).replace(/^\/+/,``).replace(/\/+$/g,``),expectsFolder:/\/+$/.test(t)}}function Pe(e){return _(e).replace(/\/+$/g,``)}function Y(e){return e.slice(0,e.lastIndexOf(`/`))}var X=/\.(md|mdx)$/i;function Fe(e,t){let{normalizedTarget:n,expectsFolder:r}=J(e);return r||!X.test(n)||k(t,n)!==void 0?e:n.replace(X,``)}function Z(e){let t=new Set;for(let n of e)for(let e of y(n))t.add(e);return t}function Ie(e,t){return t?`${e}${t}`:(e.split(`/`).pop()??``).lastIndexOf(`.`)>0?e:`${e}.md`}function Q(t,n){if(!v(t)||o(t)||k(n.pages,t)!==void 0)return null;let r=Ie(t,n.docExt);return{kind:`asset`,target:r,assetPath:r,mediaKind:e(r.slice(r.lastIndexOf(`.`)+1))}}function Le(e,i){let a=e,s=Fe(a,i.pages);if(c(s)){let e=u(s);if(e?.kind===`skill`&&e.scope===`project`){let t=f(e.name);return{kind:`doc`,target:t,docName:t}}let t=d(s);if(t){let e=p(t.folder,t.name);return{kind:`doc`,target:e,docName:e}}return{kind:`doc`,target:s,docName:s}}if(q(s))return{kind:`doc`,target:s,docName:s};let l=o(s);if(l){let e=p(l.folder,l.name);return{kind:`doc`,target:e,docName:e}}let{normalizedTarget:m,expectsFolder:h}=J(a);if(!m)return{kind:`missing`,target:m};if(!h&&(t(m)||n(m)||r(m)))return{kind:`doc`,target:m,docName:m};let g=Pe(a),_=h?void 0:H(m,{pages:i.pages,pagesBySlug:i.pagesBySlug??new Map,pagesByBasename:i.pagesByBasename}),v=h?[g]:[m,g];for(let e of v){let t=k(i.pages,`${e}/index`);if(t!==void 0&&(h||_===t))return{kind:`folder-index`,target:e,folderPath:Y(t),docName:t,noteKind:`canonical-index`};let n=e.split(`/`).pop(),r=n?k(i.pages,`${e}/${n}`):void 0;if(r!==void 0&&(h||_===r))return{kind:`folder-index`,target:e,folderPath:Y(r),docName:r,noteKind:`legacy-folder-note`}}if(_!==void 0)return{kind:`doc`,target:_,docName:_};let y=k(i.folderPaths??Z(i.pages),g);if(y!==void 0)return{kind:`folder`,target:g,folderPath:y};if(!h){let e=Q(m,i);if(e)return e}return{kind:`missing`,target:g||m}}function Re(e){return e.kind===`folder-index`?{kind:`folder`,target:e.folderPath,folderPath:e.folderPath}:e}function $(e,t,n=b){return typeof t!=`number`||!x(t,n)?null:{kind:`large-file`,target:e,docName:e,size:t,limit:n}}function ze(e,t,n=b){return e.kind!==`doc`&&e.kind!==`folder-index`?e:$(e.docName,t.get(e.docName)?.size,n)??e}function Be(e){switch(e.kind){case`doc`:case`folder-index`:case`large-file`:return e.docName;case`missing`:return e.target;case`asset`:case`skill-file`:case`skills`:case`skill-preview`:case`folder`:return null}}export{ce as A,L as C,A as D,N as E,le as M,ee as N,O,x as P,F as S,M as T,je as _,Q as a,be as b,q as c,Ce as d,Se as f,G as g,Ae as h,$ as i,S as j,k,Ne as l,V as m,Be as n,Le as o,ke as p,Re as r,ze as s,Z as t,Me as u,H as v,ye as w,_e as x,ge as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./navigation-targets-
|
|
1
|
+
import"./navigation-targets-pcYc32Il.js";var e=null,t=new Set;function n(e,t){if(e===t)return!0;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function r(e,t){return e===null?!1:e===t?!0:n(e.pages,t.pages)&&n(e.folderPaths,t.folderPaths)&&n(e.assetPaths??new Set,t.assetPaths??new Set)&&n(e.filePaths??new Set,t.filePaths??new Set)&&i(e.pageIcons,t.pageIcons)}function i(e,t){if(e===t)return!0;let n=e?.size??0;if(n!==(t?.size??0))return!1;if(n===0)return!0;for(let[n,r]of e)if(t.get(n)!==r)return!1;return!0}function a(e){let t=new Map;for(let[n,r]of e){let e=r.icon;typeof e==`string`&&e.trim()!==``&&t.set(n,e)}return t}function o(){return e}function s(n){if(!r(e,n)){e=n;for(let e of Array.from(t))try{e(n)}catch(e){console.error(`[page-list-cache] subscriber threw:`,e)}}}function c(n){if(t.add(n),e!==null)try{n(e)}catch(e){console.error(`[page-list-cache] subscriber threw on replay:`,e)}return()=>{t.delete(n)}}export{c as i,o as n,s as r,a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./utils-CPqDy6Hr.js";import{t as s}from"./button-DzgjsZzC.js";import{n as c}from"./dist-BGzUo_18.js";import{t as l}from"./createLucideIcon-DdBzwsHe.js";import{D as u,S as d,T as f,b as p,d as m,h,i as g,n as _,t as v,w as y,y as b}from"./SyncStatusBadge-Dq6snLd8.js";import{t as x}from"./arrow-up-right-nJaICi16.js";import{t as S}from"./check-B2OLRY33.js";import{t as C}from"./folder-open-COGOeTzI.js";import{t as w}from"./info-CyR0W2SK.js";import{t as T}from"./spinner-Bx8xD6f8.js";import{n as E}from"./miss-dialog-store-CsiJb9Ou.js";import{t as D}from"./refresh-cw-CC7UZEnZ.js";import{t as O}from"./triangle-alert-BXrUEeRU.js";import{i as k,p as A}from"./doc-hash-BJkweiX9.js";import{r as j}from"./doc-paths-cEiFVCxr.js";import{t as M}from"./external-link-CldCnbtR.js";import{t as N}from"./use-git-sync-status-D7jzQObo.js";var P=l(`file-pen`,[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]]),F=l(`file-question-mark`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3`,key:`mhlwft`}]]),I=l(`file-x-corner`,[[`path`,{d:`M11 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5`,key:`1jo35a`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m15 17 5 5`,key:`36xl1x`}],[`path`,{d:`m20 17-5 5`,key:`vdz27y`}]]),L=a(),R=e(n(),1),z=t(),B=`https://git-scm.com/docs/git-push`;function V(e,t){return e===`empty`?!0:!(e!==`stale`&&e!==`absent`||e===`stale`&&t?.syncEnabled===!0)}function ee(e){if(!e)return!1;let t=g(e);return t!==`dormant`&&t!==`disabled`&&t!==`auth-error`&&t!==`conflict`}function te(e){let t=(0,L.c)(11),{status:n,className:r}=e,i=n?.pausedReason;if(!m(i))return null;let a;t[0]===r?a=t[1]:(a=o(`flex min-w-0 flex-col gap-1.5`,r),t[0]=r,t[1]=a);let s;t[2]===i?s=t[3]:(s=(0,z.jsx)(`span`,{children:(0,z.jsx)(v,{reason:i})}),t[2]=i,t[3]=s);let c;t[4]!==i||t[5]!==n?.refusedSymlinkPaths?(c=i===`unsafe-incoming-symlinks`?(0,z.jsx)(_,{paths:n?.refusedSymlinkPaths}):null,t[4]=i,t[5]=n?.refusedSymlinkPaths,t[6]=c):c=t[6];let l;return t[7]!==a||t[8]!==s||t[9]!==c?(l=(0,z.jsxs)(`div`,{className:a,"data-testid":`sync-now-paused-notice`,children:[s,c]}),t[7]=a,t[8]=s,t[9]=c,t[10]=l):l=t[10],l}function H(e){let t=(0,L.c)(52),{freshness:n,status:a,kind:o}=e,{_:c}=i(),{confirmOpen:l,setConfirmOpen:u,onToggleRequest:f,onConfirm:m}=p(d()),[g,_]=(0,R.useState)(`idle`),v=(0,R.useRef)(null),y,C;if(t[0]!==a||t[1]!==g?(y=()=>{if(!(g!==`pending`||!a)){if(a.pushError||a.pushErrorCode){_(`idle`);return}(a.lastSyncUtc??null)!==v.current&&_(`synced`)}},C=[g,a],t[0]=a,t[1]=g,t[2]=y,t[3]=C):(y=t[2],C=t[3]),(0,R.useEffect)(y,C),!V(n,a))return null;if(n===`empty`){let e;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,z.jsx)(O,{className:`mt-0.5 size-3.5 shrink-0`,"aria-hidden":`true`}),t[4]=e):e=t[4];let n;t[5]===c?n=t[6]:(n=c({id:`eazHgv`}),t[5]=c,t[6]=n);let r;return t[7]===n?r=t[8]:(r=(0,z.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-dashed border-border bg-muted/40 p-2 text-xs text-muted-foreground`,"data-testid":`share-freshness-row`,children:[e,(0,z.jsx)(`span`,{children:n})]}),t[7]=n,t[8]=r),r}if(g===`synced`){let e;return t[9]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,z.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-dashed border-border bg-muted/40 p-2 text-xs text-muted-foreground`,"data-testid":`share-freshness-row`,children:[(0,z.jsx)(S,{className:`mt-0.5 size-3.5 shrink-0`,"aria-hidden":`true`}),(0,z.jsx)(`span`,{children:(0,z.jsx)(r,{id:`fxbCNQ`})})]}),t[9]=e):e=t[9],e}let E=a?.syncEnabled===!0,k=a?.pushPermission?.checkStatus===`denied`,A=!!(a?.pushError||a?.pushErrorCode),j=k||A,M=n===`absent`&&!E,N;if(n===`absent`&&!E){let e;t[10]!==c||t[11]!==o?(e=c(o===`folder`?{id:`PrJYSN`}:{id:`3BnyYc`}),t[10]=c,t[11]=o,t[12]=e):e=t[12],N=e}else if(n===`stale`){let e;t[13]!==c||t[14]!==o?(e=c(o===`folder`?{id:`Gt4gOO`}:{id:`2IYGkU`}),t[13]=c,t[14]=o,t[15]=e):e=t[15],N=e}else{let e;t[16]!==c||t[17]!==o?(e=c(o===`folder`?{id:`nqV0Kk`}:{id:`gwykHF`}),t[16]=c,t[17]=o,t[18]=e):e=t[18],N=e}let P;t[19]!==c||t[20]!==A||t[21]!==k?(P=k?c({id:`9OIqw4`}):A?c({id:`K6MQQk`}):null,t[19]=c,t[20]=A,t[21]=k,t[22]=P):P=t[22];let F=P,I;t[23]===a?.lastSyncUtc?I=t[24]:(I=()=>{v.current=a?.lastSyncUtc??null,_(`pending`),b(`sync`).catch(e=>{console.warn(`[share-freshness] sync trigger failed`,e instanceof Error?e.message:e),_(`idle`)})},t[23]=a?.lastSyncUtc,t[24]=I);let H=I,W=M?O:w,G;t[25]===W?G=t[26]:(G=(0,z.jsx)(W,{className:`mt-0.5 size-3.5 shrink-0`,"aria-hidden":`true`}),t[25]=W,t[26]=G);let K;t[27]===N?K=t[28]:(K=(0,z.jsx)(`span`,{children:N}),t[27]=N,t[28]=K);let q;t[29]===F?q=t[30]:(q=F?(0,z.jsx)(`span`,{children:F}):null,t[29]=F,t[30]=q);let J;t[31]!==j||t[32]!==H||t[33]!==f||t[34]!==a||t[35]!==E||t[36]!==g?(J=j?null:E?ee(a)?(0,z.jsx)(`div`,{children:g===`pending`?(0,z.jsxs)(s,{variant:`outline`,size:`xs`,disabled:!0,children:[(0,z.jsx)(T,{icon:D,className:`size-3 shrink-0`,"aria-hidden":`true`}),(0,z.jsx)(r,{id:`EHu0x2`})]}):(0,z.jsx)(s,{variant:`outline`,size:`xs`,onClick:H,children:(0,z.jsx)(r,{id:`lb_UU4`})})}):(0,z.jsx)(te,{status:a}):(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1.5`,children:[(0,z.jsx)(s,{variant:`outline`,size:`xs`,onClick:()=>f(!0),children:(0,z.jsx)(r,{id:`pPiV8s`})}),(0,z.jsxs)(`a`,{href:B,target:`_blank`,rel:`noopener noreferrer`,onClick:ne,onAuxClick:U,className:`inline-flex items-center gap-1 transition-colors hover:text-primary`,children:[(0,z.jsx)(r,{id:`GLxIKR`}),(0,z.jsx)(x,{className:`size-3 shrink-0`,"aria-hidden":`true`})]})]}),t[31]=j,t[32]=H,t[33]=f,t[34]=a,t[35]=E,t[36]=g,t[37]=J):J=t[37];let Y;t[38]!==K||t[39]!==q||t[40]!==J?(Y=(0,z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[K,q,J]}),t[38]=K,t[39]=q,t[40]=J,t[41]=Y):Y=t[41];let X;t[42]!==G||t[43]!==Y?(X=(0,z.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-dashed border-border bg-muted/40 p-2 text-xs text-muted-foreground`,"data-testid":`share-freshness-row`,children:[G,Y]}),t[42]=G,t[43]=Y,t[44]=X):X=t[44];let Z;t[45]!==l||t[46]!==m||t[47]!==u?(Z=(0,z.jsx)(h,{open:l,onOpenChange:u,onConfirm:m}),t[45]=l,t[46]=m,t[47]=u,t[48]=Z):Z=t[48];let Q;return t[49]!==X||t[50]!==Z?(Q=(0,z.jsxs)(z.Fragment,{children:[X,Z]}),t[49]=X,t[50]=Z,t[51]=Q):Q=t[51],Q}function U(e){return M(e,B)}function ne(e){return M(e,B)}function W(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function G(e){let t=(0,L.c)(17),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={phase:`pending`},t[0]=n):n=t[0];let[r,i]=(0,R.useState)(n),[a,o]=(0,R.useState)(0),s=e.branch,c;t[1]!==s||t[2]!==e.contentRootDepth||t[3]!==e.kind||t[4]!==e.path||t[5]!==e.repositoryPath?(c=()=>{let t=window.okDesktop??null;if(!t||s===null){i({phase:`resolved`,resolution:{verdict:`unknown`}});return}let n=!1;return t.project.fetchTargetStatus({projectPath:t.config.projectPath,branch:s,path:e.repositoryPath??e.path,kind:e.kind,...e.contentRootDepth===void 0?{}:{contentRootDepth:e.contentRootDepth}}).then(e=>{n||i({phase:`resolved`,resolution:e??{verdict:`unknown`}})}).catch(e=>{n||(console.warn(`[receive] miss target-status fetch failed`,e instanceof Error?e.message:e),i({phase:`resolved`,resolution:{verdict:`unknown`}}))}),()=>{n=!0}},t[1]=s,t[2]=e.contentRootDepth,t[3]=e.kind,t[4]=e.path,t[5]=e.repositoryPath,t[6]=c):c=t[6];let l;t[7]!==s||t[8]!==a||t[9]!==e.contentRootDepth||t[10]!==e.kind||t[11]!==e.path||t[12]!==e.repositoryPath?(l=[s,e.kind,e.path,e.repositoryPath,e.contentRootDepth,a],t[7]=s,t[8]=a,t[9]=e.contentRootDepth,t[10]=e.kind,t[11]=e.path,t[12]=e.repositoryPath,t[13]=l):l=t[13],(0,R.useEffect)(c,l);let u;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>{i({phase:`pending`}),o(K)},t[14]=u):u=t[14];let d;return t[15]===r?d=t[16]:(d={state:r,refetch:u},t[15]=r,t[16]=d),d}function K(e){return e+1}function q(e){let t=(0,L.c)(15),{onEnabled:n}=e,i=d(),a;t[0]===n?a=t[1]:(a={onEnabled:n},t[0]=n,t[1]=a);let{confirmOpen:o,setConfirmOpen:c,onToggleRequest:l,onConfirm:u}=p(i,a),f;t[2]===l?f=t[3]:(f=()=>l(!0),t[2]=l,t[3]=f);let m,g;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,z.jsx)(D,{className:`size-4`,"aria-hidden":`true`}),g=(0,z.jsx)(r,{id:`pPiV8s`}),t[4]=m,t[5]=g):(m=t[4],g=t[5]);let _;t[6]===f?_=t[7]:(_=(0,z.jsxs)(s,{onClick:f,"data-testid":`share-receive-miss-enable-sync`,children:[m,g]}),t[6]=f,t[7]=_);let v;t[8]!==o||t[9]!==u||t[10]!==c?(v=(0,z.jsx)(h,{open:o,onOpenChange:c,onConfirm:u}),t[8]=o,t[9]=u,t[10]=c,t[11]=v):v=t[11];let y;return t[12]!==_||t[13]!==v?(y=(0,z.jsxs)(z.Fragment,{children:[_,v]}),t[12]=_,t[13]=v,t[14]=y):y=t[14],y}function J(e){let t=(0,L.c)(23),{status:n,onSyncCompleted:a}=e,{_:o}=i(),[l,u]=(0,R.useState)(!1),d=(0,R.useRef)(null),f;t[0]!==a||t[1]!==l||t[2]!==n.lastSyncUtc||t[3]!==n.pushError||t[4]!==n.pushErrorCode?(f=()=>{if(l){if(n.pushError||n.pushErrorCode){u(!1);return}(n.lastSyncUtc??null)!==d.current&&(u(!1),a?.())}},t[0]=a,t[1]=l,t[2]=n.lastSyncUtc,t[3]=n.pushError,t[4]=n.pushErrorCode,t[5]=f):f=t[5];let p;t[6]!==a||t[7]!==l||t[8]!==n?(p=[l,n,a],t[6]=a,t[7]=l,t[8]=n,t[9]=p):p=t[9],(0,R.useEffect)(f,p);let m;t[10]!==o||t[11]!==n.lastSyncUtc?(m=()=>{d.current=n.lastSyncUtc??null,u(!0),b(`sync`).catch(e=>{console.warn(`[receive] miss sync trigger failed`,e instanceof Error?e.message:e),u(!1),c.error(o({id:`1u-mAI`}))})},t[10]=o,t[11]=n.lastSyncUtc,t[12]=m):m=t[12];let h=m,g;t[13]!==h||t[14]!==l?(g=l?(0,z.jsxs)(s,{disabled:!0,"aria-busy":`true`,"data-testid":`share-receive-miss-sync-now`,children:[(0,z.jsx)(T,{icon:D,className:`size-4`,"aria-hidden":`true`}),(0,z.jsx)(r,{id:`EHu0x2`})]}):(0,z.jsxs)(s,{onClick:h,"data-testid":`share-receive-miss-sync-now`,children:[(0,z.jsx)(D,{className:`size-4`,"aria-hidden":`true`}),(0,z.jsx)(r,{id:`lb_UU4`})]}),t[13]=h,t[14]=l,t[15]=g):g=t[15];let _;t[16]===l?_=t[17]:(_=l?(0,z.jsx)(r,{id:`dXOolp`}):null,t[16]=l,t[17]=_);let v;t[18]===_?v=t[19]:(v=(0,z.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`sr-only`,"data-testid":`share-receive-miss-sync-status`,children:_}),t[18]=_,t[19]=v);let y;return t[20]!==g||t[21]!==v?(y=(0,z.jsxs)(z.Fragment,{children:[g,v]}),t[20]=g,t[21]=v,t[22]=y):y=t[22],y}var Y=!1;function X(e){return!Y&&e!==null&&e.syncEnabled!==!0}function Z(e){return e===null?!1:e.hasRemote&&e.lastPullUtc!==void 0&&e.state!==`conflict`}function Q(e,t){let n=(0,L.c)(15),[r,i]=(0,R.useState)(!1),[a,o]=(0,R.useState)(null),[s,c]=(0,R.useState)(!1),l=(0,R.useRef)(null),u,d;n[0]!==t||n[1]!==r||n[2]!==e?(u=()=>{if(!r||(e?.lastPullUtc??null)===l.current)return;i(!1);let n=e?.lastPullOutcome??null;if(n===null){t?.();return}switch(n){case`refused`:case`error`:o(n);return;case`succeeded`:case`up-to-date`:if(X(e)){Y=!0,c(!0);return}t?.();return;case`conflict`:t?.();return;default:t?.();return}},d=[r,e,t],n[0]=t,n[1]=r,n[2]=e,n[3]=u,n[4]=d):(u=n[3],d=n[4]),(0,R.useEffect)(u,d);let f;n[5]===t?f=n[6]:(f=()=>{c(!1),t?.()},n[5]=t,n[6]=f);let p;n[7]===e?.lastPullUtc?p=n[8]:(p=()=>{l.current=e?.lastPullUtc??null,o(null),i(!0),b(`pull`).catch(e=>{console.warn(`[receive] miss pull trigger failed`,e instanceof Error?e.message:e),i(!1),o(`error`)})},n[7]=e?.lastPullUtc,n[8]=p);let m;return n[9]!==a||n[10]!==s||n[11]!==r||n[12]!==f||n[13]!==p?(m={pending:r,failure:a,offering:s,resolveOffer:f,start:p},n[9]=a,n[10]=s,n[11]=r,n[12]=f,n[13]=p,n[14]=m):m=n[14],m}function re(e){let t=(0,L.c)(10),{pending:n,onPull:i}=e,a;t[0]!==i||t[1]!==n?(a=n?(0,z.jsxs)(s,{disabled:!0,"aria-busy":`true`,"data-testid":`share-receive-miss-pull-now`,children:[(0,z.jsx)(T,{icon:D,className:`size-4`,"aria-hidden":`true`}),(0,z.jsx)(r,{id:`4uNLmk`})]}):(0,z.jsxs)(s,{onClick:i,"data-testid":`share-receive-miss-pull-now`,children:[(0,z.jsx)(u,{className:`size-4`,"aria-hidden":`true`}),(0,z.jsx)(r,{id:`fevEu0`})]}),t[0]=i,t[1]=n,t[2]=a):a=t[2];let o;t[3]===n?o=t[4]:(o=n?(0,z.jsx)(r,{id:`glG1TR`}):null,t[3]=n,t[4]=o);let c;t[5]===o?c=t[6]:(c=(0,z.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`sr-only`,"data-testid":`share-receive-miss-pull-status`,children:o}),t[5]=o,t[6]=c);let l;return t[7]!==a||t[8]!==c?(l=(0,z.jsxs)(z.Fragment,{children:[a,c]}),t[7]=a,t[8]=c,t[9]=l):l=t[9],l}function ie(e){let t=(0,L.c)(18),{onResolve:n,strandedCommitCount:r}=e,i=f(),a=(0,R.useRef)(!1),o;t[0]===n?o=t[1]:(o=function(){a.current||(a.current=!0,n())},t[0]=n,t[1]=o);let s=o,c;t[2]===s?c=t[3]:(c={onApplied:s},t[2]=s,t[3]=c);let{confirmOpen:l,setConfirmOpen:u,onModeSelect:d,onConfirm:p}=y(i,`off`,c),m=(0,R.useRef)(!1),g,_;t[4]===d?(g=t[5],_=t[6]):(g=()=>{m.current||(m.current=!0,d(`follow`))},_=[d],t[4]=d,t[5]=g,t[6]=_),(0,R.useEffect)(g,_);let v;t[7]!==s||t[8]!==u?(v=e=>{u(e),e||s()},t[7]=s,t[8]=u,t[9]=v):v=t[9];let b;t[10]!==p||t[11]!==s?(b=()=>{p(),s()},t[10]=p,t[11]=s,t[12]=b):b=t[12];let x;return t[13]!==l||t[14]!==r||t[15]!==v||t[16]!==b?(x=(0,z.jsx)(h,{open:l,onOpenChange:v,onConfirm:b,variant:`follow`,strandedCommitCount:r}),t[13]=l,t[14]=r,t[15]=v,t[16]=b,t[17]=x):x=t[17],x}function ae(e){let t=(0,L.c)(108),{nav:n,state:a,onBrowseFolder:o,onOpenRenamed:c,onEnableAutoSync:l,onSyncCompleted:d,onPullApplied:f}=e,{_:p}=i(),h=N(),g=Q(h,f),y=n.branch,b;t[0]!==p||t[1]!==n.kind?(b=n.kind===`folder`?p({id:`ugoTXs`}):p({id:`XH30C4`}),t[0]=p,t[1]=n.kind,t[2]=b):b=t[2];let x=b;if(a.phase===`pending`){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(T,{className:`size-5`,"aria-hidden":`true`}),(0,z.jsx)(r,{id:`c8jBgX`})]}),t[3]=e):e=t[3],e}let{resolution:S}=a,w,D;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,z.jsx)(C,{className:`size-4`,"aria-hidden":`true`}),D=(0,z.jsx)(r,{id:`hItdtk`}),t[4]=w,t[5]=D):(w=t[4],D=t[5]);let O;t[6]===o?O=t[7]:(O=(0,z.jsxs)(s,{variant:`outline`,onClick:o,"data-testid":`share-receive-miss-browse`,children:[w,D]}),t[6]=o,t[7]=O);let k=O,A,j,M,R=null;if(S.verdict===`renamed`){let e;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,z.jsx)(E,{className:`size-9`,"aria-hidden":`true`}),t[8]=e):e=t[8],A=e;let n;t[9]!==S.renamedTo||t[10]!==x?(n={0:S.renamedTo,targetNoun:x},t[9]=S.renamedTo,t[10]=x,t[11]=n):n=t[11];let i;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(i={0:(0,z.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})},t[12]=i):i=t[12];let a;t[13]===n?a=t[14]:(a=(0,z.jsx)(r,{id:`P0HC30`,values:n,components:i}),t[13]=n,t[14]=a),j=a;let o;t[15]!==c||t[16]!==S.renamedTo?(o=()=>c(S.renamedTo),t[15]=c,t[16]=S.renamedTo,t[17]=o):o=t[17];let l,u;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,z.jsx)(E,{className:`size-4`,"aria-hidden":`true`}),u=(0,z.jsx)(r,{id:`AItsE5`}),t[18]=l,t[19]=u):(l=t[18],u=t[19]);let d;t[20]===o?d=t[21]:(d=(0,z.jsxs)(s,{onClick:o,"data-testid":`share-receive-miss-open-renamed`,children:[l,u]}),t[20]=o,t[21]=d);let f;t[22]!==k||t[23]!==d?(f=(0,z.jsxs)(z.Fragment,{children:[d,k]}),t[22]=k,t[23]=d,t[24]=f):f=t[24],M=f}else if(S.verdict===`deleted`){let e;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,z.jsx)(I,{className:`size-9`,"aria-hidden":`true`}),t[25]=e):e=t[25],A=e;let n;t[26]!==y||t[27]!==x?(n={targetNoun:x,branch:y},t[26]=y,t[27]=x,t[28]=n):n=t[28];let i;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(i={0:(0,z.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})},t[29]=i):i=t[29];let a;t[30]===n?a=t[31]:(a=(0,z.jsx)(r,{id:`kpqWwG`,values:n,components:i}),t[30]=n,t[31]=a),j=a,M=k}else if(S.verdict===`never-on-branch`){let e;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,z.jsx)(F,{className:`size-9`,"aria-hidden":`true`}),t[32]=e):e=t[32],A=e;let n;t[33]!==y||t[34]!==x?(n={targetNoun:x,branch:y},t[33]=y,t[34]=x,t[35]=n):n=t[35];let i;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(i={0:(0,z.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})},t[36]=i):i=t[36];let a;t[37]===n?a=t[38]:(a=(0,z.jsx)(r,{id:`i9TPUi`,values:n,components:i}),t[37]=n,t[38]=a),j=a,M=k}else if(S.verdict===`changed-locally`){let e;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,z.jsx)(P,{className:`size-9`,"aria-hidden":`true`}),t[39]=e):e=t[39],A=e;let n=h?.syncEnabled===!0,i=h?.pushPermission?.checkStatus===`denied`||!!(h?.pushError||h?.pushErrorCode);if(n){let e;t[40]!==y||t[41]!==x?(e=y===null?(0,z.jsx)(r,{id:`RyIKxy`,values:{targetNoun:x}}):(0,z.jsx)(r,{id:`l6kpzR`,values:{targetNoun:x,branch:y},components:{0:(0,z.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}}),t[40]=y,t[41]=x,t[42]=e):e=t[42],j=e}else{let e;t[43]!==y||t[44]!==x?(e=y===null?(0,z.jsx)(r,{id:`UuYo7g`,values:{targetNoun:x}}):(0,z.jsx)(r,{id:`HoWElC`,values:{targetNoun:x,branch:y},components:{0:(0,z.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}}),t[43]=y,t[44]=x,t[45]=e):e=t[45],j=e}let a=null;if(h?.syncEnabled){let e;t[46]===h?e=t[47]:(e=ee(h),t[46]=h,t[47]=e);let n=e,r;t[48]!==n||t[49]!==h?(r=!n&&m(h.pausedReason),t[48]=n,t[49]=h,t[50]=r):r=t[50];let o=r,s=o?`w-full max-w-md text-balance text-1sm text-muted-foreground`:`sr-only`,c;t[51]!==o||t[52]!==h?(c=o?(0,z.jsx)(te,{status:h}):null,t[51]=o,t[52]=h,t[53]=c):c=t[53];let l;if(t[54]!==s||t[55]!==c?(l=(0,z.jsx)(`div`,{role:`status`,className:s,"data-testid":`share-receive-miss-sync-paused`,children:c}),t[54]=s,t[55]=c,t[56]=l):l=t[56],R=l,n&&!i){let e;t[57]!==d||t[58]!==h?(e=(0,z.jsx)(J,{status:h,onSyncCompleted:d}),t[57]=d,t[58]=h,t[59]=e):e=t[59],a=e}}else if(h!==null){let e;t[60]===l?e=t[61]:(e=(0,z.jsx)(q,{onEnabled:l}),t[60]=l,t[61]=e),a=e}let o;t[62]!==k||t[63]!==a?(o=(0,z.jsxs)(z.Fragment,{children:[a,k]}),t[62]=k,t[63]=a,t[64]=o):o=t[64],M=o}else{let e;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,z.jsx)(u,{className:`size-9`,"aria-hidden":`true`}),t[65]=e):e=t[65],A=e;let n;t[66]===h?n=t[67]:(n=Z(h),t[66]=h,t[67]=n);let i=n;if(i){let e;t[68]===y?e=t[69]:(e=y===null?(0,z.jsx)(r,{id:`gwEcOD`}):(0,z.jsx)(r,{id:`wvK7Ay`,values:{branch:y},components:{0:(0,z.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}}),t[68]=y,t[69]=e),j=e}else{let e;t[70]===y?e=t[71]:(e=y===null?(0,z.jsx)(r,{id:`Xewl6B`}):(0,z.jsx)(r,{id:`d1JjXo`,values:{branch:y},components:{0:(0,z.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}}),t[70]=y,t[71]=e),j=e}let a=g.failure===`refused`&&h?.pausedReason===`unsafe-incoming-symlinks`,o=a?`flex w-full max-w-md flex-col gap-2`:`contents`,s=g.failure===null?`sr-only`:`max-w-md text-balance text-1sm text-destructive`,c;t[72]!==g.failure||t[73]!==a?(c=a?(0,z.jsx)(v,{reason:`unsafe-incoming-symlinks`}):g.failure===`refused`?(0,z.jsx)(r,{id:`Xp7Kq4`}):g.failure===`error`?(0,z.jsx)(r,{id:`JG_8KT`}):null,t[72]=g.failure,t[73]=a,t[74]=c):c=t[74];let l;t[75]!==s||t[76]!==c?(l=(0,z.jsx)(`p`,{role:`alert`,className:s,"data-testid":`share-receive-miss-pull-error`,children:c}),t[75]=s,t[76]=c,t[77]=l):l=t[77];let d;t[78]!==a||t[79]!==h?.refusedSymlinkPaths?(d=a?(0,z.jsx)(_,{paths:h?.refusedSymlinkPaths}):null,t[78]=a,t[79]=h?.refusedSymlinkPaths,t[80]=d):d=t[80];let f;t[81]!==l||t[82]!==d||t[83]!==o?(f=(0,z.jsxs)(`div`,{className:o,children:[l,d]}),t[81]=l,t[82]=d,t[83]=o,t[84]=f):f=t[84],R=f;let p;t[85]!==i||t[86]!==g.pending||t[87]!==g.start?(p=i?(0,z.jsx)(re,{pending:g.pending,onPull:g.start}):null,t[85]=i,t[86]=g.pending,t[87]=g.start,t[88]=p):p=t[88];let m;t[89]!==g.offering||t[90]!==g.resolveOffer||t[91]!==h?.ahead?(m=g.offering?(0,z.jsx)(ie,{onResolve:g.resolveOffer,strandedCommitCount:h?.ahead??0}):null,t[89]=g.offering,t[90]=g.resolveOffer,t[91]=h?.ahead,t[92]=m):m=t[92];let b;t[93]!==k||t[94]!==p||t[95]!==m?(b=(0,z.jsxs)(z.Fragment,{children:[p,k,m]}),t[93]=k,t[94]=p,t[95]=m,t[96]=b):b=t[96],M=b}let B;t[97]===A?B=t[98]:(B=(0,z.jsx)(`div`,{className:`flex size-16 items-center justify-center rounded-full border bg-muted/40 text-muted-foreground`,children:A}),t[97]=A,t[98]=B);let V;t[99]===j?V=t[100]:(V=(0,z.jsx)(`p`,{className:`max-w-md text-balance text-base leading-6 text-foreground/90`,children:j}),t[99]=j,t[100]=V);let H;t[101]===M?H=t[102]:(H=(0,z.jsx)(`div`,{className:`flex flex-col-reverse gap-2 sm:flex-row sm:flex-wrap sm:justify-center`,children:M}),t[101]=M,t[102]=H);let U;return t[103]!==R||t[104]!==B||t[105]!==V||t[106]!==H?(U=(0,z.jsxs)(z.Fragment,{children:[B,V,R,H]}),t[103]=R,t[104]=B,t[105]=V,t[106]=H,t[107]=U):U=t[107],U}function $(e){return e.replace(/^\/+|\/+$/g,``)}function oe(e,t){if(t.kind===`folder`){if(A(e))return $(t.path)===``;let n=k(e);return n!==null&&$(n)===$(t.path)}let n=k(e);return n===null?!1:j(n)===j(t.path)}function se(){let e=null,t=new Set,n=!1;function r(){for(let e of t)e()}function i(t){e!==t&&(e=t,r())}function a(){e!==null&&(oe(window.location.hash,e)||i(null))}function o(){n||typeof window>`u`||(n=!0,window.addEventListener(`hashchange`,a))}return{arm(e){o(),i(e)},clear(){i(null)},getSnapshot(){return e},subscribe(e){return t.add(e),()=>{t.delete(e)}},dispose(){n&&typeof window<`u`&&(window.removeEventListener(`hashchange`,a),n=!1),i(null)}}}var ce=se();function le(e,t){if(e.contentRootDepth===void 0)return{...e,path:t,repositoryPath:t};let n=(e.repositoryPath??e.path).split(`/`).slice(0,e.contentRootDepth);return{...e,path:t,repositoryPath:[...n,...t===``?[]:t.split(`/`)].join(`/`)}}function ue(e,t){return e===null||e.kind!==`missing`||t===null||j(t.path)!==e.target?null:t}export{W as a,V as c,ae as i,le as n,G as o,ce as r,H as s,ue as t};
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./utils-CPqDy6Hr.js";import{t as s}from"./button-DzgjsZzC.js";import{n as c}from"./dist-BGzUo_18.js";import{t as l}from"./createLucideIcon-DdBzwsHe.js";import{D as u,S as d,T as f,b as p,d as m,h,i as g,n as _,t as v,w as y,y as b}from"./SyncStatusBadge-oD2nm86o.js";import{t as x}from"./arrow-up-right-nJaICi16.js";import{t as S}from"./check-B2OLRY33.js";import{t as C}from"./folder-open-COGOeTzI.js";import{t as w}from"./info-CyR0W2SK.js";import{t as T}from"./spinner-Bx8xD6f8.js";import{n as E}from"./miss-dialog-store-CsiJb9Ou.js";import{t as D}from"./refresh-cw-CC7UZEnZ.js";import{t as O}from"./triangle-alert-BXrUEeRU.js";import{i as k,p as A}from"./doc-hash-BJkweiX9.js";import{r as j}from"./doc-paths-cEiFVCxr.js";import{t as M}from"./external-link-CldCnbtR.js";import{t as N}from"./use-git-sync-status-B0CLaMkV.js";var P=l(`file-pen`,[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]]),F=l(`file-question-mark`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3`,key:`mhlwft`}]]),I=l(`file-x-corner`,[[`path`,{d:`M11 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5`,key:`1jo35a`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m15 17 5 5`,key:`36xl1x`}],[`path`,{d:`m20 17-5 5`,key:`vdz27y`}]]),L=a(),R=e(n(),1),z=t(),B=`https://git-scm.com/docs/git-push`;function V(e,t){return e===`empty`?!0:!(e!==`stale`&&e!==`absent`||e===`stale`&&t?.syncEnabled===!0)}function ee(e){if(!e)return!1;let t=g(e);return t!==`dormant`&&t!==`disabled`&&t!==`auth-error`&&t!==`conflict`}function te(e){let t=(0,L.c)(11),{status:n,className:r}=e,i=n?.pausedReason;if(!m(i))return null;let a;t[0]===r?a=t[1]:(a=o(`flex min-w-0 flex-col gap-1.5`,r),t[0]=r,t[1]=a);let s;t[2]===i?s=t[3]:(s=(0,z.jsx)(`span`,{children:(0,z.jsx)(v,{reason:i})}),t[2]=i,t[3]=s);let c;t[4]!==i||t[5]!==n?.refusedSymlinkPaths?(c=i===`unsafe-incoming-symlinks`?(0,z.jsx)(_,{paths:n?.refusedSymlinkPaths}):null,t[4]=i,t[5]=n?.refusedSymlinkPaths,t[6]=c):c=t[6];let l;return t[7]!==a||t[8]!==s||t[9]!==c?(l=(0,z.jsxs)(`div`,{className:a,"data-testid":`sync-now-paused-notice`,children:[s,c]}),t[7]=a,t[8]=s,t[9]=c,t[10]=l):l=t[10],l}function H(e){let t=(0,L.c)(52),{freshness:n,status:a,kind:o}=e,{_:c}=i(),{confirmOpen:l,setConfirmOpen:u,onToggleRequest:f,onConfirm:m}=p(d()),[g,_]=(0,R.useState)(`idle`),v=(0,R.useRef)(null),y,C;if(t[0]!==a||t[1]!==g?(y=()=>{if(!(g!==`pending`||!a)){if(a.pushError||a.pushErrorCode){_(`idle`);return}(a.lastSyncUtc??null)!==v.current&&_(`synced`)}},C=[g,a],t[0]=a,t[1]=g,t[2]=y,t[3]=C):(y=t[2],C=t[3]),(0,R.useEffect)(y,C),!V(n,a))return null;if(n===`empty`){let e;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,z.jsx)(O,{className:`mt-0.5 size-3.5 shrink-0`,"aria-hidden":`true`}),t[4]=e):e=t[4];let n;t[5]===c?n=t[6]:(n=c({id:`eazHgv`}),t[5]=c,t[6]=n);let r;return t[7]===n?r=t[8]:(r=(0,z.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-dashed border-border bg-muted/40 p-2 text-xs text-muted-foreground`,"data-testid":`share-freshness-row`,children:[e,(0,z.jsx)(`span`,{children:n})]}),t[7]=n,t[8]=r),r}if(g===`synced`){let e;return t[9]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,z.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-dashed border-border bg-muted/40 p-2 text-xs text-muted-foreground`,"data-testid":`share-freshness-row`,children:[(0,z.jsx)(S,{className:`mt-0.5 size-3.5 shrink-0`,"aria-hidden":`true`}),(0,z.jsx)(`span`,{children:(0,z.jsx)(r,{id:`fxbCNQ`})})]}),t[9]=e):e=t[9],e}let E=a?.syncEnabled===!0,k=a?.pushPermission?.checkStatus===`denied`,A=!!(a?.pushError||a?.pushErrorCode),j=k||A,M=n===`absent`&&!E,N;if(n===`absent`&&!E){let e;t[10]!==c||t[11]!==o?(e=c(o===`folder`?{id:`PrJYSN`}:{id:`3BnyYc`}),t[10]=c,t[11]=o,t[12]=e):e=t[12],N=e}else if(n===`stale`){let e;t[13]!==c||t[14]!==o?(e=c(o===`folder`?{id:`Gt4gOO`}:{id:`2IYGkU`}),t[13]=c,t[14]=o,t[15]=e):e=t[15],N=e}else{let e;t[16]!==c||t[17]!==o?(e=c(o===`folder`?{id:`nqV0Kk`}:{id:`gwykHF`}),t[16]=c,t[17]=o,t[18]=e):e=t[18],N=e}let P;t[19]!==c||t[20]!==A||t[21]!==k?(P=k?c({id:`9OIqw4`}):A?c({id:`K6MQQk`}):null,t[19]=c,t[20]=A,t[21]=k,t[22]=P):P=t[22];let F=P,I;t[23]===a?.lastSyncUtc?I=t[24]:(I=()=>{v.current=a?.lastSyncUtc??null,_(`pending`),b(`sync`).catch(e=>{console.warn(`[share-freshness] sync trigger failed`,e instanceof Error?e.message:e),_(`idle`)})},t[23]=a?.lastSyncUtc,t[24]=I);let H=I,W=M?O:w,G;t[25]===W?G=t[26]:(G=(0,z.jsx)(W,{className:`mt-0.5 size-3.5 shrink-0`,"aria-hidden":`true`}),t[25]=W,t[26]=G);let K;t[27]===N?K=t[28]:(K=(0,z.jsx)(`span`,{children:N}),t[27]=N,t[28]=K);let q;t[29]===F?q=t[30]:(q=F?(0,z.jsx)(`span`,{children:F}):null,t[29]=F,t[30]=q);let J;t[31]!==j||t[32]!==H||t[33]!==f||t[34]!==a||t[35]!==E||t[36]!==g?(J=j?null:E?ee(a)?(0,z.jsx)(`div`,{children:g===`pending`?(0,z.jsxs)(s,{variant:`outline`,size:`xs`,disabled:!0,children:[(0,z.jsx)(T,{icon:D,className:`size-3 shrink-0`,"aria-hidden":`true`}),(0,z.jsx)(r,{id:`EHu0x2`})]}):(0,z.jsx)(s,{variant:`outline`,size:`xs`,onClick:H,children:(0,z.jsx)(r,{id:`lb_UU4`})})}):(0,z.jsx)(te,{status:a}):(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1.5`,children:[(0,z.jsx)(s,{variant:`outline`,size:`xs`,onClick:()=>f(!0),children:(0,z.jsx)(r,{id:`pPiV8s`})}),(0,z.jsxs)(`a`,{href:B,target:`_blank`,rel:`noopener noreferrer`,onClick:ne,onAuxClick:U,className:`inline-flex items-center gap-1 transition-colors hover:text-primary`,children:[(0,z.jsx)(r,{id:`GLxIKR`}),(0,z.jsx)(x,{className:`size-3 shrink-0`,"aria-hidden":`true`})]})]}),t[31]=j,t[32]=H,t[33]=f,t[34]=a,t[35]=E,t[36]=g,t[37]=J):J=t[37];let Y;t[38]!==K||t[39]!==q||t[40]!==J?(Y=(0,z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[K,q,J]}),t[38]=K,t[39]=q,t[40]=J,t[41]=Y):Y=t[41];let X;t[42]!==G||t[43]!==Y?(X=(0,z.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-dashed border-border bg-muted/40 p-2 text-xs text-muted-foreground`,"data-testid":`share-freshness-row`,children:[G,Y]}),t[42]=G,t[43]=Y,t[44]=X):X=t[44];let Z;t[45]!==l||t[46]!==m||t[47]!==u?(Z=(0,z.jsx)(h,{open:l,onOpenChange:u,onConfirm:m}),t[45]=l,t[46]=m,t[47]=u,t[48]=Z):Z=t[48];let Q;return t[49]!==X||t[50]!==Z?(Q=(0,z.jsxs)(z.Fragment,{children:[X,Z]}),t[49]=X,t[50]=Z,t[51]=Q):Q=t[51],Q}function U(e){return M(e,B)}function ne(e){return M(e,B)}function W(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function G(e){let t=(0,L.c)(17),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={phase:`pending`},t[0]=n):n=t[0];let[r,i]=(0,R.useState)(n),[a,o]=(0,R.useState)(0),s=e.branch,c;t[1]!==s||t[2]!==e.contentRootDepth||t[3]!==e.kind||t[4]!==e.path||t[5]!==e.repositoryPath?(c=()=>{let t=window.okDesktop??null;if(!t||s===null){i({phase:`resolved`,resolution:{verdict:`unknown`}});return}let n=!1;return t.project.fetchTargetStatus({projectPath:t.config.projectPath,branch:s,path:e.repositoryPath??e.path,kind:e.kind,...e.contentRootDepth===void 0?{}:{contentRootDepth:e.contentRootDepth}}).then(e=>{n||i({phase:`resolved`,resolution:e??{verdict:`unknown`}})}).catch(e=>{n||(console.warn(`[receive] miss target-status fetch failed`,e instanceof Error?e.message:e),i({phase:`resolved`,resolution:{verdict:`unknown`}}))}),()=>{n=!0}},t[1]=s,t[2]=e.contentRootDepth,t[3]=e.kind,t[4]=e.path,t[5]=e.repositoryPath,t[6]=c):c=t[6];let l;t[7]!==s||t[8]!==a||t[9]!==e.contentRootDepth||t[10]!==e.kind||t[11]!==e.path||t[12]!==e.repositoryPath?(l=[s,e.kind,e.path,e.repositoryPath,e.contentRootDepth,a],t[7]=s,t[8]=a,t[9]=e.contentRootDepth,t[10]=e.kind,t[11]=e.path,t[12]=e.repositoryPath,t[13]=l):l=t[13],(0,R.useEffect)(c,l);let u;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>{i({phase:`pending`}),o(K)},t[14]=u):u=t[14];let d;return t[15]===r?d=t[16]:(d={state:r,refetch:u},t[15]=r,t[16]=d),d}function K(e){return e+1}function q(e){let t=(0,L.c)(15),{onEnabled:n}=e,i=d(),a;t[0]===n?a=t[1]:(a={onEnabled:n},t[0]=n,t[1]=a);let{confirmOpen:o,setConfirmOpen:c,onToggleRequest:l,onConfirm:u}=p(i,a),f;t[2]===l?f=t[3]:(f=()=>l(!0),t[2]=l,t[3]=f);let m,g;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,z.jsx)(D,{className:`size-4`,"aria-hidden":`true`}),g=(0,z.jsx)(r,{id:`pPiV8s`}),t[4]=m,t[5]=g):(m=t[4],g=t[5]);let _;t[6]===f?_=t[7]:(_=(0,z.jsxs)(s,{onClick:f,"data-testid":`share-receive-miss-enable-sync`,children:[m,g]}),t[6]=f,t[7]=_);let v;t[8]!==o||t[9]!==u||t[10]!==c?(v=(0,z.jsx)(h,{open:o,onOpenChange:c,onConfirm:u}),t[8]=o,t[9]=u,t[10]=c,t[11]=v):v=t[11];let y;return t[12]!==_||t[13]!==v?(y=(0,z.jsxs)(z.Fragment,{children:[_,v]}),t[12]=_,t[13]=v,t[14]=y):y=t[14],y}function J(e){let t=(0,L.c)(23),{status:n,onSyncCompleted:a}=e,{_:o}=i(),[l,u]=(0,R.useState)(!1),d=(0,R.useRef)(null),f;t[0]!==a||t[1]!==l||t[2]!==n.lastSyncUtc||t[3]!==n.pushError||t[4]!==n.pushErrorCode?(f=()=>{if(l){if(n.pushError||n.pushErrorCode){u(!1);return}(n.lastSyncUtc??null)!==d.current&&(u(!1),a?.())}},t[0]=a,t[1]=l,t[2]=n.lastSyncUtc,t[3]=n.pushError,t[4]=n.pushErrorCode,t[5]=f):f=t[5];let p;t[6]!==a||t[7]!==l||t[8]!==n?(p=[l,n,a],t[6]=a,t[7]=l,t[8]=n,t[9]=p):p=t[9],(0,R.useEffect)(f,p);let m;t[10]!==o||t[11]!==n.lastSyncUtc?(m=()=>{d.current=n.lastSyncUtc??null,u(!0),b(`sync`).catch(e=>{console.warn(`[receive] miss sync trigger failed`,e instanceof Error?e.message:e),u(!1),c.error(o({id:`1u-mAI`}))})},t[10]=o,t[11]=n.lastSyncUtc,t[12]=m):m=t[12];let h=m,g;t[13]!==h||t[14]!==l?(g=l?(0,z.jsxs)(s,{disabled:!0,"aria-busy":`true`,"data-testid":`share-receive-miss-sync-now`,children:[(0,z.jsx)(T,{icon:D,className:`size-4`,"aria-hidden":`true`}),(0,z.jsx)(r,{id:`EHu0x2`})]}):(0,z.jsxs)(s,{onClick:h,"data-testid":`share-receive-miss-sync-now`,children:[(0,z.jsx)(D,{className:`size-4`,"aria-hidden":`true`}),(0,z.jsx)(r,{id:`lb_UU4`})]}),t[13]=h,t[14]=l,t[15]=g):g=t[15];let _;t[16]===l?_=t[17]:(_=l?(0,z.jsx)(r,{id:`dXOolp`}):null,t[16]=l,t[17]=_);let v;t[18]===_?v=t[19]:(v=(0,z.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`sr-only`,"data-testid":`share-receive-miss-sync-status`,children:_}),t[18]=_,t[19]=v);let y;return t[20]!==g||t[21]!==v?(y=(0,z.jsxs)(z.Fragment,{children:[g,v]}),t[20]=g,t[21]=v,t[22]=y):y=t[22],y}var Y=!1;function X(e){return!Y&&e!==null&&e.syncEnabled!==!0}function Z(e){return e===null?!1:e.hasRemote&&e.lastPullUtc!==void 0&&e.state!==`conflict`}function Q(e,t){let n=(0,L.c)(15),[r,i]=(0,R.useState)(!1),[a,o]=(0,R.useState)(null),[s,c]=(0,R.useState)(!1),l=(0,R.useRef)(null),u,d;n[0]!==t||n[1]!==r||n[2]!==e?(u=()=>{if(!r||(e?.lastPullUtc??null)===l.current)return;i(!1);let n=e?.lastPullOutcome??null;if(n===null){t?.();return}switch(n){case`refused`:case`error`:o(n);return;case`succeeded`:case`up-to-date`:if(X(e)){Y=!0,c(!0);return}t?.();return;case`conflict`:t?.();return;default:t?.();return}},d=[r,e,t],n[0]=t,n[1]=r,n[2]=e,n[3]=u,n[4]=d):(u=n[3],d=n[4]),(0,R.useEffect)(u,d);let f;n[5]===t?f=n[6]:(f=()=>{c(!1),t?.()},n[5]=t,n[6]=f);let p;n[7]===e?.lastPullUtc?p=n[8]:(p=()=>{l.current=e?.lastPullUtc??null,o(null),i(!0),b(`pull`).catch(e=>{console.warn(`[receive] miss pull trigger failed`,e instanceof Error?e.message:e),i(!1),o(`error`)})},n[7]=e?.lastPullUtc,n[8]=p);let m;return n[9]!==a||n[10]!==s||n[11]!==r||n[12]!==f||n[13]!==p?(m={pending:r,failure:a,offering:s,resolveOffer:f,start:p},n[9]=a,n[10]=s,n[11]=r,n[12]=f,n[13]=p,n[14]=m):m=n[14],m}function re(e){let t=(0,L.c)(10),{pending:n,onPull:i}=e,a;t[0]!==i||t[1]!==n?(a=n?(0,z.jsxs)(s,{disabled:!0,"aria-busy":`true`,"data-testid":`share-receive-miss-pull-now`,children:[(0,z.jsx)(T,{icon:D,className:`size-4`,"aria-hidden":`true`}),(0,z.jsx)(r,{id:`4uNLmk`})]}):(0,z.jsxs)(s,{onClick:i,"data-testid":`share-receive-miss-pull-now`,children:[(0,z.jsx)(u,{className:`size-4`,"aria-hidden":`true`}),(0,z.jsx)(r,{id:`fevEu0`})]}),t[0]=i,t[1]=n,t[2]=a):a=t[2];let o;t[3]===n?o=t[4]:(o=n?(0,z.jsx)(r,{id:`glG1TR`}):null,t[3]=n,t[4]=o);let c;t[5]===o?c=t[6]:(c=(0,z.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`sr-only`,"data-testid":`share-receive-miss-pull-status`,children:o}),t[5]=o,t[6]=c);let l;return t[7]!==a||t[8]!==c?(l=(0,z.jsxs)(z.Fragment,{children:[a,c]}),t[7]=a,t[8]=c,t[9]=l):l=t[9],l}function ie(e){let t=(0,L.c)(18),{onResolve:n,strandedCommitCount:r}=e,i=f(),a=(0,R.useRef)(!1),o;t[0]===n?o=t[1]:(o=function(){a.current||(a.current=!0,n())},t[0]=n,t[1]=o);let s=o,c;t[2]===s?c=t[3]:(c={onApplied:s},t[2]=s,t[3]=c);let{confirmOpen:l,setConfirmOpen:u,onModeSelect:d,onConfirm:p}=y(i,`off`,c),m=(0,R.useRef)(!1),g,_;t[4]===d?(g=t[5],_=t[6]):(g=()=>{m.current||(m.current=!0,d(`follow`))},_=[d],t[4]=d,t[5]=g,t[6]=_),(0,R.useEffect)(g,_);let v;t[7]!==s||t[8]!==u?(v=e=>{u(e),e||s()},t[7]=s,t[8]=u,t[9]=v):v=t[9];let b;t[10]!==p||t[11]!==s?(b=()=>{p(),s()},t[10]=p,t[11]=s,t[12]=b):b=t[12];let x;return t[13]!==l||t[14]!==r||t[15]!==v||t[16]!==b?(x=(0,z.jsx)(h,{open:l,onOpenChange:v,onConfirm:b,variant:`follow`,strandedCommitCount:r}),t[13]=l,t[14]=r,t[15]=v,t[16]=b,t[17]=x):x=t[17],x}function ae(e){let t=(0,L.c)(108),{nav:n,state:a,onBrowseFolder:o,onOpenRenamed:c,onEnableAutoSync:l,onSyncCompleted:d,onPullApplied:f}=e,{_:p}=i(),h=N(),g=Q(h,f),y=n.branch,b;t[0]!==p||t[1]!==n.kind?(b=n.kind===`folder`?p({id:`ugoTXs`}):p({id:`XH30C4`}),t[0]=p,t[1]=n.kind,t[2]=b):b=t[2];let x=b;if(a.phase===`pending`){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(T,{className:`size-5`,"aria-hidden":`true`}),(0,z.jsx)(r,{id:`c8jBgX`})]}),t[3]=e):e=t[3],e}let{resolution:S}=a,w,D;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,z.jsx)(C,{className:`size-4`,"aria-hidden":`true`}),D=(0,z.jsx)(r,{id:`hItdtk`}),t[4]=w,t[5]=D):(w=t[4],D=t[5]);let O;t[6]===o?O=t[7]:(O=(0,z.jsxs)(s,{variant:`outline`,onClick:o,"data-testid":`share-receive-miss-browse`,children:[w,D]}),t[6]=o,t[7]=O);let k=O,A,j,M,R=null;if(S.verdict===`renamed`){let e;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,z.jsx)(E,{className:`size-9`,"aria-hidden":`true`}),t[8]=e):e=t[8],A=e;let n;t[9]!==S.renamedTo||t[10]!==x?(n={0:S.renamedTo,targetNoun:x},t[9]=S.renamedTo,t[10]=x,t[11]=n):n=t[11];let i;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(i={0:(0,z.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})},t[12]=i):i=t[12];let a;t[13]===n?a=t[14]:(a=(0,z.jsx)(r,{id:`P0HC30`,values:n,components:i}),t[13]=n,t[14]=a),j=a;let o;t[15]!==c||t[16]!==S.renamedTo?(o=()=>c(S.renamedTo),t[15]=c,t[16]=S.renamedTo,t[17]=o):o=t[17];let l,u;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,z.jsx)(E,{className:`size-4`,"aria-hidden":`true`}),u=(0,z.jsx)(r,{id:`AItsE5`}),t[18]=l,t[19]=u):(l=t[18],u=t[19]);let d;t[20]===o?d=t[21]:(d=(0,z.jsxs)(s,{onClick:o,"data-testid":`share-receive-miss-open-renamed`,children:[l,u]}),t[20]=o,t[21]=d);let f;t[22]!==k||t[23]!==d?(f=(0,z.jsxs)(z.Fragment,{children:[d,k]}),t[22]=k,t[23]=d,t[24]=f):f=t[24],M=f}else if(S.verdict===`deleted`){let e;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,z.jsx)(I,{className:`size-9`,"aria-hidden":`true`}),t[25]=e):e=t[25],A=e;let n;t[26]!==y||t[27]!==x?(n={targetNoun:x,branch:y},t[26]=y,t[27]=x,t[28]=n):n=t[28];let i;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(i={0:(0,z.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})},t[29]=i):i=t[29];let a;t[30]===n?a=t[31]:(a=(0,z.jsx)(r,{id:`kpqWwG`,values:n,components:i}),t[30]=n,t[31]=a),j=a,M=k}else if(S.verdict===`never-on-branch`){let e;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,z.jsx)(F,{className:`size-9`,"aria-hidden":`true`}),t[32]=e):e=t[32],A=e;let n;t[33]!==y||t[34]!==x?(n={targetNoun:x,branch:y},t[33]=y,t[34]=x,t[35]=n):n=t[35];let i;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(i={0:(0,z.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})},t[36]=i):i=t[36];let a;t[37]===n?a=t[38]:(a=(0,z.jsx)(r,{id:`i9TPUi`,values:n,components:i}),t[37]=n,t[38]=a),j=a,M=k}else if(S.verdict===`changed-locally`){let e;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,z.jsx)(P,{className:`size-9`,"aria-hidden":`true`}),t[39]=e):e=t[39],A=e;let n=h?.syncEnabled===!0,i=h?.pushPermission?.checkStatus===`denied`||!!(h?.pushError||h?.pushErrorCode);if(n){let e;t[40]!==y||t[41]!==x?(e=y===null?(0,z.jsx)(r,{id:`RyIKxy`,values:{targetNoun:x}}):(0,z.jsx)(r,{id:`l6kpzR`,values:{targetNoun:x,branch:y},components:{0:(0,z.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}}),t[40]=y,t[41]=x,t[42]=e):e=t[42],j=e}else{let e;t[43]!==y||t[44]!==x?(e=y===null?(0,z.jsx)(r,{id:`UuYo7g`,values:{targetNoun:x}}):(0,z.jsx)(r,{id:`HoWElC`,values:{targetNoun:x,branch:y},components:{0:(0,z.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}}),t[43]=y,t[44]=x,t[45]=e):e=t[45],j=e}let a=null;if(h?.syncEnabled){let e;t[46]===h?e=t[47]:(e=ee(h),t[46]=h,t[47]=e);let n=e,r;t[48]!==n||t[49]!==h?(r=!n&&m(h.pausedReason),t[48]=n,t[49]=h,t[50]=r):r=t[50];let o=r,s=o?`w-full max-w-md text-balance text-1sm text-muted-foreground`:`sr-only`,c;t[51]!==o||t[52]!==h?(c=o?(0,z.jsx)(te,{status:h}):null,t[51]=o,t[52]=h,t[53]=c):c=t[53];let l;if(t[54]!==s||t[55]!==c?(l=(0,z.jsx)(`div`,{role:`status`,className:s,"data-testid":`share-receive-miss-sync-paused`,children:c}),t[54]=s,t[55]=c,t[56]=l):l=t[56],R=l,n&&!i){let e;t[57]!==d||t[58]!==h?(e=(0,z.jsx)(J,{status:h,onSyncCompleted:d}),t[57]=d,t[58]=h,t[59]=e):e=t[59],a=e}}else if(h!==null){let e;t[60]===l?e=t[61]:(e=(0,z.jsx)(q,{onEnabled:l}),t[60]=l,t[61]=e),a=e}let o;t[62]!==k||t[63]!==a?(o=(0,z.jsxs)(z.Fragment,{children:[a,k]}),t[62]=k,t[63]=a,t[64]=o):o=t[64],M=o}else{let e;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,z.jsx)(u,{className:`size-9`,"aria-hidden":`true`}),t[65]=e):e=t[65],A=e;let n;t[66]===h?n=t[67]:(n=Z(h),t[66]=h,t[67]=n);let i=n;if(i){let e;t[68]===y?e=t[69]:(e=y===null?(0,z.jsx)(r,{id:`gwEcOD`}):(0,z.jsx)(r,{id:`wvK7Ay`,values:{branch:y},components:{0:(0,z.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}}),t[68]=y,t[69]=e),j=e}else{let e;t[70]===y?e=t[71]:(e=y===null?(0,z.jsx)(r,{id:`Xewl6B`}):(0,z.jsx)(r,{id:`d1JjXo`,values:{branch:y},components:{0:(0,z.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}}),t[70]=y,t[71]=e),j=e}let a=g.failure===`refused`&&h?.pausedReason===`unsafe-incoming-symlinks`,o=a?`flex w-full max-w-md flex-col gap-2`:`contents`,s=g.failure===null?`sr-only`:`max-w-md text-balance text-1sm text-destructive`,c;t[72]!==g.failure||t[73]!==a?(c=a?(0,z.jsx)(v,{reason:`unsafe-incoming-symlinks`}):g.failure===`refused`?(0,z.jsx)(r,{id:`Xp7Kq4`}):g.failure===`error`?(0,z.jsx)(r,{id:`JG_8KT`}):null,t[72]=g.failure,t[73]=a,t[74]=c):c=t[74];let l;t[75]!==s||t[76]!==c?(l=(0,z.jsx)(`p`,{role:`alert`,className:s,"data-testid":`share-receive-miss-pull-error`,children:c}),t[75]=s,t[76]=c,t[77]=l):l=t[77];let d;t[78]!==a||t[79]!==h?.refusedSymlinkPaths?(d=a?(0,z.jsx)(_,{paths:h?.refusedSymlinkPaths}):null,t[78]=a,t[79]=h?.refusedSymlinkPaths,t[80]=d):d=t[80];let f;t[81]!==l||t[82]!==d||t[83]!==o?(f=(0,z.jsxs)(`div`,{className:o,children:[l,d]}),t[81]=l,t[82]=d,t[83]=o,t[84]=f):f=t[84],R=f;let p;t[85]!==i||t[86]!==g.pending||t[87]!==g.start?(p=i?(0,z.jsx)(re,{pending:g.pending,onPull:g.start}):null,t[85]=i,t[86]=g.pending,t[87]=g.start,t[88]=p):p=t[88];let m;t[89]!==g.offering||t[90]!==g.resolveOffer||t[91]!==h?.ahead?(m=g.offering?(0,z.jsx)(ie,{onResolve:g.resolveOffer,strandedCommitCount:h?.ahead??0}):null,t[89]=g.offering,t[90]=g.resolveOffer,t[91]=h?.ahead,t[92]=m):m=t[92];let b;t[93]!==k||t[94]!==p||t[95]!==m?(b=(0,z.jsxs)(z.Fragment,{children:[p,k,m]}),t[93]=k,t[94]=p,t[95]=m,t[96]=b):b=t[96],M=b}let B;t[97]===A?B=t[98]:(B=(0,z.jsx)(`div`,{className:`flex size-16 items-center justify-center rounded-full border bg-muted/40 text-muted-foreground`,children:A}),t[97]=A,t[98]=B);let V;t[99]===j?V=t[100]:(V=(0,z.jsx)(`p`,{className:`max-w-md text-balance text-base leading-6 text-foreground/90`,children:j}),t[99]=j,t[100]=V);let H;t[101]===M?H=t[102]:(H=(0,z.jsx)(`div`,{className:`flex flex-col-reverse gap-2 sm:flex-row sm:flex-wrap sm:justify-center`,children:M}),t[101]=M,t[102]=H);let U;return t[103]!==R||t[104]!==B||t[105]!==V||t[106]!==H?(U=(0,z.jsxs)(z.Fragment,{children:[B,V,R,H]}),t[103]=R,t[104]=B,t[105]=V,t[106]=H,t[107]=U):U=t[107],U}function $(e){return e.replace(/^\/+|\/+$/g,``)}function oe(e,t){if(t.kind===`folder`){if(A(e))return $(t.path)===``;let n=k(e);return n!==null&&$(n)===$(t.path)}let n=k(e);return n===null?!1:j(n)===j(t.path)}function se(){let e=null,t=new Set,n=!1;function r(){for(let e of t)e()}function i(t){e!==t&&(e=t,r())}function a(){e!==null&&(oe(window.location.hash,e)||i(null))}function o(){n||typeof window>`u`||(n=!0,window.addEventListener(`hashchange`,a))}return{arm(e){o(),i(e)},clear(){i(null)},getSnapshot(){return e},subscribe(e){return t.add(e),()=>{t.delete(e)}},dispose(){n&&typeof window<`u`&&(window.removeEventListener(`hashchange`,a),n=!1),i(null)}}}var ce=se();function le(e,t){if(e.contentRootDepth===void 0)return{...e,path:t,repositoryPath:t};let n=(e.repositoryPath??e.path).split(`/`).slice(0,e.contentRootDepth);return{...e,path:t,repositoryPath:[...n,...t===``?[]:t.split(`/`)].join(`/`)}}function ue(e,t){return e===null||e.kind!==`missing`||t===null||j(t.path)!==e.target?null:t}export{W as a,V as c,ae as i,le as n,G as o,ce as r,H as s,ue as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./dist-C_FzPxEX2.js";import{n as t}from"./constants-product-
|
|
1
|
+
import{t as e}from"./dist-C_FzPxEX2.js";import{n as t}from"./constants-product-BVSOzxVs.js";function n(t){return t===`win32`?e._({id:`qi1F96`}):t===`linux`?e._({id:`e1Rn_k`}):e._({id:`LtSYdi`})}function r(t){return t===`win32`?e._({id:`o9yN4T`}):e._({id:`q3TWG7`})}function i(t){return t===`win32`?e._({id:`cVp1YI`}):e._({id:`GQ3O42`})}function a(n){if(n===`linux`)return e._({id:`uyJsf6`});let r=t;return e._({id:`lmE7r-`,values:{appName:r}})}export{i,r as n,n as r,a as t};
|