@inkeep/open-knowledge 0.62.0-beta.6 → 0.62.0-beta.8
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/{acp-harness-probe-BN1iQLwU.mjs → acp-harness-probe-DS_1snlG.mjs} +2 -2
- package/dist/cli.mjs +6 -6
- package/dist/constants-M3x5gx4s.mjs +2 -0
- package/dist/{git-handle-BkSalb6i.mjs → git-handle-BW-d_Lhz.mjs} +2 -2
- package/dist/git-handle-Cf0PDlfQ.mjs +1 -0
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +3 -3
- package/dist/init-Bk8FhVWX.mjs +1 -0
- package/dist/{init-CSNfwd6d.mjs → init-D53VmdHm.mjs} +3 -3
- package/dist/{launch-json-removal-B4jywpZ3.mjs → launch-json-removal-DwjhIdI7.mjs} +2 -2
- package/dist/loader-CMYX8gbo.mjs +1 -0
- package/dist/{loader-CiSm5ox4.mjs → loader-nsH_hdbs.mjs} +2 -2
- package/dist/md-manager-C5VB3IXU.mjs +2 -0
- package/dist/{open-browser-BS9zcVt9.mjs → open-browser-CqoTUuyv.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-Bb2Blh4l.mjs → preview-83eThwUX.mjs} +2 -2
- package/dist/preview-p5ZsiV5H.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-BMTASXPY.js → ActivityModeContent-DkTQxKSH.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-DofJ5Y6d.js → AgentDiffPane-q59j25HN.js} +2 -2
- package/dist/public/assets/{AgentThreadClientBinder-B6SCKpGN.js → AgentThreadClientBinder-r_vwrkS8.js} +1 -1
- package/dist/public/assets/{AppMenubar-8Yu49LrI.js → AppMenubar-69TlWIQ5.js} +1 -1
- package/dist/public/assets/{BugReportHistory-BVQJb7PU.js → BugReportHistory-BpVVcA5z.js} +1 -1
- package/dist/public/assets/{BugReportHistoryDialog-_mgVzUpk.js → BugReportHistoryDialog-1jJf6SqH.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-Br0HbEoO.js → CodeMirrorPropInput-D0vkBW6L.js} +3 -3
- package/dist/public/assets/{ConfigSharingInfoTooltip-Dz5-bsuu.js → ConfigSharingInfoTooltip-DBL_oQN-.js} +1 -1
- package/dist/public/assets/{ConsentDialogBody-BOStsOyA.js → ConsentDialogBody-BI66aSep.js} +1 -1
- package/dist/public/assets/{DiffView-DI7cYNCJ.js → DiffView-DHe2qKSH.js} +1 -1
- package/dist/public/assets/DocumentContext-nI82_Ey9.js +38 -0
- package/dist/public/assets/{EditorModeToggle-D6rNH9WB.js → EditorModeToggle-CWgtrWJu.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-BKNPm0-A.js → EnableSyncConfirmDialog-DNw1ACIK.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-BH_-AsXI.js → ExcalidrawDocEditor-D9RIMLLE.js} +6 -6
- package/dist/public/assets/FeedbackForm-DtFjotdd.js +1 -0
- package/dist/public/assets/{GraphPanel-fOz-MZ-A.js → GraphPanel-fkZRWaBc.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-BG-Pyo8V.js → ImportSkillDialog-DxlQ_a05.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-M5d2zRk3.js → LintConfigEditor-C7ui8Eo-.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-BWiYC5dS.js → ManagedArtifactProperties-CSBBIAdm.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-RWJ-WT5I.js +1 -0
- package/dist/public/assets/{McpConsentDialogBody-CwRVqAIu.js → McpConsentDialogBody-Br5W9Pss.js} +1 -1
- package/dist/public/assets/{Mermaid-DfHFZrVf.js → Mermaid-ImTX2BxI.js} +2 -2
- package/dist/public/assets/{MermaidDocEditor-CG5C-gsy.js → MermaidDocEditor-8nUao94a.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-BaVmOPiS.js → PropertyDisplayRow-Byp1IIUE.js} +2 -2
- package/dist/public/assets/{RegisteredAgentIcon-9IP3tgIz.js → RegisteredAgentIcon-D_jDwJpu.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-DPbSt3db.js → ReportBugDialogBody-BCldEkeI.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-C2oMK0Nl.js → SchemaConfigEditor-BwwZgItz.js} +1 -1
- package/dist/public/assets/{SessionsHost-DxbZGSrr.js → SessionsHost-Bm3gL2DW.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-DAKUZpYk.js → SettingsDialogBody-BmMhT_2k.js} +1 -1
- package/dist/public/assets/{ShareBranchSwitchDialog-C_pVfS08.js → ShareBranchSwitchDialog-D3iwikBy.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-f65F3P4j.js → ShareReceiveDialog-BPmOaV0V.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-DooAH6HZ.js → ShareReceiveMissDialog-Coy5-oRH.js} +1 -1
- package/dist/public/assets/{SkillCostValue-C2xg3KQR.js → SkillCostValue-B6TVsf2o.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-19neNY4_.js → SkillEditBanner-B9pszjmf.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-DSBVcSOn.js → SkillInstallMenu-CJzrDX6L.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-D2lLAD0d.js → SkillOriginInline-CZey0-WI.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-Ds6xqNqV.js → SkillToolbarControls-zTTB_G6l.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-Le_49a2U.js → SlidesToolbarControls-Cee-YLUn.js} +1 -1
- package/dist/public/assets/{SourceEditor-CtmefuhE.js → SourceEditor-D-u3wvTQ.js} +1 -1
- package/dist/public/assets/{TerminalPanel-Bq3D2u2L.js → TerminalPanel-Cf-vSSrN.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-nSjdfzvf.js → TerminalWindowApp-BXC4QUF2.js} +1 -1
- package/dist/public/assets/{TextDocEditor-wLlw3kKW.js → TextDocEditor-BLCKy42N.js} +1 -1
- package/dist/public/assets/{ThemePicker-Cfu6jytm.js → ThemePicker-BEO3X5aw.js} +1 -1
- package/dist/public/assets/{ThreadView-CLFEQzSt.js → ThreadView-BRSCN73i.js} +3 -3
- package/dist/public/assets/{TimelineDiffPane-DLikNJYo.js → TimelineDiffPane-BKVxf8dW.js} +2 -2
- package/dist/public/assets/{abnfDiagram-N423BO3Z-U4VtqGBo.js → abnfDiagram-N423BO3Z-C0-CVEEO.js} +1 -1
- package/dist/public/assets/{agent-diff-store-Dp7rytBq.js → agent-diff-store-9VJa6-5g.js} +1 -1
- package/dist/public/assets/{alert-dialog-D3_HT0Lf.js → alert-dialog-Cx4P6Ih4.js} +1 -1
- package/dist/public/assets/{ar-SA-G6X2FPQ2-ZIt309WY.js → ar-SA-G6X2FPQ2-DGA5H1ue.js} +1 -1
- package/dist/public/assets/{arc-DR7JhWzI.js → arc-C8mfZFbr.js} +1 -1
- package/dist/public/assets/architecture-TIHT7OUA-u5trqXy4.js +1 -0
- package/dist/public/assets/{architectureDiagram-T3A2C74G-tXECBSP6.js → architectureDiagram-T3A2C74G-COp-j7kB.js} +1 -1
- package/dist/public/assets/arrow-up-right-CXMA4cr5.js +1 -0
- package/dist/public/assets/{auth-state-cache-NqgltPww.js → auth-state-cache-BGdHT3yJ.js} +1 -1
- package/dist/public/assets/{az-AZ-76LH7QW2-D1EcwuV5.js → az-AZ-76LH7QW2-C85im219.js} +1 -1
- package/dist/public/assets/{bg-BG-XCXSNQG7-36y3JuKX.js → bg-BG-XCXSNQG7-CUCkzmBR.js} +1 -1
- package/dist/public/assets/{blockDiagram-VBNYF7ZC-Lzh-maol.js → blockDiagram-VBNYF7ZC-CUYbS6hW.js} +1 -1
- package/dist/public/assets/{bn-BD-2XOGV67Q-DWjMyrjR.js → bn-BD-2XOGV67Q-yEzIpC1C.js} +1 -1
- package/dist/public/assets/{braces-CDKuh9KW.js → braces-okUwnkYm.js} +1 -1
- package/dist/public/assets/{bug-report-send-manager-C7ZQagFv.js → bug-report-send-manager-CWQo74xi.js} +1 -1
- package/dist/public/assets/{c4Diagram-5PPSVZJV-Dv2DA9Ff.js → c4Diagram-5PPSVZJV-DvDulwKs.js} +1 -1
- package/dist/public/assets/{ca-ES-6MX7JW3Y-CP-4rxGx.js → ca-ES-6MX7JW3Y-OWyGidst.js} +1 -1
- package/dist/public/assets/{calendar-BfB8lsjW.js → calendar-DVeRRT6c.js} +1 -1
- package/dist/public/assets/{case-sensitive-BRpV9t7A.js → case-sensitive-B9mhUnHr.js} +1 -1
- package/dist/public/assets/channel-COcGroIe.js +1 -0
- package/dist/public/assets/check-Bzwwm-o4.js +1 -0
- package/dist/public/assets/{checkbox-DF_QVto8.js → checkbox-Bi7zk4c5.js} +1 -1
- package/dist/public/assets/{chevron-down-DT2zmBir.js → chevron-down-xENV92Te.js} +1 -1
- package/dist/public/assets/chevron-left-B1wYSm9K.js +1 -0
- package/dist/public/assets/chevron-right-BVvjaUfh.js +1 -0
- package/dist/public/assets/{chunk-2GRJ4B5K-C9V9XFHZ.js → chunk-2GRJ4B5K-DyJI2DjI.js} +1 -1
- package/dist/public/assets/chunk-2Q5K7J3B-BlfPP7nb.js +1 -0
- package/dist/public/assets/chunk-3NCLNEKW-d_v0RAnZ.js +1 -0
- package/dist/public/assets/{chunk-4I5QYGJK-DRvkWpJa.js → chunk-4I5QYGJK-CMhIWjZe.js} +1 -1
- package/dist/public/assets/{chunk-5FCAYU7R-B6wnKC5Z.js → chunk-5FCAYU7R-BMVgFCD0.js} +1 -1
- package/dist/public/assets/{chunk-5HE753X5-CXdQa0Iw.js → chunk-5HE753X5-B3KYB1aU.js} +1 -1
- package/dist/public/assets/{chunk-5JV3BV7I-5K453XCb.js → chunk-5JV3BV7I-DxS_m63V.js} +1 -1
- package/dist/public/assets/{chunk-5RXB4S5H-Bepujvi7.js → chunk-5RXB4S5H-DltIB3Tq.js} +1 -1
- package/dist/public/assets/{chunk-5TONJI2A-B7ADGJ95.js → chunk-5TONJI2A-8rr7Hm7V.js} +1 -1
- package/dist/public/assets/{chunk-5VM5RSS4-DJFon18P.js → chunk-5VM5RSS4-W0Hpq7PJ.js} +1 -1
- package/dist/public/assets/{chunk-6Q2QTUOP-uZ1QaaTd.js → chunk-6Q2QTUOP-BNJqKIB8.js} +1 -1
- package/dist/public/assets/{chunk-7BUUIJ7U-DEVgK4C5.js → chunk-7BUUIJ7U-CR0nXQRn.js} +1 -1
- package/dist/public/assets/{chunk-7Z6QIM7H-BaiL4HQb.js → chunk-7Z6QIM7H-DeOOqZeV.js} +1 -1
- package/dist/public/assets/{chunk-BIQX33UG-BCRpJvIo.js → chunk-BIQX33UG-EpcKIUw5.js} +1 -1
- package/dist/public/assets/{chunk-BO2N2NFS-BVKS5mdX.js → chunk-BO2N2NFS-CepakHPv.js} +3 -3
- package/dist/public/assets/{chunk-CQNSW5MT-Fea1rIgh.js → chunk-CQNSW5MT-KFmWjuaE.js} +1 -1
- package/dist/public/assets/{chunk-CYSBUYHQ-nUuNGvRl.js → chunk-CYSBUYHQ-BzqnFmtj.js} +1 -1
- package/dist/public/assets/{chunk-EIO257PC-Dbsk3Fhl.js → chunk-EIO257PC-B02-TNW8.js} +1 -1
- package/dist/public/assets/{chunk-EMLP6XTP-C-G-KGn9.js → chunk-EMLP6XTP-B2WwucMc.js} +1 -1
- package/dist/public/assets/{chunk-GF5L2VYU-bkTHrje2.js → chunk-GF5L2VYU-CxN4epH0.js} +1 -1
- package/dist/public/assets/{chunk-I66GZJ75-DdvvFHYK.js → chunk-I66GZJ75-CP2GhVHJ.js} +1 -1
- package/dist/public/assets/{chunk-J7OUQ5F2-Dkai_3ry.js → chunk-J7OUQ5F2-DB2NP1tU.js} +2 -2
- package/dist/public/assets/{chunk-JG7HCLWE-DuD1Q6Hl.js → chunk-JG7HCLWE-BmaBcoQT.js} +1 -1
- package/dist/public/assets/{chunk-JQJVKLGR-BVFBBTqn.js → chunk-JQJVKLGR-C_UEBYFh.js} +1 -1
- package/dist/public/assets/{chunk-JWPE2WC7-D5w3_tHx.js → chunk-JWPE2WC7-ewHjiSjT.js} +1 -1
- package/dist/public/assets/{chunk-K2UTITRG-CQahYOm6.js → chunk-K2UTITRG-BJBPIYUX.js} +4 -4
- package/dist/public/assets/{chunk-KBJHAD2P-Cu02YobZ.js → chunk-KBJHAD2P-SvZealg3.js} +1 -1
- package/dist/public/assets/{chunk-MOZMSUNE-BX8qCF5o.js → chunk-MOZMSUNE-BqVoeq-Z.js} +1 -1
- package/dist/public/assets/{chunk-NSK5VX7P-Cm6rtpZw.js → chunk-NSK5VX7P-B24wWiov.js} +1 -1
- package/dist/public/assets/{chunk-OSBZ3O6U-D6jJ4FxH.js → chunk-OSBZ3O6U-B-27O6Vr.js} +1 -1
- package/dist/public/assets/{chunk-QBLGF6JB-CDjITZxw.js → chunk-QBLGF6JB-Bhwe7R8z.js} +1 -1
- package/dist/public/assets/{chunk-QR6OTTB3-CdcXCJoC.js → chunk-QR6OTTB3-CPuJu4O9.js} +1 -1
- package/dist/public/assets/{chunk-R7FJI6CG-DfEovF_y.js → chunk-R7FJI6CG-Da8VCdQb.js} +1 -1
- package/dist/public/assets/{chunk-RYQCIY6F-BzaKuixW.js → chunk-RYQCIY6F-DLFjTppR.js} +1 -1
- package/dist/public/assets/{chunk-U6XO7XAA-C8eEqZWd.js → chunk-U6XO7XAA-o2GYyWCb.js} +1 -1
- package/dist/public/assets/{chunk-UBXNYLIW-tLiyG5ZI.js → chunk-UBXNYLIW-BQDXCcT8.js} +1 -1
- package/dist/public/assets/{chunk-W5SLKNZC-DuVZK-DG.js → chunk-W5SLKNZC-BSnYPJds.js} +1 -1
- package/dist/public/assets/{chunk-WRU74C26-1154g7A6.js → chunk-WRU74C26-NA2qfhE1.js} +1 -1
- package/dist/public/assets/chunk-XXDRQBXY-Eeo_7DB8.js +1 -0
- package/dist/public/assets/{chunk-YOTPTUD7-CVcdZWF6.js → chunk-YOTPTUD7-IpXTSG-1.js} +1 -1
- package/dist/public/assets/{chunk-ZIRB5QZD-Ce914HoD.js → chunk-ZIRB5QZD-D0iVBpjM.js} +1 -1
- package/dist/public/assets/{circle-alert-CuO28qX3.js → circle-alert-CKGYtHdt.js} +1 -1
- package/dist/public/assets/classDiagram-JCYQIIEL-D246yOIx.js +1 -0
- package/dist/public/assets/classDiagram-v2-OCEON4UE-DAc1VjXC.js +1 -0
- package/dist/public/assets/{client-version-C04OLNen.js → client-version-DD4hGHyX.js} +1 -1
- package/dist/public/assets/{cm-theme-CundV4JI.js → cm-theme-oWzSXbf4.js} +1 -1
- package/dist/public/assets/{comment-chips-CVBqFrEL.js → comment-chips-BWksZgYB.js} +1 -1
- package/dist/public/assets/{config-provider-BHs4LyOQ.js → config-provider-D2BCGlLV.js} +3 -3
- package/dist/public/assets/{cose-bilkent-JH36ORCC-QecUCjuD.js → cose-bilkent-JH36ORCC-BY5w1ifg.js} +1 -1
- package/dist/public/assets/{cs-CZ-2BRQDIVT-DrpA4rm5.js → cs-CZ-2BRQDIVT-CNF9y8K9.js} +1 -1
- package/dist/public/assets/cynefin-VYW2F7L2-B4ClFxtc.js +1 -0
- package/dist/public/assets/{cynefinDiagram-MW4NZA55-CE9Z5Vl5.js → cynefinDiagram-MW4NZA55-BWwd5iqY.js} +1 -1
- package/dist/public/assets/{da-DK-5WZEPLOC-DqcVW6r2.js → da-DK-5WZEPLOC-Blia_6Ss.js} +1 -1
- package/dist/public/assets/{dagre-DeJVwfs5.js → dagre-CeB4vlfW.js} +1 -1
- package/dist/public/assets/{dagre-VZM6K2ZE-l6JbWhTm.js → dagre-VZM6K2ZE-DGZytYl_.js} +1 -1
- package/dist/public/assets/{de-DE-XR44H4JA-c1g3B_1W.js → de-DE-XR44H4JA-Bd8AZ_tx.js} +1 -1
- package/dist/public/assets/{diagram-7IWD3JNH-R_54Evc_.js → diagram-7IWD3JNH-Wf-PIi35.js} +1 -1
- package/dist/public/assets/{diagram-B4RE2ZJO-jRIES5QB.js → diagram-B4RE2ZJO-Dj22fEj4.js} +1 -1
- package/dist/public/assets/{diagram-LBJQPF4R-BcO2HjWp.js → diagram-LBJQPF4R-CR7cvSjy.js} +1 -1
- package/dist/public/assets/{diagram-Q27KOJAE-Cx6r8Ane.js → diagram-Q27KOJAE-mb42FRtc.js} +1 -1
- package/dist/public/assets/{diagram-UB23O5K3-DqfBod7o.js → diagram-UB23O5K3-CTfmgppp.js} +1 -1
- package/dist/public/assets/{dialog-CeTXzamA.js → dialog-CNGLHo4Y.js} +1 -1
- package/dist/public/assets/{dist-BDokCQTT.js → dist-B2YZK8xP.js} +1 -1
- package/dist/public/assets/{dist-Dln1RION.js → dist-B4pxv-md.js} +1 -1
- package/dist/public/assets/{dist-Dvx6OW-b.js → dist-BCas6rK-.js} +1 -1
- package/dist/public/assets/{dist-DDg98E5q.js → dist-BPzBqd9z.js} +1 -1
- package/dist/public/assets/{dist-0WeLsvey2.js → dist-BkQJ7mnd2.js} +2 -2
- package/dist/public/assets/{dist-BkdK7CJv.js → dist-CTEsrXGw.js} +1 -1
- package/dist/public/assets/{dist-42PGOjVE.js → dist-CXDS0Fr6.js} +1 -1
- package/dist/public/assets/{dist-CbJimssg.js → dist-Cexu7O7F.js} +1 -1
- package/dist/public/assets/{dist-CmGSr9O-.js → dist-DAUEDzd8.js} +1 -1
- package/dist/public/assets/{dist-ZzZDT_qa.js → dist-DEDfvxCy.js} +1 -1
- package/dist/public/assets/{dist-Cxi87QtK.js → dist-Dl-SDTRn.js} +1 -1
- package/dist/public/assets/{dist-q2W-QRsN.js → dist-Dl0XBo_3.js} +1 -1
- package/dist/public/assets/{dist-DpEQ7fP3.js → dist-Duv9CObB.js} +1 -1
- package/dist/public/assets/{dist-DoGQZx5L.js → dist-DwyWIy9f.js} +1 -1
- package/dist/public/assets/{dist-DfNDNysF.js → dist-Wza7qMOs.js} +1 -1
- package/dist/public/assets/{doc-paths-CiuwB0oU.js → doc-paths-vtzfxIAt.js} +1 -1
- package/dist/public/assets/{documents-events-Bswa3218.js → documents-events-DyFOLelu.js} +1 -1
- package/dist/public/assets/{download-BDEHPw74.js → download-Bdmlj4Jo.js} +1 -1
- package/dist/public/assets/{dropdown-menu-C8skJt-Y.js → dropdown-menu-DRIarAms.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-BXEA7PRR-Bwwa1Mdz.js → ebnfDiagram-BXEA7PRR-DC9XdFNx.js} +1 -1
- package/dist/public/assets/{el-GR-BZB4AONW-Cr0PFYoQ.js → el-GR-BZB4AONW-DZuHDBq1.js} +1 -1
- package/dist/public/assets/{en-B4ZKOASM-CzKH7tBC.js → en-B4ZKOASM-BUOAYsfW.js} +1 -1
- package/dist/public/assets/{erDiagram-JOGREHBK-BXsgvN7L.js → erDiagram-JOGREHBK-iWDzvS_L.js} +1 -1
- package/dist/public/assets/{es-ES-U4NZUMDT-C_m9ako1.js → es-ES-U4NZUMDT-3QnbX6vr.js} +1 -1
- package/dist/public/assets/{eu-ES-A7QVB2H4-DpGVuA_J.js → eu-ES-A7QVB2H4-C7lSeC6u.js} +1 -1
- package/dist/public/assets/eventmodeling-45OFAUF4-VBndQWOJ.js +1 -0
- package/dist/public/assets/{eye-CXNadRZD.js → eye-DIJifYDY.js} +1 -1
- package/dist/public/assets/{fa-IR-HGAKTJCU-PN5-EanD.js → fa-IR-HGAKTJCU-KAW5YnG_.js} +1 -1
- package/dist/public/assets/{fi-FI-Z5N7JZ37-DywWtEre.js → fi-FI-Z5N7JZ37-BQrcMG_0.js} +1 -1
- package/dist/public/assets/{field-DiGsul30.js → field-BnGNvs-N.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-B4qIw1fG.js → file-tree-adapter-HHvj2nNS.js} +1 -1
- package/dist/public/assets/{file-tree-utils-BQSHH47w.js → file-tree-utils-D-D8igMV.js} +1 -1
- package/dist/public/assets/flowDiagram-UKHOOZJN-DF5TWQ08.js +1 -0
- package/dist/public/assets/{folder-config-api-3OH-7XRq.js → folder-config-api-B3yv7aJY.js} +1 -1
- package/dist/public/assets/{folder-open-Dokmmg9C.js → folder-open-5aQb9yif.js} +1 -1
- package/dist/public/assets/{fr-FR-RHASNOE6-d3yxt99e.js → fr-FR-RHASNOE6-Dy6kfAte.js} +1 -1
- package/dist/public/assets/{ganttDiagram-PKOTCBZU-DDPJ5Vmz.js → ganttDiagram-PKOTCBZU-2e3KWQ5A.js} +1 -1
- package/dist/public/assets/{git-branch-C3seqxdn.js → git-branch-BEl3Boky.js} +1 -1
- package/dist/public/assets/gitGraph-TEB2WS4Q-DHUs6vyl.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-DS77QQ5N-DV8nqTks.js → gitGraphDiagram-DS77QQ5N-CO3DFlWl.js} +1 -1
- package/dist/public/assets/{gl-ES-HMX3MZ6V-DsAptsoo.js → gl-ES-HMX3MZ6V-EiPywSaa.js} +1 -1
- package/dist/public/assets/globals-Bg7TE4FR.css +1 -0
- package/dist/public/assets/{graphlib-C2ULDrd4.js → graphlib-DSwTEXpw.js} +1 -1
- package/dist/public/assets/{hash-CXbTGfZC.js → hash-26j3E552.js} +1 -1
- package/dist/public/assets/{he-IL-6SHJWFNN-Dz2rQy78.js → he-IL-6SHJWFNN-Ct4kEvR-.js} +1 -1
- package/dist/public/assets/{hi-IN-IWLTKZ5I-pjrFW2z9.js → hi-IN-IWLTKZ5I-Cek-mACj.js} +1 -1
- package/dist/public/assets/{highlighted-body-OFNGDK62-R5erL3S3.js → highlighted-body-OFNGDK62-DBvGSv5B.js} +1 -1
- package/dist/public/assets/{history-CPr-xzs6.js → history-BteF85_l.js} +1 -1
- package/dist/public/assets/{hu-HU-A5ZG7DT2-BClp1Hmx.js → hu-HU-A5ZG7DT2-B9cZ18sJ.js} +1 -1
- package/dist/public/assets/i18n-UJBgk95d.js +1 -0
- package/dist/public/assets/{id-ID-SAP4L64H-nxQWqtlX.js → id-ID-SAP4L64H-z_imxKUa.js} +1 -1
- package/dist/public/assets/image-GAAHSSAO-DFv7e37S.js +1 -0
- package/dist/public/assets/index-UY97Q8v-.js +2098 -0
- package/dist/public/assets/{info-DIn-MtiX.js → info-CqQMSCez.js} +1 -1
- package/dist/public/assets/info-DKCQHKI2-CD6kTazz.js +1 -0
- package/dist/public/assets/{infoDiagram-6WML65LV-DPWJulz5.js → infoDiagram-6WML65LV-BArq_l8s.js} +1 -1
- package/dist/public/assets/{input-group-ChHhVUP_.js → input-group-DVpyeMx6.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-WSZJBQD7-DTJJS9BZ.js → ishikawaDiagram-WSZJBQD7-Cj3h357u.js} +1 -1
- package/dist/public/assets/{it-IT-JPQ66NNP-CMnh69L_.js → it-IT-JPQ66NNP-Bk1vs-4u.js} +1 -1
- package/dist/public/assets/{ja-JP-DBVTYXUO-kUpBHMVk.js → ja-JP-DBVTYXUO-DyGs37xf.js} +1 -1
- package/dist/public/assets/{journeyDiagram-NVQOT4AX-DSNwyC9g.js → journeyDiagram-NVQOT4AX-C-MxZYlE.js} +1 -1
- package/dist/public/assets/{kaa-6HZHGXH3-C33YyIjW.js → kaa-6HZHGXH3-Bw0g2ynu.js} +1 -1
- package/dist/public/assets/{kab-KAB-ZGHBKWFO-D3HSCwL8.js → kab-KAB-ZGHBKWFO-CTRAa943.js} +1 -1
- package/dist/public/assets/{kanban-definition-27J2QSJJ-B5B5rQlv.js → kanban-definition-27J2QSJJ-Dg30CEV-.js} +1 -1
- package/dist/public/assets/{kk-KZ-P5N5QNE5-CWaJscgE.js → kk-KZ-P5N5QNE5--rsYa4qa.js} +1 -1
- package/dist/public/assets/{km-KH-HSX4SM5Z-DmRVoVt9.js → km-KH-HSX4SM5Z-DQr4MQA5.js} +1 -1
- package/dist/public/assets/{ko-KR-MTYHY66A-DtEdWVy6.js → ko-KR-MTYHY66A-CFGQzmhC.js} +1 -1
- package/dist/public/assets/{ku-TR-6OUDTVRD-CdE2By-R.js → ku-TR-6OUDTVRD-5i2bTOt6.js} +1 -1
- package/dist/public/assets/{line-BX_DXx_6.js → line-sQdWat1D.js} +1 -1
- package/dist/public/assets/{linear-yKfiRb8l.js → linear-BhU5g7D6.js} +1 -1
- package/dist/public/assets/{lint-config-client-B_Zy2yNf.js → lint-config-client-CTfcCpXV.js} +1 -1
- package/dist/public/assets/{lint-plugin-meta-AbruPv8_.js → lint-plugin-meta-C15NfeTq.js} +1 -1
- package/dist/public/assets/{list-plus-Lm4FbPM9.js → list-plus-1_iMFVqs.js} +1 -1
- package/dist/public/assets/local-menu-action-bus-BuSRFm5g.js +1 -0
- package/dist/public/assets/{lt-LT-XHIRWOB4-Dy0Um1hj.js → lt-LT-XHIRWOB4-BKb7p1JD.js} +1 -1
- package/dist/public/assets/{lv-LV-5QDEKY6T-F4Gqvlf2.js → lv-LV-5QDEKY6T-B4dU8plL.js} +1 -1
- package/dist/public/assets/{map-BQLvsZRE.js → map-DSs4OVfF.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-hy-0vwkM.js → markdownlint-rule-browser-CoxOkILA.js} +1 -1
- package/dist/public/assets/mermaid-GHXKKRXX-Btzcf1TZ.js +1 -0
- package/dist/public/assets/{mermaid-parser.core-CmtFEtdo.js → mermaid-parser.core-CWNtRrX9.js} +2 -2
- package/dist/public/assets/{mermaid.core-W68NSbS2.js → mermaid.core-BKfDFKSP.js} +3 -3
- package/dist/public/assets/mermaid.core-BsJTOuVl.js +1 -0
- package/dist/public/assets/{mindmap-definition-FAOFIHXS-CJdkasm6.js → mindmap-definition-FAOFIHXS-HRlTx1-u.js} +1 -1
- package/dist/public/assets/minus-HJRULrSt.js +1 -0
- package/dist/public/assets/{miss-dialog-store-0sg4whjI.js → miss-dialog-store-CdkrAlK3.js} +1 -1
- package/dist/public/assets/{mr-IN-CRQNXWMA-C-rx5nCq.js → mr-IN-CRQNXWMA-d_3UP_ok.js} +1 -1
- package/dist/public/assets/{my-MM-5M5IBNSE-xJAdB_W6.js → my-MM-5M5IBNSE-C-tYgHss.js} +1 -1
- package/dist/public/assets/{navigation-targets-Df3QXcjS.js → navigation-targets-CMeQ2nTj.js} +1 -1
- package/dist/public/assets/{nb-NO-T6EIAALU-B8m3pGOf.js → nb-NO-T6EIAALU-BOHhV2mB.js} +1 -1
- package/dist/public/assets/{nl-NL-IS3SIHDZ-DvYXZ05s.js → nl-NL-IS3SIHDZ-9boNdlbg.js} +1 -1
- package/dist/public/assets/{nn-NO-6E72VCQL-Dy0PYPzE.js → nn-NO-6E72VCQL-5kGW4A5O.js} +1 -1
- package/dist/public/assets/note-window-mode-J_lykVfh.js +1 -0
- package/dist/public/assets/{now-2hoQsmwN.js → now-eUYS5OsE.js} +1 -1
- package/dist/public/assets/{oc-FR-POXYY2M6-DYP9IiCC.js → oc-FR-POXYY2M6-CaH7HGV-.js} +1 -1
- package/dist/public/assets/{ok-7HU1xjtN.js → ok-BrWqZFiT.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-DLCGOaFC.js → open-managed-artifact-tab-dBJBwk0w.js} +1 -1
- package/dist/public/assets/{ordinal-B960F-5k.js → ordinal-DJL8o-kw.js} +1 -1
- package/dist/public/assets/{pa-IN-N4M65BXN-B1BtbAQa.js → pa-IN-N4M65BXN-BJi5WsLw.js} +1 -1
- package/dist/public/assets/packet-7NZHBO7P-M7v9Z7hw.js +1 -0
- package/dist/public/assets/{panel-right-open-6pbxqqMD.js → panel-right-open-BXE3r3dB.js} +1 -1
- package/dist/public/assets/{paperclip-C6Bt4Kir.js → paperclip-C-okgtwN.js} +1 -1
- package/dist/public/assets/{pegDiagram-VL7TDLO6-DmyKkWD-.js → pegDiagram-VL7TDLO6-CR3sxlpW.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-luOT_9lJ.js → pending-receive-nav-store-B5aLXTYw.js} +1 -1
- package/dist/public/assets/percentages-BXMCSKIN-BeqO-ouV.js +1 -0
- package/dist/public/assets/pie-RZYD4A2V-DE_3nmDK.js +1 -0
- package/dist/public/assets/{pieDiagram-7S7Q4E2Y-DbB4HZ75.js → pieDiagram-7S7Q4E2Y-BAVndMcp.js} +1 -1
- package/dist/public/assets/{pl-PL-T2D74RX3-DXltPfSJ.js → pl-PL-T2D74RX3-DvSVV2Sk.js} +1 -1
- package/dist/public/assets/{progress-cNJPP0sp.js → progress-DDXDWJkv.js} +4 -4
- package/dist/public/assets/{project-paths-Be5oNlgO.js → project-paths-DQt8hUFo.js} +1 -1
- package/dist/public/assets/{prop-types-NQri49lM.js → prop-types-Dw4i5Pzf.js} +1 -1
- package/dist/public/assets/{pt-BR-5N22H2LF-BBI_kUdv.js → pt-BR-5N22H2LF-WJq2YbBU.js} +1 -1
- package/dist/public/assets/{pt-PT-UZXXM6DQ-uqy0GUTk.js → pt-PT-UZXXM6DQ-C0Duvhw3.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-CIZ2JOQS-BjHQcxZ0.js → quadrantDiagram-CIZ2JOQS-DQWmMrHu.js} +1 -1
- package/dist/public/assets/radar-I7S5WNFK-DrAAUcJY.js +1 -0
- package/dist/public/assets/railroad-3IZDKUUU-vTdwvGMP.js +1 -0
- package/dist/public/assets/railroad-abnf-AHOZXSZD-B7GLAnKx.js +1 -0
- package/dist/public/assets/railroad-ebnf-EBAXGLYW-D7lc0lJR.js +1 -0
- package/dist/public/assets/railroad-peg-LSFZ7HO6-CoUx7wsD.js +1 -0
- package/dist/public/assets/{railroadDiagram-AXF67PYL-CWE-Lz8D.js → railroadDiagram-AXF67PYL-C0qhLv0B.js} +1 -1
- package/dist/public/assets/{receive-store-wRD2KuhC.js → receive-store-cbtGGZ9i.js} +1 -1
- package/dist/public/assets/{refresh-cw-CMZXURW4.js → refresh-cw-D41gUk_B.js} +1 -1
- package/dist/public/assets/{requirementDiagram-LRYGKXZP-DVzRPfG6.js → requirementDiagram-LRYGKXZP-DmWo_VQm.js} +1 -1
- package/dist/public/assets/{ro-RO-JPDTUUEW-CwSumY42.js → ro-RO-JPDTUUEW-DD9cyVdC.js} +1 -1
- package/dist/public/assets/{ru-RU-B4JR7IUQ-LzvboDA-.js → ru-RU-B4JR7IUQ-5_52Q_Wb.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-W5VNT64P-BvGHv_UD.js → sankeyDiagram-W5VNT64P-J5Gp9uyi.js} +1 -1
- package/dist/public/assets/{select-CErmRiOd.js → select-fWSYgcDA.js} +1 -1
- package/dist/public/assets/{selection-context-ssulJfXk.js → selection-context-BcabMCnT.js} +1 -1
- package/dist/public/assets/{separator-DcX0NiAC.js → separator-BmK42_9U.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-SI44F4Z6-Ckszb4Mj.js → sequenceDiagram-SI44F4Z6-i_6ZSjfE.js} +1 -1
- package/dist/public/assets/{si-LK-N5RQ5JYF-C5hILlvg.js → si-LK-N5RQ5JYF-BTPhhyie.js} +1 -1
- package/dist/public/assets/{sizeCapture-X5ZJPWSS-BDI5VFzx.js → sizeCapture-X5ZJPWSS-C9mDWIT_.js} +1 -1
- package/dist/public/assets/{sk-SK-C5VTKIMK-CCvKNdO-.js → sk-SK-C5VTKIMK-DD9NSv5S.js} +1 -1
- package/dist/public/assets/{skill-actions-IIFKiA4b.js → skill-actions-dNZISPM-.js} +1 -1
- package/dist/public/assets/{skill-scope-CAVgRNo8.js → skill-scope-C0mo2HZh.js} +1 -1
- package/dist/public/assets/{skills-api-BmxNOfQ0.js → skills-api-C_StP2ff.js} +1 -1
- package/dist/public/assets/{sl-SI-NN7IZMDC-BfnXOjuK.js → sl-SI-NN7IZMDC-DtxXdh0P.js} +1 -1
- package/dist/public/assets/{spinner-BfQfD3gf.js → spinner-DmibE6UV.js} +1 -1
- package/dist/public/assets/{square-pen-zbdpw5xR.js → square-pen-BlKNuUz7.js} +1 -1
- package/dist/public/assets/{src-DAfekKTe.js → src-D3LmPlv1.js} +1 -1
- package/dist/public/assets/{src-D_jMrcY1.js → src-JLkedlZ8.js} +1 -1
- package/dist/public/assets/{stateDiagram-OKZ733FA-Bm4P0e_g.js → stateDiagram-OKZ733FA-b-4BGE9-.js} +1 -1
- package/dist/public/assets/stateDiagram-v2-UEYNNEHI-BkSmZC_p.js +1 -0
- package/dist/public/assets/subset-shared.chunk-BuBNd2H_.js +1 -0
- package/dist/public/assets/{subset-worker.chunk-DiIFi44a.js → subset-worker.chunk-PNot6qJM.js} +1 -1
- package/dist/public/assets/{sv-SE-XGPEYMSR-DU96U1G3.js → sv-SE-XGPEYMSR-BrLrPOqK.js} +1 -1
- package/dist/public/assets/{swimlanes-SLNWSIFB-iiVbZ3fC.js → swimlanes-SLNWSIFB-Czms9qC3.js} +2 -2
- package/dist/public/assets/swimlanesDiagram-ULZ7WXOC-C3GKm4s9.js +8 -0
- package/dist/public/assets/{ta-IN-2NMHFXQM-CQIbY_GB.js → ta-IN-2NMHFXQM-DwD_dVRw.js} +1 -1
- package/dist/public/assets/{tag-pill-input-lRng_LCn.js → tag-pill-input-DOK3Iwu7.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-BuGWbfE1.js → target-navigation-intent-iE_o5AFg.js} +1 -1
- package/dist/public/assets/{telemetry-impl-Cj_q40Ol.js → telemetry-impl-JfG1C4Ii.js} +2 -2
- package/dist/public/assets/{telemetry-startup-DjnediLY.js → telemetry-startup-ukYaFMYg.js} +1 -1
- package/dist/public/assets/terminal-CmHqE3At.js +1 -0
- package/dist/public/assets/{terminal-cli-display-DtlGtdop.js → terminal-cli-display-BZQS2rOc.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-BAi370wJ.js → terminal-launch-events-DT_27wCG.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-v1o4QDEL.js → terminal-telemetry-Zge_t1pH.js} +1 -1
- package/dist/public/assets/{text-viewer-languages-8mK7FOb6.js → text-viewer-languages-B-QzK84i.js} +2 -2
- package/dist/public/assets/{th-TH-HPSO5L25-CV6CDLuR.js → th-TH-HPSO5L25-CQ4NNj8w.js} +1 -1
- package/dist/public/assets/{timeline-definition-Z64GVDOM-CrQPhNwW.js → timeline-definition-Z64GVDOM-B5lIWea4.js} +1 -1
- package/dist/public/assets/{tr-TR-DEFEU3FU-C6Aa1Flg.js → tr-TR-DEFEU3FU-B83CxqxO.js} +1 -1
- package/dist/public/assets/{trash-2-DfA0xAM7.js → trash-2-BVoWHmfV.js} +1 -1
- package/dist/public/assets/treeView-QDETBFTQ-oKtO3_NQ.js +1 -0
- package/dist/public/assets/treemap-6X3UGDF4-i-sAzsOy.js +1 -0
- package/dist/public/assets/{triangle-alert-LClCSvEK.js → triangle-alert-CJVfCxE0.js} +1 -1
- package/dist/public/assets/typing-burst-detector-9a9I_C3E.js +8 -0
- package/dist/public/assets/{uk-UA-QMV73CPH-OWyPSQfb.js → uk-UA-QMV73CPH-Dv-8Anmo.js} +1 -1
- package/dist/public/assets/{undo-2-D0RXWwCv.js → undo-2-CXHp9Ngg.js} +1 -1
- package/dist/public/assets/{uninstall-BiXQbNQ4.js → uninstall-CDEBm9fT.js} +1 -1
- package/dist/public/assets/{use-activity-panel-C-pEmBHu.js → use-activity-panel-xYBxx5c3.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-UfawtLYp.js → use-apply-config-color-theme-C0gjDHWs.js} +1 -1
- package/dist/public/assets/{use-collab-url-DqLs_I38.js → use-collab-url-BBo_k1TT.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-yIlEKfu7.js → use-live-xterm-theme-DRqvSsHA.js} +1 -1
- package/dist/public/assets/{use-open-skill-Dse9eHkL.js → use-open-skill-CtcxRltp.js} +1 -1
- package/dist/public/assets/{use-popular-skills-BkpQsaFA.js → use-popular-skills-C8nnGJxp.js} +1 -1
- package/dist/public/assets/{use-settings-route-Lf1FP1Sa.js → use-settings-route-BLvEoiJR.js} +1 -1
- package/dist/public/assets/{use-skill-origin-CvIMw2zJ.js → use-skill-origin-DX_4jInC.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-DE4_bgnu.js → use-terminal-enabled-PblA9Ksh.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-DsLSXD0a.js → use-timeline-entry-diff-BbdgaWhQ.js} +2 -2
- package/dist/public/assets/{use-workspace-BZqaUk-j.js → use-workspace-BCxdx59D.js} +1 -1
- package/dist/public/assets/{vennDiagram-T6HMQDX7-DUxH4wy8.js → vennDiagram-T6HMQDX7-VmF9ZBTb.js} +1 -1
- package/dist/public/assets/{vi-VN-M7AON7JQ-MVSUDlZy.js → vi-VN-M7AON7JQ-B2DkADMO.js} +1 -1
- package/dist/public/assets/wardley-OPB4EBWU-Cw7yLxju.js +1 -0
- package/dist/public/assets/{wardleyDiagram-T6FBY63Y-CRduVCHa.js → wardleyDiagram-T6FBY63Y-CtNP6mmF.js} +1 -1
- package/dist/public/assets/{wrench-Bx808FyC.js → wrench-JX3g_hHJ.js} +1 -1
- package/dist/public/assets/x-wQUDJS55.js +1 -0
- package/dist/public/assets/{xychartDiagram-ELKLHX3M-ayUwPHsi.js → xychartDiagram-ELKLHX3M-BAHa9UcP.js} +1 -1
- package/dist/public/assets/{zh-CN-LNUGB5OW-D4zkPVC6.js → zh-CN-LNUGB5OW-DrO9Lxyg.js} +1 -1
- package/dist/public/assets/{zh-HK-E62DVLB3-Dy7q7eJs.js → zh-HK-E62DVLB3-Bmric47w.js} +1 -1
- package/dist/public/assets/{zh-TW-RAJ6MFWO-CPtRFViX.js → zh-TW-RAJ6MFWO-B4U0Q706.js} +1 -1
- package/dist/public/index.html +138 -137
- package/dist/public/uninstall.html +14 -14
- package/dist/{repair-launch-json-CRwFywBq.mjs → repair-launch-json-CtwUv4CE.mjs} +2 -2
- package/dist/{repair-mcp-configs-BQLEiFQa.mjs → repair-mcp-configs-CSIhiWby.mjs} +2 -2
- package/dist/repair-skills-BxzzWVm-.mjs +1 -0
- package/dist/{repair-skills-DIq6H0KE.mjs → repair-skills-D26UpUq7.mjs} +2 -2
- package/dist/{resolve-project-root-BjH69ZD8.mjs → resolve-project-root-C94rZ_5O.mjs} +2 -2
- package/dist/server-lock--BI6Lqjj.mjs +1 -0
- package/dist/{server-lock-RKPNHNqb.mjs → server-lock-Dngwkd_U.mjs} +2 -2
- package/dist/{skill-teardown-C_JJAnAZ.mjs → skill-teardown-CbmpKJso.mjs} +2 -2
- package/dist/src-8l-H1eWN.mjs +20 -0
- package/dist/{src-B_6tF_Gx.mjs → src-BHDHmhMl.mjs} +4 -4
- package/dist/{src-CNzlP6PP.mjs → src-BqEF6smt.mjs} +1 -1
- package/dist/src-CohGVfRj.mjs +1 -0
- package/dist/{src-BD1wHyiU.mjs → src-tR2kRwXj.mjs} +132 -132
- package/dist/start-BjZWHsvR.mjs +1 -0
- package/dist/{start-BqRZMdTT.mjs → start-CC_nXyuU.mjs} +3 -3
- package/package.json +4 -4
- package/dist/constants-CTfV3NOs.mjs +0 -2
- package/dist/git-handle-DaYxKcxM.mjs +0 -1
- package/dist/init-Bf0McBE9.mjs +0 -1
- package/dist/loader-DdkFu1fK.mjs +0 -1
- package/dist/md-manager-_lKMHY2F.mjs +0 -2
- package/dist/preview-ZrB__tgX.mjs +0 -1
- package/dist/public/assets/DocumentContext-Dh-Rr-aZ.js +0 -38
- package/dist/public/assets/FeedbackForm-CZ7NM1yL.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-Cu7PtFOL.js +0 -1
- package/dist/public/assets/architecture-TIHT7OUA-BkasmReP.js +0 -1
- package/dist/public/assets/arrow-up-right-BD5rQrDA.js +0 -1
- package/dist/public/assets/channel-DkPHFN0f.js +0 -1
- package/dist/public/assets/check-DDzb-wrU.js +0 -1
- package/dist/public/assets/chevron-left-7MFpt77_.js +0 -1
- package/dist/public/assets/chevron-right-D8IV-Ph_.js +0 -1
- package/dist/public/assets/chunk-2Q5K7J3B-Cfjqtkxz.js +0 -1
- package/dist/public/assets/chunk-3NCLNEKW-BYKJOcB6.js +0 -1
- package/dist/public/assets/chunk-XXDRQBXY-Bwmq4E1Q.js +0 -1
- package/dist/public/assets/classDiagram-JCYQIIEL-ZJNQWqPL.js +0 -1
- package/dist/public/assets/classDiagram-v2-OCEON4UE-BVcoIlfv.js +0 -1
- package/dist/public/assets/cynefin-VYW2F7L2-DvYWJxyz.js +0 -1
- package/dist/public/assets/eventmodeling-45OFAUF4-BIYIStQq.js +0 -1
- package/dist/public/assets/flowDiagram-UKHOOZJN-C7BD5YvS.js +0 -1
- package/dist/public/assets/gitGraph-TEB2WS4Q-Dj42vABH.js +0 -1
- package/dist/public/assets/globals-C8zrBTBL.css +0 -1
- package/dist/public/assets/i18n-pW7OFPfV.js +0 -1
- package/dist/public/assets/image-GAAHSSAO-DbE8jeIe.js +0 -1
- package/dist/public/assets/index-B6ddd51k.js +0 -2098
- package/dist/public/assets/info-DKCQHKI2-DoDfw9x-.js +0 -1
- package/dist/public/assets/local-menu-action-bus-IjTSMx8U.js +0 -1
- package/dist/public/assets/mermaid-GHXKKRXX-D2pBG5L4.js +0 -1
- package/dist/public/assets/mermaid.core-DNpF2SSh.js +0 -1
- package/dist/public/assets/minus-zMlnd3qf.js +0 -1
- package/dist/public/assets/packet-7NZHBO7P-COfpr2CC.js +0 -1
- package/dist/public/assets/percentages-BXMCSKIN-BA4UETkp.js +0 -1
- package/dist/public/assets/pie-RZYD4A2V-DNxV-985.js +0 -1
- package/dist/public/assets/radar-I7S5WNFK-StB9djRh.js +0 -1
- package/dist/public/assets/railroad-3IZDKUUU-COWcqbx-.js +0 -1
- package/dist/public/assets/railroad-abnf-AHOZXSZD-Cwi_YybN.js +0 -1
- package/dist/public/assets/railroad-ebnf-EBAXGLYW-BSovpXBC.js +0 -1
- package/dist/public/assets/railroad-peg-LSFZ7HO6-6Vmqt7TP.js +0 -1
- package/dist/public/assets/stateDiagram-v2-UEYNNEHI-D9_hTyIp.js +0 -1
- package/dist/public/assets/subset-shared.chunk-DCJmH73z.js +0 -1
- package/dist/public/assets/swimlanesDiagram-ULZ7WXOC-Hd_RccsN.js +0 -8
- package/dist/public/assets/terminal-4WK7jXvy.js +0 -1
- package/dist/public/assets/treeView-QDETBFTQ-BXlsBdsv.js +0 -1
- package/dist/public/assets/treemap-6X3UGDF4-Mb_AKp2H.js +0 -1
- package/dist/public/assets/typing-burst-detector-B7m2z9f_.js +0 -8
- package/dist/public/assets/wardley-OPB4EBWU-dqbQrHpX.js +0 -1
- package/dist/public/assets/x-C1LzPj_K.js +0 -1
- package/dist/repair-skills-D2u8xMCO.mjs +0 -1
- package/dist/server-lock-BZi8m82Z.mjs +0 -1
- package/dist/src-CCh8eL5q.mjs +0 -20
- package/dist/src-pDRg5ccv.mjs +0 -1
- package/dist/start-DzALqhgo.mjs +0 -1
- /package/dist/public/assets/{ActivityPanelDiffView-DLT5va9k.js → ActivityPanelDiffView-CgaFZtD7.js} +0 -0
- /package/dist/public/assets/{SkillModeBanner-Cfij5biF.js → SkillModeBanner-BRFTW7Zd.js} +0 -0
- /package/dist/public/assets/{__vite-browser-external-BpzCr_ou.js → __vite-browser-external-Ci1NQTFf.js} +0 -0
- /package/dist/public/assets/{agent-presence-3JajMNAq.js → agent-presence-B4IC4MV9.js} +0 -0
- /package/dist/public/assets/{app-menubar-gate-q1nJIutw.js → app-menubar-gate-Dyq1r1xM.js} +0 -0
- /package/dist/public/assets/{array-DO4pDyQ7.js → array-Ca_7zfOn.js} +0 -0
- /package/dist/public/assets/{asset-dispatch-BffGDRYN.js → asset-dispatch-BxzFY-y9.js} +0 -0
- /package/dist/public/assets/{auth-prompt-store-BXeyTyYx.js → auth-prompt-store-vAFATIFt.js} +0 -0
- /package/dist/public/assets/{badge-Bb7mpvxU.js → badge-D819pOsZ.js} +0 -0
- /package/dist/public/assets/{chunk-6U3AYISY-fX1E_nk2.js → chunk-6U3AYISY-C-nplzwN.js} +0 -0
- /package/dist/public/assets/{chunk-KEIR6QF5-d8CrmuEd.js → chunk-KEIR6QF5-Daj3WZbR.js} +0 -0
- /package/dist/public/assets/{chunk-SRAX5OIU-B7dPnL12.js → chunk-SRAX5OIU-BEvWJO3c.js} +0 -0
- /package/dist/public/assets/{chunk-Y2CYZVJY-aWKxesFC.js → chunk-Y2CYZVJY-B1lUkic5.js} +0 -0
- /package/dist/public/assets/{chunk-Z3N5DIM6-CNpC45dc.js → chunk-Z3N5DIM6-2xVL_dId.js} +0 -0
- /package/dist/public/assets/{chunk-ZUYEQ4TG-Z9Kr3Qsb.js → chunk-ZUYEQ4TG-CQSwzpWR.js} +0 -0
- /package/dist/public/assets/{clike-BqTLk6V7.js → clike-Ch26Qmt5.js} +0 -0
- /package/dist/public/assets/{code-highlighter-impl-CqBvFNiv.js → code-highlighter-impl-Cd7bLu8y.js} +0 -0
- /package/dist/public/assets/{colors-B42OMeyx.js → colors-6O6-4xPx.js} +0 -0
- /package/dist/public/assets/{copilot-BvcrBiQu.js → copilot-DMpTxujg.js} +0 -0
- /package/dist/public/assets/{createLucideIcon-IawHI4re.js → createLucideIcon-CAkY8Blx.js} +0 -0
- /package/dist/public/assets/{cursor-Dy0g2caC.js → cursor-2VSK5BUh.js} +0 -0
- /package/dist/public/assets/{cytoscape.esm-Dt8Ta-P6.js → cytoscape.esm-CyF35CGq.js} +0 -0
- /package/dist/public/assets/{defaultLocale-DxxsZVg9.js → defaultLocale-D6pwJDcg.js} +0 -0
- /package/dist/public/assets/{diff-u5V_A1YB.js → diff-BTDLDmWn.js} +0 -0
- /package/dist/public/assets/{directory-open-01563666-D2UlJbzy.js → directory-open-01563666-D5XpOJpI.js} +0 -0
- /package/dist/public/assets/{directory-open-4ed118d0-z5A7ul2e.js → directory-open-4ed118d0-Cjiog95W.js} +0 -0
- /package/dist/public/assets/{dist-CcrUlXUT.js → dist-BwWNYdG0.js} +0 -0
- /package/dist/public/assets/{dist-N46tlm2r.js → dist-CB9JlP8s.js} +0 -0
- /package/dist/public/assets/{dist-BL2TNIf3.js → dist-C_x1-g67.js} +0 -0
- /package/dist/public/assets/{documents-fetch-DMG54QRV.js → documents-fetch-DV1xQi4Z.js} +0 -0
- /package/dist/public/assets/{external-link-CxH7AG7J.js → external-link-CIs3ZL0b.js} +0 -0
- /package/dist/public/assets/{file-open-002ab408-s_iGAIkJ.js → file-open-002ab408-BMfHnumz.js} +0 -0
- /package/dist/public/assets/{file-open-7c801643-DWbyXRKQ.js → file-open-7c801643-CPvJ2Lhu.js} +0 -0
- /package/dist/public/assets/{file-save-3189631c-DutIwO69.js → file-save-3189631c-xXr-Dk51.js} +0 -0
- /package/dist/public/assets/{file-save-745eba88-Cx1iaxYt.js → file-save-745eba88-DC5dodNM.js} +0 -0
- /package/dist/public/assets/{file-tree-rename-validation-MFhw33W7.js → file-tree-rename-validation-C44g0J2h.js} +0 -0
- /package/dist/public/assets/{form-BZhYIbqM.js → form-L2L52iP2.js} +0 -0
- /package/dist/public/assets/{format-CWkG0foI.js → format-CyaLi0or.js} +0 -0
- /package/dist/public/assets/{gherkin-niswLhWK.js → gherkin-CypeqsOw.js} +0 -0
- /package/dist/public/assets/{globals-C5voaRc5.js → globals-Dad_9qHk.js} +0 -0
- /package/dist/public/assets/{go-DCCgKbjt.js → go-Bcb7Hfa3.js} +0 -0
- /package/dist/public/assets/{image-blob-reduce.esm-B6IJSUv2.js → image-blob-reduce.esm-DkbZiW0z.js} +0 -0
- /package/dist/public/assets/{init-BBWGEIrH.js → init-X_ANAGxw.js} +0 -0
- /package/dist/public/assets/{input-I1Mvaow8.js → input-a0WHtxX3.js} +0 -0
- /package/dist/public/assets/{isObject-DZ5_pJVn.js → isObject-2-KdVTyV.js} +0 -0
- /package/dist/public/assets/{known-skill-dirs-BXzevfAU.js → known-skill-dirs-BtyBErKU.js} +0 -0
- /package/dist/public/assets/{libesm-B7m5uxaw.js → libesm-mBLacfDP.js} +0 -0
- /package/dist/public/assets/{lru-string-cache-CEQLtS-9.js → lru-string-cache-Cc7rikda.js} +0 -0
- /package/dist/public/assets/{lua-B35xytUy.js → lua-0ClDTGlq.js} +0 -0
- /package/dist/public/assets/{messages-CtlqcdTj.js → messages-B7csyV27.js} +0 -0
- /package/dist/public/assets/{messages-CJdQEZYP.js → messages-BcR8jLMO.js} +0 -0
- /package/dist/public/assets/{messages-fJqQmhka.js → messages-Bg0RMNN1.js} +0 -0
- /package/dist/public/assets/{messages-CGqWrXZK.js → messages-Bg1eGvm2.js} +0 -0
- /package/dist/public/assets/{messages-Cgi0xg9T.js → messages-CZE1y4NZ.js} +0 -0
- /package/dist/public/assets/{messages-YHyKhEK1.js → messages-C_pdrnaV.js} +0 -0
- /package/dist/public/assets/{messages-CSJ16uA9.js → messages-C_ximtJ3.js} +0 -0
- /package/dist/public/assets/{messages-BkL6oWHg.js → messages-CmkoIyvq.js} +0 -0
- /package/dist/public/assets/{messages-CGw43ytR.js → messages-DDcoa_2T.js} +0 -0
- /package/dist/public/assets/{messages-COuGBUFr.js → messages-DeIEbqwd.js} +0 -0
- /package/dist/public/assets/{messages-CZa_BmA2.js → messages-Dv8wA9Ym.js} +0 -0
- /package/dist/public/assets/{messages-C3xDNJLe.js → messages-S7GnIPsZ.js} +0 -0
- /package/dist/public/assets/{min-Blkp6AN9.js → min-B6fjqEav.js} +0 -0
- /package/dist/public/assets/{panel-Do94xfkL.js → panel-DNPki55m.js} +0 -0
- /package/dist/public/assets/{panzoom.es-DbKxxf0L.js → panzoom.es-DNGwWbz6.js} +0 -0
- /package/dist/public/assets/{parse-api-error-RlJ5hnUA.js → parse-api-error-DcnXKbfT.js} +0 -0
- /package/dist/public/assets/{path-DB0YkgfR.js → path-xSBrNHof.js} +0 -0
- /package/dist/public/assets/{pdf-D1gEirhR.js → pdf-BqNVNwcr.js} +0 -0
- /package/dist/public/assets/{pdf.worker-DRJtDPZ7.js → pdf.worker-DW3F2B7X.js} +0 -0
- /package/dist/public/assets/{perl-CDTo2iyq.js → perl-CRAPUgGj.js} +0 -0
- /package/dist/public/assets/{pica-iMpjNb-X.js → pica-DfYs9nh_.js} +0 -0
- /package/dist/public/assets/{platform-labels-a3gk_AS8.js → platform-labels-ePF0gcem.js} +0 -0
- /package/dist/public/assets/{popover-Rvl_AsUU.js → popover-MKPgXNPk.js} +0 -0
- /package/dist/public/assets/{properties-DXEYJi9Y.js → properties-DsCKpj9y.js} +0 -0
- /package/dist/public/assets/{r-CGovMm-H.js → r-DKk4sl64.js} +0 -0
- /package/dist/public/assets/{rough.esm-Bc6MybHM.js → rough.esm-B3SH-vza.js} +0 -0
- /package/dist/public/assets/{roundRect-DjKj_8gM.js → roundRect-c37gVikV.js} +0 -0
- /package/dist/public/assets/{ruby-BzUaAyZc.js → ruby-De3HsNyr.js} +0 -0
- /package/dist/public/assets/{schema-fields-view-intent-D5671sPh.js → schema-fields-view-intent-DCUTojNw.js} +0 -0
- /package/dist/public/assets/{share-metadata-rows-CSTN28dW.js → share-metadata-rows-JAHDqWDY.js} +0 -0
- /package/dist/public/assets/{shell-_Pg8lfKe.js → shell-Co7K0fwY.js} +0 -0
- /package/dist/public/assets/{skeleton-DIxLroLR.js → skeleton-BZIHOzZH.js} +0 -0
- /package/dist/public/assets/{sortable.esm-DVUoPZjJ.js → sortable.esm-DK-jMveF.js} +0 -0
- /package/dist/public/assets/{sql-C0-EXPZB.js → sql-CSeQm6MO.js} +0 -0
- /package/dist/public/assets/{src-DG1oemu2.js → src-we-4-j9S.js} +0 -0
- /package/dist/public/assets/{startup-marks-CzkHuO_z.js → startup-marks-Br1wFcMD.js} +0 -0
- /package/dist/public/assets/{stex-D2L90EPe.js → stex-Ctq_QO83.js} +0 -0
- /package/dist/public/assets/{swift-C7F0BgoI.js → swift-Cw9hIozN.js} +0 -0
- /package/dist/public/assets/{tabs-r9BJxNSQ.js → tabs-C_h0VJ9w.js} +0 -0
- /package/dist/public/assets/{terminal-command-events-CaYhHIDg.js → terminal-command-events-z-N381nZ.js} +0 -0
- /package/dist/public/assets/{textarea-BtqZ3yY1.js → textarea-BoMa_3jF.js} +0 -0
- /package/dist/public/assets/{thread-client-Ox08BqB2.js → thread-client-wO3wM3Uc.js} +0 -0
- /package/dist/public/assets/{thread-draft-staging-D-3dp2ov.js → thread-draft-staging-BHVsJW6S.js} +0 -0
- /package/dist/public/assets/{timeline-diff-store-BaXPeva3.js → timeline-diff-store-ym5Oz1UF.js} +0 -0
- /package/dist/public/assets/{toml-CnVMEKmL.js → toml-SYtR-303.js} +0 -0
- /package/dist/public/assets/{tool-list-format-BjLHl4sC.js → tool-list-format-D9WYxB73.js} +0 -0
- /package/dist/public/assets/{use-apply-config-theme-yjXI2GwT.js → use-apply-config-theme-B1eLRQeV.js} +0 -0
- /package/dist/public/assets/{use-installed-clis-vg6izNL9.js → use-installed-clis-t29XGX_x.js} +0 -0
- /package/dist/public/assets/{useLintConfigViewMode-CZc7NC96.js → useLintConfigViewMode-BvPSErDD.js} +0 -0
- /package/dist/public/assets/{workspace-paths-BKo6L6w1.js → workspace-paths-CD0W1etA.js} +0 -0
|
@@ -396,9 +396,9 @@ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#pl
|
|
|
396
396
|
`,PLUGIN_SECURE_PROXY_MISSING_CHAT_MODEL:`Could not find a chat model defined in the secure proxy plugin configuration.
|
|
397
397
|
Please provide a chat model before proceeding with creating an answer session.
|
|
398
398
|
Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#plugin-secure-proxy
|
|
399
|
-
`,ANSWER_SESSION_LAST_MESSAGE_IS_NOT_ASSISTANT:`The last message in the session is not an assistant message. Cannot regenerate non-assistant messages.`,PLUGIN_COMPONENT_CONFLICT:`The component "%s" is already defined. The plugin "%s" is trying to redefine it.`};function zG(e,...t){let n=Error(gG(RG[e]??`Unsupported Orama Error code: ${e}`,...t));return n.code=e,`captureStackTrace`in Error.prototype&&Error.captureStackTrace(n),n}function BG(e){return{raw:Number(e),formatted:bG(e)}}function VG(e){if(e.id){if(typeof e.id!=`string`)throw zG(`DOCUMENT_ID_MUST_BE_STRING`,typeof e.id);return e.id}return SG()}function HG(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];if(t!==void 0&&!(r===`geopoint`&&typeof t==`object`&&typeof t.lon==`number`&&typeof t.lat==`number`)&&!(r===`enum`&&(typeof t==`string`||typeof t==`number`))){if(r===`enum[]`&&Array.isArray(t)){let e=t.length;for(let r=0;r<e;r++)if(typeof t[r]!=`string`&&typeof t[r]!=`number`)return n+`.`+r;continue}if(KG(r)){let e=YG(r);if(!Array.isArray(t)||t.length!==e)throw zG(`INVALID_INPUT_VECTOR`,n,e,t.length);continue}if(qG(r)){if(!Array.isArray(t))return n;let e=JG(r),i=t.length;for(let r=0;r<i;r++)if(typeof t[r]!==e)return n+`.`+r;continue}if(typeof r==`object`){if(!t||typeof t!=`object`)return n;let e=HG(t,r);if(e)return n+`.`+e;continue}if(typeof t!==r)return n}}}var UG={string:!1,number:!1,boolean:!1,enum:!1,geopoint:!1,"string[]":!0,"number[]":!0,"boolean[]":!0,"enum[]":!0},WG={"string[]":`string`,"number[]":`number`,"boolean[]":`boolean`,"enum[]":`enum`};function GG(e){return e===`geopoint`}function KG(e){return typeof e==`string`&&/^vector\[\d+\]$/.test(e)}function qG(e){return typeof e==`string`&&UG[e]}function JG(e){return WG[e]}function YG(e){let t=Number(e.slice(7,-1));switch(!0){case isNaN(t):throw zG(`INVALID_VECTOR_VALUE`,e);case t<=0:throw zG(`INVALID_VECTOR_SIZE`,e);default:return t}}function XG(){return{idToInternalId:new Map,internalIdToId:[],save:ZG,load:QG}}function ZG(e){return{internalIdToId:e.internalIdToId}}function QG(e,t){let{internalIdToId:n}=t;e.internalDocumentIDStore.idToInternalId.clear(),e.internalDocumentIDStore.internalIdToId=[];let r=n.length;for(let t=0;t<r;t++){let r=n[t];e.internalDocumentIDStore.idToInternalId.set(r,t+1),e.internalDocumentIDStore.internalIdToId.push(r)}}function $G(e,t){if(typeof t==`string`){let n=e.idToInternalId.get(t);if(n)return n;let r=e.idToInternalId.size+1;return e.idToInternalId.set(t,r),e.internalIdToId.push(t),r}return t>e.internalIdToId.length?$G(e,t.toString()):t}function eK(e,t){if(e.internalIdToId.length<t)throw Error(`Invalid internalId ${t}`);return e.internalIdToId[t-1]}function tK(e,t){return{sharedInternalDocumentStore:t,docs:{},count:0}}function nK(e,t){let n=$G(e.sharedInternalDocumentStore,t);return e.docs[n]}function rK(e,t){let n=t.length,r=Array.from({length:n});for(let i=0;i<n;i++){let n=$G(e.sharedInternalDocumentStore,t[i]);r[i]=e.docs[n]}return r}function iK(e){return e.docs}function aK(e,t,n,r){return e.docs[n]===void 0?(e.docs[n]=r,e.count++,!0):!1}function oK(e,t){let n=$G(e.sharedInternalDocumentStore,t);return e.docs[n]===void 0?!1:(delete e.docs[n],e.count--,!0)}function sK(e){return e.count}function cK(e,t){let n=t;return{docs:n.docs,count:n.count,sharedInternalDocumentStore:e}}function lK(e){return{docs:e.docs,count:e.count}}function uK(){return{create:tK,get:nK,getMultiple:rK,getAll:iK,store:aK,remove:oK,count:sK,load:cK,save:lK}}var dK=[`beforeInsert`,`afterInsert`,`beforeRemove`,`afterRemove`,`beforeUpdate`,`afterUpdate`,`beforeUpsert`,`afterUpsert`,`beforeSearch`,`afterSearch`,`beforeInsertMultiple`,`afterInsertMultiple`,`beforeRemoveMultiple`,`afterRemoveMultiple`,`beforeUpdateMultiple`,`afterUpdateMultiple`,`beforeUpsertMultiple`,`afterUpsertMultiple`,`beforeLoad`,`afterLoad`,`afterCreate`];function fK(e,t){let n=[],r=e.plugins?.length;if(!r)return n;for(let i=0;i<r;i++)try{let r=e.plugins[i];typeof r[t]==`function`&&n.push(r[t])}catch(e){throw console.error(`Caught error in getAllPluginsByHook:`,e),zG(`PLUGIN_CRASHED`)}return n}var pK=[`tokenizer`,`index`,`documentsStore`,`sorter`,`pinning`],mK=[`validateSchema`,`getDocumentIndexId`,`getDocumentProperties`,`formatElapsedTime`];function hK(e,t,n,r){if(e.some(jG))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function gK(e,t,n){if(e.some(jG))return(async()=>{for(let r of e)await r(t,n)})();for(let r of e)r(t,n)}function _K(e,t,n,r,i){if(e.some(jG))return(async()=>{for(let a of e)await a(t,n,r,i)})();for(let a of e)a(t,n,r,i)}function vK(e,t,n,r){if(e.some(jG))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function yK(e,t){if(e.some(jG))return(async()=>{for(let n of e)await n(t)})();for(let n of e)n(t)}var bK=class e{k;v;l=null;r=null;h=1;constructor(e,t){this.k=e,this.v=new Set(t)}updateHeight(){this.h=Math.max(e.getHeight(this.l),e.getHeight(this.r))+1}static getHeight(e){return e?e.h:0}getBalanceFactor(){return e.getHeight(this.l)-e.getHeight(this.r)}rotateLeft(){let e=this.r;return this.r=e.l,e.l=this,this.updateHeight(),e.updateHeight(),e}rotateRight(){let e=this.l;return this.l=e.r,e.r=this,this.updateHeight(),e.updateHeight(),e}toJSON(){return{k:this.k,v:Array.from(this.v),l:this.l?this.l.toJSON():null,r:this.r?this.r.toJSON():null,h:this.h}}static fromJSON(t){let n=new e(t.k,t.v);return n.l=t.l?e.fromJSON(t.l):null,n.r=t.r?e.fromJSON(t.r):null,n.h=t.h,n}},xK=class e{root=null;insertCount=0;constructor(e,t){e!==void 0&&t!==void 0&&(this.root=new bK(e,t))}insert(e,t,n=1e3){this.root=this.insertNode(this.root,e,t,n)}insertMultiple(e,t,n=1e3){for(let r of t)this.insert(e,r,n)}rebalance(){this.root&&=this.rebalanceNode(this.root)}toJSON(){return{root:this.root?this.root.toJSON():null,insertCount:this.insertCount}}static fromJSON(t){let n=new e;return n.root=t.root?bK.fromJSON(t.root):null,n.insertCount=t.insertCount||0,n}insertNode(e,t,n,r){if(e===null)return new bK(t,[n]);let i=[],a=e,o=null;for(;a!==null;)if(i.push({parent:o,node:a}),t<a.k)if(a.l===null){a.l=new bK(t,[n]),i.push({parent:a,node:a.l});break}else o=a,a=a.l;else if(t>a.k)if(a.r===null){a.r=new bK(t,[n]),i.push({parent:a,node:a.r});break}else o=a,a=a.r;else return a.v.add(n),e;let s=!1;this.insertCount++%r===0&&(s=!0);for(let t=i.length-1;t>=0;t--){let{parent:n,node:r}=i[t];if(r.updateHeight(),s){let t=this.rebalanceNode(r);n?n.l===r?n.l=t:n.r===r&&(n.r=t):e=t}}return e}rebalanceNode(e){let t=e.getBalanceFactor();if(t>1){if(e.l&&e.l.getBalanceFactor()>=0)return e.rotateRight();if(e.l)return e.l=e.l.rotateLeft(),e.rotateRight()}if(t<-1){if(e.r&&e.r.getBalanceFactor()<=0)return e.rotateLeft();if(e.r)return e.r=e.r.rotateRight(),e.rotateLeft()}return e}find(e){let t=this.findNodeByKey(e);return t?t.v:null}contains(e){return this.find(e)!==null}getSize(){let e=0,t=[],n=this.root;for(;n||t.length>0;){for(;n;)t.push(n),n=n.l;n=t.pop(),e++,n=n.r}return e}isBalanced(){if(!this.root)return!0;let e=[this.root];for(;e.length>0;){let t=e.pop(),n=t.getBalanceFactor();if(Math.abs(n)>1)return!1;t.l&&e.push(t.l),t.r&&e.push(t.r)}return!0}remove(e){this.root=this.removeNode(this.root,e)}removeDocument(e,t){let n=this.findNodeByKey(e);n&&(n.v.size===1?this.root=this.removeNode(this.root,e):n.v=new Set([...n.v.values()].filter(e=>e!==t)))}findNodeByKey(e){let t=this.root;for(;t;)if(e<t.k)t=t.l;else if(e>t.k)t=t.r;else return t;return null}removeNode(e,t){if(e===null)return null;let n=[],r=e;for(;r!==null&&r.k!==t;)n.push(r),r=t<r.k?r.l:r.r;if(r===null)return e;if(r.l===null||r.r===null){let t=r.l?r.l:r.r;if(n.length===0)e=t;else{let e=n[n.length-1];e.l===r?e.l=t:e.r=t}}else{let e=r,t=r.r;for(;t.l!==null;)e=t,t=t.l;r.k=t.k,r.v=t.v,e.l===t?e.l=t.r:e.r=t.r,r=e}n.push(r);for(let t=n.length-1;t>=0;t--){let r=n[t];r.updateHeight();let i=this.rebalanceNode(r);if(t>0){let e=n[t-1];e.l===r?e.l=i:e.r===r&&(e.r=i)}else e=i}return e}rangeSearch(e,t){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),i.k>=e&&i.k<=t)for(let e of i.v)n.add(e);if(i.k>t)break;i=i.r}return n}greaterThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.r;if(i=r.pop(),t&&i.k>=e||!t&&i.k>e)for(let e of i.v)n.add(e);else if(i.k<=e)break;i=i.l}return n}lessThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),t&&i.k<=e||!t&&i.k<e)for(let e of i.v)n.add(e);else if(i.k>e)break;i=i.r}return n}},SK=class e{numberToDocumentId;constructor(){this.numberToDocumentId=new Map}insert(e,t){this.numberToDocumentId.has(e)?this.numberToDocumentId.get(e).add(t):this.numberToDocumentId.set(e,new Set([t]))}find(e){let t=this.numberToDocumentId.get(e);return t?Array.from(t):null}remove(e){this.numberToDocumentId.delete(e)}removeDocument(e,t){let n=this.numberToDocumentId.get(t);n&&(n.delete(e),n.size===0&&this.numberToDocumentId.delete(t))}contains(e){return this.numberToDocumentId.has(e)}getSize(){let e=0;for(let t of this.numberToDocumentId.values())e+=t.size;return e}filter(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`eq`:{let t=e[n],r=this.numberToDocumentId.get(t);return r?Array.from(r):[]}case`in`:{let t=e[n],r=new Set;for(let e of t){let t=this.numberToDocumentId.get(e);if(t)for(let e of t)r.add(e)}return Array.from(r)}case`nin`:{let t=new Set(e[n]),r=new Set;for(let[e,n]of this.numberToDocumentId.entries())if(!t.has(e))for(let e of n)r.add(e);return Array.from(r)}default:throw Error(`Invalid operation`)}}filterArr(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`containsAll`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e].filter(e=>t.has(e))));return Array.from(r)}case`containsAny`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e,...t]));return Array.from(r)}default:throw Error(`Invalid operation`)}}static fromJSON(t){if(!t.numberToDocumentId)throw Error(`Invalid Flat Tree JSON`);let n=new e;for(let[e,r]of t.numberToDocumentId)n.numberToDocumentId.set(e,new Set(r));return n}toJSON(){return{numberToDocumentId:Array.from(this.numberToDocumentId.entries()).map(([e,t])=>[e,Array.from(t)])}}};function CK(e,t,n){if(n<0)return-1;if(e===t)return 0;let r=e.length,i=t.length;if(r===0)return i<=n?i:-1;if(i===0)return r<=n?r:-1;let a=Math.abs(r-i);if(e.startsWith(t))return a<=n?a:-1;if(t.startsWith(e))return 0;if(a>n)return-1;let o=[];for(let e=0;e<=r;e++){o[e]=[e];for(let t=1;t<=i;t++)o[e][t]=e===0?t:0}for(let a=1;a<=r;a++){let r=1/0;for(let n=1;n<=i;n++)e[a-1]===t[n-1]?o[a][n]=o[a-1][n-1]:o[a][n]=Math.min(o[a-1][n]+1,o[a][n-1]+1,o[a-1][n-1]+1),r=Math.min(r,o[a][n]);if(r>n)return-1}return o[r][i]<=n?o[r][i]:-1}function wK(e,t,n){let r=CK(e,t,n);return{distance:r,isBounded:r>=0}}var TK=class e{k;s;c=new Map;d=new Set;e;w=``;constructor(e,t,n){this.k=e,this.s=t,this.e=n}updateParent(e){this.w=e.w+this.s}addDocument(e){this.d.add(e)}removeDocument(e){return this.d.delete(e)}findAllWords(e,t,n,r){let i=[this];for(;i.length>0;){let a=i.pop();if(a.e){let{w:i,d:o}=a;if(n&&i!==t)continue;if(CG(e,i)!==null)if(r)if(Math.abs(t.length-i.length)<=r&&wK(t,i,r).isBounded)e[i]=[];else continue;else e[i]=[];if(CG(e,i)!=null&&o.size>0){let t=e[i];for(let e of o)t.includes(e)||t.push(e)}}a.c.size>0&&i.push(...a.c.values())}return e}insert(t,n){let r=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=r.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c){if(r=s,i+=l,i===a){s.e||=!0,s.addDocument(n);return}continue}let u=o.slice(0,l),d=o.slice(l),f=t.slice(i+l),p=new e(u[0],u,!1);if(r.c.set(u[0],p),p.updateParent(r),s.s=d,s.k=d[0],p.c.set(d[0],s),s.updateParent(p),f){let t=new e(f[0],f,!0);t.addDocument(n),p.c.set(f[0],t),t.updateParent(p)}else p.e=!0,p.addDocument(n);return}else{let a=new e(o,t.slice(i),!0);a.addDocument(n),r.c.set(o,a),a.updateParent(r);return}}r.e||=!0,r.addDocument(n)}_findLevenshtein(e,t,n,r,i){let a=[{node:this,index:t,tolerance:n}];for(;a.length>0;){let{node:t,index:n,tolerance:o}=a.pop();if(t.w.startsWith(e)){t.findAllWords(i,e,!1,0);continue}if(o<0)continue;if(t.e){let{w:n,d:a}=t;if(n&&(wK(e,n,r).isBounded&&(i[n]=[]),CG(i,n)!==void 0&&a.size>0)){let e=new Set(i[n]);for(let t of a)e.add(t);i[n]=Array.from(e)}}if(n>=e.length)continue;let s=e[n];if(t.c.has(s)){let e=t.c.get(s);a.push({node:e,index:n+1,tolerance:o})}a.push({node:t,index:n+1,tolerance:o-1});for(let[e,r]of t.c)a.push({node:r,index:n,tolerance:o-1}),e!==s&&a.push({node:r,index:n+1,tolerance:o-1})}}find(e){let{term:t,exact:n,tolerance:r}=e;if(r&&!n){let e={};return this._findLevenshtein(t,0,r,r,e),e}else{let e=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=e.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c)e=s,i+=l;else if(i+l===a)if(l===a-i){if(n)return{};{let e={};return s.findAllWords(e,t,n,r),e}}else return{};else return{}}else return{}}let o={};return e.findAllWords(o,t,n,r),o}}contains(e){let t=this,n=0,r=e.length;for(;n<r;){let i=e[n],a=t.c.get(i);if(a){let i=a.s,o=i.length,s=0;for(;s<o&&n+s<r&&i[s]===e[n+s];)s++;if(s<o)return!1;n+=o,t=a}else return!1}return!0}removeWord(e){if(!e)return!1;let t=this,n=e.length,r=[];for(let i=0;i<n;i++){let n=e[i];if(t.c.has(n)){let e=t.c.get(n);r.push({parent:t,character:n}),i+=e.s.length-1,t=e}else return!1}for(t.d.clear(),t.e=!1;r.length>0&&t.c.size===0&&!t.e&&t.d.size===0;){let{parent:e,character:n}=r.pop();e.c.delete(n),t=e}return!0}removeDocumentByWord(e,t,n=!0){if(!e)return!0;let r=this,i=e.length;for(let a=0;a<i;a++){let i=e[a];if(r.c.has(i)){let o=r.c.get(i);a+=o.s.length-1,r=o,n&&r.w!==e||r.removeDocument(t)}else return!1}return!0}static getCommonPrefix(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e.charCodeAt(r)===t.charCodeAt(r);)r++;return e.slice(0,r)}toJSON(){return{w:this.w,s:this.s,e:this.e,k:this.k,d:Array.from(this.d),c:Array.from(this.c?.entries())?.map(([e,t])=>[e,t.toJSON()])}}static fromJSON(t){let n=new e(t.k,t.s,t.e);return n.w=t.w,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([t,n])=>[t,e.fromJSON(n)])||[]),n}},EK=class e extends TK{constructor(){super(``,``,!1)}static fromJSON(t){let n=new e;return n.w=t.w,n.s=t.s,n.e=t.e,n.k=t.k,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([e,t])=>[e,TK.fromJSON(t)])||[]),n}toJSON(){return super.toJSON()}},DK=2,OK=6371e3,kK=class e{point;docIDs;left;right;parent;constructor(e,t){this.point=e,this.docIDs=new Set(t),this.left=null,this.right=null,this.parent=null}toJSON(){return{point:this.point,docIDs:Array.from(this.docIDs),left:this.left?this.left.toJSON():null,right:this.right?this.right.toJSON():null}}static fromJSON(t,n=null){let r=new e(t.point,t.docIDs);return r.parent=n,t.left&&(r.left=e.fromJSON(t.left,r)),t.right&&(r.right=e.fromJSON(t.right,r)),r}},AK=class e{root;nodeMap;constructor(){this.root=null,this.nodeMap=new Map}getPointKey(e){return`${e.lon},${e.lat}`}insert(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);if(r){t.forEach(e=>r.docIDs.add(e));return}let i=new kK(e,t);if(this.nodeMap.set(n,i),this.root==null){this.root=i;return}let a=this.root,o=0;for(;;){if(o%DK===0)if(e.lon<a.point.lon){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}else if(e.lat<a.point.lat){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}o++}}contains(e){let t=this.getPointKey(e);return this.nodeMap.has(t)}getDocIDsByCoordinates(e){let t=this.getPointKey(e),n=this.nodeMap.get(t);return n?Array.from(n.docIDs):null}removeDocByID(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);r&&(r.docIDs.delete(t),r.docIDs.size===0&&(this.nodeMap.delete(n),this.deleteNode(r)))}deleteNode(e){let t=e.parent,n=e.left?e.left:e.right;n&&(n.parent=t),t?t.left===e?t.left=n:t.right===e&&(t.right=n):(this.root=n,this.root&&(this.root.parent=null))}searchByRadius(t,n,r=!0,i=`asc`,a=!1){let o=a?e.vincentyDistance:e.haversineDistance,s=[{node:this.root,depth:0}],c=[];for(;s.length>0;){let{node:e,depth:i}=s.pop();if(e==null)continue;let a=o(t,e.point);(r?a<=n:a>n)&&c.push({point:e.point,docIDs:Array.from(e.docIDs)}),e.left!=null&&s.push({node:e.left,depth:i+1}),e.right!=null&&s.push({node:e.right,depth:i+1})}return i&&c.sort((e,n)=>{let r=o(t,e.point),a=o(t,n.point);return i.toLowerCase()===`asc`?r-a:a-r}),c}searchByPolygon(t,n=!0,r=null,i=!1){let a=[{node:this.root,depth:0}],o=[];for(;a.length>0;){let{node:r,depth:i}=a.pop();if(r==null)continue;r.left!=null&&a.push({node:r.left,depth:i+1}),r.right!=null&&a.push({node:r.right,depth:i+1});let s=e.isPointInPolygon(t,r.point);(s&&n||!s&&!n)&&o.push({point:r.point,docIDs:Array.from(r.docIDs)})}let s=e.calculatePolygonCentroid(t);if(r){let t=i?e.vincentyDistance:e.haversineDistance;o.sort((e,n)=>{let i=t(s,e.point),a=t(s,n.point);return r.toLowerCase()===`asc`?i-a:a-i})}return o}toJSON(){return{root:this.root?this.root.toJSON():null}}static fromJSON(t){let n=new e;return t.root&&(n.root=kK.fromJSON(t.root),n.buildNodeMap(n.root)),n}buildNodeMap(e){if(e==null)return;let t=this.getPointKey(e.point);this.nodeMap.set(t,e),e.left&&this.buildNodeMap(e.left),e.right&&this.buildNodeMap(e.right)}static calculatePolygonCentroid(e){let t=0,n=0,r=0,i=e.length;for(let a=0,o=i-1;a<i;o=a++){let i=e[a].lon,s=e[a].lat,c=e[o].lon,l=e[o].lat,u=i*l-c*s;t+=u,n+=(i+c)*u,r+=(s+l)*u}t/=2;let a=6*t;return n/=a,r/=a,{lon:n,lat:r}}static isPointInPolygon(e,t){let n=!1,r=t.lon,i=t.lat,a=e.length;for(let t=0,o=a-1;t<a;o=t++){let a=e[t].lon,s=e[t].lat,c=e[o].lon,l=e[o].lat;s>i!=l>i&&r<(c-a)*(i-s)/(l-s)+a&&(n=!n)}return n}static haversineDistance(e,t){let n=Math.PI/180,r=e.lat*n,i=t.lat*n,a=(t.lat-e.lat)*n,o=(t.lon-e.lon)*n,s=Math.sin(a/2)*Math.sin(a/2)+Math.cos(r)*Math.cos(i)*Math.sin(o/2)*Math.sin(o/2);return OK*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))}static vincentyDistance(e,t){let n=6378137,r=1/298.257223563,i=(1-r)*n,a=Math.PI/180,o=e.lat*a,s=t.lat*a,c=(t.lon-e.lon)*a,l=Math.atan((1-r)*Math.tan(o)),u=Math.atan((1-r)*Math.tan(s)),d=Math.sin(l),f=Math.cos(l),p=Math.sin(u),m=Math.cos(u),h=c,g,_=1e3,v,y,b,x,S,C;do{let e=Math.sin(h),t=Math.cos(h);if(v=Math.sqrt(m*e*(m*e)+(f*p-d*m*t)*(f*p-d*m*t)),v===0)return 0;y=d*p+f*m*t,b=Math.atan2(v,y),x=f*m*e/v,S=1-x*x,C=y-2*d*p/S,isNaN(C)&&(C=0);let n=r/16*S*(4+r*(4-3*S));g=h,h=c+(1-n)*r*x*(b+n*v*(C+n*y*(-1+2*C*C)))}while(Math.abs(h-g)>1e-12&&--_>0);if(_===0)return NaN;let w=S*(n*n-i*i)/(i*i),T=1+w/16384*(4096+w*(-768+w*(320-175*w))),E=w/1024*(256+w*(-128+w*(74-47*w))),D=E*v*(C+E/4*(y*(-1+2*C*C)-E/6*C*(-3+4*v*v)*(-3+4*C*C)));return i*T*(b-D)}},jK=class e{true;false;constructor(){this.true=new Set,this.false=new Set}insert(e,t){t?this.true.add(e):this.false.add(e)}delete(e,t){t?this.true.delete(e):this.false.delete(e)}getSize(){return this.true.size+this.false.size}toJSON(){return{true:Array.from(this.true),false:Array.from(this.false)}}static fromJSON(t){let n=new e;return n.true=new Set(t.true),n.false=new Set(t.false),n}};function MK(e,t,n,r,i,{k:a,b:o,d:s}){return Math.log(1+(n-t+.5)/(t+.5))*(s+e*(a+1))/(e+a*(1-o+o*r/i))}var NK=class e{size;vectors=new Map;constructor(e){this.size=e}add(e,t){t instanceof Float32Array||(t=new Float32Array(t));let n=PK(t,this.size);this.vectors.set(e,[n,t])}remove(e){this.vectors.delete(e)}find(e,t,n){return e instanceof Float32Array||(e=new Float32Array(e)),FK(e,n,this.vectors,this.size,t)}toJSON(){let e=[];for(let[t,[n,r]]of this.vectors)e.push([t,[n,Array.from(r)]]);return{size:this.size,vectors:e}}static fromJSON(t){let n=t,r=new e(n.size);for(let[e,[t,i]]of n.vectors)r.vectors.set(e,[t,new Float32Array(i)]);return r}};function PK(e,t){let n=0;for(let r=0;r<t;r++)n+=e[r]*e[r];return Math.sqrt(n)}function FK(e,t,n,r,i){let a=PK(e,r),o=[],s=t||n.keys();for(let t of s){let s=n.get(t);if(!s)continue;let c=s[0],l=s[1],u=0;for(let t=0;t<r;t++)u+=e[t]*l[t];let d=u/(a*c);d>=i&&o.push([t,d])}return o}function IK(e,t,n,r,i){let a=$G(e.sharedInternalDocumentStore,n);e.avgFieldLength[t]=((e.avgFieldLength[t]??0)*(i-1)+r.length)/i,e.fieldLengths[t][a]=r.length,e.frequencies[t][a]={}}function LK(e,t,n,r,i){let a=0;for(let e of r)e===i&&a++;let o=$G(e.sharedInternalDocumentStore,n),s=a/r.length;e.frequencies[t][o][i]=s,i in e.tokenOccurrences[t]||(e.tokenOccurrences[t][i]=0),e.tokenOccurrences[t][i]=(e.tokenOccurrences[t][i]??0)+1}function RK(e,t,n,r){let i=$G(e.sharedInternalDocumentStore,n);r>1?e.avgFieldLength[t]=(e.avgFieldLength[t]*r-e.fieldLengths[t][i])/(r-1):e.avgFieldLength[t]=void 0,e.fieldLengths[t][i]=void 0,e.frequencies[t][i]=void 0}function zK(e,t,n){e.tokenOccurrences[t][n]--}function BK(e,t,n,r,i=``){r||={sharedInternalDocumentStore:t,indexes:{},vectorIndexes:{},searchableProperties:[],searchablePropertiesWithTypes:{},frequencies:{},tokenOccurrences:{},avgFieldLength:{},fieldLengths:{}};for(let[a,o]of Object.entries(n)){let n=`${i}${i?`.`:``}${a}`;if(typeof o==`object`&&!Array.isArray(o)){BK(e,t,o,r,n);continue}if(KG(o))r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o,r.vectorIndexes[n]={type:`Vector`,node:new NK(YG(o)),isArray:!1};else{let e=/\[/.test(o);switch(o){case`boolean`:case`boolean[]`:r.indexes[n]={type:`Bool`,node:new jK,isArray:e};break;case`number`:case`number[]`:r.indexes[n]={type:`AVL`,node:new xK(0,[]),isArray:e};break;case`string`:case`string[]`:r.indexes[n]={type:`Radix`,node:new EK,isArray:e},r.avgFieldLength[n]=0,r.frequencies[n]={},r.tokenOccurrences[n]={},r.fieldLengths[n]={};break;case`enum`:case`enum[]`:r.indexes[n]={type:`Flat`,node:new SK,isArray:e};break;case`geopoint`:r.indexes[n]={type:`BKD`,node:new AK,isArray:e};break;default:throw zG(`INVALID_SCHEMA_TYPE`,Array.isArray(o)?`array`:o,n)}r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o}}return r}function VK(e,t,n,r,i,a,o,s){return c=>{let{type:l,node:u}=t.indexes[n];switch(l){case`Bool`:u[c?`true`:`false`].add(r);break;case`AVL`:{let e=s?.avlRebalanceThreshold??1;u.insert(c,r,e);break}case`Radix`:{let s=a.tokenize(c,i,n,!1);e.insertDocumentScoreParameters(t,n,r,s,o);for(let i of s)e.insertTokenScoreParameters(t,n,r,s,i),u.insert(i,r);break}case`Flat`:u.insert(c,r);break;case`BKD`:u.insert(c,[r]);break}}}function HK(e,t,n,r,i,a,o,s,c,l,u){if(KG(o))return UK(t,n,a,r,i);let d=VK(e,t,n,i,s,c,l,u);if(!qG(o))return d(a);let f=a,p=f.length;for(let e=0;e<p;e++)d(f[e])}function UK(e,t,n,r,i){e.vectorIndexes[t].node.add(i,n)}function WK(e,t,n,r,i,a,o,s,c,l){if(KG(o))return t.vectorIndexes[n].node.remove(i),!0;let{type:u,node:d}=t.indexes[n];switch(u){case`AVL`:return d.removeDocument(a,i),!0;case`Bool`:return d[a?`true`:`false`].delete(i),!0;case`Radix`:{let o=c.tokenize(a,s,n);e.removeDocumentScoreParameters(t,n,r,l);for(let r of o)e.removeTokenScoreParameters(t,n,r),d.removeDocumentByWord(r,i);return!0}case`Flat`:return d.removeDocument(i,a),!0;case`BKD`:return d.removeDocByID(a,i),!1}}function GK(e,t,n,r,i,a,o,s,c,l){if(!qG(o))return WK(e,t,n,r,i,a,o,s,c,l);let u=JG(o),d=a,f=d.length;for(let a=0;a<f;a++)WK(e,t,n,r,i,d[a],u,s,c,l);return!0}function KK(e,t,n,r,i,a,o,s,c,l){let u=Array.from(r),d=e.avgFieldLength[t],f=e.fieldLengths[t],p=e.tokenOccurrences[t],m=e.frequencies[t],h=typeof p[n]==`number`?p[n]??0:0,g=u.length;for(let e=0;e<g;e++){let r=u[e];if(c&&!c.has(r))continue;l.has(r)||l.set(r,new Map);let p=l.get(r);p.set(t,(p.get(t)||0)+1);let g=MK(m?.[r]?.[n]??0,h,i,f[r],d,a);o.has(r)?o.set(r,o.get(r)+g*s):o.set(r,g*s)}}function qK(e,t,n,r,i,a,o,s,c,l,u,d=0){let f=n.tokenize(t,r),p=f.length||1,m=new Map,h=new Map,g=new Map;for(let n of i){if(!(n in e.indexes))continue;let r=e.indexes[n],{type:i}=r;if(i!==`Radix`)throw zG(`WRONG_SEARCH_PROPERTY_TYPE`,n);let d=s[n]??1;if(d<=0)throw zG(`INVALID_BOOST_VALUE`,d);f.length===0&&!t&&f.push(``);let p=f.length;for(let t=0;t<p;t++){let i=f[t],s=r.node.find({term:i,exact:a,tolerance:o}),p=Object.keys(s);p.length>0&&h.set(i,!0);let _=p.length;for(let t=0;t<_;t++){let r=p[t],i=s[r];KK(e,n,r,i,l,c,g,d,u,m)}}}let _=Array.from(g.entries()).map(([e,t])=>[e,t]).sort((e,t)=>t[1]-e[1]);if(_.length===0)return[];if(d===1)return _;if(d===0){if(p===1)return _;for(let e of f)if(!h.get(e))return[];return _.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1})}let v=_.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1});if(v.length>0){let e=_.filter(([e])=>!v.some(([t])=>t===e)),t=Math.ceil(e.length*d);return[...v,...e.slice(0,t)]}return _}function JK(e,t,n,r){if(`and`in n&&n.and&&Array.isArray(n.and)){let i=n.and;return i.length===0?new Set:NG(...i.map(n=>JK(e,t,n,r)))}if(`or`in n&&n.or&&Array.isArray(n.or)){let i=n.or;return i.length===0?new Set:i.map(n=>JK(e,t,n,r)).reduce((e,t)=>FG(e,t),new Set)}if(`not`in n&&n.not){let i=n.not,a=new Set,o=e.sharedInternalDocumentStore;for(let e=1;e<=o.internalIdToId.length;e++)a.add(e);return IG(a,JK(e,t,i,r))}let i=Object.keys(n),a=i.reduce((e,t)=>({[t]:new Set,...e}),{});for(let o of i){let i=n[o];if(e.indexes[o]===void 0)throw zG(`UNKNOWN_FILTER_PROPERTY`,o);let{node:s,type:c,isArray:l}=e.indexes[o];if(c===`Bool`){let e=s,t=i?e.true:e.false;a[o]=FG(a[o],t);continue}if(c===`BKD`){let e;if(`radius`in i)e=`radius`;else if(`polygon`in i)e=`polygon`;else throw Error(`Invalid operation ${i}`);if(e===`radius`){let{value:t,coordinates:n,unit:r=`m`,inside:c=!0,highPrecision:l=!1}=i[e],u=kG(t,r),d=s.searchByRadius(n,u,c,void 0,l);a[o]=eq(a[o],d)}else{let{coordinates:t,inside:n=!0,highPrecision:r=!1}=i[e],c=s.searchByPolygon(t,n,void 0,r);a[o]=eq(a[o],c)}continue}if(c===`Radix`&&(typeof i==`string`||Array.isArray(i))){for(let e of[i].flat()){let n=t.tokenize(e,r,o);for(let e of n){let t=s.find({term:e,exact:!0});a[o]=iq(a[o],t)}}continue}let u=Object.keys(i);if(u.length>1)throw zG(`INVALID_FILTER_OPERATION`,u.length);if(c===`Flat`){let e=new Set(l?s.filterArr(i):s.filter(i));a[o]=FG(a[o],e);continue}if(c===`AVL`){let e=u[0],t=i[e],n;switch(e){case`gt`:n=s.greaterThan(t,!1);break;case`gte`:n=s.greaterThan(t,!0);break;case`lt`:n=s.lessThan(t,!1);break;case`lte`:n=s.lessThan(t,!0);break;case`eq`:n=s.find(t)??new Set;break;case`between`:{let[e,r]=t;n=s.rangeSearch(e,r);break}default:throw zG(`INVALID_FILTER_OPERATION`,e)}a[o]=FG(a[o],n)}}return NG(...Object.values(a))}function YK(e){return e.searchableProperties}function XK(e){return e.searchablePropertiesWithTypes}function ZK(e,t){let{indexes:n,vectorIndexes:r,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}=t,u={},d={};for(let e of Object.keys(n)){let{node:t,type:r,isArray:i}=n[e];switch(r){case`Radix`:u[e]={type:`Radix`,node:EK.fromJSON(t),isArray:i};break;case`Flat`:u[e]={type:`Flat`,node:SK.fromJSON(t),isArray:i};break;case`AVL`:u[e]={type:`AVL`,node:xK.fromJSON(t),isArray:i};break;case`BKD`:u[e]={type:`BKD`,node:AK.fromJSON(t),isArray:i};break;case`Bool`:u[e]={type:`Bool`,node:jK.fromJSON(t),isArray:i};break;default:u[e]=n[e]}}for(let e of Object.keys(r))d[e]={type:`Vector`,isArray:!1,node:NK.fromJSON(r[e])};return{sharedInternalDocumentStore:e,indexes:u,vectorIndexes:d,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}}function QK(e){let{indexes:t,vectorIndexes:n,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}=e,l={};for(let e of Object.keys(n))l[e]=n[e].node.toJSON();let u={};for(let e of Object.keys(t)){let{type:n,node:r,isArray:i}=t[e];n===`Flat`||n===`Radix`||n===`AVL`||n===`BKD`||n===`Bool`?u[e]={type:n,node:r.toJSON(),isArray:i}:(u[e]=t[e],u[e].node=u[e].node.toJSON())}return{indexes:u,vectorIndexes:l,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}}function $K(){return{create:BK,insert:HK,remove:GK,insertDocumentScoreParameters:IK,insertTokenScoreParameters:LK,removeDocumentScoreParameters:RK,removeTokenScoreParameters:zK,calculateResultScores:KK,search:qK,searchByWhereClause:JK,getSearchableProperties:YK,getSearchablePropertiesWithTypes:XK,load:ZK,save:QK}}function eq(e,t){e||=new Set;let n=t.length;for(let r=0;r<n;r++){let n=t[r].docIDs,i=n.length;for(let t=0;t<i;t++)e.add(n[t])}return e}function tq(e,t,n=!1){let r=n?AK.vincentyDistance:AK.haversineDistance,i=[],a=[];for(let{point:n}of e)a.push(r(t,n));let o=Math.max(...a),s=0;for(let{docIDs:t}of e){let e=o-a[s]+1;for(let n of t)i.push([n,e]);s++}return i.sort((e,t)=>t[1]-e[1]),i}function nq(e,t){let n=Object.keys(e);if(n.length!==1)return{isGeoOnly:!1};let r=n[0],i=e[r];if(t.indexes[r]===void 0)return{isGeoOnly:!1};let{type:a}=t.indexes[r];return a===`BKD`&&i&&(`radius`in i||`polygon`in i)?{isGeoOnly:!0,geoProperty:r,geoOperation:i}:{isGeoOnly:!1}}function rq(e,t){let n=e,r=nq(t,n);if(!r.isGeoOnly||!r.geoProperty||!r.geoOperation)return null;let{node:i}=n.indexes[r.geoProperty],a=r.geoOperation,o=i,s;if(`radius`in a){let{value:e,coordinates:t,unit:n=`m`,inside:r=!0,highPrecision:i=!1}=a.radius,c=t,l=kG(e,n);return s=o.searchByRadius(c,l,r,`asc`,i),tq(s,c,i)}else if(`polygon`in a){let{coordinates:e,inside:t=!0,highPrecision:n=!1}=a.polygon;s=o.searchByPolygon(e,t,`asc`,n);let r=AK.calculatePolygonCentroid(e);return tq(s,r,n)}return null}function iq(e,t){e||=new Set;let n=Object.keys(t),r=n.length;for(let i=0;i<r;i++){let r=t[n[i]],a=r.length;for(let t=0;t<a;t++)e.add(r[t])}return e}function aq(e,t,n,r,i){let a={language:e.tokenizer.language,sharedInternalDocumentStore:t,enabled:!0,isSorted:!0,sortableProperties:[],sortablePropertiesWithTypes:{},sorts:{}};for(let[o,s]of Object.entries(n)){let n=`${i}${i?`.`:``}${o}`;if(!r.includes(n)){if(typeof s==`object`&&!Array.isArray(s)){let i=aq(e,t,s,r,n);hG(a.sortableProperties,i.sortableProperties),a.sorts={...a.sorts,...i.sorts},a.sortablePropertiesWithTypes={...a.sortablePropertiesWithTypes,...i.sortablePropertiesWithTypes};continue}if(!KG(s))switch(s){case`boolean`:case`number`:case`string`:a.sortableProperties.push(n),a.sortablePropertiesWithTypes[n]=s,a.sorts[n]={docs:new Map,orderedDocsToRemove:new Map,orderedDocs:[],type:s};break;case`geopoint`:case`enum`:continue;case`enum[]`:case`boolean[]`:case`number[]`:case`string[]`:continue;default:throw zG(`INVALID_SORT_SCHEMA_TYPE`,Array.isArray(s)?`array`:s,n)}}}return a}function oq(e,t,n,r){return r?.enabled===!1?{disabled:!0}:aq(e,t,n,(r||{}).unsortableProperties||[],``)}function sq(e,t,n,r){if(!e.enabled)return;e.isSorted=!1;let i=$G(e.sharedInternalDocumentStore,n),a=e.sorts[t];a.orderedDocsToRemove.has(i)&&mq(e,t),a.docs.set(i,a.orderedDocs.length),a.orderedDocs.push([i,r])}function cq(e){if(e.isSorted||!e.enabled)return;let t=Object.keys(e.sorts);for(let n of t)fq(e,n);e.isSorted=!0}function lq(e,t,n){return t[1].localeCompare(n[1],cG(e))}function uq(e,t){return e[1]-t[1]}function dq(e,t){return t[1]?-1:1}function fq(e,t){let n=e.sorts[t],r;switch(n.type){case`string`:r=lq.bind(null,e.language);break;case`number`:r=uq.bind(null);break;case`boolean`:r=dq.bind(null);break}n.orderedDocs.sort(r);let i=n.orderedDocs.length;for(let e=0;e<i;e++){let t=n.orderedDocs[e][0];n.docs.set(t,e)}}function pq(e){let t=Object.keys(e.sorts);for(let n of t)mq(e,n)}function mq(e,t){let n=e.sorts[t];n.orderedDocsToRemove.size&&(n.orderedDocs=n.orderedDocs.filter(e=>!n.orderedDocsToRemove.has(e[0])),n.orderedDocsToRemove.clear())}function hq(e,t,n){if(!e.enabled)return;let r=e.sorts[t],i=$G(e.sharedInternalDocumentStore,n);r.docs.get(i)&&(r.docs.delete(i),r.orderedDocsToRemove.set(i,!0))}function gq(e,t,n){if(!e.enabled)throw zG(`SORT_DISABLED`);let r=n.property,i=n.order===`DESC`,a=e.sorts[r];if(!a)throw zG(`UNABLE_TO_SORT_ON_UNKNOWN_FIELD`,r,e.sortableProperties.join(`, `));return mq(e,r),cq(e),t.sort((t,n)=>{let r=a.docs.get($G(e.sharedInternalDocumentStore,t[0])),o=a.docs.get($G(e.sharedInternalDocumentStore,n[0])),s=r!==void 0,c=o!==void 0;return!s&&!c?0:s?c?i?o-r:r-o:-1:1}),t}function _q(e){return e.enabled?e.sortableProperties:[]}function vq(e){return e.enabled?e.sortablePropertiesWithTypes:{}}function yq(e,t){let n=t;if(!n.enabled)return{enabled:!1};let r=Object.keys(n.sorts).reduce((e,t)=>{let{docs:r,orderedDocs:i,type:a}=n.sorts[t];return e[t]={docs:new Map(Object.entries(r).map(([e,t])=>[+e,t])),orderedDocsToRemove:new Map,orderedDocs:i,type:a},e},{});return{sharedInternalDocumentStore:e,language:n.language,sortableProperties:n.sortableProperties,sortablePropertiesWithTypes:n.sortablePropertiesWithTypes,sorts:r,enabled:!0,isSorted:n.isSorted}}function bq(e){if(!e.enabled)return{enabled:!1};pq(e),cq(e);let t=Object.keys(e.sorts).reduce((t,n)=>{let{docs:r,orderedDocs:i,type:a}=e.sorts[n];return t[n]={docs:Object.fromEntries(r.entries()),orderedDocs:i,type:a},t},{});return{language:e.language,sortableProperties:e.sortableProperties,sortablePropertiesWithTypes:e.sortablePropertiesWithTypes,sorts:t,enabled:e.enabled,isSorted:e.isSorted}}function xq(){return{create:oq,insert:sq,remove:hq,save:bq,load:yq,sortBy:gq,getSortableProperties:_q,getSortablePropertiesWithTypes:vq}}var Sq=192,Cq=383,wq=[65,65,65,65,65,65,65,67,69,69,69,69,73,73,73,73,69,78,79,79,79,79,79,null,79,85,85,85,85,89,80,115,97,97,97,97,97,97,97,99,101,101,101,101,105,105,105,105,101,110,111,111,111,111,111,null,111,117,117,117,117,121,112,121,65,97,65,97,65,97,67,99,67,99,67,99,67,99,68,100,68,100,69,101,69,101,69,101,69,101,69,101,71,103,71,103,71,103,71,103,72,104,72,104,73,105,73,105,73,105,73,105,73,105,73,105,74,106,75,107,107,76,108,76,108,76,108,76,108,76,108,78,110,78,110,78,110,110,78,110,79,111,79,111,79,111,79,111,82,114,82,114,82,114,83,115,83,115,83,115,83,115,84,116,84,116,84,116,85,117,85,117,85,117,85,117,85,117,85,117,87,119,89,121,89,90,122,90,122,90,122,115];function Tq(e){return e<Sq||e>Cq?e:wq[e-Sq]||e}function Eq(e){let t=[];for(let n=0;n<e.length;n++)t[n]=Tq(e.charCodeAt(n));return String.fromCharCode(...t)}var Dq={ational:`ate`,tional:`tion`,enci:`ence`,anci:`ance`,izer:`ize`,bli:`ble`,alli:`al`,entli:`ent`,eli:`e`,ousli:`ous`,ization:`ize`,ation:`ate`,ator:`ate`,alism:`al`,iveness:`ive`,fulness:`ful`,ousness:`ous`,aliti:`al`,iviti:`ive`,biliti:`ble`,logi:`log`},Oq={icate:`ic`,ative:``,alize:`al`,iciti:`ic`,ical:`ic`,ful:``,ness:``},kq=`[^aeiou]`,Aq=`[aeiouy]`,jq=kq+`[^aeiouy]*`;Aq+``;var Mq=`^(`+jq+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*`,Nq=`^(`+jq+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*([aeiouy][aeiou]*)?$`,Pq=`^(`+jq+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*[aeiouy][aeiou]*[^aeiou][^aeiouy]*`,Fq=`^(`+jq+`)?[aeiouy]`;function Iq(e){let t,n,r,i,a,o;if(e.length<3)return e;let s=e.substring(0,1);if(s==`y`&&(e=s.toUpperCase()+e.substring(1)),r=/^(.+?)(ss|i)es$/,i=/^(.+?)([^s])s$/,r.test(e)?e=e.replace(r,`$1$2`):i.test(e)&&(e=e.replace(i,`$1$2`)),r=/^(.+?)eed$/,i=/^(.+?)(ed|ing)$/,r.test(e)){let t=r.exec(e);r=new RegExp(Mq),r.test(t[1])&&(r=/.$/,e=e.replace(r,``))}else i.test(e)&&(t=i.exec(e)[1],i=new RegExp(Fq),i.test(t)&&(e=t,i=/(at|bl|iz)$/,a=RegExp(`([^aeiouylsz])\\1$`),o=RegExp(`^`+jq+Aq+`[^aeiouwxy]$`),i.test(e)?e+=`e`:a.test(e)?(r=/.$/,e=e.replace(r,``)):o.test(e)&&(e+=`e`)));if(r=/^(.+?)y$/,r.test(e)&&(t=r.exec(e)?.[1],r=new RegExp(Fq),t&&r.test(t)&&(e=t+`i`)),r=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=new RegExp(Mq),t&&r.test(t)&&(e=t+Dq[n])}if(r=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=new RegExp(Mq),t&&r.test(t)&&(e=t+Oq[n])}if(r=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,i=/^(.+?)(s|t)(ion)$/,r.test(e))t=r.exec(e)?.[1],r=new RegExp(Pq),t&&r.test(t)&&(e=t);else if(i.test(e)){let n=i.exec(e);t=n?.[1]??``+n?.[2]??``,i=new RegExp(Pq),i.test(t)&&(e=t)}return r=/^(.+?)e$/,r.test(e)&&(t=r.exec(e)?.[1],r=new RegExp(Pq),i=new RegExp(Nq),a=RegExp(`^`+jq+Aq+`[^aeiouwxy]$`),t&&(r.test(t)||i.test(t)&&!a.test(t))&&(e=t)),r=/ll$/,i=new RegExp(Pq),r.test(e)&&i.test(e)&&(r=/.$/,e=e.replace(r,``)),s==`y`&&(e=s.toLowerCase()+e.substring(1)),e}function Lq(e,t,n=!0){let r=`${this.language}:${e}:${t}`;return n&&this.normalizationCache.has(r)?this.normalizationCache.get(r):this.stopWords?.includes(t)?(n&&this.normalizationCache.set(r,``),``):(this.stemmer&&!this.stemmerSkipProperties.has(e)&&(t=this.stemmer(t)),t=Eq(t),n&&this.normalizationCache.set(r,t),t)}function Rq(e){for(;e[e.length-1]===``;)e.pop();for(;e[0]===``;)e.shift();return e}function zq(e,t,n,r=!0){if(t&&t!==this.language)throw zG(`LANGUAGE_NOT_SUPPORTED`,t);if(typeof e!=`string`)return[e];let i=this.normalizeToken.bind(this,n??``),a;if(n&&this.tokenizeSkipProperties.has(n))a=[i(e,r)];else{let t=oG[this.language];a=e.toLowerCase().split(t).map(e=>i(e,r)).filter(Boolean)}let o=Rq(a);return this.allowDuplicates?o:Array.from(new Set(o))}function Bq(e={}){if(!e.language)e.language=`english`;else if(!sG.includes(e.language))throw zG(`LANGUAGE_NOT_SUPPORTED`,e.language);let t;if(e.stemming||e.stemmer&&!(`stemming`in e))if(e.stemmer){if(typeof e.stemmer!=`function`)throw zG(`INVALID_STEMMER_FUNCTION_TYPE`);t=e.stemmer}else if(e.language===`english`)t=Iq;else throw zG(`MISSING_STEMMER`,e.language);let n;if(e.stopWords!==!1){if(n=[],Array.isArray(e.stopWords))n=e.stopWords;else if(typeof e.stopWords==`function`)n=e.stopWords(n);else if(e.stopWords)throw zG(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);if(!Array.isArray(n))throw zG(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);for(let e of n)if(typeof e!=`string`)throw zG(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`)}let r={tokenize:zq,language:e.language,stemmer:t,stemmerSkipProperties:new Set(e.stemmerSkipProperties?[e.stemmerSkipProperties].flat():[]),tokenizeSkipProperties:new Set(e.tokenizeSkipProperties?[e.tokenizeSkipProperties].flat():[]),stopWords:n,allowDuplicates:!!e.allowDuplicates,normalizeToken:Lq,normalizationCache:new Map};return r.tokenize=zq.bind(r),r.normalizeToken=Lq,r}function Vq(e){return{sharedInternalDocumentStore:e,rules:new Map}}function Hq(e,t){if(e.rules.has(t.id))throw Error(`PINNING_RULE_ALREADY_EXISTS: A pinning rule with id "${t.id}" already exists. Use updateRule to modify it.`);e.rules.set(t.id,t)}function Uq(e,t){if(!e.rules.has(t.id))throw Error(`PINNING_RULE_NOT_FOUND: Cannot update pinning rule with id "${t.id}" because it does not exist. Use addRule to create it.`);e.rules.set(t.id,t)}function Wq(e,t){return e.rules.delete(t)}function Gq(e,t){return e.rules.get(t)}function Kq(e){return Array.from(e.rules.values())}function qq(e,t){let n=e.toLowerCase().trim(),r=t.pattern.toLowerCase().trim();switch(t.anchoring){case`is`:return n===r;case`starts_with`:return n.startsWith(r);case`contains`:return n.includes(r);default:return!1}}function Jq(e,t){return e?t.conditions.every(t=>qq(e,t)):!1}function Yq(e,t){if(!t)return[];let n=[];for(let r of e.rules.values())Jq(t,r)&&n.push(r);return n}function Xq(e,t){return{sharedInternalDocumentStore:e,rules:new Map(t?.rules??[])}}function Zq(e){return{rules:Array.from(e.rules.entries())}}function Qq(){return{create:Vq,addRule:Hq,updateRule:Uq,removeRule:Wq,getRule:Gq,getAllRules:Kq,getMatchingRules:Yq,load:Xq,save:Zq}}function $q(e){let t={formatElapsedTime:BG,getDocumentIndexId:VG,getDocumentProperties:EG,validateSchema:HG};for(let n of mK){let r=n;if(e[r]){if(typeof e[r]!=`function`)throw zG(`COMPONENT_MUST_BE_FUNCTION`,r)}else e[r]=t[r]}for(let t of Object.keys(e))if(!pK.includes(t)&&!mK.includes(t))throw zG(`UNSUPPORTED_COMPONENT`,t)}function eJ({schema:e,sort:t,language:n,components:r,id:i,plugins:a}){r||={};for(let t of a??[]){if(!(`getComponents`in t)||typeof t.getComponents!=`function`)continue;let n=t.getComponents(e),i=Object.keys(n);for(let e of i)if(r[e])throw zG(`PLUGIN_COMPONENT_CONFLICT`,e,t.name);r={...r,...n}}i||=SG();let o=r.tokenizer,s=r.index,c=r.documentsStore,l=r.sorter,u=r.pinning;if(o=o?o.tokenize?o:Bq(o):Bq({language:n??`english`}),r.tokenizer&&n)throw zG(`NO_LANGUAGE_WITH_CUSTOM_TOKENIZER`);let d=XG();s||=$K(),l||=xq(),c||=uK(),u||=Qq(),$q(r);let{getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,formatElapsedTime:h}=r,g={data:{},caches:{},schema:e,tokenizer:o,index:s,sorter:l,documentsStore:c,pinning:u,internalDocumentIDStore:d,getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,beforeInsert:[],afterInsert:[],beforeRemove:[],afterRemove:[],beforeUpdate:[],afterUpdate:[],beforeUpsert:[],afterUpsert:[],beforeSearch:[],afterSearch:[],beforeInsertMultiple:[],afterInsertMultiple:[],beforeRemoveMultiple:[],afterRemoveMultiple:[],beforeUpdateMultiple:[],afterUpdateMultiple:[],beforeUpsertMultiple:[],afterUpsertMultiple:[],afterCreate:[],formatElapsedTime:h,id:i,plugins:a,version:tJ()};g.data={index:g.index.create(g,d,e),docs:g.documentsStore.create(g,d),sorting:g.sorter.create(g,d,e,t),pinning:g.pinning.create(d)};for(let e of dK)g[e]=(g[e]??[]).concat(fK(g,e));let _=g.afterCreate;return _&&yK(_,g),g}function tJ(){return`{{VERSION}}`}function nJ(e){return e.documentsStore.count(e.data.docs)}function rJ(e,t,n,r,i){let a=e.validateSchema(t,e.schema);if(a)throw zG(`SCHEMA_VALIDATION_FAILURE`,a);return jG(e.beforeInsert)||jG(e.afterInsert)||jG(e.index.beforeInsert)||jG(e.index.insert)||jG(e.index.afterInsert)?oJ(e,t,n,r,i):sJ(e,t,n,r,i)}var iJ=new Set([`enum`,`enum[]`]),aJ=new Set([`string`,`number`]);async function oJ(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw zG(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=$G(e.internalDocumentIDStore,s);if(r||await hK(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw zG(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];cJ(n,r,e,t)}return await lJ(e,s,u,f,l,n,t,i),r||await hK(e.afterInsert,e,s,t),s}function sJ(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw zG(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=$G(e.internalDocumentIDStore,s);if(r||hK(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw zG(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];cJ(n,r,e,t)}return uJ(e,s,u,f,l,n,t,i),r||hK(e.afterInsert,e,s,t),s}function cJ(e,t,n,r){if(!(GG(t)&&typeof r==`object`&&typeof r.lon==`number`&&typeof r.lat==`number`)&&!(KG(t)&&Array.isArray(r))&&!(qG(t)&&Array.isArray(r))&&!(iJ.has(t)&&aJ.has(e))&&e!==t)throw zG(`INVALID_DOCUMENT_PROPERTY`,n,t,e)}async function lJ(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o];await e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i);let l=e.internalDocumentIDStore.idToInternalId.get(t);await e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),await e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function uJ(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o],l=$G(e.internalDocumentIDStore,t);e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i),e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function dJ(e,t,n,r,i,a){return jG(e.afterInsertMultiple)||jG(e.beforeInsertMultiple)||jG(e.index.beforeInsert)||jG(e.index.insert)||jG(e.index.afterInsert)?fJ(e,t,n,r,i,a):pJ(e,t,n,r,i,a)}async function fJ(e,t,n=1e3,r,i,a=0){let o=[],s=async a=>{let s=Math.min(a+n,t.length),c=t.slice(a,s);for(let t of c){let n=await rJ(e,t,r,i,{avlRebalanceThreshold:c.length});o.push(n)}return s};return await(async()=>{let e=0;for(;e<t.length;){let t=Date.now();if(e=await s(e),a>0){let e=a-(Date.now()-t);e>0&&LG(e)}}})(),i||await gK(e.afterInsertMultiple,e,t),o}function pJ(e,t,n=1e3,r,i,a=0){let o=[],s=0;function c(){let a=t.slice(s*n,(s+1)*n);if(a.length===0)return!1;for(let t of a){let n=rJ(e,t,r,i,{avlRebalanceThreshold:a.length});o.push(n)}return s++,!0}function l(){let e=Date.now();for(;c();)if(a>0){let t=Date.now()-e;if(t>=a){let e=a-t%a;e>0&&LG(e)}}}return l(),i||gK(e.afterInsertMultiple,e,t),o}function mJ(e,t){return e[1]-t[1]}function hJ(e,t){return t[1]-e[1]}function gJ(e=`desc`){return e.toLowerCase()===`asc`?mJ:hJ}function _J(e,t,n){let r={},i=t.map(([e])=>e),a=e.documentsStore.getMultiple(e.data.docs,i),o=Object.keys(n),s=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e of o){let t;if(s[e]===`number`){let{ranges:r}=n[e],i=r.length,a=Array.from({length:i});for(let e=0;e<i;e++){let t=r[e];a[e]=[`${t.from}-${t.to}`,0]}t=Object.fromEntries(a)}r[e]={count:0,values:t??{}}}let c=a.length;for(let e=0;e<c;e++){let t=a[e];for(let e of o){let i=e.includes(`.`)?DG(t,e):t[e],a=s[e],o=r[e].values;switch(a){case`number`:{let t=n[e].ranges;vJ(t,o)(i);break}case`number[]`:{let t=new Set,r=n[e].ranges,a=vJ(r,o,t);for(let e of i)a(e);break}case`boolean`:case`enum`:case`string`:yJ(o,a)(i);break;case`boolean[]`:case`enum[]`:case`string[]`:{let e=yJ(o,a===`boolean[]`?`boolean`:`string`,new Set);for(let t of i)e(t);break}default:throw zG(`FACET_NOT_SUPPORTED`,a)}}}for(let e of o){let t=r[e];if(t.count=Object.keys(t.values).length,s[e]===`string`){let r=n[e],i=gJ(r.sort);t.values=Object.fromEntries(Object.entries(t.values).sort(i).slice(r.offset??0,r.limit??10))}}return r}function vJ(e,t,n){return r=>{for(let i of e){let e=`${i.from}-${i.to}`;n?.has(e)||r>=i.from&&r<=i.to&&(t[e]===void 0?t[e]=1:(t[e]++,n?.add(e)))}}}function yJ(e,t,n){let r=t===`boolean`?`false`:``;return t=>{let i=t?.toString()??r;n?.has(i)||(e[i]=(e[i]??0)+1,n?.add(i))}}var bJ={reducer:(e,t,n,r)=>(t[r]=n,t),getInitialValue:e=>Array.from({length:e})},xJ=[`string`,`number`,`boolean`];function SJ(e,t,n){let r=n.properties,i=r.length,a=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e=0;e<i;e++){let t=r[e];if(a[t]===void 0)throw zG(`UNKNOWN_GROUP_BY_PROPERTY`,t);if(!xJ.includes(a[t]))throw zG(`INVALID_GROUP_BY_PROPERTY`,t,xJ.join(`, `),a[t])}let o=t.map(([t])=>eK(e.internalDocumentIDStore,t)),s=e.documentsStore.getMultiple(e.data.docs,o),c=s.length,l=n.maxResult||2**53-1,u=[],d={};for(let e=0;e<i;e++){let t=r[e],n={property:t,perValue:{}},i=new Set;for(let e=0;e<c;e++){let r=s[e],a=DG(r,t);if(a===void 0)continue;let o=typeof a==`boolean`?``+a:a,c=n.perValue[o]??{indexes:[],count:0};c.count>=l||(c.indexes.push(e),c.count++,n.perValue[o]=c,i.add(a))}u.push(Array.from(i)),d[t]=n}let f=CJ(u),p=f.length,m=[];for(let e=0;e<p;e++){let t=f[e],n=t.length,i={values:[],indexes:[]},a=[];for(let e=0;e<n;e++){let n=t[e],o=r[e];a.push(d[o].perValue[typeof n==`boolean`?``+n:n].indexes),i.values.push(n)}i.indexes=TG(a).sort((e,t)=>e-t),i.indexes.length!==0&&m.push(i)}let h=m.length,g=Array.from({length:h});for(let e=0;e<h;e++){let r=m[e],i=n.reduce||bJ,a=r.indexes.map(e=>({id:o[e],score:t[e][1],document:s[e]})),c=i.reducer.bind(null,r.values),l=i.getInitialValue(r.indexes.length),u=a.reduce(c,l);g[e]={values:r.values,result:u}}return g}function CJ(e,t=0){if(t+1===e.length)return e[t].map(e=>[e]);let n=e[t],r=CJ(e,t+1),i=[];for(let e of n)for(let t of r){let n=[e];hG(n,t),i.push(n)}return i}function wJ(e,t,n,r){let i=Yq(t,r);if(i.length===0)return n;let a=i.flatMap(e=>e.consequence.promote);a.sort((e,t)=>e.position-t.position);let o=new Set,s=new Map,c=new Set;for(let t of a){let n=$G(e.internalDocumentIDStore,t.doc_id);if(n!==void 0){if(s.has(n)){let e=s.get(n);t.position<e&&s.set(n,t.position);continue}c.has(t.position)||(o.add(n),s.set(n,t.position),c.add(t.position))}}if(s.size===0)return n;let l=n.filter(([e])=>!o.has(e)),u=[];for(let[t,r]of s.entries())n.find(([e])=>e===t)?u.push([t,1e6-r]):e.documentsStore.get(e.data.docs,t)&&u.push([t,0]);u.sort((e,t)=>(s.get(e[0])??1/0)-(s.get(t[0])??1/0));let d=[],f=new Map;for(let e of u){let t=s.get(e[0]);f.set(t,e)}let p=0,m=0;for(;m<l.length+u.length;)if(f.has(m))d.push(f.get(m)),m++;else if(p<l.length)d.push(l[p]),p++,m++;else break;for(let[e,t]of f.entries())e>=d.length&&d.push(t);return d}function TJ(e,t,n){let{term:r,properties:i}=t,a=e.data.index,o=e.caches.propertiesToSearch;if(!o){let t=e.index.getSearchablePropertiesWithTypes(a);o=e.index.getSearchableProperties(a),o=o.filter(e=>t[e].startsWith(`string`)),e.caches.propertiesToSearch=o}if(i&&i!==`*`){for(let e of i)if(!o.includes(e))throw zG(`UNKNOWN_INDEX`,e,o.join(`, `));o=o.filter(e=>i.includes(e))}let s=Object.keys(t.where??{}).length>0,c;s&&(c=e.index.searchByWhereClause(a,e.tokenizer,t.where,n));let l,u=t.threshold!==void 0&&t.threshold!==null?t.threshold:1;if(r||i){let i=nJ(e);if(l=e.index.search(a,r||``,e.tokenizer,n,o,t.exact||!1,t.tolerance||0,t.boost||{},AJ(t.relevance),i,c,u),t.exact&&r){let t=r.trim().split(/\s+/);l=l.filter(([n])=>{let r=e.documentsStore.get(e.data.docs,n);if(!r)return!1;for(let e of o){let n=DJ(r,e);if(typeof n==`string`&&t.every(e=>RegExp(`\\b${EJ(e)}\\b`).test(n)))return!0}return!1})}}else l=s?rq(a,t.where)||(c?Array.from(c):[]).map(e=>[+e,0]):Object.keys(e.documentsStore.getAll(e.data.docs)).map(e=>[+e,0]);return l}function EJ(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function DJ(e,t){let n=t.split(`.`),r=e;for(let e of n)if(r&&typeof r==`object`&&e in r)r=r[e];else return;return r}function OJ(e,t,n){let r=xG();function i(){let i=Object.keys(e.data.index.vectorIndexes),a=t.facets&&Object.keys(t.facets).length>0,{limit:o=10,offset:s=0,distinctOn:c,includeVectors:l=!1}=t,u=t.preflight===!0,d=TJ(e,t,n);if(t.sortBy)if(typeof t.sortBy==`function`){let n=d.map(([e])=>e),r=e.documentsStore.getMultiple(e.data.docs,n).map((e,t)=>[d[t][0],d[t][1],e]);r.sort(t.sortBy),d=r.map(([e,t])=>[e,t])}else d=e.sorter.sortBy(e.data.sorting,d,t.sortBy).map(([t,n])=>[$G(e.internalDocumentIDStore,t),n]);else d=d.sort(wG);d=wJ(e,e.data.pinning,d,t.term);let f;u||(f=c?HJ(e,d,s,o,c):UJ(e,d,s,o));let p={elapsed:{formatted:``,raw:0},hits:[],count:d.length};return f!==void 0&&(p.hits=f.filter(Boolean),l||AG(p,i)),a&&(p.facets=_J(e,d,t.facets)),t.groupBy&&(p.groups=SJ(e,d,t.groupBy)),p.elapsed=e.formatElapsedTime(xG()-r),p}async function a(){e.beforeSearch&&await vK(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await _K(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}var kJ={k:1.2,b:.75,d:.5};function AJ(e){let t=e??{};return t.k=t.k??kJ.k,t.b=t.b??kJ.b,t.d=t.d??kJ.d,t}function jJ(e,t,n){let r=t.vector;if(r&&(!(`value`in r)||!(`property`in r)))throw zG(`INVALID_VECTOR_INPUT`,Object.keys(r).join(`, `));let i=e.data.index.vectorIndexes[r.property];if(!i)throw zG(`UNKNOWN_VECTOR_PROPERTY`,r.property);let a=i.node.size;if(r?.value.length!==a)throw r?.property===void 0||r?.value.length===void 0?zG(`INVALID_INPUT_VECTOR`,`undefined`,a,`undefined`):zG(`INVALID_INPUT_VECTOR`,r.property,a,r.value.length);let o=e.data.index,s;return Object.keys(t.where??{}).length>0&&(s=e.index.searchByWhereClause(o,e.tokenizer,t.where,n)),i.node.find(r.value,t.similarity??.8,s)}function MJ(e,t,n=`english`){let r=xG();function i(){let i=jJ(e,t,n).sort(wG);i=wJ(e,e.data.pinning,i,void 0);let a=[];t.facets&&Object.keys(t.facets).length>0&&(a=_J(e,i,t.facets));let o=t.vector.property,s=t.includeVectors??!1,c=t.limit??10,l=t.offset??0,u=Array.from({length:c});for(let t=0;t<c;t++){let n=i[t+l];if(!n)break;let r=e.data.docs.docs[n[0]];r&&(s||(r[o]=null),u[t]={id:eK(e.internalDocumentIDStore,n[0]),score:n[1],document:r})}let d=[];t.groupBy&&(d=SJ(e,i,t.groupBy));let f=xG()-r;return{count:i.length,hits:u.filter(Boolean),elapsed:{raw:Number(f),formatted:bG(f)},...a?{facets:a}:{},...d?{groups:d}:{}}}async function a(){e.beforeSearch&&await vK(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await _K(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function NJ(e,t,n){let r=IJ(TJ(e,t,n)),i=jJ(e,t,n),a=t.hybridWeights;return zJ(r,i,t.term??``,a)}function PJ(e,t,n){let r=xG();function i(){let i=NJ(e,t,n);i=wJ(e,e.data.pinning,i,t.term);let a;t.facets&&Object.keys(t.facets).length>0&&(a=_J(e,i,t.facets));let o;t.groupBy&&(o=SJ(e,i,t.groupBy));let s=t.offset??0,c=t.limit??10,l=UJ(e,i,s,c).filter(Boolean),u=xG(),d={count:i.length,elapsed:{raw:Number(u-r),formatted:bG(u-r)},hits:l,...a?{facets:a}:{},...o?{groups:o}:{}};return(t.includeVectors??!1)||AG(d,Object.keys(e.data.index.vectorIndexes)),d}async function a(){e.beforeSearch&&await vK(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await _K(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function FJ(e){return e[1]}function IJ(e){let t=Math.max.apply(Math,e.map(FJ));return e.map(([e,n])=>[e,n/t])}function LJ(e,t){return e/t}function RJ(e,t){return(n,r)=>n*e+r*t}function zJ(e,t,n,r){let i=Math.max.apply(Math,e.map(FJ)),a=Math.max.apply(Math,t.map(FJ)),{text:o,vector:s}=r&&r.text&&r.vector?r:BJ(n),c=new Map,l=e.length,u=RJ(o,s);for(let t=0;t<l;t++){let[n,r]=e[t],a=u(LJ(r,i),0);c.set(n,a)}let d=t.length;for(let e=0;e<d;e++){let[n,r]=t[e],i=LJ(r,a),o=c.get(n)??0;c.set(n,o+u(0,i))}return[...c].sort((e,t)=>t[1]-e[1])}function BJ(e){return{text:.5,vector:.5}}function VJ(e,t,n){let r=t.mode??`fulltext`;if(r===`fulltext`)return OJ(e,t,n);if(r===`vector`)return MJ(e,t);if(r===`hybrid`)return PJ(e,t);throw zG(`INVALID_SEARCH_MODE`,r)}function HJ(e,t,n,r,i){let a=e.data.docs,o=new Map,s=[],c=new Set,l=t.length,u=0;for(let d=0;d<l;d++){let l=t[d];if(l===void 0)continue;let[f,p]=l;if(c.has(f))continue;let m=e.documentsStore.get(a,f),h=DG(m,i);if(!(h===void 0||o.has(h))&&(o.set(h,!0),u++,!(u<=n)&&(s.push({id:eK(e.internalDocumentIDStore,f),score:p,document:m}),c.add(f),u>=n+r)))break}return s}function UJ(e,t,n,r){let i=e.data.docs,a=Array.from({length:r}),o=new Set;for(let s=n;s<r+n;s++){let n=t[s];if(n===void 0)break;let[r,c]=n;if(!o.has(r)){let t=e.documentsStore.get(i,r);a[s]={id:eK(e.internalDocumentIDStore,r),score:c,document:t},o.add(r)}}return a}var WJ=r(iG(),1),GJ=/[\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF]/g;function KJ(e){return e.replace(GJ,``)}function qJ(e){return e.replace(/[\u0000-\u001F\u007F]/g,` `)}function JJ(e,t){if(e.length<=t)return e;let n=e.slice(0,t),r=n.charCodeAt(n.length-1);return r>=55296&&r<=56319?n.slice(0,-1):n}var YJ=R({at:N(),transport:N(),outcome:N(),reference:N().optional(),error:N().optional(),errorCode:N().optional()}),XJ=R({reason:N(),at:N(),errorCode:N().optional()});R({version:P().int().catch(1),id:N(),createdAt:N(),bundleLevel:N(),zipBytes:P().int().nonnegative().catch(0),zipDeleted:F().optional(),state:N(),systemWide:F().optional(),projectSlug:N().nullable().optional(),reference:N().optional(),lastError:XJ.optional(),attempts:I(YJ).optional(),note:N().optional()});var ZJ=`0.0.0-unknown`,QJ={protocol:`x-ok-client-protocol`,runtime:`x-ok-client-runtime`,kind:`x-ok-client-kind`};function $J({kind:e,runtimeVersion:t}){return{[QJ.protocol]:`2`,[QJ.runtime]:t,[QJ.kind]:e}}function eY({kind:e,runtimeVersion:t}){return{clientProtocolVersion:2,clientRuntimeVersion:t,clientKind:e}}var tY=`extra/screenshot.png`,nY=[{name:`macos-home-path`,regex:/\/Users\/[^/]+\//g,replacement:`~/`},{name:`linux-home-path`,regex:/\/home\/[^/]+\//g,replacement:`~/`},{name:`github-pat`,regex:/\b(ghp_|gho_|ghu_|ghs_|ghr_)[A-Za-z0-9]{36,}\b/g,replacement:`[REDACTED-GH-PAT]`},{name:`aws-access-key`,regex:/\b(AKIA|ASIA|ABIA)[A-Z2-7]{16}\b/g,replacement:`[REDACTED-AWS-KEY]`},{name:`anthropic-key`,regex:/\bsk-ant-api03-[A-Za-z0-9_-]{20,}\b/g,replacement:`[REDACTED-ANTHROPIC]`},{name:`openai-key`,regex:/\bsk-[A-Za-z0-9]{20,}\b/g,replacement:`[REDACTED-OPENAI]`},{name:`bearer-token`,regex:/([Aa]uthorization:\s*[Bb]earer\s+)\S+/g,replacement:`$1[REDACTED]`},{name:`jwt`,regex:/eyJ[A-Za-z0-9_-]{8,}\.eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}/g,replacement:`[REDACTED-JWT]`},{name:`url-credentials`,regex:/:\/\/[^/\s:@]+:[^/\s:@]+@/g,replacement:`://[REDACTED]@`},{name:`github-pat-fine-grained`,regex:/\bgithub_pat_[0-9A-Za-z_]{20,}/g,replacement:`[REDACTED-GH-PAT]`},{name:`openai-key-modern`,regex:/\bsk-(?:proj|svcacct|admin|None)-[A-Za-z0-9_-]{20,}/g,replacement:`[REDACTED-OPENAI]`},{name:`slack-token`,regex:/\bxox[a-z]-[A-Za-z0-9-]{10,}/g,replacement:`[REDACTED-SLACK]`},{name:`google-api-key`,regex:/\bAIza[0-9A-Za-z_-]{35}/g,replacement:`[REDACTED-GOOGLE]`},{name:`stripe-secret-key`,regex:/\b(?:sk|rk)_live_[0-9A-Za-z]{16,}\b/g,replacement:`[REDACTED-STRIPE]`},{name:`gitlab-pat`,regex:/\bglpat-[0-9A-Za-z_-]{20,}/g,replacement:`[REDACTED-GITLAB]`},{name:`bearer-token-json`,regex:/("[Aa]uthorization"\s*:\s*"[Bb]earer\s+)[^"]+/g,replacement:`$1[REDACTED]`}];nY.map(e=>e.name);function rY(e){let t=new Set,n=0;return{redacted:e.split(`
|
|
399
|
+
`,ANSWER_SESSION_LAST_MESSAGE_IS_NOT_ASSISTANT:`The last message in the session is not an assistant message. Cannot regenerate non-assistant messages.`,PLUGIN_COMPONENT_CONFLICT:`The component "%s" is already defined. The plugin "%s" is trying to redefine it.`};function zG(e,...t){let n=Error(gG(RG[e]??`Unsupported Orama Error code: ${e}`,...t));return n.code=e,`captureStackTrace`in Error.prototype&&Error.captureStackTrace(n),n}function BG(e){return{raw:Number(e),formatted:bG(e)}}function VG(e){if(e.id){if(typeof e.id!=`string`)throw zG(`DOCUMENT_ID_MUST_BE_STRING`,typeof e.id);return e.id}return SG()}function HG(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];if(t!==void 0&&!(r===`geopoint`&&typeof t==`object`&&typeof t.lon==`number`&&typeof t.lat==`number`)&&!(r===`enum`&&(typeof t==`string`||typeof t==`number`))){if(r===`enum[]`&&Array.isArray(t)){let e=t.length;for(let r=0;r<e;r++)if(typeof t[r]!=`string`&&typeof t[r]!=`number`)return n+`.`+r;continue}if(KG(r)){let e=YG(r);if(!Array.isArray(t)||t.length!==e)throw zG(`INVALID_INPUT_VECTOR`,n,e,t.length);continue}if(qG(r)){if(!Array.isArray(t))return n;let e=JG(r),i=t.length;for(let r=0;r<i;r++)if(typeof t[r]!==e)return n+`.`+r;continue}if(typeof r==`object`){if(!t||typeof t!=`object`)return n;let e=HG(t,r);if(e)return n+`.`+e;continue}if(typeof t!==r)return n}}}var UG={string:!1,number:!1,boolean:!1,enum:!1,geopoint:!1,"string[]":!0,"number[]":!0,"boolean[]":!0,"enum[]":!0},WG={"string[]":`string`,"number[]":`number`,"boolean[]":`boolean`,"enum[]":`enum`};function GG(e){return e===`geopoint`}function KG(e){return typeof e==`string`&&/^vector\[\d+\]$/.test(e)}function qG(e){return typeof e==`string`&&UG[e]}function JG(e){return WG[e]}function YG(e){let t=Number(e.slice(7,-1));switch(!0){case isNaN(t):throw zG(`INVALID_VECTOR_VALUE`,e);case t<=0:throw zG(`INVALID_VECTOR_SIZE`,e);default:return t}}function XG(){return{idToInternalId:new Map,internalIdToId:[],save:ZG,load:QG}}function ZG(e){return{internalIdToId:e.internalIdToId}}function QG(e,t){let{internalIdToId:n}=t;e.internalDocumentIDStore.idToInternalId.clear(),e.internalDocumentIDStore.internalIdToId=[];let r=n.length;for(let t=0;t<r;t++){let r=n[t];e.internalDocumentIDStore.idToInternalId.set(r,t+1),e.internalDocumentIDStore.internalIdToId.push(r)}}function $G(e,t){if(typeof t==`string`){let n=e.idToInternalId.get(t);if(n)return n;let r=e.idToInternalId.size+1;return e.idToInternalId.set(t,r),e.internalIdToId.push(t),r}return t>e.internalIdToId.length?$G(e,t.toString()):t}function eK(e,t){if(e.internalIdToId.length<t)throw Error(`Invalid internalId ${t}`);return e.internalIdToId[t-1]}function tK(e,t){return{sharedInternalDocumentStore:t,docs:{},count:0}}function nK(e,t){let n=$G(e.sharedInternalDocumentStore,t);return e.docs[n]}function rK(e,t){let n=t.length,r=Array.from({length:n});for(let i=0;i<n;i++){let n=$G(e.sharedInternalDocumentStore,t[i]);r[i]=e.docs[n]}return r}function iK(e){return e.docs}function aK(e,t,n,r){return e.docs[n]===void 0?(e.docs[n]=r,e.count++,!0):!1}function oK(e,t){let n=$G(e.sharedInternalDocumentStore,t);return e.docs[n]===void 0?!1:(delete e.docs[n],e.count--,!0)}function sK(e){return e.count}function cK(e,t){let n=t;return{docs:n.docs,count:n.count,sharedInternalDocumentStore:e}}function lK(e){return{docs:e.docs,count:e.count}}function uK(){return{create:tK,get:nK,getMultiple:rK,getAll:iK,store:aK,remove:oK,count:sK,load:cK,save:lK}}var dK=[`beforeInsert`,`afterInsert`,`beforeRemove`,`afterRemove`,`beforeUpdate`,`afterUpdate`,`beforeUpsert`,`afterUpsert`,`beforeSearch`,`afterSearch`,`beforeInsertMultiple`,`afterInsertMultiple`,`beforeRemoveMultiple`,`afterRemoveMultiple`,`beforeUpdateMultiple`,`afterUpdateMultiple`,`beforeUpsertMultiple`,`afterUpsertMultiple`,`beforeLoad`,`afterLoad`,`afterCreate`];function fK(e,t){let n=[],r=e.plugins?.length;if(!r)return n;for(let i=0;i<r;i++)try{let r=e.plugins[i];typeof r[t]==`function`&&n.push(r[t])}catch(e){throw console.error(`Caught error in getAllPluginsByHook:`,e),zG(`PLUGIN_CRASHED`)}return n}var pK=[`tokenizer`,`index`,`documentsStore`,`sorter`,`pinning`],mK=[`validateSchema`,`getDocumentIndexId`,`getDocumentProperties`,`formatElapsedTime`];function hK(e,t,n,r){if(e.some(jG))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function gK(e,t,n){if(e.some(jG))return(async()=>{for(let r of e)await r(t,n)})();for(let r of e)r(t,n)}function _K(e,t,n,r,i){if(e.some(jG))return(async()=>{for(let a of e)await a(t,n,r,i)})();for(let a of e)a(t,n,r,i)}function vK(e,t,n,r){if(e.some(jG))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function yK(e,t){if(e.some(jG))return(async()=>{for(let n of e)await n(t)})();for(let n of e)n(t)}var bK=class e{k;v;l=null;r=null;h=1;constructor(e,t){this.k=e,this.v=new Set(t)}updateHeight(){this.h=Math.max(e.getHeight(this.l),e.getHeight(this.r))+1}static getHeight(e){return e?e.h:0}getBalanceFactor(){return e.getHeight(this.l)-e.getHeight(this.r)}rotateLeft(){let e=this.r;return this.r=e.l,e.l=this,this.updateHeight(),e.updateHeight(),e}rotateRight(){let e=this.l;return this.l=e.r,e.r=this,this.updateHeight(),e.updateHeight(),e}toJSON(){return{k:this.k,v:Array.from(this.v),l:this.l?this.l.toJSON():null,r:this.r?this.r.toJSON():null,h:this.h}}static fromJSON(t){let n=new e(t.k,t.v);return n.l=t.l?e.fromJSON(t.l):null,n.r=t.r?e.fromJSON(t.r):null,n.h=t.h,n}},xK=class e{root=null;insertCount=0;constructor(e,t){e!==void 0&&t!==void 0&&(this.root=new bK(e,t))}insert(e,t,n=1e3){this.root=this.insertNode(this.root,e,t,n)}insertMultiple(e,t,n=1e3){for(let r of t)this.insert(e,r,n)}rebalance(){this.root&&=this.rebalanceNode(this.root)}toJSON(){return{root:this.root?this.root.toJSON():null,insertCount:this.insertCount}}static fromJSON(t){let n=new e;return n.root=t.root?bK.fromJSON(t.root):null,n.insertCount=t.insertCount||0,n}insertNode(e,t,n,r){if(e===null)return new bK(t,[n]);let i=[],a=e,o=null;for(;a!==null;)if(i.push({parent:o,node:a}),t<a.k)if(a.l===null){a.l=new bK(t,[n]),i.push({parent:a,node:a.l});break}else o=a,a=a.l;else if(t>a.k)if(a.r===null){a.r=new bK(t,[n]),i.push({parent:a,node:a.r});break}else o=a,a=a.r;else return a.v.add(n),e;let s=!1;this.insertCount++%r===0&&(s=!0);for(let t=i.length-1;t>=0;t--){let{parent:n,node:r}=i[t];if(r.updateHeight(),s){let t=this.rebalanceNode(r);n?n.l===r?n.l=t:n.r===r&&(n.r=t):e=t}}return e}rebalanceNode(e){let t=e.getBalanceFactor();if(t>1){if(e.l&&e.l.getBalanceFactor()>=0)return e.rotateRight();if(e.l)return e.l=e.l.rotateLeft(),e.rotateRight()}if(t<-1){if(e.r&&e.r.getBalanceFactor()<=0)return e.rotateLeft();if(e.r)return e.r=e.r.rotateRight(),e.rotateLeft()}return e}find(e){let t=this.findNodeByKey(e);return t?t.v:null}contains(e){return this.find(e)!==null}getSize(){let e=0,t=[],n=this.root;for(;n||t.length>0;){for(;n;)t.push(n),n=n.l;n=t.pop(),e++,n=n.r}return e}isBalanced(){if(!this.root)return!0;let e=[this.root];for(;e.length>0;){let t=e.pop(),n=t.getBalanceFactor();if(Math.abs(n)>1)return!1;t.l&&e.push(t.l),t.r&&e.push(t.r)}return!0}remove(e){this.root=this.removeNode(this.root,e)}removeDocument(e,t){let n=this.findNodeByKey(e);n&&(n.v.size===1?this.root=this.removeNode(this.root,e):n.v=new Set([...n.v.values()].filter(e=>e!==t)))}findNodeByKey(e){let t=this.root;for(;t;)if(e<t.k)t=t.l;else if(e>t.k)t=t.r;else return t;return null}removeNode(e,t){if(e===null)return null;let n=[],r=e;for(;r!==null&&r.k!==t;)n.push(r),r=t<r.k?r.l:r.r;if(r===null)return e;if(r.l===null||r.r===null){let t=r.l?r.l:r.r;if(n.length===0)e=t;else{let e=n[n.length-1];e.l===r?e.l=t:e.r=t}}else{let e=r,t=r.r;for(;t.l!==null;)e=t,t=t.l;r.k=t.k,r.v=t.v,e.l===t?e.l=t.r:e.r=t.r,r=e}n.push(r);for(let t=n.length-1;t>=0;t--){let r=n[t];r.updateHeight();let i=this.rebalanceNode(r);if(t>0){let e=n[t-1];e.l===r?e.l=i:e.r===r&&(e.r=i)}else e=i}return e}rangeSearch(e,t){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),i.k>=e&&i.k<=t)for(let e of i.v)n.add(e);if(i.k>t)break;i=i.r}return n}greaterThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.r;if(i=r.pop(),t&&i.k>=e||!t&&i.k>e)for(let e of i.v)n.add(e);else if(i.k<=e)break;i=i.l}return n}lessThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),t&&i.k<=e||!t&&i.k<e)for(let e of i.v)n.add(e);else if(i.k>e)break;i=i.r}return n}},SK=class e{numberToDocumentId;constructor(){this.numberToDocumentId=new Map}insert(e,t){this.numberToDocumentId.has(e)?this.numberToDocumentId.get(e).add(t):this.numberToDocumentId.set(e,new Set([t]))}find(e){let t=this.numberToDocumentId.get(e);return t?Array.from(t):null}remove(e){this.numberToDocumentId.delete(e)}removeDocument(e,t){let n=this.numberToDocumentId.get(t);n&&(n.delete(e),n.size===0&&this.numberToDocumentId.delete(t))}contains(e){return this.numberToDocumentId.has(e)}getSize(){let e=0;for(let t of this.numberToDocumentId.values())e+=t.size;return e}filter(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`eq`:{let t=e[n],r=this.numberToDocumentId.get(t);return r?Array.from(r):[]}case`in`:{let t=e[n],r=new Set;for(let e of t){let t=this.numberToDocumentId.get(e);if(t)for(let e of t)r.add(e)}return Array.from(r)}case`nin`:{let t=new Set(e[n]),r=new Set;for(let[e,n]of this.numberToDocumentId.entries())if(!t.has(e))for(let e of n)r.add(e);return Array.from(r)}default:throw Error(`Invalid operation`)}}filterArr(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`containsAll`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e].filter(e=>t.has(e))));return Array.from(r)}case`containsAny`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e,...t]));return Array.from(r)}default:throw Error(`Invalid operation`)}}static fromJSON(t){if(!t.numberToDocumentId)throw Error(`Invalid Flat Tree JSON`);let n=new e;for(let[e,r]of t.numberToDocumentId)n.numberToDocumentId.set(e,new Set(r));return n}toJSON(){return{numberToDocumentId:Array.from(this.numberToDocumentId.entries()).map(([e,t])=>[e,Array.from(t)])}}};function CK(e,t,n){if(n<0)return-1;if(e===t)return 0;let r=e.length,i=t.length;if(r===0)return i<=n?i:-1;if(i===0)return r<=n?r:-1;let a=Math.abs(r-i);if(e.startsWith(t))return a<=n?a:-1;if(t.startsWith(e))return 0;if(a>n)return-1;let o=[];for(let e=0;e<=r;e++){o[e]=[e];for(let t=1;t<=i;t++)o[e][t]=e===0?t:0}for(let a=1;a<=r;a++){let r=1/0;for(let n=1;n<=i;n++)e[a-1]===t[n-1]?o[a][n]=o[a-1][n-1]:o[a][n]=Math.min(o[a-1][n]+1,o[a][n-1]+1,o[a-1][n-1]+1),r=Math.min(r,o[a][n]);if(r>n)return-1}return o[r][i]<=n?o[r][i]:-1}function wK(e,t,n){let r=CK(e,t,n);return{distance:r,isBounded:r>=0}}var TK=class e{k;s;c=new Map;d=new Set;e;w=``;constructor(e,t,n){this.k=e,this.s=t,this.e=n}updateParent(e){this.w=e.w+this.s}addDocument(e){this.d.add(e)}removeDocument(e){return this.d.delete(e)}findAllWords(e,t,n,r){let i=[this];for(;i.length>0;){let a=i.pop();if(a.e){let{w:i,d:o}=a;if(n&&i!==t)continue;if(CG(e,i)!==null)if(r)if(Math.abs(t.length-i.length)<=r&&wK(t,i,r).isBounded)e[i]=[];else continue;else e[i]=[];if(CG(e,i)!=null&&o.size>0){let t=e[i];for(let e of o)t.includes(e)||t.push(e)}}a.c.size>0&&i.push(...a.c.values())}return e}insert(t,n){let r=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=r.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c){if(r=s,i+=l,i===a){s.e||=!0,s.addDocument(n);return}continue}let u=o.slice(0,l),d=o.slice(l),f=t.slice(i+l),p=new e(u[0],u,!1);if(r.c.set(u[0],p),p.updateParent(r),s.s=d,s.k=d[0],p.c.set(d[0],s),s.updateParent(p),f){let t=new e(f[0],f,!0);t.addDocument(n),p.c.set(f[0],t),t.updateParent(p)}else p.e=!0,p.addDocument(n);return}else{let a=new e(o,t.slice(i),!0);a.addDocument(n),r.c.set(o,a),a.updateParent(r);return}}r.e||=!0,r.addDocument(n)}_findLevenshtein(e,t,n,r,i){let a=[{node:this,index:t,tolerance:n}];for(;a.length>0;){let{node:t,index:n,tolerance:o}=a.pop();if(t.w.startsWith(e)){t.findAllWords(i,e,!1,0);continue}if(o<0)continue;if(t.e){let{w:n,d:a}=t;if(n&&(wK(e,n,r).isBounded&&(i[n]=[]),CG(i,n)!==void 0&&a.size>0)){let e=new Set(i[n]);for(let t of a)e.add(t);i[n]=Array.from(e)}}if(n>=e.length)continue;let s=e[n];if(t.c.has(s)){let e=t.c.get(s);a.push({node:e,index:n+1,tolerance:o})}a.push({node:t,index:n+1,tolerance:o-1});for(let[e,r]of t.c)a.push({node:r,index:n,tolerance:o-1}),e!==s&&a.push({node:r,index:n+1,tolerance:o-1})}}find(e){let{term:t,exact:n,tolerance:r}=e;if(r&&!n){let e={};return this._findLevenshtein(t,0,r,r,e),e}else{let e=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=e.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c)e=s,i+=l;else if(i+l===a)if(l===a-i){if(n)return{};{let e={};return s.findAllWords(e,t,n,r),e}}else return{};else return{}}else return{}}let o={};return e.findAllWords(o,t,n,r),o}}contains(e){let t=this,n=0,r=e.length;for(;n<r;){let i=e[n],a=t.c.get(i);if(a){let i=a.s,o=i.length,s=0;for(;s<o&&n+s<r&&i[s]===e[n+s];)s++;if(s<o)return!1;n+=o,t=a}else return!1}return!0}removeWord(e){if(!e)return!1;let t=this,n=e.length,r=[];for(let i=0;i<n;i++){let n=e[i];if(t.c.has(n)){let e=t.c.get(n);r.push({parent:t,character:n}),i+=e.s.length-1,t=e}else return!1}for(t.d.clear(),t.e=!1;r.length>0&&t.c.size===0&&!t.e&&t.d.size===0;){let{parent:e,character:n}=r.pop();e.c.delete(n),t=e}return!0}removeDocumentByWord(e,t,n=!0){if(!e)return!0;let r=this,i=e.length;for(let a=0;a<i;a++){let i=e[a];if(r.c.has(i)){let o=r.c.get(i);a+=o.s.length-1,r=o,n&&r.w!==e||r.removeDocument(t)}else return!1}return!0}static getCommonPrefix(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e.charCodeAt(r)===t.charCodeAt(r);)r++;return e.slice(0,r)}toJSON(){return{w:this.w,s:this.s,e:this.e,k:this.k,d:Array.from(this.d),c:Array.from(this.c?.entries())?.map(([e,t])=>[e,t.toJSON()])}}static fromJSON(t){let n=new e(t.k,t.s,t.e);return n.w=t.w,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([t,n])=>[t,e.fromJSON(n)])||[]),n}},EK=class e extends TK{constructor(){super(``,``,!1)}static fromJSON(t){let n=new e;return n.w=t.w,n.s=t.s,n.e=t.e,n.k=t.k,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([e,t])=>[e,TK.fromJSON(t)])||[]),n}toJSON(){return super.toJSON()}},DK=2,OK=6371e3,kK=class e{point;docIDs;left;right;parent;constructor(e,t){this.point=e,this.docIDs=new Set(t),this.left=null,this.right=null,this.parent=null}toJSON(){return{point:this.point,docIDs:Array.from(this.docIDs),left:this.left?this.left.toJSON():null,right:this.right?this.right.toJSON():null}}static fromJSON(t,n=null){let r=new e(t.point,t.docIDs);return r.parent=n,t.left&&(r.left=e.fromJSON(t.left,r)),t.right&&(r.right=e.fromJSON(t.right,r)),r}},AK=class e{root;nodeMap;constructor(){this.root=null,this.nodeMap=new Map}getPointKey(e){return`${e.lon},${e.lat}`}insert(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);if(r){t.forEach(e=>r.docIDs.add(e));return}let i=new kK(e,t);if(this.nodeMap.set(n,i),this.root==null){this.root=i;return}let a=this.root,o=0;for(;;){if(o%DK===0)if(e.lon<a.point.lon){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}else if(e.lat<a.point.lat){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}o++}}contains(e){let t=this.getPointKey(e);return this.nodeMap.has(t)}getDocIDsByCoordinates(e){let t=this.getPointKey(e),n=this.nodeMap.get(t);return n?Array.from(n.docIDs):null}removeDocByID(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);r&&(r.docIDs.delete(t),r.docIDs.size===0&&(this.nodeMap.delete(n),this.deleteNode(r)))}deleteNode(e){let t=e.parent,n=e.left?e.left:e.right;n&&(n.parent=t),t?t.left===e?t.left=n:t.right===e&&(t.right=n):(this.root=n,this.root&&(this.root.parent=null))}searchByRadius(t,n,r=!0,i=`asc`,a=!1){let o=a?e.vincentyDistance:e.haversineDistance,s=[{node:this.root,depth:0}],c=[];for(;s.length>0;){let{node:e,depth:i}=s.pop();if(e==null)continue;let a=o(t,e.point);(r?a<=n:a>n)&&c.push({point:e.point,docIDs:Array.from(e.docIDs)}),e.left!=null&&s.push({node:e.left,depth:i+1}),e.right!=null&&s.push({node:e.right,depth:i+1})}return i&&c.sort((e,n)=>{let r=o(t,e.point),a=o(t,n.point);return i.toLowerCase()===`asc`?r-a:a-r}),c}searchByPolygon(t,n=!0,r=null,i=!1){let a=[{node:this.root,depth:0}],o=[];for(;a.length>0;){let{node:r,depth:i}=a.pop();if(r==null)continue;r.left!=null&&a.push({node:r.left,depth:i+1}),r.right!=null&&a.push({node:r.right,depth:i+1});let s=e.isPointInPolygon(t,r.point);(s&&n||!s&&!n)&&o.push({point:r.point,docIDs:Array.from(r.docIDs)})}let s=e.calculatePolygonCentroid(t);if(r){let t=i?e.vincentyDistance:e.haversineDistance;o.sort((e,n)=>{let i=t(s,e.point),a=t(s,n.point);return r.toLowerCase()===`asc`?i-a:a-i})}return o}toJSON(){return{root:this.root?this.root.toJSON():null}}static fromJSON(t){let n=new e;return t.root&&(n.root=kK.fromJSON(t.root),n.buildNodeMap(n.root)),n}buildNodeMap(e){if(e==null)return;let t=this.getPointKey(e.point);this.nodeMap.set(t,e),e.left&&this.buildNodeMap(e.left),e.right&&this.buildNodeMap(e.right)}static calculatePolygonCentroid(e){let t=0,n=0,r=0,i=e.length;for(let a=0,o=i-1;a<i;o=a++){let i=e[a].lon,s=e[a].lat,c=e[o].lon,l=e[o].lat,u=i*l-c*s;t+=u,n+=(i+c)*u,r+=(s+l)*u}t/=2;let a=6*t;return n/=a,r/=a,{lon:n,lat:r}}static isPointInPolygon(e,t){let n=!1,r=t.lon,i=t.lat,a=e.length;for(let t=0,o=a-1;t<a;o=t++){let a=e[t].lon,s=e[t].lat,c=e[o].lon,l=e[o].lat;s>i!=l>i&&r<(c-a)*(i-s)/(l-s)+a&&(n=!n)}return n}static haversineDistance(e,t){let n=Math.PI/180,r=e.lat*n,i=t.lat*n,a=(t.lat-e.lat)*n,o=(t.lon-e.lon)*n,s=Math.sin(a/2)*Math.sin(a/2)+Math.cos(r)*Math.cos(i)*Math.sin(o/2)*Math.sin(o/2);return OK*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))}static vincentyDistance(e,t){let n=6378137,r=1/298.257223563,i=(1-r)*n,a=Math.PI/180,o=e.lat*a,s=t.lat*a,c=(t.lon-e.lon)*a,l=Math.atan((1-r)*Math.tan(o)),u=Math.atan((1-r)*Math.tan(s)),d=Math.sin(l),f=Math.cos(l),p=Math.sin(u),m=Math.cos(u),h=c,g,_=1e3,v,y,b,x,S,C;do{let e=Math.sin(h),t=Math.cos(h);if(v=Math.sqrt(m*e*(m*e)+(f*p-d*m*t)*(f*p-d*m*t)),v===0)return 0;y=d*p+f*m*t,b=Math.atan2(v,y),x=f*m*e/v,S=1-x*x,C=y-2*d*p/S,isNaN(C)&&(C=0);let n=r/16*S*(4+r*(4-3*S));g=h,h=c+(1-n)*r*x*(b+n*v*(C+n*y*(-1+2*C*C)))}while(Math.abs(h-g)>1e-12&&--_>0);if(_===0)return NaN;let w=S*(n*n-i*i)/(i*i),T=1+w/16384*(4096+w*(-768+w*(320-175*w))),E=w/1024*(256+w*(-128+w*(74-47*w))),D=E*v*(C+E/4*(y*(-1+2*C*C)-E/6*C*(-3+4*v*v)*(-3+4*C*C)));return i*T*(b-D)}},jK=class e{true;false;constructor(){this.true=new Set,this.false=new Set}insert(e,t){t?this.true.add(e):this.false.add(e)}delete(e,t){t?this.true.delete(e):this.false.delete(e)}getSize(){return this.true.size+this.false.size}toJSON(){return{true:Array.from(this.true),false:Array.from(this.false)}}static fromJSON(t){let n=new e;return n.true=new Set(t.true),n.false=new Set(t.false),n}};function MK(e,t,n,r,i,{k:a,b:o,d:s}){return Math.log(1+(n-t+.5)/(t+.5))*(s+e*(a+1))/(e+a*(1-o+o*r/i))}var NK=class e{size;vectors=new Map;constructor(e){this.size=e}add(e,t){t instanceof Float32Array||(t=new Float32Array(t));let n=PK(t,this.size);this.vectors.set(e,[n,t])}remove(e){this.vectors.delete(e)}find(e,t,n){return e instanceof Float32Array||(e=new Float32Array(e)),FK(e,n,this.vectors,this.size,t)}toJSON(){let e=[];for(let[t,[n,r]]of this.vectors)e.push([t,[n,Array.from(r)]]);return{size:this.size,vectors:e}}static fromJSON(t){let n=t,r=new e(n.size);for(let[e,[t,i]]of n.vectors)r.vectors.set(e,[t,new Float32Array(i)]);return r}};function PK(e,t){let n=0;for(let r=0;r<t;r++)n+=e[r]*e[r];return Math.sqrt(n)}function FK(e,t,n,r,i){let a=PK(e,r),o=[],s=t||n.keys();for(let t of s){let s=n.get(t);if(!s)continue;let c=s[0],l=s[1],u=0;for(let t=0;t<r;t++)u+=e[t]*l[t];let d=u/(a*c);d>=i&&o.push([t,d])}return o}function IK(e,t,n,r,i){let a=$G(e.sharedInternalDocumentStore,n);e.avgFieldLength[t]=((e.avgFieldLength[t]??0)*(i-1)+r.length)/i,e.fieldLengths[t][a]=r.length,e.frequencies[t][a]={}}function LK(e,t,n,r,i){let a=0;for(let e of r)e===i&&a++;let o=$G(e.sharedInternalDocumentStore,n),s=a/r.length;e.frequencies[t][o][i]=s,i in e.tokenOccurrences[t]||(e.tokenOccurrences[t][i]=0),e.tokenOccurrences[t][i]=(e.tokenOccurrences[t][i]??0)+1}function RK(e,t,n,r){let i=$G(e.sharedInternalDocumentStore,n);r>1?e.avgFieldLength[t]=(e.avgFieldLength[t]*r-e.fieldLengths[t][i])/(r-1):e.avgFieldLength[t]=void 0,e.fieldLengths[t][i]=void 0,e.frequencies[t][i]=void 0}function zK(e,t,n){e.tokenOccurrences[t][n]--}function BK(e,t,n,r,i=``){r||={sharedInternalDocumentStore:t,indexes:{},vectorIndexes:{},searchableProperties:[],searchablePropertiesWithTypes:{},frequencies:{},tokenOccurrences:{},avgFieldLength:{},fieldLengths:{}};for(let[a,o]of Object.entries(n)){let n=`${i}${i?`.`:``}${a}`;if(typeof o==`object`&&!Array.isArray(o)){BK(e,t,o,r,n);continue}if(KG(o))r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o,r.vectorIndexes[n]={type:`Vector`,node:new NK(YG(o)),isArray:!1};else{let e=/\[/.test(o);switch(o){case`boolean`:case`boolean[]`:r.indexes[n]={type:`Bool`,node:new jK,isArray:e};break;case`number`:case`number[]`:r.indexes[n]={type:`AVL`,node:new xK(0,[]),isArray:e};break;case`string`:case`string[]`:r.indexes[n]={type:`Radix`,node:new EK,isArray:e},r.avgFieldLength[n]=0,r.frequencies[n]={},r.tokenOccurrences[n]={},r.fieldLengths[n]={};break;case`enum`:case`enum[]`:r.indexes[n]={type:`Flat`,node:new SK,isArray:e};break;case`geopoint`:r.indexes[n]={type:`BKD`,node:new AK,isArray:e};break;default:throw zG(`INVALID_SCHEMA_TYPE`,Array.isArray(o)?`array`:o,n)}r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o}}return r}function VK(e,t,n,r,i,a,o,s){return c=>{let{type:l,node:u}=t.indexes[n];switch(l){case`Bool`:u[c?`true`:`false`].add(r);break;case`AVL`:{let e=s?.avlRebalanceThreshold??1;u.insert(c,r,e);break}case`Radix`:{let s=a.tokenize(c,i,n,!1);e.insertDocumentScoreParameters(t,n,r,s,o);for(let i of s)e.insertTokenScoreParameters(t,n,r,s,i),u.insert(i,r);break}case`Flat`:u.insert(c,r);break;case`BKD`:u.insert(c,[r]);break}}}function HK(e,t,n,r,i,a,o,s,c,l,u){if(KG(o))return UK(t,n,a,r,i);let d=VK(e,t,n,i,s,c,l,u);if(!qG(o))return d(a);let f=a,p=f.length;for(let e=0;e<p;e++)d(f[e])}function UK(e,t,n,r,i){e.vectorIndexes[t].node.add(i,n)}function WK(e,t,n,r,i,a,o,s,c,l){if(KG(o))return t.vectorIndexes[n].node.remove(i),!0;let{type:u,node:d}=t.indexes[n];switch(u){case`AVL`:return d.removeDocument(a,i),!0;case`Bool`:return d[a?`true`:`false`].delete(i),!0;case`Radix`:{let o=c.tokenize(a,s,n);e.removeDocumentScoreParameters(t,n,r,l);for(let r of o)e.removeTokenScoreParameters(t,n,r),d.removeDocumentByWord(r,i);return!0}case`Flat`:return d.removeDocument(i,a),!0;case`BKD`:return d.removeDocByID(a,i),!1}}function GK(e,t,n,r,i,a,o,s,c,l){if(!qG(o))return WK(e,t,n,r,i,a,o,s,c,l);let u=JG(o),d=a,f=d.length;for(let a=0;a<f;a++)WK(e,t,n,r,i,d[a],u,s,c,l);return!0}function KK(e,t,n,r,i,a,o,s,c,l){let u=Array.from(r),d=e.avgFieldLength[t],f=e.fieldLengths[t],p=e.tokenOccurrences[t],m=e.frequencies[t],h=typeof p[n]==`number`?p[n]??0:0,g=u.length;for(let e=0;e<g;e++){let r=u[e];if(c&&!c.has(r))continue;l.has(r)||l.set(r,new Map);let p=l.get(r);p.set(t,(p.get(t)||0)+1);let g=MK(m?.[r]?.[n]??0,h,i,f[r],d,a);o.has(r)?o.set(r,o.get(r)+g*s):o.set(r,g*s)}}function qK(e,t,n,r,i,a,o,s,c,l,u,d=0){let f=n.tokenize(t,r),p=f.length||1,m=new Map,h=new Map,g=new Map;for(let n of i){if(!(n in e.indexes))continue;let r=e.indexes[n],{type:i}=r;if(i!==`Radix`)throw zG(`WRONG_SEARCH_PROPERTY_TYPE`,n);let d=s[n]??1;if(d<=0)throw zG(`INVALID_BOOST_VALUE`,d);f.length===0&&!t&&f.push(``);let p=f.length;for(let t=0;t<p;t++){let i=f[t],s=r.node.find({term:i,exact:a,tolerance:o}),p=Object.keys(s);p.length>0&&h.set(i,!0);let _=p.length;for(let t=0;t<_;t++){let r=p[t],i=s[r];KK(e,n,r,i,l,c,g,d,u,m)}}}let _=Array.from(g.entries()).map(([e,t])=>[e,t]).sort((e,t)=>t[1]-e[1]);if(_.length===0)return[];if(d===1)return _;if(d===0){if(p===1)return _;for(let e of f)if(!h.get(e))return[];return _.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1})}let v=_.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1});if(v.length>0){let e=_.filter(([e])=>!v.some(([t])=>t===e)),t=Math.ceil(e.length*d);return[...v,...e.slice(0,t)]}return _}function JK(e,t,n,r){if(`and`in n&&n.and&&Array.isArray(n.and)){let i=n.and;return i.length===0?new Set:NG(...i.map(n=>JK(e,t,n,r)))}if(`or`in n&&n.or&&Array.isArray(n.or)){let i=n.or;return i.length===0?new Set:i.map(n=>JK(e,t,n,r)).reduce((e,t)=>FG(e,t),new Set)}if(`not`in n&&n.not){let i=n.not,a=new Set,o=e.sharedInternalDocumentStore;for(let e=1;e<=o.internalIdToId.length;e++)a.add(e);return IG(a,JK(e,t,i,r))}let i=Object.keys(n),a=i.reduce((e,t)=>({[t]:new Set,...e}),{});for(let o of i){let i=n[o];if(e.indexes[o]===void 0)throw zG(`UNKNOWN_FILTER_PROPERTY`,o);let{node:s,type:c,isArray:l}=e.indexes[o];if(c===`Bool`){let e=s,t=i?e.true:e.false;a[o]=FG(a[o],t);continue}if(c===`BKD`){let e;if(`radius`in i)e=`radius`;else if(`polygon`in i)e=`polygon`;else throw Error(`Invalid operation ${i}`);if(e===`radius`){let{value:t,coordinates:n,unit:r=`m`,inside:c=!0,highPrecision:l=!1}=i[e],u=kG(t,r),d=s.searchByRadius(n,u,c,void 0,l);a[o]=eq(a[o],d)}else{let{coordinates:t,inside:n=!0,highPrecision:r=!1}=i[e],c=s.searchByPolygon(t,n,void 0,r);a[o]=eq(a[o],c)}continue}if(c===`Radix`&&(typeof i==`string`||Array.isArray(i))){for(let e of[i].flat()){let n=t.tokenize(e,r,o);for(let e of n){let t=s.find({term:e,exact:!0});a[o]=iq(a[o],t)}}continue}let u=Object.keys(i);if(u.length>1)throw zG(`INVALID_FILTER_OPERATION`,u.length);if(c===`Flat`){let e=new Set(l?s.filterArr(i):s.filter(i));a[o]=FG(a[o],e);continue}if(c===`AVL`){let e=u[0],t=i[e],n;switch(e){case`gt`:n=s.greaterThan(t,!1);break;case`gte`:n=s.greaterThan(t,!0);break;case`lt`:n=s.lessThan(t,!1);break;case`lte`:n=s.lessThan(t,!0);break;case`eq`:n=s.find(t)??new Set;break;case`between`:{let[e,r]=t;n=s.rangeSearch(e,r);break}default:throw zG(`INVALID_FILTER_OPERATION`,e)}a[o]=FG(a[o],n)}}return NG(...Object.values(a))}function YK(e){return e.searchableProperties}function XK(e){return e.searchablePropertiesWithTypes}function ZK(e,t){let{indexes:n,vectorIndexes:r,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}=t,u={},d={};for(let e of Object.keys(n)){let{node:t,type:r,isArray:i}=n[e];switch(r){case`Radix`:u[e]={type:`Radix`,node:EK.fromJSON(t),isArray:i};break;case`Flat`:u[e]={type:`Flat`,node:SK.fromJSON(t),isArray:i};break;case`AVL`:u[e]={type:`AVL`,node:xK.fromJSON(t),isArray:i};break;case`BKD`:u[e]={type:`BKD`,node:AK.fromJSON(t),isArray:i};break;case`Bool`:u[e]={type:`Bool`,node:jK.fromJSON(t),isArray:i};break;default:u[e]=n[e]}}for(let e of Object.keys(r))d[e]={type:`Vector`,isArray:!1,node:NK.fromJSON(r[e])};return{sharedInternalDocumentStore:e,indexes:u,vectorIndexes:d,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}}function QK(e){let{indexes:t,vectorIndexes:n,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}=e,l={};for(let e of Object.keys(n))l[e]=n[e].node.toJSON();let u={};for(let e of Object.keys(t)){let{type:n,node:r,isArray:i}=t[e];n===`Flat`||n===`Radix`||n===`AVL`||n===`BKD`||n===`Bool`?u[e]={type:n,node:r.toJSON(),isArray:i}:(u[e]=t[e],u[e].node=u[e].node.toJSON())}return{indexes:u,vectorIndexes:l,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}}function $K(){return{create:BK,insert:HK,remove:GK,insertDocumentScoreParameters:IK,insertTokenScoreParameters:LK,removeDocumentScoreParameters:RK,removeTokenScoreParameters:zK,calculateResultScores:KK,search:qK,searchByWhereClause:JK,getSearchableProperties:YK,getSearchablePropertiesWithTypes:XK,load:ZK,save:QK}}function eq(e,t){e||=new Set;let n=t.length;for(let r=0;r<n;r++){let n=t[r].docIDs,i=n.length;for(let t=0;t<i;t++)e.add(n[t])}return e}function tq(e,t,n=!1){let r=n?AK.vincentyDistance:AK.haversineDistance,i=[],a=[];for(let{point:n}of e)a.push(r(t,n));let o=Math.max(...a),s=0;for(let{docIDs:t}of e){let e=o-a[s]+1;for(let n of t)i.push([n,e]);s++}return i.sort((e,t)=>t[1]-e[1]),i}function nq(e,t){let n=Object.keys(e);if(n.length!==1)return{isGeoOnly:!1};let r=n[0],i=e[r];if(t.indexes[r]===void 0)return{isGeoOnly:!1};let{type:a}=t.indexes[r];return a===`BKD`&&i&&(`radius`in i||`polygon`in i)?{isGeoOnly:!0,geoProperty:r,geoOperation:i}:{isGeoOnly:!1}}function rq(e,t){let n=e,r=nq(t,n);if(!r.isGeoOnly||!r.geoProperty||!r.geoOperation)return null;let{node:i}=n.indexes[r.geoProperty],a=r.geoOperation,o=i,s;if(`radius`in a){let{value:e,coordinates:t,unit:n=`m`,inside:r=!0,highPrecision:i=!1}=a.radius,c=t,l=kG(e,n);return s=o.searchByRadius(c,l,r,`asc`,i),tq(s,c,i)}else if(`polygon`in a){let{coordinates:e,inside:t=!0,highPrecision:n=!1}=a.polygon;s=o.searchByPolygon(e,t,`asc`,n);let r=AK.calculatePolygonCentroid(e);return tq(s,r,n)}return null}function iq(e,t){e||=new Set;let n=Object.keys(t),r=n.length;for(let i=0;i<r;i++){let r=t[n[i]],a=r.length;for(let t=0;t<a;t++)e.add(r[t])}return e}function aq(e,t,n,r,i){let a={language:e.tokenizer.language,sharedInternalDocumentStore:t,enabled:!0,isSorted:!0,sortableProperties:[],sortablePropertiesWithTypes:{},sorts:{}};for(let[o,s]of Object.entries(n)){let n=`${i}${i?`.`:``}${o}`;if(!r.includes(n)){if(typeof s==`object`&&!Array.isArray(s)){let i=aq(e,t,s,r,n);hG(a.sortableProperties,i.sortableProperties),a.sorts={...a.sorts,...i.sorts},a.sortablePropertiesWithTypes={...a.sortablePropertiesWithTypes,...i.sortablePropertiesWithTypes};continue}if(!KG(s))switch(s){case`boolean`:case`number`:case`string`:a.sortableProperties.push(n),a.sortablePropertiesWithTypes[n]=s,a.sorts[n]={docs:new Map,orderedDocsToRemove:new Map,orderedDocs:[],type:s};break;case`geopoint`:case`enum`:continue;case`enum[]`:case`boolean[]`:case`number[]`:case`string[]`:continue;default:throw zG(`INVALID_SORT_SCHEMA_TYPE`,Array.isArray(s)?`array`:s,n)}}}return a}function oq(e,t,n,r){return r?.enabled===!1?{disabled:!0}:aq(e,t,n,(r||{}).unsortableProperties||[],``)}function sq(e,t,n,r){if(!e.enabled)return;e.isSorted=!1;let i=$G(e.sharedInternalDocumentStore,n),a=e.sorts[t];a.orderedDocsToRemove.has(i)&&mq(e,t),a.docs.set(i,a.orderedDocs.length),a.orderedDocs.push([i,r])}function cq(e){if(e.isSorted||!e.enabled)return;let t=Object.keys(e.sorts);for(let n of t)fq(e,n);e.isSorted=!0}function lq(e,t,n){return t[1].localeCompare(n[1],cG(e))}function uq(e,t){return e[1]-t[1]}function dq(e,t){return t[1]?-1:1}function fq(e,t){let n=e.sorts[t],r;switch(n.type){case`string`:r=lq.bind(null,e.language);break;case`number`:r=uq.bind(null);break;case`boolean`:r=dq.bind(null);break}n.orderedDocs.sort(r);let i=n.orderedDocs.length;for(let e=0;e<i;e++){let t=n.orderedDocs[e][0];n.docs.set(t,e)}}function pq(e){let t=Object.keys(e.sorts);for(let n of t)mq(e,n)}function mq(e,t){let n=e.sorts[t];n.orderedDocsToRemove.size&&(n.orderedDocs=n.orderedDocs.filter(e=>!n.orderedDocsToRemove.has(e[0])),n.orderedDocsToRemove.clear())}function hq(e,t,n){if(!e.enabled)return;let r=e.sorts[t],i=$G(e.sharedInternalDocumentStore,n);r.docs.get(i)&&(r.docs.delete(i),r.orderedDocsToRemove.set(i,!0))}function gq(e,t,n){if(!e.enabled)throw zG(`SORT_DISABLED`);let r=n.property,i=n.order===`DESC`,a=e.sorts[r];if(!a)throw zG(`UNABLE_TO_SORT_ON_UNKNOWN_FIELD`,r,e.sortableProperties.join(`, `));return mq(e,r),cq(e),t.sort((t,n)=>{let r=a.docs.get($G(e.sharedInternalDocumentStore,t[0])),o=a.docs.get($G(e.sharedInternalDocumentStore,n[0])),s=r!==void 0,c=o!==void 0;return!s&&!c?0:s?c?i?o-r:r-o:-1:1}),t}function _q(e){return e.enabled?e.sortableProperties:[]}function vq(e){return e.enabled?e.sortablePropertiesWithTypes:{}}function yq(e,t){let n=t;if(!n.enabled)return{enabled:!1};let r=Object.keys(n.sorts).reduce((e,t)=>{let{docs:r,orderedDocs:i,type:a}=n.sorts[t];return e[t]={docs:new Map(Object.entries(r).map(([e,t])=>[+e,t])),orderedDocsToRemove:new Map,orderedDocs:i,type:a},e},{});return{sharedInternalDocumentStore:e,language:n.language,sortableProperties:n.sortableProperties,sortablePropertiesWithTypes:n.sortablePropertiesWithTypes,sorts:r,enabled:!0,isSorted:n.isSorted}}function bq(e){if(!e.enabled)return{enabled:!1};pq(e),cq(e);let t=Object.keys(e.sorts).reduce((t,n)=>{let{docs:r,orderedDocs:i,type:a}=e.sorts[n];return t[n]={docs:Object.fromEntries(r.entries()),orderedDocs:i,type:a},t},{});return{language:e.language,sortableProperties:e.sortableProperties,sortablePropertiesWithTypes:e.sortablePropertiesWithTypes,sorts:t,enabled:e.enabled,isSorted:e.isSorted}}function xq(){return{create:oq,insert:sq,remove:hq,save:bq,load:yq,sortBy:gq,getSortableProperties:_q,getSortablePropertiesWithTypes:vq}}var Sq=192,Cq=383,wq=[65,65,65,65,65,65,65,67,69,69,69,69,73,73,73,73,69,78,79,79,79,79,79,null,79,85,85,85,85,89,80,115,97,97,97,97,97,97,97,99,101,101,101,101,105,105,105,105,101,110,111,111,111,111,111,null,111,117,117,117,117,121,112,121,65,97,65,97,65,97,67,99,67,99,67,99,67,99,68,100,68,100,69,101,69,101,69,101,69,101,69,101,71,103,71,103,71,103,71,103,72,104,72,104,73,105,73,105,73,105,73,105,73,105,73,105,74,106,75,107,107,76,108,76,108,76,108,76,108,76,108,78,110,78,110,78,110,110,78,110,79,111,79,111,79,111,79,111,82,114,82,114,82,114,83,115,83,115,83,115,83,115,84,116,84,116,84,116,85,117,85,117,85,117,85,117,85,117,85,117,87,119,89,121,89,90,122,90,122,90,122,115];function Tq(e){return e<Sq||e>Cq?e:wq[e-Sq]||e}function Eq(e){let t=[];for(let n=0;n<e.length;n++)t[n]=Tq(e.charCodeAt(n));return String.fromCharCode(...t)}var Dq={ational:`ate`,tional:`tion`,enci:`ence`,anci:`ance`,izer:`ize`,bli:`ble`,alli:`al`,entli:`ent`,eli:`e`,ousli:`ous`,ization:`ize`,ation:`ate`,ator:`ate`,alism:`al`,iveness:`ive`,fulness:`ful`,ousness:`ous`,aliti:`al`,iviti:`ive`,biliti:`ble`,logi:`log`},Oq={icate:`ic`,ative:``,alize:`al`,iciti:`ic`,ical:`ic`,ful:``,ness:``},kq=`[^aeiou]`,Aq=`[aeiouy]`,jq=kq+`[^aeiouy]*`;Aq+``;var Mq=`^(`+jq+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*`,Nq=`^(`+jq+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*([aeiouy][aeiou]*)?$`,Pq=`^(`+jq+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*[aeiouy][aeiou]*[^aeiou][^aeiouy]*`,Fq=`^(`+jq+`)?[aeiouy]`;function Iq(e){let t,n,r,i,a,o;if(e.length<3)return e;let s=e.substring(0,1);if(s==`y`&&(e=s.toUpperCase()+e.substring(1)),r=/^(.+?)(ss|i)es$/,i=/^(.+?)([^s])s$/,r.test(e)?e=e.replace(r,`$1$2`):i.test(e)&&(e=e.replace(i,`$1$2`)),r=/^(.+?)eed$/,i=/^(.+?)(ed|ing)$/,r.test(e)){let t=r.exec(e);r=new RegExp(Mq),r.test(t[1])&&(r=/.$/,e=e.replace(r,``))}else i.test(e)&&(t=i.exec(e)[1],i=new RegExp(Fq),i.test(t)&&(e=t,i=/(at|bl|iz)$/,a=RegExp(`([^aeiouylsz])\\1$`),o=RegExp(`^`+jq+Aq+`[^aeiouwxy]$`),i.test(e)?e+=`e`:a.test(e)?(r=/.$/,e=e.replace(r,``)):o.test(e)&&(e+=`e`)));if(r=/^(.+?)y$/,r.test(e)&&(t=r.exec(e)?.[1],r=new RegExp(Fq),t&&r.test(t)&&(e=t+`i`)),r=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=new RegExp(Mq),t&&r.test(t)&&(e=t+Dq[n])}if(r=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=new RegExp(Mq),t&&r.test(t)&&(e=t+Oq[n])}if(r=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,i=/^(.+?)(s|t)(ion)$/,r.test(e))t=r.exec(e)?.[1],r=new RegExp(Pq),t&&r.test(t)&&(e=t);else if(i.test(e)){let n=i.exec(e);t=n?.[1]??``+n?.[2]??``,i=new RegExp(Pq),i.test(t)&&(e=t)}return r=/^(.+?)e$/,r.test(e)&&(t=r.exec(e)?.[1],r=new RegExp(Pq),i=new RegExp(Nq),a=RegExp(`^`+jq+Aq+`[^aeiouwxy]$`),t&&(r.test(t)||i.test(t)&&!a.test(t))&&(e=t)),r=/ll$/,i=new RegExp(Pq),r.test(e)&&i.test(e)&&(r=/.$/,e=e.replace(r,``)),s==`y`&&(e=s.toLowerCase()+e.substring(1)),e}function Lq(e,t,n=!0){let r=`${this.language}:${e}:${t}`;return n&&this.normalizationCache.has(r)?this.normalizationCache.get(r):this.stopWords?.includes(t)?(n&&this.normalizationCache.set(r,``),``):(this.stemmer&&!this.stemmerSkipProperties.has(e)&&(t=this.stemmer(t)),t=Eq(t),n&&this.normalizationCache.set(r,t),t)}function Rq(e){for(;e[e.length-1]===``;)e.pop();for(;e[0]===``;)e.shift();return e}function zq(e,t,n,r=!0){if(t&&t!==this.language)throw zG(`LANGUAGE_NOT_SUPPORTED`,t);if(typeof e!=`string`)return[e];let i=this.normalizeToken.bind(this,n??``),a;if(n&&this.tokenizeSkipProperties.has(n))a=[i(e,r)];else{let t=oG[this.language];a=e.toLowerCase().split(t).map(e=>i(e,r)).filter(Boolean)}let o=Rq(a);return this.allowDuplicates?o:Array.from(new Set(o))}function Bq(e={}){if(!e.language)e.language=`english`;else if(!sG.includes(e.language))throw zG(`LANGUAGE_NOT_SUPPORTED`,e.language);let t;if(e.stemming||e.stemmer&&!(`stemming`in e))if(e.stemmer){if(typeof e.stemmer!=`function`)throw zG(`INVALID_STEMMER_FUNCTION_TYPE`);t=e.stemmer}else if(e.language===`english`)t=Iq;else throw zG(`MISSING_STEMMER`,e.language);let n;if(e.stopWords!==!1){if(n=[],Array.isArray(e.stopWords))n=e.stopWords;else if(typeof e.stopWords==`function`)n=e.stopWords(n);else if(e.stopWords)throw zG(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);if(!Array.isArray(n))throw zG(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);for(let e of n)if(typeof e!=`string`)throw zG(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`)}let r={tokenize:zq,language:e.language,stemmer:t,stemmerSkipProperties:new Set(e.stemmerSkipProperties?[e.stemmerSkipProperties].flat():[]),tokenizeSkipProperties:new Set(e.tokenizeSkipProperties?[e.tokenizeSkipProperties].flat():[]),stopWords:n,allowDuplicates:!!e.allowDuplicates,normalizeToken:Lq,normalizationCache:new Map};return r.tokenize=zq.bind(r),r.normalizeToken=Lq,r}function Vq(e){return{sharedInternalDocumentStore:e,rules:new Map}}function Hq(e,t){if(e.rules.has(t.id))throw Error(`PINNING_RULE_ALREADY_EXISTS: A pinning rule with id "${t.id}" already exists. Use updateRule to modify it.`);e.rules.set(t.id,t)}function Uq(e,t){if(!e.rules.has(t.id))throw Error(`PINNING_RULE_NOT_FOUND: Cannot update pinning rule with id "${t.id}" because it does not exist. Use addRule to create it.`);e.rules.set(t.id,t)}function Wq(e,t){return e.rules.delete(t)}function Gq(e,t){return e.rules.get(t)}function Kq(e){return Array.from(e.rules.values())}function qq(e,t){let n=e.toLowerCase().trim(),r=t.pattern.toLowerCase().trim();switch(t.anchoring){case`is`:return n===r;case`starts_with`:return n.startsWith(r);case`contains`:return n.includes(r);default:return!1}}function Jq(e,t){return e?t.conditions.every(t=>qq(e,t)):!1}function Yq(e,t){if(!t)return[];let n=[];for(let r of e.rules.values())Jq(t,r)&&n.push(r);return n}function Xq(e,t){return{sharedInternalDocumentStore:e,rules:new Map(t?.rules??[])}}function Zq(e){return{rules:Array.from(e.rules.entries())}}function Qq(){return{create:Vq,addRule:Hq,updateRule:Uq,removeRule:Wq,getRule:Gq,getAllRules:Kq,getMatchingRules:Yq,load:Xq,save:Zq}}function $q(e){let t={formatElapsedTime:BG,getDocumentIndexId:VG,getDocumentProperties:EG,validateSchema:HG};for(let n of mK){let r=n;if(e[r]){if(typeof e[r]!=`function`)throw zG(`COMPONENT_MUST_BE_FUNCTION`,r)}else e[r]=t[r]}for(let t of Object.keys(e))if(!pK.includes(t)&&!mK.includes(t))throw zG(`UNSUPPORTED_COMPONENT`,t)}function eJ({schema:e,sort:t,language:n,components:r,id:i,plugins:a}){r||={};for(let t of a??[]){if(!(`getComponents`in t)||typeof t.getComponents!=`function`)continue;let n=t.getComponents(e),i=Object.keys(n);for(let e of i)if(r[e])throw zG(`PLUGIN_COMPONENT_CONFLICT`,e,t.name);r={...r,...n}}i||=SG();let o=r.tokenizer,s=r.index,c=r.documentsStore,l=r.sorter,u=r.pinning;if(o=o?o.tokenize?o:Bq(o):Bq({language:n??`english`}),r.tokenizer&&n)throw zG(`NO_LANGUAGE_WITH_CUSTOM_TOKENIZER`);let d=XG();s||=$K(),l||=xq(),c||=uK(),u||=Qq(),$q(r);let{getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,formatElapsedTime:h}=r,g={data:{},caches:{},schema:e,tokenizer:o,index:s,sorter:l,documentsStore:c,pinning:u,internalDocumentIDStore:d,getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,beforeInsert:[],afterInsert:[],beforeRemove:[],afterRemove:[],beforeUpdate:[],afterUpdate:[],beforeUpsert:[],afterUpsert:[],beforeSearch:[],afterSearch:[],beforeInsertMultiple:[],afterInsertMultiple:[],beforeRemoveMultiple:[],afterRemoveMultiple:[],beforeUpdateMultiple:[],afterUpdateMultiple:[],beforeUpsertMultiple:[],afterUpsertMultiple:[],afterCreate:[],formatElapsedTime:h,id:i,plugins:a,version:tJ()};g.data={index:g.index.create(g,d,e),docs:g.documentsStore.create(g,d),sorting:g.sorter.create(g,d,e,t),pinning:g.pinning.create(d)};for(let e of dK)g[e]=(g[e]??[]).concat(fK(g,e));let _=g.afterCreate;return _&&yK(_,g),g}function tJ(){return`{{VERSION}}`}function nJ(e){return e.documentsStore.count(e.data.docs)}function rJ(e,t,n,r,i){let a=e.validateSchema(t,e.schema);if(a)throw zG(`SCHEMA_VALIDATION_FAILURE`,a);return jG(e.beforeInsert)||jG(e.afterInsert)||jG(e.index.beforeInsert)||jG(e.index.insert)||jG(e.index.afterInsert)?oJ(e,t,n,r,i):sJ(e,t,n,r,i)}var iJ=new Set([`enum`,`enum[]`]),aJ=new Set([`string`,`number`]);async function oJ(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw zG(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=$G(e.internalDocumentIDStore,s);if(r||await hK(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw zG(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];cJ(n,r,e,t)}return await lJ(e,s,u,f,l,n,t,i),r||await hK(e.afterInsert,e,s,t),s}function sJ(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw zG(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=$G(e.internalDocumentIDStore,s);if(r||hK(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw zG(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];cJ(n,r,e,t)}return uJ(e,s,u,f,l,n,t,i),r||hK(e.afterInsert,e,s,t),s}function cJ(e,t,n,r){if(!(GG(t)&&typeof r==`object`&&typeof r.lon==`number`&&typeof r.lat==`number`)&&!(KG(t)&&Array.isArray(r))&&!(qG(t)&&Array.isArray(r))&&!(iJ.has(t)&&aJ.has(e))&&e!==t)throw zG(`INVALID_DOCUMENT_PROPERTY`,n,t,e)}async function lJ(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o];await e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i);let l=e.internalDocumentIDStore.idToInternalId.get(t);await e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),await e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function uJ(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o],l=$G(e.internalDocumentIDStore,t);e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i),e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function dJ(e,t,n,r,i,a){return jG(e.afterInsertMultiple)||jG(e.beforeInsertMultiple)||jG(e.index.beforeInsert)||jG(e.index.insert)||jG(e.index.afterInsert)?fJ(e,t,n,r,i,a):pJ(e,t,n,r,i,a)}async function fJ(e,t,n=1e3,r,i,a=0){let o=[],s=async a=>{let s=Math.min(a+n,t.length),c=t.slice(a,s);for(let t of c){let n=await rJ(e,t,r,i,{avlRebalanceThreshold:c.length});o.push(n)}return s};return await(async()=>{let e=0;for(;e<t.length;){let t=Date.now();if(e=await s(e),a>0){let e=a-(Date.now()-t);e>0&&LG(e)}}})(),i||await gK(e.afterInsertMultiple,e,t),o}function pJ(e,t,n=1e3,r,i,a=0){let o=[],s=0;function c(){let a=t.slice(s*n,(s+1)*n);if(a.length===0)return!1;for(let t of a){let n=rJ(e,t,r,i,{avlRebalanceThreshold:a.length});o.push(n)}return s++,!0}function l(){let e=Date.now();for(;c();)if(a>0){let t=Date.now()-e;if(t>=a){let e=a-t%a;e>0&&LG(e)}}}return l(),i||gK(e.afterInsertMultiple,e,t),o}function mJ(e,t){return e[1]-t[1]}function hJ(e,t){return t[1]-e[1]}function gJ(e=`desc`){return e.toLowerCase()===`asc`?mJ:hJ}function _J(e,t,n){let r={},i=t.map(([e])=>e),a=e.documentsStore.getMultiple(e.data.docs,i),o=Object.keys(n),s=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e of o){let t;if(s[e]===`number`){let{ranges:r}=n[e],i=r.length,a=Array.from({length:i});for(let e=0;e<i;e++){let t=r[e];a[e]=[`${t.from}-${t.to}`,0]}t=Object.fromEntries(a)}r[e]={count:0,values:t??{}}}let c=a.length;for(let e=0;e<c;e++){let t=a[e];for(let e of o){let i=e.includes(`.`)?DG(t,e):t[e],a=s[e],o=r[e].values;switch(a){case`number`:{let t=n[e].ranges;vJ(t,o)(i);break}case`number[]`:{let t=new Set,r=n[e].ranges,a=vJ(r,o,t);for(let e of i)a(e);break}case`boolean`:case`enum`:case`string`:yJ(o,a)(i);break;case`boolean[]`:case`enum[]`:case`string[]`:{let e=yJ(o,a===`boolean[]`?`boolean`:`string`,new Set);for(let t of i)e(t);break}default:throw zG(`FACET_NOT_SUPPORTED`,a)}}}for(let e of o){let t=r[e];if(t.count=Object.keys(t.values).length,s[e]===`string`){let r=n[e],i=gJ(r.sort);t.values=Object.fromEntries(Object.entries(t.values).sort(i).slice(r.offset??0,r.limit??10))}}return r}function vJ(e,t,n){return r=>{for(let i of e){let e=`${i.from}-${i.to}`;n?.has(e)||r>=i.from&&r<=i.to&&(t[e]===void 0?t[e]=1:(t[e]++,n?.add(e)))}}}function yJ(e,t,n){let r=t===`boolean`?`false`:``;return t=>{let i=t?.toString()??r;n?.has(i)||(e[i]=(e[i]??0)+1,n?.add(i))}}var bJ={reducer:(e,t,n,r)=>(t[r]=n,t),getInitialValue:e=>Array.from({length:e})},xJ=[`string`,`number`,`boolean`];function SJ(e,t,n){let r=n.properties,i=r.length,a=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e=0;e<i;e++){let t=r[e];if(a[t]===void 0)throw zG(`UNKNOWN_GROUP_BY_PROPERTY`,t);if(!xJ.includes(a[t]))throw zG(`INVALID_GROUP_BY_PROPERTY`,t,xJ.join(`, `),a[t])}let o=t.map(([t])=>eK(e.internalDocumentIDStore,t)),s=e.documentsStore.getMultiple(e.data.docs,o),c=s.length,l=n.maxResult||2**53-1,u=[],d={};for(let e=0;e<i;e++){let t=r[e],n={property:t,perValue:{}},i=new Set;for(let e=0;e<c;e++){let r=s[e],a=DG(r,t);if(a===void 0)continue;let o=typeof a==`boolean`?``+a:a,c=n.perValue[o]??{indexes:[],count:0};c.count>=l||(c.indexes.push(e),c.count++,n.perValue[o]=c,i.add(a))}u.push(Array.from(i)),d[t]=n}let f=CJ(u),p=f.length,m=[];for(let e=0;e<p;e++){let t=f[e],n=t.length,i={values:[],indexes:[]},a=[];for(let e=0;e<n;e++){let n=t[e],o=r[e];a.push(d[o].perValue[typeof n==`boolean`?``+n:n].indexes),i.values.push(n)}i.indexes=TG(a).sort((e,t)=>e-t),i.indexes.length!==0&&m.push(i)}let h=m.length,g=Array.from({length:h});for(let e=0;e<h;e++){let r=m[e],i=n.reduce||bJ,a=r.indexes.map(e=>({id:o[e],score:t[e][1],document:s[e]})),c=i.reducer.bind(null,r.values),l=i.getInitialValue(r.indexes.length),u=a.reduce(c,l);g[e]={values:r.values,result:u}}return g}function CJ(e,t=0){if(t+1===e.length)return e[t].map(e=>[e]);let n=e[t],r=CJ(e,t+1),i=[];for(let e of n)for(let t of r){let n=[e];hG(n,t),i.push(n)}return i}function wJ(e,t,n,r){let i=Yq(t,r);if(i.length===0)return n;let a=i.flatMap(e=>e.consequence.promote);a.sort((e,t)=>e.position-t.position);let o=new Set,s=new Map,c=new Set;for(let t of a){let n=$G(e.internalDocumentIDStore,t.doc_id);if(n!==void 0){if(s.has(n)){let e=s.get(n);t.position<e&&s.set(n,t.position);continue}c.has(t.position)||(o.add(n),s.set(n,t.position),c.add(t.position))}}if(s.size===0)return n;let l=n.filter(([e])=>!o.has(e)),u=[];for(let[t,r]of s.entries())n.find(([e])=>e===t)?u.push([t,1e6-r]):e.documentsStore.get(e.data.docs,t)&&u.push([t,0]);u.sort((e,t)=>(s.get(e[0])??1/0)-(s.get(t[0])??1/0));let d=[],f=new Map;for(let e of u){let t=s.get(e[0]);f.set(t,e)}let p=0,m=0;for(;m<l.length+u.length;)if(f.has(m))d.push(f.get(m)),m++;else if(p<l.length)d.push(l[p]),p++,m++;else break;for(let[e,t]of f.entries())e>=d.length&&d.push(t);return d}function TJ(e,t,n){let{term:r,properties:i}=t,a=e.data.index,o=e.caches.propertiesToSearch;if(!o){let t=e.index.getSearchablePropertiesWithTypes(a);o=e.index.getSearchableProperties(a),o=o.filter(e=>t[e].startsWith(`string`)),e.caches.propertiesToSearch=o}if(i&&i!==`*`){for(let e of i)if(!o.includes(e))throw zG(`UNKNOWN_INDEX`,e,o.join(`, `));o=o.filter(e=>i.includes(e))}let s=Object.keys(t.where??{}).length>0,c;s&&(c=e.index.searchByWhereClause(a,e.tokenizer,t.where,n));let l,u=t.threshold!==void 0&&t.threshold!==null?t.threshold:1;if(r||i){let i=nJ(e);if(l=e.index.search(a,r||``,e.tokenizer,n,o,t.exact||!1,t.tolerance||0,t.boost||{},AJ(t.relevance),i,c,u),t.exact&&r){let t=r.trim().split(/\s+/);l=l.filter(([n])=>{let r=e.documentsStore.get(e.data.docs,n);if(!r)return!1;for(let e of o){let n=DJ(r,e);if(typeof n==`string`&&t.every(e=>RegExp(`\\b${EJ(e)}\\b`).test(n)))return!0}return!1})}}else l=s?rq(a,t.where)||(c?Array.from(c):[]).map(e=>[+e,0]):Object.keys(e.documentsStore.getAll(e.data.docs)).map(e=>[+e,0]);return l}function EJ(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function DJ(e,t){let n=t.split(`.`),r=e;for(let e of n)if(r&&typeof r==`object`&&e in r)r=r[e];else return;return r}function OJ(e,t,n){let r=xG();function i(){let i=Object.keys(e.data.index.vectorIndexes),a=t.facets&&Object.keys(t.facets).length>0,{limit:o=10,offset:s=0,distinctOn:c,includeVectors:l=!1}=t,u=t.preflight===!0,d=TJ(e,t,n);if(t.sortBy)if(typeof t.sortBy==`function`){let n=d.map(([e])=>e),r=e.documentsStore.getMultiple(e.data.docs,n).map((e,t)=>[d[t][0],d[t][1],e]);r.sort(t.sortBy),d=r.map(([e,t])=>[e,t])}else d=e.sorter.sortBy(e.data.sorting,d,t.sortBy).map(([t,n])=>[$G(e.internalDocumentIDStore,t),n]);else d=d.sort(wG);d=wJ(e,e.data.pinning,d,t.term);let f;u||(f=c?HJ(e,d,s,o,c):UJ(e,d,s,o));let p={elapsed:{formatted:``,raw:0},hits:[],count:d.length};return f!==void 0&&(p.hits=f.filter(Boolean),l||AG(p,i)),a&&(p.facets=_J(e,d,t.facets)),t.groupBy&&(p.groups=SJ(e,d,t.groupBy)),p.elapsed=e.formatElapsedTime(xG()-r),p}async function a(){e.beforeSearch&&await vK(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await _K(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}var kJ={k:1.2,b:.75,d:.5};function AJ(e){let t=e??{};return t.k=t.k??kJ.k,t.b=t.b??kJ.b,t.d=t.d??kJ.d,t}function jJ(e,t,n){let r=t.vector;if(r&&(!(`value`in r)||!(`property`in r)))throw zG(`INVALID_VECTOR_INPUT`,Object.keys(r).join(`, `));let i=e.data.index.vectorIndexes[r.property];if(!i)throw zG(`UNKNOWN_VECTOR_PROPERTY`,r.property);let a=i.node.size;if(r?.value.length!==a)throw r?.property===void 0||r?.value.length===void 0?zG(`INVALID_INPUT_VECTOR`,`undefined`,a,`undefined`):zG(`INVALID_INPUT_VECTOR`,r.property,a,r.value.length);let o=e.data.index,s;return Object.keys(t.where??{}).length>0&&(s=e.index.searchByWhereClause(o,e.tokenizer,t.where,n)),i.node.find(r.value,t.similarity??.8,s)}function MJ(e,t,n=`english`){let r=xG();function i(){let i=jJ(e,t,n).sort(wG);i=wJ(e,e.data.pinning,i,void 0);let a=[];t.facets&&Object.keys(t.facets).length>0&&(a=_J(e,i,t.facets));let o=t.vector.property,s=t.includeVectors??!1,c=t.limit??10,l=t.offset??0,u=Array.from({length:c});for(let t=0;t<c;t++){let n=i[t+l];if(!n)break;let r=e.data.docs.docs[n[0]];r&&(s||(r[o]=null),u[t]={id:eK(e.internalDocumentIDStore,n[0]),score:n[1],document:r})}let d=[];t.groupBy&&(d=SJ(e,i,t.groupBy));let f=xG()-r;return{count:i.length,hits:u.filter(Boolean),elapsed:{raw:Number(f),formatted:bG(f)},...a?{facets:a}:{},...d?{groups:d}:{}}}async function a(){e.beforeSearch&&await vK(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await _K(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function NJ(e,t,n){let r=IJ(TJ(e,t,n)),i=jJ(e,t,n),a=t.hybridWeights;return zJ(r,i,t.term??``,a)}function PJ(e,t,n){let r=xG();function i(){let i=NJ(e,t,n);i=wJ(e,e.data.pinning,i,t.term);let a;t.facets&&Object.keys(t.facets).length>0&&(a=_J(e,i,t.facets));let o;t.groupBy&&(o=SJ(e,i,t.groupBy));let s=t.offset??0,c=t.limit??10,l=UJ(e,i,s,c).filter(Boolean),u=xG(),d={count:i.length,elapsed:{raw:Number(u-r),formatted:bG(u-r)},hits:l,...a?{facets:a}:{},...o?{groups:o}:{}};return(t.includeVectors??!1)||AG(d,Object.keys(e.data.index.vectorIndexes)),d}async function a(){e.beforeSearch&&await vK(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await _K(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function FJ(e){return e[1]}function IJ(e){let t=Math.max.apply(Math,e.map(FJ));return e.map(([e,n])=>[e,n/t])}function LJ(e,t){return e/t}function RJ(e,t){return(n,r)=>n*e+r*t}function zJ(e,t,n,r){let i=Math.max.apply(Math,e.map(FJ)),a=Math.max.apply(Math,t.map(FJ)),{text:o,vector:s}=r&&r.text&&r.vector?r:BJ(n),c=new Map,l=e.length,u=RJ(o,s);for(let t=0;t<l;t++){let[n,r]=e[t],a=u(LJ(r,i),0);c.set(n,a)}let d=t.length;for(let e=0;e<d;e++){let[n,r]=t[e],i=LJ(r,a),o=c.get(n)??0;c.set(n,o+u(0,i))}return[...c].sort((e,t)=>t[1]-e[1])}function BJ(e){return{text:.5,vector:.5}}function VJ(e,t,n){let r=t.mode??`fulltext`;if(r===`fulltext`)return OJ(e,t,n);if(r===`vector`)return MJ(e,t);if(r===`hybrid`)return PJ(e,t);throw zG(`INVALID_SEARCH_MODE`,r)}function HJ(e,t,n,r,i){let a=e.data.docs,o=new Map,s=[],c=new Set,l=t.length,u=0;for(let d=0;d<l;d++){let l=t[d];if(l===void 0)continue;let[f,p]=l;if(c.has(f))continue;let m=e.documentsStore.get(a,f),h=DG(m,i);if(!(h===void 0||o.has(h))&&(o.set(h,!0),u++,!(u<=n)&&(s.push({id:eK(e.internalDocumentIDStore,f),score:p,document:m}),c.add(f),u>=n+r)))break}return s}function UJ(e,t,n,r){let i=e.data.docs,a=Array.from({length:r}),o=new Set;for(let s=n;s<r+n;s++){let n=t[s];if(n===void 0)break;let[r,c]=n;if(!o.has(r)){let t=e.documentsStore.get(i,r);a[s]={id:eK(e.internalDocumentIDStore,r),score:c,document:t},o.add(r)}}return a}var WJ=r(iG(),1),GJ=/[\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF]/g;function KJ(e){return e.replace(GJ,``)}function qJ(e){return e.replace(/[\u0000-\u001F\u007F]/g,` `)}function JJ(e,t){if(e.length<=t)return e;let n=e.slice(0,t),r=n.charCodeAt(n.length-1);return r>=55296&&r<=56319?n.slice(0,-1):n}var YJ=R({at:N(),transport:N(),outcome:N(),reference:N().optional(),error:N().optional(),errorCode:N().optional()}),XJ=R({reason:N(),at:N(),errorCode:N().optional()});R({version:P().int().catch(1),id:N(),createdAt:N(),bundleLevel:N(),zipBytes:P().int().nonnegative().catch(0),zipDeleted:F().optional(),state:N(),systemWide:F().optional(),projectSlug:N().nullable().optional(),reference:N().optional(),lastError:XJ.optional(),attempts:I(YJ).optional(),note:N().optional()}),R({version:P().int().catch(1),id:N().optional(),sentAt:N().optional(),reference:N().optional()});var ZJ=`0.0.0-unknown`,QJ={protocol:`x-ok-client-protocol`,runtime:`x-ok-client-runtime`,kind:`x-ok-client-kind`};function $J({kind:e,runtimeVersion:t}){return{[QJ.protocol]:`2`,[QJ.runtime]:t,[QJ.kind]:e}}function eY({kind:e,runtimeVersion:t}){return{clientProtocolVersion:2,clientRuntimeVersion:t,clientKind:e}}var tY=`extra/screenshot.png`,nY=[{name:`macos-home-path`,regex:/\/Users\/[^/]+\//g,replacement:`~/`},{name:`linux-home-path`,regex:/\/home\/[^/]+\//g,replacement:`~/`},{name:`github-pat`,regex:/\b(ghp_|gho_|ghu_|ghs_|ghr_)[A-Za-z0-9]{36,}\b/g,replacement:`[REDACTED-GH-PAT]`},{name:`aws-access-key`,regex:/\b(AKIA|ASIA|ABIA)[A-Z2-7]{16}\b/g,replacement:`[REDACTED-AWS-KEY]`},{name:`anthropic-key`,regex:/\bsk-ant-api03-[A-Za-z0-9_-]{20,}\b/g,replacement:`[REDACTED-ANTHROPIC]`},{name:`openai-key`,regex:/\bsk-[A-Za-z0-9]{20,}\b/g,replacement:`[REDACTED-OPENAI]`},{name:`bearer-token`,regex:/([Aa]uthorization:\s*[Bb]earer\s+)\S+/g,replacement:`$1[REDACTED]`},{name:`jwt`,regex:/eyJ[A-Za-z0-9_-]{8,}\.eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}/g,replacement:`[REDACTED-JWT]`},{name:`url-credentials`,regex:/:\/\/[^/\s:@]+:[^/\s:@]+@/g,replacement:`://[REDACTED]@`},{name:`github-pat-fine-grained`,regex:/\bgithub_pat_[0-9A-Za-z_]{20,}/g,replacement:`[REDACTED-GH-PAT]`},{name:`openai-key-modern`,regex:/\bsk-(?:proj|svcacct|admin|None)-[A-Za-z0-9_-]{20,}/g,replacement:`[REDACTED-OPENAI]`},{name:`slack-token`,regex:/\bxox[a-z]-[A-Za-z0-9-]{10,}/g,replacement:`[REDACTED-SLACK]`},{name:`google-api-key`,regex:/\bAIza[0-9A-Za-z_-]{35}/g,replacement:`[REDACTED-GOOGLE]`},{name:`stripe-secret-key`,regex:/\b(?:sk|rk)_live_[0-9A-Za-z]{16,}\b/g,replacement:`[REDACTED-STRIPE]`},{name:`gitlab-pat`,regex:/\bglpat-[0-9A-Za-z_-]{20,}/g,replacement:`[REDACTED-GITLAB]`},{name:`bearer-token-json`,regex:/("[Aa]uthorization"\s*:\s*"[Bb]earer\s+)[^"]+/g,replacement:`$1[REDACTED]`}];nY.map(e=>e.name);function rY(e){let t=new Set,n=0;return{redacted:e.split(`
|
|
400
400
|
`).map(e=>{let r=e,i=!1;for(let{name:e,regex:n,replacement:a}of nY)n.lastIndex=0,n.test(r)&&(t.add(e),i=!0,n.lastIndex=0,r=r.replace(n,a));return i&&n++,r}).join(`
|
|
401
|
-
`),patterns:[...t],lineCount:n}}function iY(e){return rY(e).redacted}var aY=8192,oY=32768,sY=`…[truncated]`;function cY(e){let t=e.trim();if(t.length===0||t[0]!==`{`)return null;let n;try{n=JSON.parse(t)}catch{return null}if(typeof n!=`object`||!n||Array.isArray(n))return null;let r=n;return{event:typeof r.event==`string`?r.event:void 0,fields:r}}function lY(e){return e.length<=8192?e:`${e.slice(0,aY-12)}${sY}`}function uY(e,t){return!(e.host===`desktop`&&t.host!==`desktop`||e.singleFileHidden&&t.singleFile||e.requiresTerminalCapability&&!t.terminalCapable||e.requiresTerminalLive&&!t.terminalLive||e.requiresCanExpandAll&&!t.canExpandAll||e.requiresCanCollapseAll&&!t.canCollapseAll||e.requiresActiveDoc&&!t.hasActiveDoc||e.requiresInstallSkill&&!t.showInstallSkill||e.requiresTargetKinds&&!e.requiresTargetKinds.includes(t.activeTargetKind))}var dY=[{id:`open-blob-run`,labelKey:`blobRun`,keywords:[`game`,`blob`,`runner`,`play`,`easter egg`,`dino`],availability:{},palette:{group:`app`,visibility:`search-only`}},{id:`navigate-back`,menuActionId:`navigate-back`,labelKey:`back`,keywords:[`previous history`],shortcutId:`navigate-back`,shortcutDesktopOnly:!0,availability:{host:`desktop`},palette:{group:`commands`,visibility:`search-only`},menu:[{section:`view-history`,order:0,platform:`mac`,accelerator:`Cmd+[`},{section:`view-history`,order:0,platform:`other`,accelerator:`Alt+Left`}]},{id:`navigate-forward`,menuActionId:`navigate-forward`,labelKey:`forward`,keywords:[`next history`],shortcutId:`navigate-forward`,shortcutDesktopOnly:!0,availability:{host:`desktop`},palette:{group:`commands`,visibility:`search-only`},menu:[{section:`view-history`,order:1,platform:`mac`,accelerator:`Cmd+]`},{section:`view-history`,order:1,platform:`other`,accelerator:`Alt+Right`}]},{id:`new-file`,menuActionId:`new-doc`,labelKey:`newFile`,keywords:[`create file`],shortcutId:`new-item`,availability:{},palette:{group:`commands`,visibility:`always`},menu:[{section:`file-create`,order:0,accelerator:`CmdOrCtrl+N`}]},{id:`new-folder`,menuActionId:`new-folder`,labelKey:`newFolder`,keywords:[`create folder`],shortcutId:`new-folder`,shortcutDesktopOnly:!0,availability:{},palette:{group:`commands`,visibility:`always`},menu:[{section:`file-create`,order:1,accelerator:`CmdOrCtrl+Shift+N`}]},{id:`open-graph`,labelKey:`openGraph`,keywords:[`graph panel network`],availability:{requiresActiveDoc:!0},palette:{group:`commands`,visibility:`always`}},{id:`open-in-new-window`,labelKey:`openInNewWindow`,keywords:[`pop out`,`detach`,`separate window`,`second monitor`],availability:{host:`desktop`,requiresActiveDoc:!0,singleFileHidden:!0},palette:{group:`commands`,visibility:`always`},menu:[{section:`window`,order:0}]},{id:`initialize-starter-pack`,labelKey:`initializeStarterPack`,keywords:[`scaffold`,`seed`,`pack`,`starter`],availability:{},palette:{group:`commands`,visibility:`always`}},{id:`new-skill`,labelKey:`newSkill`,keywords:[`skill`,`create`,`author`,`new`],availability:{singleFileHidden:!0},palette:{group:`commands`,visibility:`always`}},{id:`new-project`,menuActionId:`new-project`,labelKey:`newProject`,keywords:[`create new project scaffold`],availability:{host:`desktop`},palette:{group:`project`,visibility:`always`},menu:[{section:`file-project`,order:0,ellipsis:!0}]},{id:`open-folder`,labelKey:`openFolderOnDisk`,keywords:[`project`,`folder`,`disk`],shortcutId:`open-folder`,availability:{host:`desktop`},palette:{group:`project`,visibility:`always`},menu:[{section:`file-project`,order:2,accelerator:`CmdOrCtrl+O`,ellipsis:!0,menuLabelKey:`openFolder`}]},{id:`open-file`,labelKey:`openFileOnDisk`,keywords:[`file`,`markdown`,`single`,`standalone`,`temporary`],shortcutId:`open-file`,availability:{host:`desktop`},palette:{group:`project`,visibility:`always`},menu:[{section:`file-project`,order:3,accelerator:`CmdOrCtrl+Shift+O`,ellipsis:!0,menuLabelKey:`openFile`}]},{id:`open-skills`,labelKey:`openSkills`,keywords:[`skills marketplace explore import discover`],availability:{singleFileHidden:!0},palette:{group:`project`,visibility:`always`},menu:[]},{id:`switch-project`,labelKey:`switchProject`,keywords:[`switch project navigator projects`],shortcutId:`switch-project`,availability:{host:`desktop`,singleFileHidden:!0},palette:{group:`project`,visibility:`always`},menu:[{section:`file-project`,order:1,accelerator:`CmdOrCtrl+Shift+P`,ellipsis:!0}]},{id:`settings`,labelKey:`settings`,keywords:[`preferences config`],shortcutId:`settings`,availability:{singleFileHidden:!0},palette:{group:`project`,visibility:`always`},menu:[{section:`app-settings`,order:0,platform:`mac`,accelerator:`CmdOrCtrl+,`,ellipsis:!0},{section:`file-settings`,order:0,platform:`other`,accelerator:`CmdOrCtrl+,`,ellipsis:!0}]},{id:`install-claude-desktop`,labelKey:`installClaudeDesktop`,keywords:[`claude desktop install cowork`],availability:{requiresInstallSkill:!0},palette:{group:`project`,visibility:`always`},menu:[{section:`help-install`,order:0,ellipsis:!0,menuLabelText:`Install for Claude Chat & Cowork (desktop app)`}]},{id:`report-bug`,menuActionId:`report-bug`,labelKey:`reportBug`,keywords:[`bug report issue feedback problem`],availability:{host:`desktop`},palette:{group:`project`,visibility:`always`},menu:[{section:`help-links`,order:1,ellipsis:!0}]},{id:`bug-report-history`,labelKey:`bugReportHistory`,keywords:[`bug report history previous reports past retry resend`],availability:{host:`desktop`},palette:{group:`project`,visibility:`always`}},{id:`send-feedback`,menuActionId:`send-feedback`,labelKey:`sendFeedback`,keywords:[`feedback`,`suggestion`,`idea`,`rate`,`survey`,`contact`],availability:{},palette:{group:`project`,visibility:`always`},menu:[{section:`help-links`,order:2,ellipsis:!0}]},{id:`new-from-template`,menuActionId:`new-from-template`,labelKey:`newFromTemplate`,keywords:[`template`,`create`,`new`],availability:{singleFileHidden:!0},palette:{group:`file`,visibility:`search-only`},menu:[{section:`file-create`,order:2,ellipsis:!0}]},{id:`rename`,menuActionId:`rename`,labelKey:`rename`,keywords:[`rename`,`file`,`folder`],availability:{host:`desktop`,requiresTargetKinds:[`doc`,`folder`,`asset`]},palette:{group:`file`,visibility:`search-only`},menu:[{section:`file-item`,order:1}]},{id:`duplicate`,menuActionId:`duplicate`,labelKey:`duplicate`,keywords:[`duplicate`,`copy`,`file`,`folder`],shortcutId:`file-tree-duplicate`,availability:{host:`desktop`,requiresTargetKinds:[`doc`,`folder`]},palette:{group:`file`,visibility:`search-only`},menu:[{section:`file-item`,order:0,accelerator:`CmdOrCtrl+D`}]},{id:`move-to-trash`,menuActionId:`move-to-trash`,labelKey:`moveToTrash`,keywords:[`delete`,`trash`,`remove`],shortcutId:`file-tree-delete`,availability:{host:`desktop`,requiresTargetKinds:[`doc`,`folder`,`asset`]},palette:{group:`file`,visibility:`search-only`},menu:[{section:`file-item`,order:2,accelerator:`CmdOrCtrl+Delete`}]},{id:`reveal-in-finder`,menuActionId:`reveal-in-finder`,labelKey:`revealInFinder`,keywords:[`finder`,`reveal`,`show`,`file`],availability:{host:`desktop`,requiresTargetKinds:[`doc`,`folder`,`asset`,`project`]},palette:{group:`file`,visibility:`search-only`},menu:[{section:`file-reveal`,order:0}]},{id:`send-to-ai`,menuActionId:`send-to-ai`,labelKey:`openWithAi`,keywords:[`ai`,`agent`,`handoff`],availability:{host:`desktop`,requiresTargetKinds:[`doc`,`folder`,`project`]},menu:[{section:`file-reveal`,order:1}]},{id:`copy-full-path`,menuActionId:`copy-full-path`,labelKey:`copyFullPath`,keywords:[`copy`,`path`,`absolute`,`full`],availability:{host:`desktop`,requiresTargetKinds:[`doc`,`folder`,`asset`,`project`]},palette:{group:`file`,visibility:`search-only`},menu:[{section:`file-copy-path`,order:0,menuLabelKey:`fullPath`}]},{id:`copy-relative-path`,menuActionId:`copy-relative-path`,labelKey:`copyRelativePath`,keywords:[`copy`,`path`,`relative`],availability:{host:`desktop`,requiresTargetKinds:[`doc`,`folder`,`asset`,`project`]},palette:{group:`file`,visibility:`search-only`},menu:[{section:`file-copy-path`,order:1,menuLabelKey:`relativePath`}]},{id:`close-tab`,menuActionId:`close-active-tab-or-window`,labelKey:`closeTab`,keywords:[`close`,`tab`,`window`],availability:{host:`desktop`},palette:{group:`file`,visibility:`search-only`},menu:[{section:`file-close`,order:0,platform:`mac`,accelerator:`CmdOrCtrl+W`}]},{id:`new-worktree`,menuActionId:`new-worktree`,labelKey:`newWorktree`,keywords:[`worktree`,`branch`,`new`],availability:{host:`desktop`},palette:{group:`file`,visibility:`search-only`},menu:[{section:`file-worktree`,order:0,ellipsis:!0}]},{id:`switch-worktree`,menuActionId:`switch-worktree`,labelKey:`switchWorktree`,keywords:[`worktree`,`switch`,`branch`],availability:{host:`desktop`},palette:{group:`file`,visibility:`search-only`},menu:[{section:`file-worktree`,order:1,ellipsis:!0}]},{id:`toggle-sidebar`,menuActionId:`toggle-sidebar`,labelKey:`sidebarHide`,keywords:[`sidebar`,`files`,`panel`,`toggle`],shortcutId:`toggle-files-sidebar`,stateToggle:{showKey:`sidebarShow`,hideKey:`sidebarHide`,stateField:`sidebarVisible`,defaultVisible:!0},availability:{},palette:{group:`view`,visibility:`search-only`},menu:[{section:`view-panels`,order:0,accelerator:`CmdOrCtrl+Alt+S`}]},{id:`toggle-doc-panel`,menuActionId:`toggle-doc-panel`,labelKey:`docPanelHide`,keywords:[`document`,`panel`,`info`,`toggle`],shortcutId:`toggle-document-panel`,stateToggle:{showKey:`docPanelShow`,hideKey:`docPanelHide`,stateField:`docPanelVisible`,defaultVisible:!0},availability:{},palette:{group:`view`,visibility:`search-only`},menu:[{section:`view-panels`,order:1,accelerator:`CmdOrCtrl+Alt+B`}]},{id:`toggle-terminal`,menuActionId:`toggle-terminal`,labelKey:`terminalShow`,keywords:[`terminal`,`shell`,`console`,`panel`,`toggle terminal`,`toggle bottom dock`,`show terminal`,`hide terminal`],shortcutId:`toggle-terminal-panel`,stateToggle:{showKey:`terminalShow`,hideKey:`terminalHide`,stateField:`terminalVisible`,defaultVisible:!1},availability:{host:`desktop`,requiresTerminalCapability:!0},palette:{group:`view`,visibility:`search-only`},menu:[{section:`view-panels`,order:2,accelerator:`CmdOrCtrl+J`}]},{id:`toggle-agent-panel`,menuActionId:`toggle-agent-panel`,labelKey:`agentPanelShow`,keywords:[`agent`,`agents`,`chat`,`ai`,`ask`,`panel`,`toggle`],shortcutId:`toggle-agent-panel`,stateToggle:{showKey:`agentPanelShow`,hideKey:`agentPanelHide`,stateField:`agentPanelVisible`,defaultVisible:!1,overrideKey:`agentPanelAskSelection`,overrideField:`hasEditorSelection`},availability:{},palette:{group:`view`,visibility:`search-only`},menu:[{section:`view-panels`,order:3,accelerator:`CmdOrCtrl+L`}]},{id:`toggle-show-hidden-files`,menuActionId:`toggle-show-hidden-files`,labelKey:`showHiddenFiles`,keywords:[`hidden`,`dotfiles`,`files`,`show`],checkField:`showHiddenFiles`,availability:{},palette:{group:`view`,visibility:`search-only`},menu:[{section:`view-visibility`,order:0,accelerator:`CmdOrCtrl+Shift+.`,checkbox:!0}]},{id:`toggle-show-ok-folders`,menuActionId:`toggle-show-ok-folders`,labelKey:`showOkFolders`,keywords:[`ok`,`folders`,`hidden`,`show`],checkField:`showOkFolders`,availability:{},palette:{group:`view`,visibility:`search-only`},menu:[{section:`view-visibility`,order:1,checkbox:!0}]},{id:`toggle-show-only-markdown-files`,menuActionId:`toggle-show-only-markdown-files`,labelKey:`showOnlyMarkdownFiles`,keywords:[`markdown`,`filter`,`files`,`only`],checkField:`showOnlyMarkdownFiles`,availability:{},palette:{group:`view`,visibility:`search-only`},menu:[{section:`view-visibility`,order:2,checkbox:!0}]},{id:`toggle-show-skills-section`,menuActionId:`toggle-show-skills-section`,labelKey:`showSkillsSection`,keywords:[`skills`,`section`,`sidebar`,`show`],checkField:`showSkillsSection`,availability:{},palette:{group:`view`,visibility:`search-only`},menu:[{section:`view-visibility`,order:3,checkbox:!0}]},{id:`expand-all-tree`,menuActionId:`expand-all-tree`,labelKey:`expandAll`,keywords:[`expand`,`tree`,`folders`,`all`],availability:{requiresCanExpandAll:!0},palette:{group:`view`,visibility:`search-only`},menu:[{section:`view-tree`,order:0,smartHide:!0}]},{id:`collapse-all-tree`,menuActionId:`collapse-all-tree`,labelKey:`collapseAll`,keywords:[`collapse`,`tree`,`folders`,`all`],availability:{requiresCanCollapseAll:!0},palette:{group:`view`,visibility:`search-only`},menu:[{section:`view-tree`,order:1,smartHide:!0}]},{id:`new-terminal`,menuActionId:`new-terminal`,labelKey:`newTerminal`,keywords:[`terminal`,`shell`,`new`,`tab`],availability:{host:`desktop`,requiresTerminalCapability:!0},palette:{group:`terminal`,visibility:`search-only`},menu:[{section:`terminal`,order:0}]},{id:`new-terminal-window`,keywords:[],availability:{host:`desktop`,requiresTerminalCapability:!0},menu:[{section:`terminal`,order:1,menuLabelText:`New Terminal Window`}]},{id:`move-terminal`,menuActionId:`move-terminal`,labelKey:`terminalMoveRight`,keywords:[`terminal`,`move`,`dock`,`right`,`bottom`,`placement`],placementToggle:{bottomKey:`terminalMoveRight`,rightKey:`terminalMoveBottom`},availability:{host:`desktop`,requiresTerminalCapability:!0},palette:{group:`terminal`,visibility:`search-only`},menu:[{section:`terminal`,order:2}]},{id:`kill-terminal`,menuActionId:`kill-terminal`,labelKey:`killTerminal`,keywords:[`terminal`,`kill`,`close`,`session`],availability:{host:`desktop`,requiresTerminalCapability:!0,requiresTerminalLive:!0},palette:{group:`terminal`,visibility:`search-only`},menu:[{section:`terminal`,order:3}]},{id:`check-for-updates`,labelKey:`checkForUpdates`,keywords:[`update`,`upgrade`,`version`,`check`],availability:{host:`desktop`},palette:{group:`app`,visibility:`search-only`},menu:[{section:`app-updates`,order:0,platform:`mac`,ellipsis:!0},{section:`help-updates`,order:0,platform:`other`,ellipsis:!0}]},{id:`set-up-integrations`,labelKey:`setUpIntegrations`,keywords:[`integrations`,`mcp`,`setup`,`claude`,`configure`],availability:{host:`desktop`},palette:{group:`app`,visibility:`search-only`},menu:[{section:`file-integrations`,order:0,ellipsis:!0}]},{id:`toggle-spell-check`,labelKey:`checkSpelling`,keywords:[`spell`,`spelling`,`check`,`typing`],availability:{host:`desktop`},palette:{group:`app`,visibility:`search-only`},menu:[{section:`edit-spell`,order:0,checkbox:!0}]},{id:`open-github`,labelKey:`openOnGithub`,keywords:[`github`,`source`,`repository`,`code`],availability:{},palette:{group:`app`,visibility:`search-only`},menu:[{section:`help-links`,order:0}]},{id:`uninstall`,keywords:[],availability:{host:`desktop`},menu:[{section:`app-uninstall`,order:0,platform:`mac`,ellipsis:!0,menuLabelText:`Uninstall OpenKnowledge`}]}];function fY(e,t){let n=e.attrs[t];return typeof n==`string`?n:``}function pY(e,t){let n=e.attrs.props;if(typeof n!=`object`||!n)return``;let r=n[t];return typeof r==`string`?r:``}var mY=[`children`,`chart`,`formula`,`alt`,`name`,`alias`,`target`];function hY(e){for(let t of mY){let n=pY(e,t);if(n.length>0)return n}return fY(e,`sourceRaw`)}function gY(e){switch(e.type.name){case`wikiLink`:return fY(e,`alias`)||fY(e,`target`);case`wikiLinkEmbed`:return fY(e,`target`);case`tag`:return`#${fY(e,`value`)}`;case`mathInline`:return fY(e,`formula`);case`image`:case`imageReference`:return fY(e,`alt`);case`footnoteReference`:return fY(e,`label`)||fY(e,`identifier`);case`jsxComponent`:case`jsxInline`:return e.content.size===0?hY(e):``;default:return``}}function _Y(e,t,n,r=`
|
|
401
|
+
`),patterns:[...t],lineCount:n}}function iY(e){return rY(e).redacted}var aY=8192,oY=32768,sY=`…[truncated]`;function cY(e){let t=e.trim();if(t.length===0||t[0]!==`{`)return null;let n;try{n=JSON.parse(t)}catch{return null}if(typeof n!=`object`||!n||Array.isArray(n))return null;let r=n;return{event:typeof r.event==`string`?r.event:void 0,fields:r}}function lY(e){return e.length<=8192?e:`${e.slice(0,aY-12)}${sY}`}function uY(e,t){return!(e.host===`desktop`&&t.host!==`desktop`||e.singleFileHidden&&t.singleFile||e.requiresTerminalCapability&&!t.terminalCapable||e.requiresTerminalLive&&!t.terminalLive||e.requiresCanExpandAll&&!t.canExpandAll||e.requiresCanCollapseAll&&!t.canCollapseAll||e.requiresActiveDoc&&!t.hasActiveDoc||e.requiresInstallSkill&&!t.showInstallSkill||e.requiresTargetKinds&&!e.requiresTargetKinds.includes(t.activeTargetKind))}var dY=[{id:`open-blob-run`,labelKey:`blobRun`,keywords:[`game`,`blob`,`runner`,`play`,`easter egg`,`dino`],availability:{},palette:{group:`app`,visibility:`search-only`}},{id:`navigate-back`,menuActionId:`navigate-back`,labelKey:`back`,keywords:[`previous history`],shortcutId:`navigate-back`,shortcutDesktopOnly:!0,availability:{host:`desktop`},palette:{group:`commands`,visibility:`search-only`},menu:[{section:`view-history`,order:0,platform:`mac`,accelerator:`Cmd+[`},{section:`view-history`,order:0,platform:`other`,accelerator:`Alt+Left`}]},{id:`navigate-forward`,menuActionId:`navigate-forward`,labelKey:`forward`,keywords:[`next history`],shortcutId:`navigate-forward`,shortcutDesktopOnly:!0,availability:{host:`desktop`},palette:{group:`commands`,visibility:`search-only`},menu:[{section:`view-history`,order:1,platform:`mac`,accelerator:`Cmd+]`},{section:`view-history`,order:1,platform:`other`,accelerator:`Alt+Right`}]},{id:`new-file`,menuActionId:`new-doc`,labelKey:`newFile`,keywords:[`create file`],shortcutId:`new-item`,availability:{},palette:{group:`commands`,visibility:`always`},menu:[{section:`file-create`,order:0,accelerator:`CmdOrCtrl+N`}]},{id:`new-folder`,menuActionId:`new-folder`,labelKey:`newFolder`,keywords:[`create folder`],shortcutId:`new-folder`,shortcutDesktopOnly:!0,availability:{},palette:{group:`commands`,visibility:`always`},menu:[{section:`file-create`,order:1,accelerator:`CmdOrCtrl+Shift+N`}]},{id:`open-graph`,labelKey:`openGraph`,keywords:[`graph panel network`],availability:{requiresActiveDoc:!0},palette:{group:`commands`,visibility:`always`}},{id:`open-in-new-window`,labelKey:`openInNewWindow`,keywords:[`pop out`,`detach`,`separate window`,`second monitor`],availability:{host:`desktop`,requiresActiveDoc:!0,singleFileHidden:!0},palette:{group:`commands`,visibility:`always`},menu:[{section:`window`,order:0}]},{id:`initialize-starter-pack`,labelKey:`initializeStarterPack`,keywords:[`scaffold`,`seed`,`pack`,`starter`],availability:{},palette:{group:`commands`,visibility:`always`}},{id:`new-skill`,labelKey:`newSkill`,keywords:[`skill`,`create`,`author`,`new`],availability:{singleFileHidden:!0},palette:{group:`commands`,visibility:`always`}},{id:`new-project`,menuActionId:`new-project`,labelKey:`newProject`,keywords:[`create new project scaffold`],availability:{host:`desktop`},palette:{group:`project`,visibility:`always`},menu:[{section:`file-project`,order:0,ellipsis:!0}]},{id:`open-folder`,labelKey:`openFolderOnDisk`,keywords:[`project`,`folder`,`disk`],shortcutId:`open-folder`,availability:{host:`desktop`},palette:{group:`project`,visibility:`always`},menu:[{section:`file-project`,order:2,accelerator:`CmdOrCtrl+O`,ellipsis:!0,menuLabelKey:`openFolder`}]},{id:`open-file`,labelKey:`openFileOnDisk`,keywords:[`file`,`markdown`,`single`,`standalone`,`temporary`],shortcutId:`open-file`,availability:{host:`desktop`},palette:{group:`project`,visibility:`always`},menu:[{section:`file-project`,order:3,accelerator:`CmdOrCtrl+Shift+O`,ellipsis:!0,menuLabelKey:`openFile`}]},{id:`open-skills`,labelKey:`openSkills`,keywords:[`skills marketplace explore import discover`],availability:{singleFileHidden:!0},palette:{group:`project`,visibility:`always`},menu:[]},{id:`switch-project`,labelKey:`switchProject`,keywords:[`switch project navigator projects`],shortcutId:`switch-project`,availability:{host:`desktop`,singleFileHidden:!0},palette:{group:`project`,visibility:`always`},menu:[{section:`file-project`,order:1,accelerator:`CmdOrCtrl+Shift+P`,ellipsis:!0}]},{id:`settings`,labelKey:`settings`,keywords:[`preferences config`],shortcutId:`settings`,availability:{singleFileHidden:!0},palette:{group:`project`,visibility:`always`},menu:[{section:`app-settings`,order:0,platform:`mac`,accelerator:`CmdOrCtrl+,`,ellipsis:!0},{section:`file-settings`,order:0,platform:`other`,accelerator:`CmdOrCtrl+,`,ellipsis:!0}]},{id:`install-claude-desktop`,labelKey:`installClaudeDesktop`,keywords:[`claude desktop install cowork`],availability:{requiresInstallSkill:!0},palette:{group:`project`,visibility:`always`},menu:[{section:`help-install`,order:0,ellipsis:!0,menuLabelText:`Install for Claude Chat & Cowork (desktop app)`}]},{id:`report-bug`,menuActionId:`report-bug`,labelKey:`reportBug`,keywords:[`bug report issue feedback problem`],availability:{host:`desktop`},palette:{group:`project`,visibility:`always`},menu:[{section:`help-links`,order:1,ellipsis:!0}]},{id:`bug-report-history`,labelKey:`bugReportHistory`,keywords:[`bug report history previous reports past retry resend`],availability:{host:`desktop`},palette:{group:`project`,visibility:`always`}},{id:`send-feedback`,menuActionId:`send-feedback`,labelKey:`sendFeedback`,keywords:[`feedback`,`suggestion`,`idea`,`rate`,`survey`,`contact`],availability:{},palette:{group:`project`,visibility:`always`},menu:[{section:`help-links`,order:2,ellipsis:!0}]},{id:`new-from-template`,menuActionId:`new-from-template`,labelKey:`newFromTemplate`,keywords:[`template`,`create`,`new`],availability:{singleFileHidden:!0},palette:{group:`file`,visibility:`search-only`},menu:[{section:`file-create`,order:2,ellipsis:!0}]},{id:`rename`,menuActionId:`rename`,labelKey:`rename`,keywords:[`rename`,`file`,`folder`],availability:{host:`desktop`,requiresTargetKinds:[`doc`,`folder`,`asset`]},palette:{group:`file`,visibility:`search-only`},menu:[{section:`file-item`,order:1}]},{id:`duplicate`,menuActionId:`duplicate`,labelKey:`duplicate`,keywords:[`duplicate`,`copy`,`file`,`folder`],shortcutId:`file-tree-duplicate`,availability:{host:`desktop`,requiresTargetKinds:[`doc`,`folder`]},palette:{group:`file`,visibility:`search-only`},menu:[{section:`file-item`,order:0,accelerator:`CmdOrCtrl+D`}]},{id:`move-to-trash`,menuActionId:`move-to-trash`,labelKey:`moveToTrash`,keywords:[`delete`,`trash`,`remove`],shortcutId:`file-tree-delete`,availability:{host:`desktop`,requiresTargetKinds:[`doc`,`folder`,`asset`]},palette:{group:`file`,visibility:`search-only`},menu:[{section:`file-item`,order:2,accelerator:`CmdOrCtrl+Delete`}]},{id:`reveal-in-finder`,menuActionId:`reveal-in-finder`,labelKey:`revealInFinder`,keywords:[`finder`,`reveal`,`show`,`file`],availability:{host:`desktop`,requiresTargetKinds:[`doc`,`folder`,`asset`,`project`]},palette:{group:`file`,visibility:`search-only`},menu:[{section:`file-reveal`,order:0}]},{id:`send-to-ai`,menuActionId:`send-to-ai`,labelKey:`openWithAi`,keywords:[`ai`,`agent`,`handoff`],availability:{host:`desktop`,requiresTargetKinds:[`doc`,`folder`,`project`]},menu:[{section:`file-reveal`,order:1}]},{id:`copy-full-path`,menuActionId:`copy-full-path`,labelKey:`copyFullPath`,keywords:[`copy`,`path`,`absolute`,`full`],availability:{host:`desktop`,requiresTargetKinds:[`doc`,`folder`,`asset`,`project`]},palette:{group:`file`,visibility:`search-only`},menu:[{section:`file-copy-path`,order:0,menuLabelKey:`fullPath`}]},{id:`copy-relative-path`,menuActionId:`copy-relative-path`,labelKey:`copyRelativePath`,keywords:[`copy`,`path`,`relative`],availability:{host:`desktop`,requiresTargetKinds:[`doc`,`folder`,`asset`,`project`]},palette:{group:`file`,visibility:`search-only`},menu:[{section:`file-copy-path`,order:1,menuLabelKey:`relativePath`}]},{id:`close-tab`,menuActionId:`close-active-tab-or-window`,labelKey:`closeTab`,keywords:[`close`,`tab`,`window`],availability:{host:`desktop`},palette:{group:`file`,visibility:`search-only`},menu:[{section:`file-close`,order:0,platform:`mac`,accelerator:`CmdOrCtrl+W`}]},{id:`new-worktree`,menuActionId:`new-worktree`,labelKey:`newWorktree`,keywords:[`worktree`,`branch`,`new`],availability:{host:`desktop`},palette:{group:`file`,visibility:`search-only`},menu:[{section:`file-worktree`,order:0,ellipsis:!0}]},{id:`switch-worktree`,menuActionId:`switch-worktree`,labelKey:`switchWorktree`,keywords:[`worktree`,`switch`,`branch`],availability:{host:`desktop`},palette:{group:`file`,visibility:`search-only`},menu:[{section:`file-worktree`,order:1,ellipsis:!0}]},{id:`toggle-sidebar`,menuActionId:`toggle-sidebar`,labelKey:`sidebarHide`,keywords:[`sidebar`,`files`,`panel`,`toggle`],shortcutId:`toggle-files-sidebar`,stateToggle:{showKey:`sidebarShow`,hideKey:`sidebarHide`,stateField:`sidebarVisible`,defaultVisible:!0},availability:{},palette:{group:`view`,visibility:`search-only`},menu:[{section:`view-panels`,order:0,accelerator:`CmdOrCtrl+Alt+S`}]},{id:`toggle-doc-panel`,menuActionId:`toggle-doc-panel`,labelKey:`docPanelHide`,keywords:[`document`,`panel`,`info`,`toggle`],shortcutId:`toggle-document-panel`,stateToggle:{showKey:`docPanelShow`,hideKey:`docPanelHide`,stateField:`docPanelVisible`,defaultVisible:!0},availability:{},palette:{group:`view`,visibility:`search-only`},menu:[{section:`view-panels`,order:1,accelerator:`CmdOrCtrl+Alt+B`}]},{id:`toggle-terminal`,menuActionId:`toggle-terminal`,labelKey:`terminalShow`,keywords:[`terminal`,`shell`,`console`,`panel`,`toggle terminal`,`toggle bottom dock`,`show terminal`,`hide terminal`,`close`],shortcutId:`toggle-terminal-panel`,stateToggle:{showKey:`terminalShow`,hideKey:`terminalHide`,stateField:`terminalVisible`,defaultVisible:!1},availability:{host:`desktop`,requiresTerminalCapability:!0},palette:{group:`view`,visibility:`search-only`},menu:[{section:`view-panels`,order:2,accelerator:`CmdOrCtrl+J`}]},{id:`toggle-agent-panel`,menuActionId:`toggle-agent-panel`,labelKey:`agentPanelShow`,keywords:[`agent`,`agents`,`chat`,`ai`,`ask`,`panel`,`toggle`],shortcutId:`toggle-agent-panel`,stateToggle:{showKey:`agentPanelShow`,hideKey:`agentPanelHide`,stateField:`agentPanelVisible`,defaultVisible:!1,overrideKey:`agentPanelAskSelection`,overrideField:`hasEditorSelection`},availability:{},palette:{group:`view`,visibility:`search-only`},menu:[{section:`view-panels`,order:3,accelerator:`CmdOrCtrl+L`}]},{id:`toggle-show-hidden-files`,menuActionId:`toggle-show-hidden-files`,labelKey:`showHiddenFiles`,keywords:[`hidden`,`dotfiles`,`files`,`show`],checkField:`showHiddenFiles`,availability:{},palette:{group:`view`,visibility:`search-only`},menu:[{section:`view-visibility`,order:0,accelerator:`CmdOrCtrl+Shift+.`,checkbox:!0}]},{id:`toggle-show-ok-folders`,menuActionId:`toggle-show-ok-folders`,labelKey:`showOkFolders`,keywords:[`ok`,`folders`,`hidden`,`show`],checkField:`showOkFolders`,availability:{},palette:{group:`view`,visibility:`search-only`},menu:[{section:`view-visibility`,order:1,checkbox:!0}]},{id:`toggle-show-only-markdown-files`,menuActionId:`toggle-show-only-markdown-files`,labelKey:`showOnlyMarkdownFiles`,keywords:[`markdown`,`filter`,`files`,`only`],checkField:`showOnlyMarkdownFiles`,availability:{},palette:{group:`view`,visibility:`search-only`},menu:[{section:`view-visibility`,order:2,checkbox:!0}]},{id:`toggle-show-skills-section`,menuActionId:`toggle-show-skills-section`,labelKey:`showSkillsSection`,keywords:[`skills`,`section`,`sidebar`,`show`],checkField:`showSkillsSection`,availability:{},palette:{group:`view`,visibility:`search-only`},menu:[{section:`view-visibility`,order:3,checkbox:!0}]},{id:`expand-all-tree`,menuActionId:`expand-all-tree`,labelKey:`expandAll`,keywords:[`expand`,`tree`,`folders`,`all`],availability:{requiresCanExpandAll:!0},palette:{group:`view`,visibility:`search-only`},menu:[{section:`view-tree`,order:0,smartHide:!0}]},{id:`collapse-all-tree`,menuActionId:`collapse-all-tree`,labelKey:`collapseAll`,keywords:[`collapse`,`tree`,`folders`,`all`],availability:{requiresCanCollapseAll:!0},palette:{group:`view`,visibility:`search-only`},menu:[{section:`view-tree`,order:1,smartHide:!0}]},{id:`new-terminal`,menuActionId:`new-terminal`,labelKey:`newTerminal`,keywords:[`terminal`,`shell`,`new`,`tab`],availability:{host:`desktop`,requiresTerminalCapability:!0},palette:{group:`terminal`,visibility:`search-only`},menu:[{section:`terminal`,order:0}]},{id:`new-terminal-window`,keywords:[],availability:{host:`desktop`,requiresTerminalCapability:!0},menu:[{section:`terminal`,order:1,menuLabelText:`New Terminal Window`}]},{id:`move-terminal`,menuActionId:`move-terminal`,labelKey:`terminalMoveRight`,keywords:[`terminal`,`move`,`dock`,`right`,`bottom`,`placement`],placementToggle:{bottomKey:`terminalMoveRight`,rightKey:`terminalMoveBottom`},availability:{host:`desktop`,requiresTerminalCapability:!0},palette:{group:`terminal`,visibility:`search-only`},menu:[{section:`terminal`,order:2}]},{id:`kill-terminal`,menuActionId:`kill-terminal`,labelKey:`killTerminal`,keywords:[`terminal`,`kill`,`close`,`session`],availability:{host:`desktop`,requiresTerminalCapability:!0,requiresTerminalLive:!0},palette:{group:`terminal`,visibility:`search-only`},menu:[{section:`terminal`,order:3}]},{id:`check-for-updates`,labelKey:`checkForUpdates`,keywords:[`update`,`upgrade`,`version`,`check`],availability:{host:`desktop`},palette:{group:`app`,visibility:`search-only`},menu:[{section:`app-updates`,order:0,platform:`mac`,ellipsis:!0},{section:`help-updates`,order:0,platform:`other`,ellipsis:!0}]},{id:`set-up-integrations`,labelKey:`setUpIntegrations`,keywords:[`integrations`,`mcp`,`setup`,`claude`,`configure`],availability:{host:`desktop`},palette:{group:`app`,visibility:`search-only`},menu:[{section:`file-integrations`,order:0,ellipsis:!0}]},{id:`toggle-spell-check`,labelKey:`checkSpelling`,keywords:[`spell`,`spelling`,`check`,`typing`],availability:{host:`desktop`},palette:{group:`app`,visibility:`search-only`},menu:[{section:`edit-spell`,order:0,checkbox:!0}]},{id:`open-github`,labelKey:`openOnGithub`,keywords:[`github`,`source`,`repository`,`code`],availability:{},palette:{group:`app`,visibility:`search-only`},menu:[{section:`help-links`,order:0}]},{id:`uninstall`,keywords:[],availability:{host:`desktop`},menu:[{section:`app-uninstall`,order:0,platform:`mac`,ellipsis:!0,menuLabelText:`Uninstall OpenKnowledge`}]}];function fY(e,t){let n=e.attrs[t];return typeof n==`string`?n:``}function pY(e,t){let n=e.attrs.props;if(typeof n!=`object`||!n)return``;let r=n[t];return typeof r==`string`?r:``}var mY=[`children`,`chart`,`formula`,`alt`,`name`,`alias`,`target`];function hY(e){for(let t of mY){let n=pY(e,t);if(n.length>0)return n}return fY(e,`sourceRaw`)}function gY(e){switch(e.type.name){case`wikiLink`:return fY(e,`alias`)||fY(e,`target`);case`wikiLinkEmbed`:return fY(e,`target`);case`tag`:return`#${fY(e,`value`)}`;case`mathInline`:return fY(e,`formula`);case`image`:case`imageReference`:return fY(e,`alt`);case`footnoteReference`:return fY(e,`label`)||fY(e,`identifier`);case`jsxComponent`:case`jsxInline`:return e.content.size===0?hY(e):``;default:return``}}function _Y(e,t,n,r=`
|
|
402
402
|
`,{inlineOnly:i=!1}={}){let a=``,o=!0;return e.nodesBetween(t,n,(e,s)=>{let c=e.isText?(e.text??``).slice(Math.max(t,s)-s,n-s):i&&e.isBlock?``:gY(e);return e.isBlock&&(e.isTextblock||c.length>0)&&r&&(o?o=!1:a+=r),a+=c,!0},0),a}var vY=new Map([[32,` `],[9,` `],[160,`\xA0`]]);function yY(e){let t=/^&#(x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);$/.exec(e);if(!t)return null;let n=t[1],r=n[0]===`x`||n[0]===`X`,i=Number.parseInt(r?n.slice(1):n,r?16:10);return Number.isNaN(i)?null:i}function bY(e){let t=yY(e);return t!==null&&vY.has(t)}function xY(e){let t=yY(e);return t===null?null:vY.get(t)??null}var SY=/&#(?:x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);/g;function CY(e){SY.lastIndex=0;let t=e.match(SY);if(t===null||t.join(``)!==e)return null;let n=``;for(let e of t){let t=xY(e);if(t===null)return null;n+=t}return n}var wY=new Set([`*`,`_`,"`",`~`,`\\`,`$`]),TY=/^={2,}/,EY=/^<(?:[A-Za-z][A-Za-z0-9+.-]*:[^<>\s]*|[^\s<>@]+@[^\s<>]+)>/,DY=512;function OY(e,t){return EY.test(e.slice(t,t+DY))}function kY(e,t){let n=e.lastIndexOf(`<`,t);return n<0||t-n>DY?!1:EY.exec(e.slice(n,t+1))?.[0].length===t+1-n}var AY=/^<\/?[A-Za-z][A-Za-z0-9-]*(?:\s[^>]*?)?\/?>/,jY=512,MY=/^!(?=\[)/,NY=/^\[\^/,PY=/^\]\[[^\]]*\]/,FY=/^\[\[[^\][|]*\|/,IY=/^#[^\][|]*(?=\]\])/,LY=512,RY=/^\]\([^)]*\)/,zY=512,BY=/^(?:#{1,6}[ \t]+|>[ \t]?|(?:[-*+]|\d{1,9}[.)])[ \t]+(?:\[[ xX]\][ \t]+)?)/,VY=32,HY=`|`,UY=/^(?:`{3,}[^`\n]*|~{3,}[^\n]*)$/,WY=/^(?:(?:[-*_][ \t]*){3,}|=+[ \t]*|[|\-: \t]*-[|\-: \t]*)$/,GY=1024;function KY(e,t){let n=e.indexOf(`
|
|
403
403
|
`,t),r=n===-1?e.length:n;if(r>t&&e[r-1]===`\r`&&--r,r-t>GY)return 0;let i=e.slice(t,r);return i.length===0||!UY.test(i)&&!WY.test(i)?0:i.length}var qY=/&#(?:x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);/y;function JY(e,t){if(e[t]!==`&`)return null;let n=t,r=``;for(;;){qY.lastIndex=n;let t=qY.exec(e)?.[0];if(t===void 0)break;let i=xY(t);if(i===null)break;r+=i,n+=t.length}return n===t?null:{length:n-t,rendered:r}}function YY(e){return e===` `||e===` `||e===`
|
|
404
404
|
`||e===`\r`||e===`\f`||e===`\v`}function XY(e,t){for(let n=t-1;n>=0;--n){let t=e[n];if(t===`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,H as t,K as n,U as r,V as i,W as a,q as o}from"./dist-BL2TNIf3.js";var s=class e{constructor(e,t,n,r,i,a,o,s,c,l=0,u){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=a,this.buffer=o,this.bufferBase=s,this.curContext=c,this.lookAhead=l,this.parent=u}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?`!`+this.score:``}`}static start(t,n,r=0){let i=t.parser.context;return new e(t,[],n,r,r,0,[],0,i?new c(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){let t=e>>19,n=e&65535,{parser:r}=this.p,i=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),a=r.dynamicPrecedence(n);if(a&&(this.score+=a),t==0){n<r.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(r.getGoto(this.state,n,!0),this.reducePos),n<r.minRepeatTerm&&this.storeNode(n,this.reducePos,this.reducePos,i?8:4,!0),this.reduceContext(n,this.reducePos);return}let o=this.stack.length-(t-1)*3-(e&262144?6:0),s=o?this.stack[o-2]:this.p.ranges[0].from;n<r.minRepeatTerm&&s==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let c=this.reducePos-s;c>=2e3&&!this.p.parser.nodeSet.types[n]?.isAnonymous&&(s==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=s,this.p.lastBigReductionSize=c));let l=o?this.stack[o-1]:0,u=this.bufferBase+this.buffer.length-l;if(n<r.minRepeatTerm||e&131072){let e=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(n,s,e,u+4,!0)}if(e&262144)this.state=this.stack[o];else{let e=this.stack[o-3];this.state=r.getGoto(e,n,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(n,s)}storeNode(e,t,n,r=4,i=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this.buffer.length;if(e>0&&this.buffer[e-4]==0&&this.buffer[e-1]>-1){if(t==n)return;if(this.buffer[e-2]>=t){this.buffer[e-2]=n;return}}}if(!i||this.pos==n)this.buffer.push(e,t,n,r);else{let i=this.buffer.length;if(i>0&&(this.buffer[i-4]!=0||this.buffer[i-1]<0)){let e=!1;for(let t=i;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}}shift(e,t,n,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4);else{let i=e,{parser:a}=this.p;this.pos=r;let o=a.stateFlag(i,1);!o&&(r>n||t<=a.maxNode)&&(this.reducePos=r),this.pushState(i,o?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=a.maxNode&&this.buffer.push(t,n,r,4)}}apply(e,t,n,r){e&65536?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let t=this,n=t.buffer.length;for(n&&t.buffer[n-4]==0&&(n-=4);n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let r=t.buffer.slice(n),i=t.bufferBase+n;for(;t&&i==t.bufferBase;)t=t.parent;return new e(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new l(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(n&65536))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r=0,i;r<t.length;r+=2)(i=t[r+1])!=this.state&&this.p.parser.hasAction(i,e)&&n.push(t[r],i);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let r=t[e+1];n.some((e,t)=>t&1&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let r=t[e+1];if(r==this.state)continue;let i=this.split();i.pushState(r,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(t[e],this.pos),i.reducePos=this.pos,i.score-=200,n.push(i)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(t&65536))return!1;if(!e.validAction(this.state,t)){let n=t>>19,r=t&65535,i=this.stack.length-n*3;if(i<0||e.getGoto(this.stack[i],r,!1)<0){let e=this.findForcedReduction();if(e==null)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,t=>{if(!(t&393216))if(t&65536){let n=(t>>19)-i;if(n>1){let r=t&65535,i=this.stack.length-n*3;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+1);if(e!=null)return e}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new c(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},c=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},l=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3,this.state=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0)}},u=class e{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new e(t,n,n-t.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new e(this.stack,this.pos,this.index)}};function d(e,t=Uint16Array){if(typeof e!=`string`)return e;let n=null;for(let r=0,i=0;r<e.length;){let a=0;for(;;){let t=e.charCodeAt(r++),n=!1;if(t==126){a=65535;break}t>=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),a+=i,n)break;a*=46}n?n[i++]=a:n=new t(a)}return n}var f=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},p=new f,m=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk=``,this.chunkOff=0,this.chunk2=``,this.chunk2Pos=0,this.next=-1,this.token=p,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let e=this.ranges[--r];i-=n.from-e.to,n=e}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=this.chunk.charCodeAt(t);else{let t=this.resolveOffset(e,1);if(t==null)return-1;if(n=t,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let e=this.rangeIndex,t=this.range;for(;t.to<=n;)t=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>t.to&&(this.chunk2=this.chunk2.slice(0,t.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw RangeError(`Token end out of bounds`);this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos);this.chunk=this.pos+e.length>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk=``,this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=p,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk=``,this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n=``;for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}},h=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;v(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};h.prototype.contextual=h.prototype.fallback=h.prototype.extend=!1;var g=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e==`string`?d(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(v(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(n||r++,i==null)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}};g.prototype.contextual=h.prototype.fallback=h.prototype.extend=!1;var _=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};function v(e,t,n,r,i,a){let o=0,s=1<<r,{dialect:c}=n.p.parser;scan:for(;(s&e[o])!=0;){let n=e[o+1];for(let r=o+3;r<n;r+=2)if((e[r+1]&s)>0){let n=e[r];if(c.allows(n)&&(t.token.value==-1||t.token.value==n||b(n,t.token.value,i,a))){t.acceptToken(n);break}}let r=t.next,l=0,u=e[o+2];if(t.next<0&&u>l&&e[n+u*3-3]==65535){o=e[n+u*3-1];continue scan}for(;l<u;){let i=l+u>>1,a=n+i+(i<<1),s=e[a],c=e[a+1]||65536;if(r<s)u=i;else if(r>=c)l=i+1;else{o=e[a+2],t.advance();continue scan}}break}}function y(e,t,n){for(let r=t,i;(i=e[r])!=65535;r++)if(i==n)return r-t;return-1}function b(e,t,n,r){let i=y(n,r,t);return i<0||y(n,r,e)<i}var x=typeof process<`u`&&/\bparse\b/.test({}.LOG),S=null;function C(e,t,n){let r=e.cursor(i.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}var w=class{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?C(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?C(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let a=r.children[i],s=this.start[n]+r.positions[i];if(s>e)return this.nextStart=s,null;if(a instanceof o){if(s==e){if(s<this.safeFrom)return null;let e=s+a.length;if(e<=this.safeTo){let n=a.prop(t.lookAhead);if(!n||e+n<this.fragment.to)return a}}this.index[n]++,s+a.length>=Math.max(this.safeFrom,e)&&(this.trees.push(a),this.start.push(s),this.index.push(0))}else this.index[n]++,this.nextStart=s+a.length}}},T=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new f)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,a=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,s=0;for(let r=0;r<i.length;r++){if(!(1<<r&a))continue;let c=i[r],l=this.tokens[r];if(!(n&&!c.fallback)&&((c.contextual||l.start!=e.pos||l.mask!=a||l.context!=o)&&(this.updateCachedToken(l,c,e),l.mask=a,l.context=o),l.lookAhead>l.end+25&&(s=Math.max(l.lookAhead,s)),l.value!=0)){let r=t;if(l.extended>-1&&(t=this.addActions(e,l.extended,l.end,t)),t=this.addActions(e,l.value,l.end,t),!c.extend&&(n=l,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),!n&&e.pos==this.stream.end&&(n=new f,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new f,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r<t.specialized.length;r++)if(t.specialized[r]==e.value){let i=t.specializers[r](this.stream.read(e.start,e.end),n);if(i>=0&&n.p.parser.dialect.allows(i>>1)){i&1?e.extended=i>>1:e.value=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t<r;t+=3)if(this.actions[t]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:a}=e.p,{data:o}=a;for(let e=0;e<2;e++)for(let s=a.stateSlot(i,e?2:1);;s+=3){if(o[s]==65535)if(o[s+1]==1)s=M(o,s+2);else{r==0&&o[s+1]==2&&(r=this.putAction(M(o,s+2),t,n,r));break}o[s]==t&&(r=this.putAction(M(o,s+1),t,n,r))}return r}},E=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new m(t,r),this.tokens=new T(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[s.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>e.bufferLength*4?new w(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],r,i;if(this.bigReductionCount>300&&e.length==1){let[t]=e;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let o=e[a];for(;;){if(this.tokens.mainToken=null,o.pos>t)n.push(o);else if(this.advanceStack(o,n,e))continue;else{r||(r=[],i=[]),r.push(o);let e=this.tokens.getMainToken(o);i.push(e.value,e.end)}break}}if(!n.length){let e=r&&N(r);if(e)return x&&console.log(`Finish with `+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw x&&r&&console.log(`Stuck with token `+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):`none`)),SyntaxError(`No parse at `+t);this.recovering||=5}if(this.recovering&&r){let e=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,i,n);if(e)return x&&console.log(`Force-finish `+this.stackID(e)),this.stackToTree(e.forceAll())}if(this.recovering){let e=this.recovering==1?1:this.recovering*3;if(n.length>e)for(n.sort((e,t)=>t.score-e.score);n.length>e;)n.pop();n.some(e=>e.reducePos>t)&&this.recovering--}else if(n.length>1){outer:for(let e=0;e<n.length-1;e++){let t=n[e];for(let r=e+1;r<n.length;r++){let i=n[r];if(t.sameState(i)||t.buffer.length>500&&i.buffer.length>500)if((t.score-i.score||t.buffer.length-i.buffer.length)>0)n.splice(r--,1);else{n.splice(e--,1);continue outer}}}n.length>12&&(n.sort((e,t)=>t.score-e.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let e=1;e<n.length;e++)n[e].pos<this.minStackPos&&(this.minStackPos=n[e].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}advanceStack(e,n,r){let i=e.pos,{parser:a}=this,s=x?this.stackID(e)+` -> `:``;if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let n=e.curContext&&e.curContext.tracker.strict,r=n?e.curContext.hash:0;for(let c=this.fragments.nodeAt(i);c;){let i=this.parser.nodeSet.types[c.type.id]==c.type?a.getGoto(e.state,c.type.id):-1;if(i>-1&&c.length&&(!n||(c.prop(t.contextHash)||0)==r))return e.useNode(c,i),x&&console.log(s+this.stackID(e)+` (via reuse of ${a.getName(c.type.id)})`),!0;if(!(c instanceof o)||c.children.length==0||c.positions[0]>0)break;let l=c.children[0];if(l instanceof o&&c.positions[0]==0)c=l;else break}}let c=a.stateSlot(e.state,4);if(c>0)return e.reduce(c),x&&console.log(s+this.stackID(e)+` (via always-reduce ${a.getName(c&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let t=0;t<l.length;){let o=l[t++],c=l[t++],u=l[t++],d=t==l.length||!r,f=d?e:e.split(),p=this.tokens.mainToken;if(f.apply(o,c,p?p.start:f.pos,u),x&&console.log(s+this.stackID(f)+` (via ${o&65536?`reduce of ${a.getName(o&65535)}`:`shift`} for ${a.getName(c)} @ ${i}${f==e?``:`, split`})`),d)return!0;f.pos>i?n.push(f):r.push(f)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return D(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let a=0;a<e.length;a++){let o=e[a],s=t[a<<1],c=t[(a<<1)+1],l=x?this.stackID(o)+` -> `:``;if(o.deadEnd&&(i||(i=!0,o.restart(),x&&console.log(l+this.stackID(o)+` (restarted)`),this.advanceFully(o,n))))continue;let u=o.split(),d=l;for(let e=0;e<10&&u.forceReduce()&&(x&&console.log(d+this.stackID(u)+` (via force-reduce)`),!this.advanceFully(u,n));e++)x&&(d=this.stackID(u)+` -> `);for(let e of o.recoverByInsert(s))x&&console.log(l+this.stackID(e)+` (via recover-insert)`),this.advanceFully(e,n);this.stream.end>o.pos?(c==o.pos&&(c++,s=0),o.recoverByDelete(s,c),x&&console.log(l+this.stackID(o)+` (via recover-delete ${this.parser.getName(s)})`),D(o,n)):(!r||r.score<u.score)&&(r=u)}return r}stackToTree(e){return e.close(),o.build({buffer:u.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(S||=new WeakMap).get(e);return t||S.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}};function D(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}var O=class{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}},k=e=>e,A=class{constructor(e){this.start=e.start,this.shift=e.shift||k,this.reduce=e.reduce||k,this.reuse=e.reuse||k,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},j=class i extends n{constructor(n){if(super(),this.wrappers=[],n.version!=14)throw RangeError(`Parser version (${n.version}) doesn't match runtime version (14)`);let i=n.nodeNames.split(` `);this.minRepeatTerm=i.length;for(let e=0;e<n.repeatNodeCount;e++)i.push(``);let o=Object.keys(n.topRules).map(e=>n.topRules[e][1]),s=[];for(let e=0;e<i.length;e++)s.push([]);function c(e,t,n){s[e].push([t,t.deserialize(String(n))])}if(n.nodeProps)for(let e of n.nodeProps){let n=e[0];typeof n==`string`&&(n=t[n]);for(let t=1;t<e.length;){let r=e[t++];if(r>=0)c(r,n,e[t++]);else{let i=e[t+-r];for(let a=-r;a>0;a--)c(e[t++],n,i);t++}}}this.nodeSet=new r(i.map((e,t)=>a.define({name:t>=this.minRepeatTerm?void 0:e,id:t,props:s[t],top:o.indexOf(t)>-1,error:t==0,skipped:n.skippedNodes&&n.skippedNodes.indexOf(t)>-1}))),n.propSources&&(this.nodeSet=this.nodeSet.extend(...n.propSources)),this.strict=!1,this.bufferLength=e;let l=d(n.tokenData);this.context=n.context,this.specializerSpecs=n.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(P),this.states=d(n.states,Uint32Array),this.data=d(n.stateData),this.goto=d(n.goto),this.maxTerm=n.maxTerm,this.tokenizers=n.tokenizers.map(e=>typeof e==`number`?new h(l,e):e),this.topRules=n.topRules,this.dialects=n.dialects||{},this.dynamicPrecedences=n.dynamicPrecedences||null,this.tokenPrecTable=n.tokenPrec,this.termNames=n.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new E(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let i=r[t+1];;){let t=r[i++],a=t&1,o=r[i++];if(a&&n)return o;for(let n=i+(t>>1);i<n;i++)if(r[i]==e)return o;if(a)return-1}}hasAction(e,t){let n=this.data;for(let r=0;r<2;r++)for(let i=this.stateSlot(e,r?2:1),a;;i+=3){if((a=n[i])==65535)if(n[i+1]==1)a=n[i=M(n,i+2)];else if(n[i+1]==2)return M(n,i+2);else break;if(a==t||a==0)return M(n,i+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t?!0:null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);r==null;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=M(this.data,n+2);else break;r=t(M(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=M(this.data,n+2);else break;if(!(this.data[n+2]&1)){let e=this.data[n+1];t.some((t,n)=>n&1&&t==e)||t.push(this.data[n],e)}}return t}configure(e){let t=Object.assign(Object.create(i.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(t=>{let n=e.tokenizers.find(e=>e.from==t);return n?n.to:t})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,r)=>{let i=e.specializers.find(e=>e.from==n.external);if(!i)return n;let a=Object.assign(Object.assign({},n),{external:i.to});return t.specializers[r]=P(a),a})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(` `)){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n=this.dialects[t[e]],i;(i=this.data[n++])!=65535;)(r||=new Uint8Array(this.maxTerm+1))[i]=1;return new O(e,n,r)}static deserialize(e){return new i(e)}};function M(e,t){return e[t]|e[t+1]<<16}function N(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||e!=null&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}function P(e){if(e.external){let t=+!!e.extend;return(n,r)=>e.external(n,r)<<1|t}return e.get}export{g as i,_ as n,j as r,A as t};
|
|
1
|
+
import{B as e,H as t,K as n,U as r,V as i,W as a,q as o}from"./dist-C_x1-g67.js";var s=class e{constructor(e,t,n,r,i,a,o,s,c,l=0,u){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=a,this.buffer=o,this.bufferBase=s,this.curContext=c,this.lookAhead=l,this.parent=u}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?`!`+this.score:``}`}static start(t,n,r=0){let i=t.parser.context;return new e(t,[],n,r,r,0,[],0,i?new c(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){let t=e>>19,n=e&65535,{parser:r}=this.p,i=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),a=r.dynamicPrecedence(n);if(a&&(this.score+=a),t==0){n<r.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(r.getGoto(this.state,n,!0),this.reducePos),n<r.minRepeatTerm&&this.storeNode(n,this.reducePos,this.reducePos,i?8:4,!0),this.reduceContext(n,this.reducePos);return}let o=this.stack.length-(t-1)*3-(e&262144?6:0),s=o?this.stack[o-2]:this.p.ranges[0].from;n<r.minRepeatTerm&&s==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let c=this.reducePos-s;c>=2e3&&!this.p.parser.nodeSet.types[n]?.isAnonymous&&(s==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=s,this.p.lastBigReductionSize=c));let l=o?this.stack[o-1]:0,u=this.bufferBase+this.buffer.length-l;if(n<r.minRepeatTerm||e&131072){let e=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(n,s,e,u+4,!0)}if(e&262144)this.state=this.stack[o];else{let e=this.stack[o-3];this.state=r.getGoto(e,n,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(n,s)}storeNode(e,t,n,r=4,i=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this.buffer.length;if(e>0&&this.buffer[e-4]==0&&this.buffer[e-1]>-1){if(t==n)return;if(this.buffer[e-2]>=t){this.buffer[e-2]=n;return}}}if(!i||this.pos==n)this.buffer.push(e,t,n,r);else{let i=this.buffer.length;if(i>0&&(this.buffer[i-4]!=0||this.buffer[i-1]<0)){let e=!1;for(let t=i;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}}shift(e,t,n,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4);else{let i=e,{parser:a}=this.p;this.pos=r;let o=a.stateFlag(i,1);!o&&(r>n||t<=a.maxNode)&&(this.reducePos=r),this.pushState(i,o?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=a.maxNode&&this.buffer.push(t,n,r,4)}}apply(e,t,n,r){e&65536?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let t=this,n=t.buffer.length;for(n&&t.buffer[n-4]==0&&(n-=4);n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let r=t.buffer.slice(n),i=t.bufferBase+n;for(;t&&i==t.bufferBase;)t=t.parent;return new e(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new l(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(n&65536))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r=0,i;r<t.length;r+=2)(i=t[r+1])!=this.state&&this.p.parser.hasAction(i,e)&&n.push(t[r],i);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let r=t[e+1];n.some((e,t)=>t&1&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let r=t[e+1];if(r==this.state)continue;let i=this.split();i.pushState(r,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(t[e],this.pos),i.reducePos=this.pos,i.score-=200,n.push(i)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(t&65536))return!1;if(!e.validAction(this.state,t)){let n=t>>19,r=t&65535,i=this.stack.length-n*3;if(i<0||e.getGoto(this.stack[i],r,!1)<0){let e=this.findForcedReduction();if(e==null)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,t=>{if(!(t&393216))if(t&65536){let n=(t>>19)-i;if(n>1){let r=t&65535,i=this.stack.length-n*3;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+1);if(e!=null)return e}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new c(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},c=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},l=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3,this.state=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0)}},u=class e{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new e(t,n,n-t.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new e(this.stack,this.pos,this.index)}};function d(e,t=Uint16Array){if(typeof e!=`string`)return e;let n=null;for(let r=0,i=0;r<e.length;){let a=0;for(;;){let t=e.charCodeAt(r++),n=!1;if(t==126){a=65535;break}t>=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),a+=i,n)break;a*=46}n?n[i++]=a:n=new t(a)}return n}var f=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},p=new f,m=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk=``,this.chunkOff=0,this.chunk2=``,this.chunk2Pos=0,this.next=-1,this.token=p,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let e=this.ranges[--r];i-=n.from-e.to,n=e}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=this.chunk.charCodeAt(t);else{let t=this.resolveOffset(e,1);if(t==null)return-1;if(n=t,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let e=this.rangeIndex,t=this.range;for(;t.to<=n;)t=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>t.to&&(this.chunk2=this.chunk2.slice(0,t.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw RangeError(`Token end out of bounds`);this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos);this.chunk=this.pos+e.length>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk=``,this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=p,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk=``,this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n=``;for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}},h=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;v(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};h.prototype.contextual=h.prototype.fallback=h.prototype.extend=!1;var g=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e==`string`?d(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(v(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(n||r++,i==null)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}};g.prototype.contextual=h.prototype.fallback=h.prototype.extend=!1;var _=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};function v(e,t,n,r,i,a){let o=0,s=1<<r,{dialect:c}=n.p.parser;scan:for(;(s&e[o])!=0;){let n=e[o+1];for(let r=o+3;r<n;r+=2)if((e[r+1]&s)>0){let n=e[r];if(c.allows(n)&&(t.token.value==-1||t.token.value==n||b(n,t.token.value,i,a))){t.acceptToken(n);break}}let r=t.next,l=0,u=e[o+2];if(t.next<0&&u>l&&e[n+u*3-3]==65535){o=e[n+u*3-1];continue scan}for(;l<u;){let i=l+u>>1,a=n+i+(i<<1),s=e[a],c=e[a+1]||65536;if(r<s)u=i;else if(r>=c)l=i+1;else{o=e[a+2],t.advance();continue scan}}break}}function y(e,t,n){for(let r=t,i;(i=e[r])!=65535;r++)if(i==n)return r-t;return-1}function b(e,t,n,r){let i=y(n,r,t);return i<0||y(n,r,e)<i}var x=typeof process<`u`&&/\bparse\b/.test({}.LOG),S=null;function C(e,t,n){let r=e.cursor(i.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}var w=class{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?C(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?C(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let a=r.children[i],s=this.start[n]+r.positions[i];if(s>e)return this.nextStart=s,null;if(a instanceof o){if(s==e){if(s<this.safeFrom)return null;let e=s+a.length;if(e<=this.safeTo){let n=a.prop(t.lookAhead);if(!n||e+n<this.fragment.to)return a}}this.index[n]++,s+a.length>=Math.max(this.safeFrom,e)&&(this.trees.push(a),this.start.push(s),this.index.push(0))}else this.index[n]++,this.nextStart=s+a.length}}},T=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new f)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,a=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,s=0;for(let r=0;r<i.length;r++){if(!(1<<r&a))continue;let c=i[r],l=this.tokens[r];if(!(n&&!c.fallback)&&((c.contextual||l.start!=e.pos||l.mask!=a||l.context!=o)&&(this.updateCachedToken(l,c,e),l.mask=a,l.context=o),l.lookAhead>l.end+25&&(s=Math.max(l.lookAhead,s)),l.value!=0)){let r=t;if(l.extended>-1&&(t=this.addActions(e,l.extended,l.end,t)),t=this.addActions(e,l.value,l.end,t),!c.extend&&(n=l,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),!n&&e.pos==this.stream.end&&(n=new f,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new f,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r<t.specialized.length;r++)if(t.specialized[r]==e.value){let i=t.specializers[r](this.stream.read(e.start,e.end),n);if(i>=0&&n.p.parser.dialect.allows(i>>1)){i&1?e.extended=i>>1:e.value=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t<r;t+=3)if(this.actions[t]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:a}=e.p,{data:o}=a;for(let e=0;e<2;e++)for(let s=a.stateSlot(i,e?2:1);;s+=3){if(o[s]==65535)if(o[s+1]==1)s=M(o,s+2);else{r==0&&o[s+1]==2&&(r=this.putAction(M(o,s+2),t,n,r));break}o[s]==t&&(r=this.putAction(M(o,s+1),t,n,r))}return r}},E=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new m(t,r),this.tokens=new T(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[s.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>e.bufferLength*4?new w(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],r,i;if(this.bigReductionCount>300&&e.length==1){let[t]=e;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let o=e[a];for(;;){if(this.tokens.mainToken=null,o.pos>t)n.push(o);else if(this.advanceStack(o,n,e))continue;else{r||(r=[],i=[]),r.push(o);let e=this.tokens.getMainToken(o);i.push(e.value,e.end)}break}}if(!n.length){let e=r&&N(r);if(e)return x&&console.log(`Finish with `+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw x&&r&&console.log(`Stuck with token `+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):`none`)),SyntaxError(`No parse at `+t);this.recovering||=5}if(this.recovering&&r){let e=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,i,n);if(e)return x&&console.log(`Force-finish `+this.stackID(e)),this.stackToTree(e.forceAll())}if(this.recovering){let e=this.recovering==1?1:this.recovering*3;if(n.length>e)for(n.sort((e,t)=>t.score-e.score);n.length>e;)n.pop();n.some(e=>e.reducePos>t)&&this.recovering--}else if(n.length>1){outer:for(let e=0;e<n.length-1;e++){let t=n[e];for(let r=e+1;r<n.length;r++){let i=n[r];if(t.sameState(i)||t.buffer.length>500&&i.buffer.length>500)if((t.score-i.score||t.buffer.length-i.buffer.length)>0)n.splice(r--,1);else{n.splice(e--,1);continue outer}}}n.length>12&&(n.sort((e,t)=>t.score-e.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let e=1;e<n.length;e++)n[e].pos<this.minStackPos&&(this.minStackPos=n[e].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}advanceStack(e,n,r){let i=e.pos,{parser:a}=this,s=x?this.stackID(e)+` -> `:``;if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let n=e.curContext&&e.curContext.tracker.strict,r=n?e.curContext.hash:0;for(let c=this.fragments.nodeAt(i);c;){let i=this.parser.nodeSet.types[c.type.id]==c.type?a.getGoto(e.state,c.type.id):-1;if(i>-1&&c.length&&(!n||(c.prop(t.contextHash)||0)==r))return e.useNode(c,i),x&&console.log(s+this.stackID(e)+` (via reuse of ${a.getName(c.type.id)})`),!0;if(!(c instanceof o)||c.children.length==0||c.positions[0]>0)break;let l=c.children[0];if(l instanceof o&&c.positions[0]==0)c=l;else break}}let c=a.stateSlot(e.state,4);if(c>0)return e.reduce(c),x&&console.log(s+this.stackID(e)+` (via always-reduce ${a.getName(c&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let t=0;t<l.length;){let o=l[t++],c=l[t++],u=l[t++],d=t==l.length||!r,f=d?e:e.split(),p=this.tokens.mainToken;if(f.apply(o,c,p?p.start:f.pos,u),x&&console.log(s+this.stackID(f)+` (via ${o&65536?`reduce of ${a.getName(o&65535)}`:`shift`} for ${a.getName(c)} @ ${i}${f==e?``:`, split`})`),d)return!0;f.pos>i?n.push(f):r.push(f)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return D(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let a=0;a<e.length;a++){let o=e[a],s=t[a<<1],c=t[(a<<1)+1],l=x?this.stackID(o)+` -> `:``;if(o.deadEnd&&(i||(i=!0,o.restart(),x&&console.log(l+this.stackID(o)+` (restarted)`),this.advanceFully(o,n))))continue;let u=o.split(),d=l;for(let e=0;e<10&&u.forceReduce()&&(x&&console.log(d+this.stackID(u)+` (via force-reduce)`),!this.advanceFully(u,n));e++)x&&(d=this.stackID(u)+` -> `);for(let e of o.recoverByInsert(s))x&&console.log(l+this.stackID(e)+` (via recover-insert)`),this.advanceFully(e,n);this.stream.end>o.pos?(c==o.pos&&(c++,s=0),o.recoverByDelete(s,c),x&&console.log(l+this.stackID(o)+` (via recover-delete ${this.parser.getName(s)})`),D(o,n)):(!r||r.score<u.score)&&(r=u)}return r}stackToTree(e){return e.close(),o.build({buffer:u.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(S||=new WeakMap).get(e);return t||S.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}};function D(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}var O=class{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}},k=e=>e,A=class{constructor(e){this.start=e.start,this.shift=e.shift||k,this.reduce=e.reduce||k,this.reuse=e.reuse||k,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},j=class i extends n{constructor(n){if(super(),this.wrappers=[],n.version!=14)throw RangeError(`Parser version (${n.version}) doesn't match runtime version (14)`);let i=n.nodeNames.split(` `);this.minRepeatTerm=i.length;for(let e=0;e<n.repeatNodeCount;e++)i.push(``);let o=Object.keys(n.topRules).map(e=>n.topRules[e][1]),s=[];for(let e=0;e<i.length;e++)s.push([]);function c(e,t,n){s[e].push([t,t.deserialize(String(n))])}if(n.nodeProps)for(let e of n.nodeProps){let n=e[0];typeof n==`string`&&(n=t[n]);for(let t=1;t<e.length;){let r=e[t++];if(r>=0)c(r,n,e[t++]);else{let i=e[t+-r];for(let a=-r;a>0;a--)c(e[t++],n,i);t++}}}this.nodeSet=new r(i.map((e,t)=>a.define({name:t>=this.minRepeatTerm?void 0:e,id:t,props:s[t],top:o.indexOf(t)>-1,error:t==0,skipped:n.skippedNodes&&n.skippedNodes.indexOf(t)>-1}))),n.propSources&&(this.nodeSet=this.nodeSet.extend(...n.propSources)),this.strict=!1,this.bufferLength=e;let l=d(n.tokenData);this.context=n.context,this.specializerSpecs=n.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(P),this.states=d(n.states,Uint32Array),this.data=d(n.stateData),this.goto=d(n.goto),this.maxTerm=n.maxTerm,this.tokenizers=n.tokenizers.map(e=>typeof e==`number`?new h(l,e):e),this.topRules=n.topRules,this.dialects=n.dialects||{},this.dynamicPrecedences=n.dynamicPrecedences||null,this.tokenPrecTable=n.tokenPrec,this.termNames=n.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new E(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let i=r[t+1];;){let t=r[i++],a=t&1,o=r[i++];if(a&&n)return o;for(let n=i+(t>>1);i<n;i++)if(r[i]==e)return o;if(a)return-1}}hasAction(e,t){let n=this.data;for(let r=0;r<2;r++)for(let i=this.stateSlot(e,r?2:1),a;;i+=3){if((a=n[i])==65535)if(n[i+1]==1)a=n[i=M(n,i+2)];else if(n[i+1]==2)return M(n,i+2);else break;if(a==t||a==0)return M(n,i+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t?!0:null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);r==null;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=M(this.data,n+2);else break;r=t(M(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=M(this.data,n+2);else break;if(!(this.data[n+2]&1)){let e=this.data[n+1];t.some((t,n)=>n&1&&t==e)||t.push(this.data[n],e)}}return t}configure(e){let t=Object.assign(Object.create(i.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(t=>{let n=e.tokenizers.find(e=>e.from==t);return n?n.to:t})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,r)=>{let i=e.specializers.find(e=>e.from==n.external);if(!i)return n;let a=Object.assign(Object.assign({},n),{external:i.to});return t.specializers[r]=P(a),a})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(` `)){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n=this.dialects[t[e]],i;(i=this.data[n++])!=65535;)(r||=new Uint8Array(this.maxTerm+1))[i]=1;return new O(e,n,r)}static deserialize(e){return new i(e)}};function M(e,t){return e[t]|e[t+1]<<16}function N(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||e!=null&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}function P(e){if(e.external){let t=+!!e.extend;return(n,r)=>e.external(n,r)<<1|t}return e.get}export{g as i,_ as n,j as r,A as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./chunk-CYidjpOJ.js";import{E as t,R as n,m as r,o as i,r as a,x as o,y as s,z as c}from"./dist-BL2TNIf3.js";import{n as l,r as ee,t as te}from"./dist-BkdK7CJv.js";var u=63,d=64,f=1,p=2,m=3,h=4,g=5,_=6,v=7,y=65,b=66,ne=8,x=9,S=10,C=11,w=12,T=13,E=19,D=20,O=29,re=33,ie=34,ae=47,oe=0,k=1,A=2,j=3,M=4,N=class{constructor(e,t,n){this.parent=e,this.depth=t,this.type=n,this.hash=(e?e.hash+e.hash<<8:0)+t+(t<<4)+n}};N.top=new N(null,-1,oe);function P(e,t){for(let n=0,r=t-e.pos-1;;r--,n++){let t=e.peek(r);if(I(t)||t==-1)return n}}function F(e){return e==32||e==9}function I(e){return e==10||e==13}function L(e){return F(e)||I(e)}function R(e){return e<0||L(e)}var z=new te({start:N.top,reduce(e,t){return e.type==j&&(t==D||t==ie)?e.parent:e},shift(e,t,n,r){if(t==m)return new N(e,P(r,r.pos),k);if(t==y||t==g)return new N(e,P(r,r.pos),A);if(t==u)return e.parent;if(t==E||t==re)return new N(e,0,j);if(t==T&&e.type==M)return e.parent;if(t==ae){let t=/[1-9]/.exec(r.read(r.pos,n.pos));if(t)return new N(e,e.depth+ +t[0],M)}return e},hash(e){return e.hash}});function B(e,t,n=0){return e.peek(n)==t&&e.peek(n+1)==t&&e.peek(n+2)==t&&R(e.peek(n+3))}var V=new l((e,t)=>{if(e.next==-1&&t.canShift(d))return e.acceptToken(d);let n=e.peek(-1);if((I(n)||n<0)&&t.context.type!=j){if(B(e,45))if(t.canShift(u))e.acceptToken(u);else return e.acceptToken(f,3);if(B(e,46))if(t.canShift(u))e.acceptToken(u);else return e.acceptToken(p,3);let n=0;for(;e.next==32;)n++,e.advance();(n<t.context.depth||n==t.context.depth&&t.context.type==k&&(e.next!=45||!R(e.peek(1))))&&e.next!=-1&&!I(e.next)&&e.next!=35&&e.acceptToken(u,-n)}},{contextual:!0}),H=new l((e,t)=>{if(t.context.type==j){e.next==63&&(e.advance(),R(e.next)&&e.acceptToken(v));return}if(e.next==45)e.advance(),R(e.next)&&e.acceptToken(t.context.type==k&&t.context.depth==P(e,e.pos-1)?h:m);else if(e.next==63)e.advance(),R(e.next)&&e.acceptToken(t.context.type==A&&t.context.depth==P(e,e.pos-1)?_:g);else{let n=e.pos;for(;;)if(F(e.next)){if(e.pos==n)return;e.advance()}else if(e.next==33)K(e);else if(e.next==38)q(e);else if(e.next==42){q(e);break}else if(e.next==39||e.next==34){if(J(e,!0))break;return}else if(e.next==91||e.next==123){if(!se(e))return;break}else{Z(e,!0,!1,0);break}for(;F(e.next);)e.advance();if(e.next==58){if(e.pos==n&&t.canShift(O))return;R(e.peek(1))&&e.acceptTokenTo(t.context.type==A&&t.context.depth==P(e,n)?b:y,n)}}},{contextual:!0});function U(e){return e>32&&e<127&&e!=34&&e!=37&&e!=44&&e!=60&&e!=62&&e!=92&&e!=94&&e!=96&&e!=123&&e!=124&&e!=125}function W(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function G(e,t){return e.next==37?(e.advance(),W(e.next)&&e.advance(),W(e.next)&&e.advance(),!0):U(e.next)||t&&e.next==44?(e.advance(),!0):!1}function K(e){if(e.advance(),e.next==60){for(e.advance();;)if(!G(e,!0)){e.next==62&&e.advance();break}}else for(;G(e,!1););}function q(e){for(e.advance();!R(e.next)&&Y(e.next)!=`f`;)e.advance()}function J(e,t){let n=e.next,r=!1,i=e.pos;for(e.advance();;){let a=e.next;if(a<0)break;if(e.advance(),a==n)if(a==39)if(e.next==39)e.advance();else break;else break;else if(a==92&&n==34)e.next>=0&&e.advance();else if(I(a)){if(t)return!1;r=!0}else if(t&&e.pos>=i+1024)return!1}return!r}function se(e){for(let t=[],n=e.pos+1024;;)if(e.next==91||e.next==123)t.push(e.next),e.advance();else if(e.next==39||e.next==34){if(!J(e,!0))return!1}else if(e.next==93||e.next==125){if(t[t.length-1]!=e.next-2)return!1;if(t.pop(),e.advance(),!t.length)return!0}else if(e.next<0||e.pos>n||I(e.next))return!1;else e.advance()}var ce=`iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif`;function Y(e){return e<33?`u`:e>125?`s`:ce[e-33]}function X(e,t){let n=Y(e);return n!=`u`&&!(t&&n==`f`)}function Z(e,t,n,r){if(Y(e.next)==`s`||(e.next==63||e.next==58||e.next==45)&&X(e.peek(1),n))e.advance();else return!1;let i=e.pos;for(;;){let a=e.next,o=0,s=r+1;for(;L(a);){if(I(a)){if(t)return!1;s=0}else s++;a=e.peek(++o)}if(!(a>=0&&(a==58?X(e.peek(o+1),n):a==35?e.peek(o-1)!=32:X(a,n)))||!n&&s<=r||s==0&&!n&&(B(e,45,o)||B(e,46,o)))break;if(t&&Y(a)==`f`)return!1;for(let t=o;t>=0;t--)e.advance();if(t&&e.pos>i+1024)return!1}return!0}var le=new l((e,t)=>{if(e.next==33)K(e),e.acceptToken(w);else if(e.next==38||e.next==42){let t=e.next==38?S:C;q(e),e.acceptToken(t)}else e.next==39||e.next==34?(J(e,!1),e.acceptToken(x)):Z(e,!1,t.context.type==j,t.context.depth)&&e.acceptToken(ne)}),ue=new l((e,t)=>{let n=t.context.type==M?t.context.depth:-1,r=e.pos;scan:for(;;){let i=0,a=e.next;for(;a==32;)a=e.peek(++i);if(!i&&(B(e,45,i)||B(e,46,i))||!I(a)&&(n<0&&(n=Math.max(t.context.depth+1,i)),i<n))break;for(;;){if(e.next<0)break scan;let t=I(e.next);if(e.advance(),t)continue scan;r=e.pos}}e.acceptTokenTo(T,r)}),de=n({DirectiveName:c.keyword,DirectiveContent:c.attributeValue,"DirectiveEnd DocEnd":c.meta,QuotedLiteral:c.string,BlockLiteralHeader:c.special(c.string),BlockLiteralContent:c.content,Literal:c.content,"Key/Literal Key/QuotedLiteral":c.definition(c.propertyName),"Anchor Alias":c.labelName,Tag:c.typeName,Comment:c.lineComment,": , -":c.separator,"?":c.punctuation,"[ ]":c.squareBracket,"{ }":c.brace}),fe=ee.deserialize({version:14,states:"5lQ!ZQgOOO#PQfO'#CpO#uQfO'#DOOOQR'#Dv'#DvO$qQgO'#DRO%gQdO'#DUO%nQgO'#DUO&ROaO'#D[OOQR'#Du'#DuO&{QgO'#D^O'rQgO'#D`OOQR'#Dt'#DtO(iOqO'#DbOOQP'#Dj'#DjO(zQaO'#CmO)YQgO'#CmOOQP'#Cm'#CmQ)jQaOOQ)uQgOOQ]QgOOO*PQdO'#CrO*nQdO'#CtOOQO'#Dw'#DwO+]Q`O'#CxO+hQdO'#CwO+rQ`O'#CwOOQO'#Cv'#CvO+wQdO'#CvOOQO'#Cq'#CqO,UQ`O,59[O,^QfO,59[OOQR,59[,59[OOQO'#Cx'#CxO,eQ`O'#DPO,pQdO'#DPOOQO'#Dx'#DxO,zQdO'#DxO-XQ`O,59jO-aQfO,59jOOQR,59j,59jOOQR'#DS'#DSO-hQcO,59mO-sQgO'#DVO.TQ`O'#DVO.YQcO,59pOOQR'#DX'#DXO#|QfO'#DWO.hQcO'#DWOOQR,59v,59vO.yOWO,59vO/OOaO,59vO/WOaO,59vO/cQgO'#D_OOQR,59x,59xO0VQgO'#DaOOQR,59z,59zOOQP,59|,59|O0yOaO,59|O1ROaO,59|O1aOqO,59|OOQP-E7h-E7hO1oQgO,59XOOQP,59X,59XO2PQaO'#DeO2_QgO'#DeO2oQgO'#DkOOQP'#Dk'#DkQ)jQaOOO3PQdO'#CsOOQO,59^,59^O3kQdO'#CuOOQO,59`,59`OOQO,59c,59cO4VQdO,59cO4aQdO'#CzO4kQ`O'#CzOOQO,59b,59bOOQU,5:Q,5:QOOQR1G.v1G.vO4pQ`O1G.vOOQU-E7d-E7dO4xQdO,59kOOQO,59k,59kO5SQdO'#DQO5^Q`O'#DQOOQO,5:d,5:dOOQU,5:R,5:ROOQR1G/U1G/UO5cQ`O1G/UOOQU-E7e-E7eO5kQgO'#DhO5xQcO1G/XOOQR1G/X1G/XOOQR,59q,59qO6TQgO,59qO6eQdO'#DiO6lQgO'#DiO7PQcO1G/[OOQR1G/[1G/[OOQR,59r,59rO#|QfO,59rOOQR1G/b1G/bO7_OWO1G/bO7dOaO1G/bOOQR,59y,59yOOQR,59{,59{OOQP1G/h1G/hO7lOaO1G/hO7tOaO1G/hO8POaO1G/hOOQP1G.s1G.sO8_QgO,5:POOQP,5:P,5:POOQP,5:V,5:VOOQP-E7i-E7iOOQO,59_,59_OOQO,59a,59aOOQO1G.}1G.}OOQO,59f,59fO8oQdO,59fOOQR7+$b7+$bP,XQ`O'#DfOOQO1G/V1G/VOOQO,59l,59lO8yQdO,59lOOQR7+$p7+$pP9TQ`O'#DgOOQR'#DT'#DTOOQR,5:S,5:SOOQR-E7f-E7fOOQR7+$s7+$sOOQR1G/]1G/]O9YQgO'#DYO9jQ`O'#DYOOQR,5:T,5:TO#|QfO'#DZO9oQcO'#DZOOQR-E7g-E7gOOQR7+$v7+$vOOQR1G/^1G/^OOQR7+$|7+$|O:QOWO7+$|OOQP7+%S7+%SO:VOaO7+%SO:_OaO7+%SOOQP1G/k1G/kOOQO1G/Q1G/QOOQO1G/W1G/WOOQR,59t,59tO:jQgO,59tOOQR,59u,59uO#|QfO,59uOOQR<<Hh<<HhOOQP<<Hn<<HnO:zOaO<<HnOOQR1G/`1G/`OOQR1G/a1G/aOOQPAN>YAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]O!g!YO~OP!_O!V[OQaX!`aX~OPaXQaX!VaX!`aX~P#|OP!bOQ!cO!V[O~OP_O!V[O~P#|OWROXROY!fOcPOqQObfXmfXofXpfX~OWROXRO[!hOcPOqQObhXmhXohXphX~ObeXmlXoeX~ObkXokX~P%OOm!kO~Om!lObnPonP~P%OOb!pOo!oO~Ob!pO~P!bOm!sOosXpsX~OosXpsX~P%OOm!uOotPptP~P%OOo!xOp!yO~Op!yO~P#WOS!|O!a#OO!b#OO~OUyX!ayX!byX!dyX~P#|Om#QO~OU#SO!a#UO!b#UO!d#RO~Om#WOUzX!azX!bzX!dzX~O]#XO~O!b#XO!g#YO~O^#ZO!b#XO!g#YO~OP!RXQ!RX!V!RX!`!RXS!RX!a!RX!b!RXU!RXm!RX!d!RX~P&aOP!TXQ!TX!V!TX!`!TXS!TX!a!TX!b!TXU!TXm!TX!d!TX~P&aO!b#^O!g#^O~O^#_O!b#^O!f#`O!g#^O~O^#_O!W#aO!b#^O!g#^O~OPaaQaa!Vaa!`aa~P#|OP#cO!V[OQ!XX!`!XX~OP!XXQ!XX!V!XX!`!XX~P#|OP_O!V[OQ!_X!`!_X~P#|OWROXROcPOqQObgXmgXogXpgX~OWROXROcPOqQObiXmiXoiXpiX~Obkaoka~P%OObnXonX~P%OOm#kO~Ob#lOo!oO~Oosapsa~P%OOotXptX~P%OOm#pO~Oo!xOp#qO~OSwP!awP!bwP~P#|OS!|O!a#vO!b#vO~OUya!aya!bya!dya~P#|Om#xO~P%OOm#{OU}P!a}P!b}P!d}P~P#|OU#SO!a$OO!b$OO!d#RO~O]$QO~O!b$QO!g$RO~O!b$SO!g$SO~O^$TO!b$SO!g$SO~O^$TO!b$SO!f$UO!g$SO~OP!XaQ!Xa!V!Xa!`!Xa~P#|Obnaona~P%OOotapta~P%OOo!xO~OU|X!a|X!b|X!d|X~P#|Om$ZO~Om$]OU}X!a}X!b}X!d}X~O]$^O~O!b$_O!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:`⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document`,maxTerm:74,context:z,nodeProps:[[`isolate`,-3,8,9,14,``],[`openedBy`,18,`[`,32,`{`],[`closedBy`,19,`]`,33,`}`]],propSources:[de],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[V,H,le,ue,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),pe=e({yaml:()=>$,yamlLanguage:()=>Q}),Q=a.define({name:`yaml`,parser:fe.configure({props:[t.add({Stream:e=>{for(let t=e.node.resolve(e.pos,-1);t&&t.to>=e.pos;t=t.parent){if(t.name==`BlockLiteralContent`&&t.from<t.to)return e.baseIndentFor(t);if(t.name==`BlockLiteral`)return e.baseIndentFor(t)+e.unit;if(t.name==`BlockSequence`||t.name==`BlockMapping`)return e.column(t.firstChild.from,1);if(t.name==`QuotedLiteral`)return null;if(t.name==`Literal`){let n=e.column(t.from,1);if(n==e.lineIndent(t.from,1))return n;if(t.to>e.pos)return null}}return null},FlowMapping:r({closing:`}`}),FlowSequence:r({closing:`]`})}),o.add({"FlowMapping FlowSequence":s,"Item Pair BlockLiteral":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:`#`},indentOnInput:/^\s*[\]\}]$/}});function $(){return new i(Q)}c.meta;export{$ as n,pe as t};
|
|
1
|
+
import{r as e}from"./chunk-CYidjpOJ.js";import{E as t,R as n,m as r,o as i,r as a,x as o,y as s,z as c}from"./dist-C_x1-g67.js";import{n as l,r as ee,t as te}from"./dist-CTEsrXGw.js";var u=63,d=64,f=1,p=2,m=3,h=4,g=5,_=6,v=7,y=65,b=66,ne=8,x=9,S=10,C=11,w=12,T=13,E=19,D=20,O=29,re=33,ie=34,ae=47,oe=0,k=1,A=2,j=3,M=4,N=class{constructor(e,t,n){this.parent=e,this.depth=t,this.type=n,this.hash=(e?e.hash+e.hash<<8:0)+t+(t<<4)+n}};N.top=new N(null,-1,oe);function P(e,t){for(let n=0,r=t-e.pos-1;;r--,n++){let t=e.peek(r);if(I(t)||t==-1)return n}}function F(e){return e==32||e==9}function I(e){return e==10||e==13}function L(e){return F(e)||I(e)}function R(e){return e<0||L(e)}var z=new te({start:N.top,reduce(e,t){return e.type==j&&(t==D||t==ie)?e.parent:e},shift(e,t,n,r){if(t==m)return new N(e,P(r,r.pos),k);if(t==y||t==g)return new N(e,P(r,r.pos),A);if(t==u)return e.parent;if(t==E||t==re)return new N(e,0,j);if(t==T&&e.type==M)return e.parent;if(t==ae){let t=/[1-9]/.exec(r.read(r.pos,n.pos));if(t)return new N(e,e.depth+ +t[0],M)}return e},hash(e){return e.hash}});function B(e,t,n=0){return e.peek(n)==t&&e.peek(n+1)==t&&e.peek(n+2)==t&&R(e.peek(n+3))}var V=new l((e,t)=>{if(e.next==-1&&t.canShift(d))return e.acceptToken(d);let n=e.peek(-1);if((I(n)||n<0)&&t.context.type!=j){if(B(e,45))if(t.canShift(u))e.acceptToken(u);else return e.acceptToken(f,3);if(B(e,46))if(t.canShift(u))e.acceptToken(u);else return e.acceptToken(p,3);let n=0;for(;e.next==32;)n++,e.advance();(n<t.context.depth||n==t.context.depth&&t.context.type==k&&(e.next!=45||!R(e.peek(1))))&&e.next!=-1&&!I(e.next)&&e.next!=35&&e.acceptToken(u,-n)}},{contextual:!0}),H=new l((e,t)=>{if(t.context.type==j){e.next==63&&(e.advance(),R(e.next)&&e.acceptToken(v));return}if(e.next==45)e.advance(),R(e.next)&&e.acceptToken(t.context.type==k&&t.context.depth==P(e,e.pos-1)?h:m);else if(e.next==63)e.advance(),R(e.next)&&e.acceptToken(t.context.type==A&&t.context.depth==P(e,e.pos-1)?_:g);else{let n=e.pos;for(;;)if(F(e.next)){if(e.pos==n)return;e.advance()}else if(e.next==33)K(e);else if(e.next==38)q(e);else if(e.next==42){q(e);break}else if(e.next==39||e.next==34){if(J(e,!0))break;return}else if(e.next==91||e.next==123){if(!se(e))return;break}else{Z(e,!0,!1,0);break}for(;F(e.next);)e.advance();if(e.next==58){if(e.pos==n&&t.canShift(O))return;R(e.peek(1))&&e.acceptTokenTo(t.context.type==A&&t.context.depth==P(e,n)?b:y,n)}}},{contextual:!0});function U(e){return e>32&&e<127&&e!=34&&e!=37&&e!=44&&e!=60&&e!=62&&e!=92&&e!=94&&e!=96&&e!=123&&e!=124&&e!=125}function W(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function G(e,t){return e.next==37?(e.advance(),W(e.next)&&e.advance(),W(e.next)&&e.advance(),!0):U(e.next)||t&&e.next==44?(e.advance(),!0):!1}function K(e){if(e.advance(),e.next==60){for(e.advance();;)if(!G(e,!0)){e.next==62&&e.advance();break}}else for(;G(e,!1););}function q(e){for(e.advance();!R(e.next)&&Y(e.next)!=`f`;)e.advance()}function J(e,t){let n=e.next,r=!1,i=e.pos;for(e.advance();;){let a=e.next;if(a<0)break;if(e.advance(),a==n)if(a==39)if(e.next==39)e.advance();else break;else break;else if(a==92&&n==34)e.next>=0&&e.advance();else if(I(a)){if(t)return!1;r=!0}else if(t&&e.pos>=i+1024)return!1}return!r}function se(e){for(let t=[],n=e.pos+1024;;)if(e.next==91||e.next==123)t.push(e.next),e.advance();else if(e.next==39||e.next==34){if(!J(e,!0))return!1}else if(e.next==93||e.next==125){if(t[t.length-1]!=e.next-2)return!1;if(t.pop(),e.advance(),!t.length)return!0}else if(e.next<0||e.pos>n||I(e.next))return!1;else e.advance()}var ce=`iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif`;function Y(e){return e<33?`u`:e>125?`s`:ce[e-33]}function X(e,t){let n=Y(e);return n!=`u`&&!(t&&n==`f`)}function Z(e,t,n,r){if(Y(e.next)==`s`||(e.next==63||e.next==58||e.next==45)&&X(e.peek(1),n))e.advance();else return!1;let i=e.pos;for(;;){let a=e.next,o=0,s=r+1;for(;L(a);){if(I(a)){if(t)return!1;s=0}else s++;a=e.peek(++o)}if(!(a>=0&&(a==58?X(e.peek(o+1),n):a==35?e.peek(o-1)!=32:X(a,n)))||!n&&s<=r||s==0&&!n&&(B(e,45,o)||B(e,46,o)))break;if(t&&Y(a)==`f`)return!1;for(let t=o;t>=0;t--)e.advance();if(t&&e.pos>i+1024)return!1}return!0}var le=new l((e,t)=>{if(e.next==33)K(e),e.acceptToken(w);else if(e.next==38||e.next==42){let t=e.next==38?S:C;q(e),e.acceptToken(t)}else e.next==39||e.next==34?(J(e,!1),e.acceptToken(x)):Z(e,!1,t.context.type==j,t.context.depth)&&e.acceptToken(ne)}),ue=new l((e,t)=>{let n=t.context.type==M?t.context.depth:-1,r=e.pos;scan:for(;;){let i=0,a=e.next;for(;a==32;)a=e.peek(++i);if(!i&&(B(e,45,i)||B(e,46,i))||!I(a)&&(n<0&&(n=Math.max(t.context.depth+1,i)),i<n))break;for(;;){if(e.next<0)break scan;let t=I(e.next);if(e.advance(),t)continue scan;r=e.pos}}e.acceptTokenTo(T,r)}),de=n({DirectiveName:c.keyword,DirectiveContent:c.attributeValue,"DirectiveEnd DocEnd":c.meta,QuotedLiteral:c.string,BlockLiteralHeader:c.special(c.string),BlockLiteralContent:c.content,Literal:c.content,"Key/Literal Key/QuotedLiteral":c.definition(c.propertyName),"Anchor Alias":c.labelName,Tag:c.typeName,Comment:c.lineComment,": , -":c.separator,"?":c.punctuation,"[ ]":c.squareBracket,"{ }":c.brace}),fe=ee.deserialize({version:14,states:"5lQ!ZQgOOO#PQfO'#CpO#uQfO'#DOOOQR'#Dv'#DvO$qQgO'#DRO%gQdO'#DUO%nQgO'#DUO&ROaO'#D[OOQR'#Du'#DuO&{QgO'#D^O'rQgO'#D`OOQR'#Dt'#DtO(iOqO'#DbOOQP'#Dj'#DjO(zQaO'#CmO)YQgO'#CmOOQP'#Cm'#CmQ)jQaOOQ)uQgOOQ]QgOOO*PQdO'#CrO*nQdO'#CtOOQO'#Dw'#DwO+]Q`O'#CxO+hQdO'#CwO+rQ`O'#CwOOQO'#Cv'#CvO+wQdO'#CvOOQO'#Cq'#CqO,UQ`O,59[O,^QfO,59[OOQR,59[,59[OOQO'#Cx'#CxO,eQ`O'#DPO,pQdO'#DPOOQO'#Dx'#DxO,zQdO'#DxO-XQ`O,59jO-aQfO,59jOOQR,59j,59jOOQR'#DS'#DSO-hQcO,59mO-sQgO'#DVO.TQ`O'#DVO.YQcO,59pOOQR'#DX'#DXO#|QfO'#DWO.hQcO'#DWOOQR,59v,59vO.yOWO,59vO/OOaO,59vO/WOaO,59vO/cQgO'#D_OOQR,59x,59xO0VQgO'#DaOOQR,59z,59zOOQP,59|,59|O0yOaO,59|O1ROaO,59|O1aOqO,59|OOQP-E7h-E7hO1oQgO,59XOOQP,59X,59XO2PQaO'#DeO2_QgO'#DeO2oQgO'#DkOOQP'#Dk'#DkQ)jQaOOO3PQdO'#CsOOQO,59^,59^O3kQdO'#CuOOQO,59`,59`OOQO,59c,59cO4VQdO,59cO4aQdO'#CzO4kQ`O'#CzOOQO,59b,59bOOQU,5:Q,5:QOOQR1G.v1G.vO4pQ`O1G.vOOQU-E7d-E7dO4xQdO,59kOOQO,59k,59kO5SQdO'#DQO5^Q`O'#DQOOQO,5:d,5:dOOQU,5:R,5:ROOQR1G/U1G/UO5cQ`O1G/UOOQU-E7e-E7eO5kQgO'#DhO5xQcO1G/XOOQR1G/X1G/XOOQR,59q,59qO6TQgO,59qO6eQdO'#DiO6lQgO'#DiO7PQcO1G/[OOQR1G/[1G/[OOQR,59r,59rO#|QfO,59rOOQR1G/b1G/bO7_OWO1G/bO7dOaO1G/bOOQR,59y,59yOOQR,59{,59{OOQP1G/h1G/hO7lOaO1G/hO7tOaO1G/hO8POaO1G/hOOQP1G.s1G.sO8_QgO,5:POOQP,5:P,5:POOQP,5:V,5:VOOQP-E7i-E7iOOQO,59_,59_OOQO,59a,59aOOQO1G.}1G.}OOQO,59f,59fO8oQdO,59fOOQR7+$b7+$bP,XQ`O'#DfOOQO1G/V1G/VOOQO,59l,59lO8yQdO,59lOOQR7+$p7+$pP9TQ`O'#DgOOQR'#DT'#DTOOQR,5:S,5:SOOQR-E7f-E7fOOQR7+$s7+$sOOQR1G/]1G/]O9YQgO'#DYO9jQ`O'#DYOOQR,5:T,5:TO#|QfO'#DZO9oQcO'#DZOOQR-E7g-E7gOOQR7+$v7+$vOOQR1G/^1G/^OOQR7+$|7+$|O:QOWO7+$|OOQP7+%S7+%SO:VOaO7+%SO:_OaO7+%SOOQP1G/k1G/kOOQO1G/Q1G/QOOQO1G/W1G/WOOQR,59t,59tO:jQgO,59tOOQR,59u,59uO#|QfO,59uOOQR<<Hh<<HhOOQP<<Hn<<HnO:zOaO<<HnOOQR1G/`1G/`OOQR1G/a1G/aOOQPAN>YAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]O!g!YO~OP!_O!V[OQaX!`aX~OPaXQaX!VaX!`aX~P#|OP!bOQ!cO!V[O~OP_O!V[O~P#|OWROXROY!fOcPOqQObfXmfXofXpfX~OWROXRO[!hOcPOqQObhXmhXohXphX~ObeXmlXoeX~ObkXokX~P%OOm!kO~Om!lObnPonP~P%OOb!pOo!oO~Ob!pO~P!bOm!sOosXpsX~OosXpsX~P%OOm!uOotPptP~P%OOo!xOp!yO~Op!yO~P#WOS!|O!a#OO!b#OO~OUyX!ayX!byX!dyX~P#|Om#QO~OU#SO!a#UO!b#UO!d#RO~Om#WOUzX!azX!bzX!dzX~O]#XO~O!b#XO!g#YO~O^#ZO!b#XO!g#YO~OP!RXQ!RX!V!RX!`!RXS!RX!a!RX!b!RXU!RXm!RX!d!RX~P&aOP!TXQ!TX!V!TX!`!TXS!TX!a!TX!b!TXU!TXm!TX!d!TX~P&aO!b#^O!g#^O~O^#_O!b#^O!f#`O!g#^O~O^#_O!W#aO!b#^O!g#^O~OPaaQaa!Vaa!`aa~P#|OP#cO!V[OQ!XX!`!XX~OP!XXQ!XX!V!XX!`!XX~P#|OP_O!V[OQ!_X!`!_X~P#|OWROXROcPOqQObgXmgXogXpgX~OWROXROcPOqQObiXmiXoiXpiX~Obkaoka~P%OObnXonX~P%OOm#kO~Ob#lOo!oO~Oosapsa~P%OOotXptX~P%OOm#pO~Oo!xOp#qO~OSwP!awP!bwP~P#|OS!|O!a#vO!b#vO~OUya!aya!bya!dya~P#|Om#xO~P%OOm#{OU}P!a}P!b}P!d}P~P#|OU#SO!a$OO!b$OO!d#RO~O]$QO~O!b$QO!g$RO~O!b$SO!g$SO~O^$TO!b$SO!g$SO~O^$TO!b$SO!f$UO!g$SO~OP!XaQ!Xa!V!Xa!`!Xa~P#|Obnaona~P%OOotapta~P%OOo!xO~OU|X!a|X!b|X!d|X~P#|Om$ZO~Om$]OU}X!a}X!b}X!d}X~O]$^O~O!b$_O!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:`⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document`,maxTerm:74,context:z,nodeProps:[[`isolate`,-3,8,9,14,``],[`openedBy`,18,`[`,32,`{`],[`closedBy`,19,`]`,33,`}`]],propSources:[de],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[V,H,le,ue,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),pe=e({yaml:()=>$,yamlLanguage:()=>Q}),Q=a.define({name:`yaml`,parser:fe.configure({props:[t.add({Stream:e=>{for(let t=e.node.resolve(e.pos,-1);t&&t.to>=e.pos;t=t.parent){if(t.name==`BlockLiteralContent`&&t.from<t.to)return e.baseIndentFor(t);if(t.name==`BlockLiteral`)return e.baseIndentFor(t)+e.unit;if(t.name==`BlockSequence`||t.name==`BlockMapping`)return e.column(t.firstChild.from,1);if(t.name==`QuotedLiteral`)return null;if(t.name==`Literal`){let n=e.column(t.from,1);if(n==e.lineIndent(t.from,1))return n;if(t.to>e.pos)return null}}return null},FlowMapping:r({closing:`}`}),FlowSequence:r({closing:`]`})}),o.add({"FlowMapping FlowSequence":s,"Item Pair BlockLiteral":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:`#`},indentOnInput:/^\s*[\]\}]$/}});function $(){return new i(Q)}c.meta;export{$ as n,pe as t};
|