@inkeep/open-knowledge 0.25.0-beta.10 → 0.25.0-beta.3
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/alias-JE7RI5QX-DmHh8yog.mjs +1 -0
- package/dist/{architectureDiagram-Q4EWVU46-Dwlx8W7J.mjs → architectureDiagram-Q4EWVU46-C9cSuC8m.mjs} +2 -2
- package/dist/assets/skills/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +1 -1
- package/dist/awk2-POPGKRAI-C7696e-z.mjs +1 -0
- package/dist/base64-4YMZCVJ5-BIHNwDj2.mjs +1 -0
- package/dist/basename-AA2KJYZQ-Dcz4Ls85.mjs +1 -0
- package/dist/bash-IJWYRKFO-DgruzS3i.mjs +1 -0
- package/dist/{blockDiagram-DXYQGD6D-D_l7RLVS.mjs → blockDiagram-DXYQGD6D-Dr7L7QsL.mjs} +2 -2
- package/dist/{build-CCNlCFyu.mjs → build-CN003PPg.mjs} +1 -1
- package/dist/build-Ca40rJCO.mjs +1 -0
- package/dist/{c4Diagram-AHTNJAMY-QadWjRVL.mjs → c4Diagram-AHTNJAMY-CPm6kKNR.mjs} +2 -2
- package/dist/cat-RDUMLXKC-BJJIS9lB.mjs +1 -0
- package/dist/channel-DE79NHCf.mjs +2 -0
- package/dist/chmod-SYMGL4JA-C1Ie7s0s.mjs +1 -0
- package/dist/{chokidar-D1eNAlbX.mjs → chokidar-oNPiNLWX.mjs} +3 -3
- package/dist/{chunk-24IMIIXA-BoP5OA93.mjs → chunk-24IMIIXA-DaS5XS55.mjs} +2 -2
- package/dist/{chunk-336JU56O-5giJrfiv.mjs → chunk-336JU56O-KTMEs5Wk.mjs} +2 -2
- package/dist/{chunk-3THT3N7L-CBWmNncQ.mjs → chunk-3THT3N7L-B1WzJUh4.mjs} +1 -1
- package/dist/{chunk-426QAEUC-BGn1TCpd.mjs → chunk-426QAEUC-DUpKwtVu.mjs} +2 -2
- package/dist/{chunk-44UOCSGV-B6GSHp1s.mjs → chunk-44UOCSGV-BZ6LfyW2.mjs} +1 -1
- package/dist/{chunk-4TB4RGXK-DWREoP49.mjs → chunk-4TB4RGXK-Ct6WjPoY.mjs} +2 -2
- package/dist/{chunk-5FUZZQ4R-DFR5eSi-.mjs → chunk-5FUZZQ4R-Bf6nbyQG.mjs} +2 -2
- package/dist/{chunk-5PVQY5BW-C5V4E1lO.mjs → chunk-5PVQY5BW-DUXm3tDu.mjs} +2 -2
- package/dist/{chunk-5QMZ5MUS-_0tQyQsf.mjs → chunk-5QMZ5MUS-BwpNU33k.mjs} +2 -2
- package/dist/{chunk-62RKD26F-K5NW6_Si.mjs → chunk-62RKD26F-DebCAz0V.mjs} +2 -2
- package/dist/{chunk-A4JSPFCI-BA544Kdp.mjs → chunk-A4JSPFCI-CQJoYugB.mjs} +2 -2
- package/dist/{chunk-A5O5YHGN-Kbs3GRxW.mjs → chunk-A5O5YHGN-DApqA6Ow.mjs} +2 -2
- package/dist/{chunk-BBXLRYSX-OVlWa2B-.mjs → chunk-BBXLRYSX-XWD4jM9A.mjs} +2 -2
- package/dist/{chunk-BRGMQKJV-DtyxDw61.mjs → chunk-BRGMQKJV-CZUkYGAZ.mjs} +3 -3
- package/dist/{chunk-CR5AFCPT-BD_awIEP.mjs → chunk-CR5AFCPT-DN7EAdus.mjs} +2 -2
- package/dist/{chunk-CWQS3NFK-DNm_iIwd.mjs → chunk-CWQS3NFK-BkE4vqrf.mjs} +1 -1
- package/dist/{chunk-D6CWQ5DW-CaV8X9is.mjs → chunk-D6CWQ5DW-CF9bBHyK.mjs} +2 -2
- package/dist/{chunk-DXB73IDG-Bx-Ikbnu.mjs → chunk-DXB73IDG-F_tmy-Lz.mjs} +1 -1
- package/dist/{chunk-EDXVE4YY-B_wA-KGy.mjs → chunk-EDXVE4YY-CI4s3JHP.mjs} +2 -2
- package/dist/{chunk-ENJZ2VHE-DwiyImt2.mjs → chunk-ENJZ2VHE-CQwjtY5A.mjs} +2 -2
- package/dist/{chunk-F55TLFGB-AEzanSfe.mjs → chunk-F55TLFGB-BZSRX-Vi.mjs} +2 -2
- package/dist/{chunk-FEIOJCZD-D6YUa1Xl.mjs → chunk-FEIOJCZD-NzTooVTc.mjs} +2 -2
- package/dist/{chunk-GFQRA5P5-DigWkxW2.mjs → chunk-GFQRA5P5-DbAN9IDm.mjs} +1 -1
- package/dist/{chunk-GOV5EKKI-x0jEbztj.mjs → chunk-GOV5EKKI-CDGzZWfT.mjs} +2 -2
- package/dist/{chunk-HWBSOZZR-DaPTwPxK.mjs → chunk-HWBSOZZR-DQTTl_pa.mjs} +3 -3
- package/dist/{chunk-I57KEIP3-DpiJySG6.mjs → chunk-I57KEIP3-DSoF8c_0.mjs} +2 -2
- package/dist/{chunk-ICPOFSXX-D0MVsm4H.mjs → chunk-ICPOFSXX-C--tVIY5.mjs} +2 -2
- package/dist/{chunk-IPJHKYVM-DlQCOz2c.mjs → chunk-IPJHKYVM-CUKythEA.mjs} +1 -1
- package/dist/{chunk-J642UCRS-C1PS8Hwf.mjs → chunk-J642UCRS-HjD8qpZD.mjs} +2 -2
- package/dist/{chunk-LPQPILI2-GOcK96AE.mjs → chunk-LPQPILI2-OoVL_l9j.mjs} +2 -2
- package/dist/{chunk-MDDMCKUK-CuQlmIio.mjs → chunk-MDDMCKUK-ChL1CU4m.mjs} +2 -2
- package/dist/{chunk-MIZPJHVH-Bo1j-3C3.mjs → chunk-MIZPJHVH-BD7tHmLL.mjs} +2 -2
- package/dist/{chunk-MLXIYONF-DRuy-_4a.mjs → chunk-MLXIYONF-CV7WHBm-.mjs} +2 -2
- package/dist/{chunk-NAERJDUW-0UrOIQ6q.mjs → chunk-NAERJDUW-Cyg2DAzO.mjs} +2 -2
- package/dist/{chunk-NUYSJFDK-BvwS54ju.mjs → chunk-NUYSJFDK-BH2DjyxF.mjs} +2 -2
- package/dist/{chunk-NYQYO467-KfHLMnUW.mjs → chunk-NYQYO467-CY88QCuT.mjs} +2 -2
- package/dist/{chunk-OARHFVLG-Csb_cJVS.mjs → chunk-OARHFVLG-dXiYYC4o.mjs} +2 -2
- package/dist/{chunk-OCLXQMOG-CCPg8vjW.mjs → chunk-OCLXQMOG-DOkdFgyf.mjs} +2 -2
- package/dist/{chunk-OCS6LSEM-DkbaohJu.mjs → chunk-OCS6LSEM-Bcx6uxmm.mjs} +2 -2
- package/dist/{chunk-OJDRYQWQ-LGuZyK6R.mjs → chunk-OJDRYQWQ-CmrD0Dg2.mjs} +1 -1
- package/dist/{chunk-OL3S66CO-CBdL6pp1.mjs → chunk-OL3S66CO-CWEDi2F_.mjs} +2 -2
- package/dist/{chunk-OYMX7WX6-BrOfVMt8.mjs → chunk-OYMX7WX6-Dvg98Zb-.mjs} +2 -2
- package/dist/{chunk-PBXLG62G-C7MEQojr.mjs → chunk-PBXLG62G-CpvczNyQ.mjs} +2 -2
- package/dist/{chunk-R6VWJ2ZL-XKIhMSUi.mjs → chunk-R6VWJ2ZL-BVeTwIsz.mjs} +1 -1
- package/dist/{chunk-SYMJJMQ4-DUF5hY-A.mjs → chunk-SYMJJMQ4-jdmKoBFb.mjs} +2 -2
- package/dist/{chunk-T56QNPHK-B6DfVzfs.mjs → chunk-T56QNPHK-DmDxJbbD.mjs} +2 -2
- package/dist/{chunk-TLSUDHID-SuIGgADo.mjs → chunk-TLSUDHID-CSDR438C.mjs} +2 -2
- package/dist/{chunk-TOMNU26N-Dw9Enq1O.mjs → chunk-TOMNU26N-CrDa7MpH.mjs} +2 -2
- package/dist/{chunk-U2HBQHQK-DB1SzWgs.mjs → chunk-U2HBQHQK-C1Q2DiEX.mjs} +2 -2
- package/dist/{chunk-UNYNJIFU-HSzsM3a6.mjs → chunk-UNYNJIFU-CZ2Mla0s.mjs} +3 -3
- package/dist/{chunk-VLGZJRPG-CHtdu0KZ.mjs → chunk-VLGZJRPG-DpYP_EVp.mjs} +2 -2
- package/dist/{chunk-X2U36JSP-CqOGcGN3.mjs → chunk-X2U36JSP-BiF0R9ys.mjs} +2 -2
- package/dist/{chunk-XHM67O4N-2lBQUjKO.mjs → chunk-XHM67O4N-D3pxE_Og.mjs} +1 -1
- package/dist/{chunk-XORM457F-CJbQLVgU.mjs → chunk-XORM457F-BuPOSqOe.mjs} +2 -2
- package/dist/{chunk-YCFVLTST-CKzPj8PR.mjs → chunk-YCFVLTST-DsF45PbT.mjs} +2 -2
- package/dist/{chunk-YFG2CMIF-DBRGs_rZ.mjs → chunk-YFG2CMIF-DjdwxBNc.mjs} +2 -2
- package/dist/{chunk-YNYSPYQ5-DHter9G3.mjs → chunk-YNYSPYQ5-gU4-j5DO.mjs} +1 -1
- package/dist/{chunk-YS3AZT3J-DwQ3GyQR.mjs → chunk-YS3AZT3J-CB0wWPLc.mjs} +2 -2
- package/dist/{chunk-YTNYSM6T-DcovOiF_.mjs → chunk-YTNYSM6T-DpkSVTln.mjs} +2 -2
- package/dist/{chunk-YZCP3GAM-CkC6DoBJ.mjs → chunk-YZCP3GAM-DRdMIQsB.mjs} +2 -2
- package/dist/{chunk-Z6LRHWXI-BLaYoFnT.mjs → chunk-Z6LRHWXI-EsbeaQ3V.mjs} +2 -2
- package/dist/{chunk-ZZ45TVLE-CXznFlWR.mjs → chunk-ZZ45TVLE-DwKS4e_N.mjs} +2 -2
- package/dist/classDiagram-6PBFFD2Q-BrpY9pLd.mjs +2 -0
- package/dist/classDiagram-v2-HSJHXN6E-DDV6mz7Y.mjs +2 -0
- package/dist/clear-5CZ5X4YR-CHSnzs8i.mjs +1 -0
- package/dist/cli.mjs +59 -71
- package/dist/clone-BD_JFVST.mjs +2 -0
- package/dist/column-WLPMMSTS-DTBoovzp.mjs +1 -0
- package/dist/comm-5SLSESQG-DT3SY7zS.mjs +1 -0
- package/dist/constants-B43V8fIN.mjs +2 -0
- package/dist/cp-XOYR4ABJ-Bs6Rpbb2.mjs +1 -0
- package/dist/{curl-47BFPSFW-ClMENMWY.mjs → curl-47BFPSFW-xgS5bDTx.mjs} +2 -2
- package/dist/cut-OPC3VAGB-Bm1HBn07.mjs +1 -0
- package/dist/{dagre-KV5264BT-C5SrnhX7.mjs → dagre-KV5264BT-Ci7CcQr4.mjs} +2 -2
- package/dist/{dagre-LJG-5J7U.mjs → dagre-L3rg9n9q.mjs} +2 -2
- package/dist/date-DD7FVA2V-Dv3os04S.mjs +1 -0
- package/dist/{diagram-5BDNPKRD-biBuhEzo.mjs → diagram-5BDNPKRD-BM3C88Zx.mjs} +2 -2
- package/dist/{diagram-G4DWMVQ6-CHhS5h96.mjs → diagram-G4DWMVQ6-Dt1Kt-mj.mjs} +2 -2
- package/dist/{diagram-MMDJMWI5-BgulNwvp.mjs → diagram-MMDJMWI5-DomPsk0L.mjs} +2 -2
- package/dist/{diagram-TYMM5635-DpmgERPD.mjs → diagram-TYMM5635-eOfCqwhs.mjs} +2 -2
- package/dist/diff-HJF2MPDN-Di-oK2tx.mjs +1 -0
- package/dist/dirname-LEMTZZFS-D-u8wJ0b.mjs +1 -0
- package/dist/{dist-H-OAf-7x.mjs → dist-CMJUtzX1.mjs} +1 -1
- package/dist/{dist-DyW0okj3.mjs → dist-CWHBXHzy.mjs} +16 -16
- package/dist/du-WO2ENHXQ-CO_jR0w6.mjs +1 -0
- package/dist/echo-O45JWWI2-RBT2dq5Y.mjs +1 -0
- package/dist/env-5EPCWSXR-DSwwgRF5.mjs +1 -0
- package/dist/{erDiagram-SMLLAGMA-BNISHenz.mjs → erDiagram-SMLLAGMA-CPcwhEue.mjs} +2 -2
- package/dist/{esm-CsQUg9js.mjs → esm-BLMtE3s6.mjs} +1 -1
- package/dist/{esm-BQ4-CT8p.mjs → esm-BS2W3Uzl.mjs} +1 -1
- package/dist/expand-DTNXU4LQ-CtzV8vlq.mjs +1 -0
- package/dist/expansion-ENLSRCXJ-CNi8PTVy.mjs +1 -0
- package/dist/expr-5T3UU5KE-BOXtVHu2.mjs +1 -0
- package/dist/file-ZIGAJ4YS-Bt-1Wusv.mjs +1 -0
- package/dist/find-TPUOAIUQ-CJd25AiD.mjs +1 -0
- package/dist/{flag-coverage-QT4N2Z44-BlPYKPtd.mjs → flag-coverage-QT4N2Z44-hqAAghSo.mjs} +2 -2
- package/dist/{flowDiagram-DWJPFMVM-CFu645eN.mjs → flowDiagram-DWJPFMVM-WnIxEgSt.mjs} +2 -2
- package/dist/fold-LDSORVYE-DZ2L21IZ.mjs +1 -0
- package/dist/{ganttDiagram-T4ZO3ILL-DhKUbpmR.mjs → ganttDiagram-T4ZO3ILL-BJEuIZ2X.mjs} +2 -2
- package/dist/{getMachineId-bsd-DC8LkcdK.mjs → getMachineId-bsd-B7ue3N1o.mjs} +2 -2
- package/dist/{getMachineId-bsd-Bt-frlcx.mjs → getMachineId-bsd-DYQqYqxN.mjs} +2 -2
- package/dist/{getMachineId-bsd-DFsE-K5i.mjs → getMachineId-bsd-ucL-2FoT.mjs} +2 -2
- package/dist/{getMachineId-darwin-B9GQUU0e.mjs → getMachineId-darwin-BNCkZc-0.mjs} +2 -2
- package/dist/{getMachineId-darwin-DMNBrKWp.mjs → getMachineId-darwin-CSTYV_Bd.mjs} +2 -2
- package/dist/{getMachineId-darwin-DRxpszyZ.mjs → getMachineId-darwin-DWmBOUuk.mjs} +2 -2
- package/dist/{getMachineId-linux-D9dNX75P.mjs → getMachineId-linux-BaNp1ZEm.mjs} +2 -2
- package/dist/{getMachineId-linux-DOv7iOg-.mjs → getMachineId-linux-Bv6oOXxT.mjs} +2 -2
- package/dist/{getMachineId-linux-B5vQV4C7.mjs → getMachineId-linux-tTgUzx-Z.mjs} +2 -2
- package/dist/{getMachineId-unsupported-D6sWFm_K.mjs → getMachineId-unsupported-Kf9p6LJQ.mjs} +2 -2
- package/dist/{getMachineId-unsupported-DdAD6gRb.mjs → getMachineId-unsupported-fh_7WYkB.mjs} +2 -2
- package/dist/{getMachineId-unsupported-BQ6KY9w-.mjs → getMachineId-unsupported-iDvWGFBk.mjs} +2 -2
- package/dist/{getMachineId-win-BZsHRo32.mjs → getMachineId-win-Bo1_B38N.mjs} +2 -2
- package/dist/{getMachineId-win-CpDtoa22.mjs → getMachineId-win-DHmdubaR.mjs} +2 -2
- package/dist/{getMachineId-win-BMQSc3Xj.mjs → getMachineId-win-DQ2s9Z1n.mjs} +2 -2
- package/dist/{gh-detect-Ck0zE5NU.mjs → gh-detect-BIaONQmT.mjs} +3 -3
- package/dist/{git-handle-DY9lXoT3-CfssnuIB.mjs → git-handle-DY9lXoT3-Cmzgvwd8.mjs} +4 -4
- package/dist/git-handle-DdgvPBh6-Dv4DjLoy.mjs +1 -0
- package/dist/{gitGraphDiagram-UUTBAWPF-Cwemn6Ch.mjs → gitGraphDiagram-UUTBAWPF-BqA8KMTw.mjs} +2 -2
- package/dist/{graphlib-5CpUx0Yq.mjs → graphlib-BI4uS4Lx.mjs} +2 -2
- package/dist/grep-3AIAIJVR-CzG01gPs.mjs +1 -0
- package/dist/gzip-AQXSGOVS-B_BV2fa3.mjs +1 -0
- package/dist/head-HT2B6D2J-CjBr6WQ1.mjs +1 -0
- package/dist/help-VVWX7SA5-C4HsVKec.mjs +1 -0
- package/dist/history-J4QRNGRO-1CYG7cs0.mjs +1 -0
- package/dist/hostname-BK6HG2DE-BLS00ZWn.mjs +1 -0
- package/dist/html-to-markdown-TFCECAGV-5Fopg2Q5.mjs +1 -0
- package/dist/index.d.mts +1 -40
- package/dist/index.mjs +1 -1
- package/dist/{infoDiagram-42DDH7IO-D0XeM9Mm.mjs → infoDiagram-42DDH7IO-0lM1lRCH.mjs} +2 -2
- package/dist/init-CTGKTybp.mjs +1 -0
- package/dist/init-VRZmGeiJ.mjs +317 -0
- package/dist/{ishikawaDiagram-UXIWVN3A-vTBTHzHj.mjs → ishikawaDiagram-UXIWVN3A-j-jlqjJX.mjs} +2 -2
- package/dist/join-GG2LDHE5-C_A2RnwJ.mjs +1 -0
- package/dist/{journeyDiagram-VCZTEJTY-Dq1fLo6N.mjs → journeyDiagram-VCZTEJTY-BDX_OcrR.mjs} +2 -2
- package/dist/jq-ODXZBPLY-hdWY1RUY.mjs +1 -0
- package/dist/{js-exec-M6UR76J5-ZESSNIAK.mjs → js-exec-M6UR76J5-Cu6NIWHE.mjs} +2 -2
- package/dist/{kanban-definition-6JOO6SKY-B03_bODj.mjs → kanban-definition-6JOO6SKY-C5XJUD3U.mjs} +2 -2
- package/dist/{katex-Bif7Db7V.mjs → katex-DEJL_MaU.mjs} +1 -1
- package/dist/{lib-CCQO9uWA.mjs → lib-CItGM3rN.mjs} +2 -2
- package/dist/{libesm-_Wi8iuGI.mjs → libesm-Ob3yvbRV.mjs} +1 -1
- package/dist/{line-C62ka-l9.mjs → line-C6RZPh4T.mjs} +2 -2
- package/dist/ln-4TRFBYAT-CMm4PFgi.mjs +1 -0
- package/dist/loader-CU_qX_as.mjs +1 -0
- package/dist/{loader-Z9weMUfL.mjs → loader-Ccwo98t7.mjs} +3 -3
- package/dist/ls-KSXFZCWH-Beyjypib.mjs +1 -0
- package/dist/{lzma-BSEvzrCT.mjs → lzma-DBkyKSY9.mjs} +2 -2
- package/dist/md5sum-INMIK4DX-C2RH1Ljb.mjs +1 -0
- package/dist/{mermaid.core-LrO0u_wA.mjs → mermaid.core-CcmmzbTt.mjs} +3 -3
- package/dist/{mindmap-definition-QFDTVHPH-b0aFdJAS.mjs → mindmap-definition-QFDTVHPH-WLdthwDy.mjs} +2 -2
- package/dist/mkdir-TDEMSB6C-BeLs_C7x.mjs +1 -0
- package/dist/mv-Z6MORUFL-BDAoI0Wd.mjs +1 -0
- package/dist/nl-U5YJDM32-SP99R3HJ.mjs +1 -0
- package/dist/od-VJEF2UR5-BR0Ho1t5.mjs +1 -0
- package/dist/paste-7N6AFSDS-Bz3kd4hU.mjs +1 -0
- package/dist/{pieDiagram-DEJITSTG-C77h8TOO.mjs → pieDiagram-DEJITSTG-7oeIAT-R.mjs} +2 -2
- package/dist/preview-CekBtuZU.mjs +1 -0
- package/dist/{preview-DlyUih8P.mjs → preview-DTcYw4sX.mjs} +2 -2
- package/dist/printf-CX64KX2P-GrZNCK4M.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-QvRIx_do.js → ActivityModeContent-CNxdYTCc.js} +1 -1
- package/dist/public/assets/{DocumentContext-zL3ZbwDo.js → DocumentContext-bNGvFuJS.js} +1 -1
- package/dist/public/assets/{GraphPanel-DiyMfzQg.js → GraphPanel-D5yxV_ez.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-OxkUY14x.js → ManagedArtifactProperties-CRYWYGK4.js} +1 -1
- package/dist/public/assets/McpConsentDialogBody-Dr_AIi2H.js +1 -0
- package/dist/public/assets/{PropertyPanel-D9A27c2E.js → PropertyPanel-DgbQo3wG.js} +1 -1
- package/dist/public/assets/{SettingsDialogBody-cotnwVMw.js → SettingsDialogBody-CU-nEwde.js} +1 -1
- package/dist/public/assets/{SkillEditorActions-BsGotb40.js → SkillEditorActions-Bfh-iuK_.js} +1 -1
- package/dist/public/assets/{SourceEditor-BZ3cbLjs.js → SourceEditor-CAUoNOTU.js} +1 -1
- package/dist/public/assets/{TerminalPanel-XlICQw5o.js → TerminalPanel-Ds-ev2-D.js} +1 -1
- package/dist/public/assets/{config-validation-events-yB2QWKKJ.js → config-validation-events-DiOTHiAz.js} +1 -1
- package/dist/public/assets/{dist-BRGUidv4.js → dist-GmorMgHF.js} +6 -8
- package/dist/public/assets/{documents-events-DA8Q5ICz.js → documents-events-CSQluyCM.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-CP3Xa3us.js → file-tree-adapter-TDYabCI-.js} +1 -1
- package/dist/public/assets/{index-CzFOYplh.js → index-BeB8EEj0.js} +93 -93
- package/dist/public/assets/index-hY8weMMg.css +1 -0
- package/dist/public/assets/{keyboard-shortcuts-DOkzBlgc.js → keyboard-shortcuts-CZysvuV8.js} +1 -1
- package/dist/public/assets/{navigation-targets-DNRja8Z0.js → navigation-targets-CXdtVjj4.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-DBkxdYp_.js → open-managed-artifact-tab-CvsZjaW-.js} +1 -1
- package/dist/public/assets/{prop-types-C-aZftyS.js → prop-types-C_2IQGCC.js} +1 -1
- package/dist/public/assets/{selection-context-vh0MmCBb.js → selection-context-B6kAEK37.js} +1 -1
- package/dist/public/assets/{skill-actions-Sc4IN52j.js → skill-actions-CPoGr_7b.js} +1 -1
- package/dist/public/assets/{skills-api-ts3L80AV.js → skills-api-mcV6MiPo.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-CIKQ1Hj-.js → target-navigation-intent-C4nLupIH.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-BT98lJOb.js → typing-burst-detector-DEl5qeGr.js} +1 -1
- package/dist/public/index.html +17 -17
- package/dist/pwd-D4OZ7N27-DDRhZsId.mjs +1 -0
- package/dist/{python3-AUFTPCU6-B7_jrPM3.mjs → python3-AUFTPCU6-DmPp1QHj.mjs} +2 -2
- package/dist/{quadrantDiagram-34T5L4WZ-CLL-GTlz.mjs → quadrantDiagram-34T5L4WZ-DWVBhb1E.mjs} +2 -2
- package/dist/readlink-MI4GCHJF-mNeJ3km7.mjs +1 -0
- package/dist/{repair-launch-json-DgKo_ct3.mjs → repair-launch-json-CQi2Gb_O.mjs} +2 -2
- package/dist/repair-mcp-configs-C_aVjx-w.mjs +2 -0
- package/dist/repair-skills-BFe09bLm.mjs +1 -0
- package/dist/repair-skills-xrYOvyVd.mjs +3 -0
- package/dist/{requirementDiagram-MS252O5E-JIzm76n0.mjs → requirementDiagram-MS252O5E-Bneel37I.mjs} +2 -2
- package/dist/rev-XOSYPP45-KAKdorsx.mjs +1 -0
- package/dist/rg-FOQSCCX3-BWOdKDEd.mjs +1 -0
- package/dist/rm-RTZG23RL-D4Xj3X_m.mjs +1 -0
- package/dist/rmdir-XTQXT7RK-Bx-u3U5l.mjs +1 -0
- package/dist/{sankeyDiagram-XADWPNL6-Bpk8eTPe.mjs → sankeyDiagram-XADWPNL6-4f2f9-uf.mjs} +2 -2
- package/dist/sed-VFTTATXJ-DmL_7Y-J.mjs +1 -0
- package/dist/seq-RN5ZUASB-DeaNEJEM.mjs +1 -0
- package/dist/{sequenceDiagram-FGHM5R23-CHCigzvZ.mjs → sequenceDiagram-FGHM5R23-B1K4VtLp.mjs} +2 -2
- package/dist/server-lock-8Lv6A-Xa-B4jggKdG.mjs +1 -0
- package/dist/{server-lock-CN2YHwpP-BYuwTc93.mjs → server-lock-CN2YHwpP-Cwa4llpq.mjs} +73 -73
- package/dist/sha1sum-VJPNLNU6-DYUNX0rt.mjs +1 -0
- package/dist/sha256sum-PI32XWXY-BwDMGEnF.mjs +1 -0
- package/dist/sleep-VZFPZFWA-D3IG7CwN.mjs +1 -0
- package/dist/sort-DCNRDA7U-BfL8J8kf.mjs +1 -0
- package/dist/split-SITCSYCZ-Q5NIWguo.mjs +1 -0
- package/dist/sqlite3-56UMWEY3-DA8bw7DG.mjs +1 -0
- package/dist/src-B4ueRPSp.mjs +3 -0
- package/dist/start-2TGfkITh.mjs +3 -0
- package/dist/start-DzdUFQz6.mjs +1 -0
- package/dist/stat-BT5A227F-CYFqsI8W.mjs +1 -0
- package/dist/{stateDiagram-FHFEXIEX-CiIJxbDV.mjs → stateDiagram-FHFEXIEX-BREbMXiC.mjs} +2 -2
- package/dist/stateDiagram-v2-QKLJ7IA2-DQeH2s3K.mjs +2 -0
- package/dist/strings-7PLOGTPD-BLW4mXRs.mjs +1 -0
- package/dist/tac-SJGXQ4T2-BGR2Dq7O.mjs +1 -0
- package/dist/tail-S5ULNTJU-BOBd42y5.mjs +1 -0
- package/dist/tar-ANUBEFJY-DCUS8bvA.mjs +1 -0
- package/dist/tee-O7VXZDCO-Bg8MXC_K.mjs +1 -0
- package/dist/time-DEUO3QV2-CxVP9vXG.mjs +1 -0
- package/dist/{timeline-definition-GMOUNBTQ-BBhlpYO9.mjs → timeline-definition-GMOUNBTQ-Bd7XEw7o.mjs} +2 -2
- package/dist/timeout-VRKMCG72-CVG2Q30a.mjs +1 -0
- package/dist/touch-DX2IJOQ4-DmEja_Fu.mjs +1 -0
- package/dist/tr-2HXZRDSW-DWcyuCoi.mjs +1 -0
- package/dist/tree-LYXBS7DC-CFaeUWGI.mjs +1 -0
- package/dist/true-WHJNXCHG-CJH22fVg.mjs +1 -0
- package/dist/unexpand-RGTMIGZM-Uj1QzdPV.mjs +1 -0
- package/dist/uniq-SUNANL47-MRCnRrGo.mjs +1 -0
- package/dist/{vennDiagram-DHZGUBPP-CATweP9B.mjs → vennDiagram-DHZGUBPP-Bk-INjRY.mjs} +2 -2
- package/dist/{wardleyDiagram-NUSXRM2D-3qxY3I6a.mjs → wardleyDiagram-NUSXRM2D-DOD6wQla.mjs} +2 -2
- package/dist/wc-TQB3VNOX-JPk1lni-.mjs +1 -0
- package/dist/which-XZHEH76L-Cl63MOrV.mjs +1 -0
- package/dist/whoami-DGKU3D2X-CB3itqHE.mjs +1 -0
- package/dist/{wrapper-CGw3ogaz.mjs → wrapper-BZO_sIci.mjs} +1 -1
- package/dist/write-project-skill-CRxX-42S.mjs +12 -0
- package/dist/xan-BXDXYEIB-ZPqGVO90.mjs +1 -0
- package/dist/xan-view-ECQUO7AJ-C-WHEJiv.mjs +1 -0
- package/dist/xargs-I6EZUCYF-BvcSF5Y7.mjs +1 -0
- package/dist/{xychartDiagram-5P7HB3ND-BAWpa2N2.mjs → xychartDiagram-5P7HB3ND-B4AGYFQs.mjs} +2 -2
- package/dist/yazl-CQSNnbvt.mjs +1 -0
- package/dist/{yazl-DgCFuIuD.mjs → yazl-Docqgl6q.mjs} +1 -1
- package/dist/yq-MJMAR36V-_D_zdU3z.mjs +1 -0
- package/package.json +1 -1
- package/dist/alias-JE7RI5QX-DxvTrQH3.mjs +0 -1
- package/dist/awk2-POPGKRAI-6Q9HKhoL.mjs +0 -1
- package/dist/base64-4YMZCVJ5-bqN_UBX0.mjs +0 -1
- package/dist/basename-AA2KJYZQ-GWPOMupJ.mjs +0 -1
- package/dist/bash-IJWYRKFO-C7Yi9aK0.mjs +0 -1
- package/dist/build-gfyDk62R.mjs +0 -1
- package/dist/cat-RDUMLXKC-Cqi4_PjZ.mjs +0 -1
- package/dist/channel-Dq8ADXfq.mjs +0 -2
- package/dist/chmod-SYMGL4JA-C_dD-tNl.mjs +0 -1
- package/dist/classDiagram-6PBFFD2Q-cIblqhKe.mjs +0 -2
- package/dist/classDiagram-v2-HSJHXN6E-CnZ_g-6O.mjs +0 -2
- package/dist/clear-5CZ5X4YR-C4DTv-gF.mjs +0 -1
- package/dist/clone-s6xjJkoz.mjs +0 -2
- package/dist/column-WLPMMSTS-Bg1ZsVDm.mjs +0 -1
- package/dist/comm-5SLSESQG-CTh1BUfn.mjs +0 -1
- package/dist/constants-m4f9Gwpu.mjs +0 -2
- package/dist/cp-XOYR4ABJ-VqiK1WcH.mjs +0 -1
- package/dist/cut-OPC3VAGB-BDAM8WY8.mjs +0 -1
- package/dist/date-DD7FVA2V-nDqDn5ZQ.mjs +0 -1
- package/dist/diff-HJF2MPDN-DSY9AfjL.mjs +0 -1
- package/dist/dirname-LEMTZZFS-VsUIxZwx.mjs +0 -1
- package/dist/du-WO2ENHXQ-Cq3dzRFU.mjs +0 -1
- package/dist/echo-O45JWWI2-B99ElfBo.mjs +0 -1
- package/dist/env-5EPCWSXR-CsaomJHQ.mjs +0 -1
- package/dist/expand-DTNXU4LQ-Bp3M0RnL.mjs +0 -1
- package/dist/expansion-ENLSRCXJ-C5xjxYTl.mjs +0 -1
- package/dist/expr-5T3UU5KE-DrJUreFq.mjs +0 -1
- package/dist/file-ZIGAJ4YS-D07ChhI1.mjs +0 -1
- package/dist/find-TPUOAIUQ-ZPOxwUwf.mjs +0 -1
- package/dist/fold-LDSORVYE-Bx5XDGgK.mjs +0 -1
- package/dist/git-handle-DdgvPBh6-C80s8fFN.mjs +0 -1
- package/dist/grep-3AIAIJVR-Bh6KBg6d.mjs +0 -1
- package/dist/gzip-AQXSGOVS-BtiMTiZG.mjs +0 -1
- package/dist/head-HT2B6D2J-DSAed845.mjs +0 -1
- package/dist/help-VVWX7SA5-DCBusWam.mjs +0 -1
- package/dist/history-J4QRNGRO-BwBOMO5i.mjs +0 -1
- package/dist/hostname-BK6HG2DE-_qJ9gN13.mjs +0 -1
- package/dist/html-to-markdown-TFCECAGV-D7XdAo13.mjs +0 -1
- package/dist/init-BbVUxVGS.mjs +0 -321
- package/dist/init-Cxp98ROz.mjs +0 -1
- package/dist/join-GG2LDHE5-BMnXfCXQ.mjs +0 -1
- package/dist/jq-ODXZBPLY-D3tmTL1R.mjs +0 -1
- package/dist/ln-4TRFBYAT-Byit-TLI.mjs +0 -1
- package/dist/loader-UdRFiBKU.mjs +0 -1
- package/dist/ls-KSXFZCWH-CNZ_hN8P.mjs +0 -1
- package/dist/md5sum-INMIK4DX-pTX2tfQd.mjs +0 -1
- package/dist/mkdir-TDEMSB6C-Bl16kSBR.mjs +0 -1
- package/dist/mv-Z6MORUFL-D9pw6nb9.mjs +0 -1
- package/dist/nl-U5YJDM32-Bs_nMrMg.mjs +0 -1
- package/dist/od-VJEF2UR5-DwpkPMHp.mjs +0 -1
- package/dist/paste-7N6AFSDS-C8EyimeA.mjs +0 -1
- package/dist/preview-BUIvO8U0.mjs +0 -1
- package/dist/printf-CX64KX2P-2Mks7IIT.mjs +0 -1
- package/dist/public/assets/McpConsentDialogBody-ByCv3Eox.js +0 -1
- package/dist/public/assets/index-CG7gf_6X.css +0 -1
- package/dist/pwd-D4OZ7N27-m5fzqroZ.mjs +0 -1
- package/dist/readlink-MI4GCHJF-BMheCA1U.mjs +0 -1
- package/dist/repair-mcp-configs-DUZFjiWh.mjs +0 -2
- package/dist/repair-skills-BGQinwio.mjs +0 -3
- package/dist/repair-skills-BQP8U0AN.mjs +0 -1
- package/dist/rev-XOSYPP45-4azlKYu4.mjs +0 -1
- package/dist/rg-FOQSCCX3-ViKChHv5.mjs +0 -1
- package/dist/rm-RTZG23RL-F9g7gQHU.mjs +0 -1
- package/dist/rmdir-XTQXT7RK-CFMuhNvO.mjs +0 -1
- package/dist/sed-VFTTATXJ-BfHBQ11q.mjs +0 -1
- package/dist/seq-RN5ZUASB-BaUQfYSh.mjs +0 -1
- package/dist/server-lock-8Lv6A-Xa-xTK-ENFB.mjs +0 -1
- package/dist/sha1sum-VJPNLNU6-NRAU83Yg.mjs +0 -1
- package/dist/sha256sum-PI32XWXY-Cfe-w5CY.mjs +0 -1
- package/dist/sleep-VZFPZFWA-BgSOeH2N.mjs +0 -1
- package/dist/sort-DCNRDA7U-DqMg1dll.mjs +0 -1
- package/dist/split-SITCSYCZ-DqhMcIGL.mjs +0 -1
- package/dist/sqlite3-56UMWEY3-DNmhrHQv.mjs +0 -1
- package/dist/src-B8E2dBvX.mjs +0 -3
- package/dist/start-BbTUyYTc.mjs +0 -3
- package/dist/start-BoQjiYiU.mjs +0 -1
- package/dist/stat-BT5A227F-DOG39Ce5.mjs +0 -1
- package/dist/stateDiagram-v2-QKLJ7IA2-CTdt2FVd.mjs +0 -2
- package/dist/strings-7PLOGTPD-l9kho9ff.mjs +0 -1
- package/dist/tac-SJGXQ4T2-DMDGVNTy.mjs +0 -1
- package/dist/tail-S5ULNTJU-knoYRbXD.mjs +0 -1
- package/dist/tar-ANUBEFJY-Db9qg5B2.mjs +0 -1
- package/dist/tee-O7VXZDCO-BgHEibOy.mjs +0 -1
- package/dist/time-DEUO3QV2-CXWA3kJ0.mjs +0 -1
- package/dist/timeout-VRKMCG72-aaC7r4sX.mjs +0 -1
- package/dist/touch-DX2IJOQ4-DGiKr2c0.mjs +0 -1
- package/dist/tr-2HXZRDSW-BDNDgux2.mjs +0 -1
- package/dist/tree-LYXBS7DC-BK2c44-E.mjs +0 -1
- package/dist/true-WHJNXCHG-B6CZ-ZF1.mjs +0 -1
- package/dist/unexpand-RGTMIGZM-BWFllY1p.mjs +0 -1
- package/dist/uniq-SUNANL47-CiXMC2Qh.mjs +0 -1
- package/dist/wc-TQB3VNOX-Bof613yN.mjs +0 -1
- package/dist/which-XZHEH76L-DfnqWxtA.mjs +0 -1
- package/dist/whoami-DGKU3D2X-DhtD1OhF.mjs +0 -1
- package/dist/write-project-skill-DzjtpVMW.mjs +0 -36
- package/dist/xan-BXDXYEIB-I8yansvE.mjs +0 -1
- package/dist/xan-view-ECQUO7AJ-DJhdCPf3.mjs +0 -1
- package/dist/xargs-I6EZUCYF-CdKFilDT.mjs +0 -1
- package/dist/yazl-Clfc09F-.mjs +0 -1
- package/dist/yq-MJMAR36V-BXyMiYfX.mjs +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./mermaid.core-CLOkRfd8.js","./preload-helper-2ej06EnG.js","./chunk-U2HBQHQK-Wd4MIHD7.js","./src-DEzC9TbA.js","./chunk-CFjPhJqf.js","./src-C3imF5Zq.js","./chunk-5PVQY5BW-7GSXpGpA.js","./dist-BAzUe-Rb.js","./chunk-ICPOFSXX-MhneOmo1.js","./_baseFor-D25oCqSU.js","./isObjectLike-0yTn5bno.js","./isEmpty-DKKUMPPC.js","./chunk-336JU56O-BDNF8ABQ.js","./chunk-5FUZZQ4R-BhDATrAC.js","./chunk-X2U36JSP-DgR3BYDC.js","./chunk-ZZ45TVLE-Bml1MOax.js","./rough.esm-Bk-GM2I8.js","./chunk-ENJZ2VHE-CqUfmxZL.js","./line-Dk1foLQO.js","./path-1iyJ-o9O.js","./array-CXyn2wAU.js","./chunk-BSJP7CBP-DRn1Q8qZ.js","./chunk-426QAEUC-UlKin18B.js","./chunk-XPW4576I-BIhGQhfc.js","./pdf-BjE4l7oX.js","./dist-Dtxdqotp.js","./dist-DWaLpHcz.js","./w3c-keyname-beU76Hfb.js","./dist-CHEQzAl9.js","./dist-BdwnfcKi.js","./dist-znFZQjzE.js","./dist-Bqo1ZTng.js","./dist-3l3ADjEo.js","./stex-coA_FIxI.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{o as e,t}from"./chunk-CFjPhJqf.js";import{t as n}from"./preload-helper-2ej06EnG.js";import{n as r,r as i,t as a}from"./compiler-runtime-CVnuRdak.js";import{n as o,r as s}from"./dist-CQw2y-s3.js";import{$n as c,$r as l,A as u,Ai as d,An as f,At as p,B as m,Bi as h,Bn as g,Br as _,Ci as v,Cn as y,Cr as b,Di as x,Dn as S,Dr as C,Fi as w,Fn as T,G as E,Gr as D,Gt as O,H as k,Hr as A,I as j,In as M,Ir as N,It as P,Jr as F,Jt as I,K as L,Ki as R,Kn as ee,Kr as z,Kt as te,Ln as B,Lr as V,Mn as ne,Nn as H,Nt as U,Oi as W,On as G,Ot as K,P as re,Pn as ie,Pt as ae,Q as oe,Qn as q,Qr as se,R as ce,Rr as le,S as ue,Tn as de,Tt as fe,Un as pe,Ut as me,V as he,Vi as ge,Vr as _e,Vt as ve,W as ye,Wn as be,Wr as xe,Yn as Se,Yr as Ce,Yt as we,Z as Te,Zn as Ee,_ as De,_i as Oe,_n as ke,_r as Ae,ai as je,ar as Me,b as Ne,bi as Pe,c as Fe,ci as Ie,cn as Le,d as Re,di as ze,dt as Be,er as Ve,et as He,f as Ue,fi as We,fn as Ge,g as Ke,gi as qe,gn as Je,h as Ye,hi as Xe,hr as Ze,ii as Qe,jn as $e,ki as et,kn as tt,kt as nt,l as rt,ln as it,lt as at,m as ot,mi as st,mn as ct,mr as lt,mt as ut,ni as dt,nr as ft,nt as pt,o as mt,pi as ht,pn as gt,pt as _t,q as vt,qn as yt,qr as bt,qt as xt,ri as St,rr as Ct,rt as wt,s as Tt,si as Et,sn as Dt,sr as Ot,st as kt,tr as At,tt as jt,u as Mt,ui as Nt,ur as Pt,ut as Ft,vi as It,vr as Lt,wn as Rt,wr as zt,xi as Bt,xn as Vt,y as Ht,yi as Ut,z as Wt,zi as Gt,zr as Kt}from"./dist-BRGUidv4.js";import{t as qt}from"./react-dom-C-oc-P2K.js";import{c as Jt,i as Yt,l as Xt,o as Zt,r as Qt,s as $t,t as en,u as J}from"./button-DGf25ccp.js";import{_ as tn,a as nn,c as rn,d as an,f as on,g as sn,h as cn,i as ln,l as un,m as dn,n as fn,o as pn,p as mn,r as hn,s as gn,t as _n,u as vn}from"./dialog-CIq9aQLf.js";import{t as yn}from"./chevron-down-CzFz_0zd.js";import{t as bn}from"./chevron-right-jyIhGBkw.js";import{a as xn,c as Sn,i as Cn,l as wn,o as Tn,r as En,s as Dn,u as On}from"./prop-types-C-aZftyS.js";import{d as kn,f as An,i as jn,l as Mn,m as Nn,n as Pn,p as Fn,t as In,u as Ln}from"./config-context-DhhN0rlf.js";import{i as Rn,n as zn,r as Bn,t as Vn}from"./collapsible-CjgfK1G5.js";import{n as Hn,r as Un}from"./dist-KBKQayVB.js";import{l as Wn,n as Gn,t as Kn,u as qn}from"./documents-events-DA8Q5ICz.js";import{t as Jn}from"./trace-api-MhJXZpsM.js";import{n as Yn,t as Xn}from"./propagation-api-CR2CQW4x.js";import{a as Zn,c as Qn,d as $n,f as er,i as tr,l as nr,n as rr,o as ir,r as ar,s as or,t as sr}from"./dist-BXd_K33i.js";import{a as cr,i as lr,n as ur,t as dr}from"./tooltip-DiL7DBhT.js";import{_ as fr,a as pr,c as mr,g as hr,h as gr,i as _r,l as vr,m as yr,n as br,p as xr,r as Sr,t as Cr,u as wr}from"./dist-ICp_3rWY.js";import{t as Tr}from"./dist-ug68MPTZ.js";import{t as Er}from"./input-DkQ8Zmzd.js";import{C as Dr,O as Or,S as kr,T as Ar,a as jr,l as Mr,n as Nr,s as Pr,v as Fr,w as Ir,y as Lr}from"./navigation-targets-DNRja8Z0.js";import{a as Y,o as Rr,t as zr}from"./startup-marks-CWTDb1CP.js";import{t as Br}from"./file-tree-rename-validation-BqGkSO9-.js";import{Bt as Vr,C as Hr,Ct as Ur,D as Wr,Dt as Gr,E as Kr,Et as qr,F as Jr,Ft as Yr,Ht as Xr,It as Zr,J as Qr,L as $r,Lt as ei,Mt as ti,N as ni,O as ri,Ot as ii,P as ai,Pt as oi,Q as si,R as X,S as ci,St as li,Tt as ui,V as di,Vt as fi,X as pi,Y as mi,a as hi,c as gi,dt as _i,f as vi,j as yi,l as bi,n as xi,o as Si,q as Ci,r as wi,t as Ti,ut as Ei,xt as Di}from"./dist-DWaLpHcz.js";import{n as Oi,r as ki,t as Ai}from"./dist-CHEQzAl9.js";import{t as ji}from"./dist-C3ftUzLd.js";import{n as Mi}from"./dist-BgLh90uo2.js";import{n as Ni}from"./dist-BZEgBj4N.js";import{n as Pi}from"./dist-Dtxdqotp.js";import{i as Fi,n as Ii,r as Li}from"./dist-E5KjgWw7.js";import{n as Ri}from"./dist-BdwnfcKi.js";import{t as zi}from"./stex-coA_FIxI.js";var Z=i();(function(){var e=[`user-blocking`,`user-visible`,`background`];class t{constructor(){this.t=new MessageChannel,this.i=this.t.port2,this.l={},this.o=1,this.t.port1.onmessage=e=>this.h(e)}u(e){var t=this.o++;return this.l[t]=e,this.i.postMessage(t),t}p(e){delete this.l[e]}h(e){var t=e.data;if(t in this.l){var n=this.l[t];delete this.l[t],n()}}}function n(){return n.v||=new t,n.v}class r{constructor(e,t,n){n===void 0&&(n=0),this.k=e,this.T=null,this.C=null,this.m=!1,this._(t,n)}isIdleCallback(){return this.T===0}I(){return this.T===2}cancel(){if(!this.m)switch(this.m=!0,this.T){case 0:cancelIdleCallback(this.C);break;case 1:clearTimeout(this.C);break;case 2:n().p(this.C);break;default:throw TypeError(`Unknown CallbackType`)}}_(t,r){if(r&&r>0)return this.T=1,void(this.C=setTimeout(()=>{this.P()},r));if(!e.includes(t))throw TypeError(`Invalid task priority : `+t);t===`background`&&typeof requestIdleCallback==`function`?(this.T=0,this.C=requestIdleCallback(()=>{this.P()})):typeof MessageChannel==`function`?(this.T=2,this.C=n().u(()=>{this.P()})):(this.T=1,this.C=setTimeout(()=>{this.P()}))}P(){this.m||this.k()}}var i=0;class a{constructor(){this.j=null,this.M=null}isEmpty(){return this.j==null}push(e){if(typeof e!=`object`)throw TypeError(`Task must be an Object`);e.A=i++,this.isEmpty()?(e.N=null,this.j=e):(e.N=this.M,this.M.O=e),e.O=null,this.M=e}takeNextTask(){if(this.isEmpty())return null;var e=this.j;return this.q(e),e}merge(e,t){if(typeof t!=`function`)throw TypeError(`Must provide a selector function.`);if(e==null)throw Error(`sourceQueue cannot be null`);for(var n=this.j,r=null,i=e.j;i;){var a=i;if(i=i.O,t(a)){for(e.q(a);n&&n.A<a.A;)r=n,n=n.O;this.D(a,r),r=a}}}D(e,t){if(t!=this.M){var n=t?t.O:this.j;e.O=n,n.N=e,e.N=t,t==null?this.j=e:t.O=e}else this.push(e)}q(e){if(e==null)throw Error(`Expected task to be non-null`);e===this.j&&(this.j=e.O),e===this.M&&(this.M=this.M.N),e.O&&(e.O.N=e.N),e.N&&(e.N.O=e.O)}}class o extends Event{constructor(t,n){if(!n||!e.includes(n.previousPriority))throw TypeError(`Invalid task priority: '`+n.previousPriority+`'`);super(t),this.previousPriority=n.previousPriority}}class s extends AbortController{constructor(t){if(t===void 0&&(t={}),super(),t??={},typeof t!=`object`)throw TypeError(`'init' is not an object`);var n,r,i=t.priority===void 0?`user-visible`:t.priority;if(!e.includes(i))throw TypeError(`Invalid task priority: '`+i+`'`);this.H=i,this.R=!1,r=(n=this).signal,Object.defineProperties(r,{priority:{get:function(){return n.H},enumerable:!0},onprioritychange:{value:null,writable:!0,enumerable:!0}}),r.addEventListener(`prioritychange`,e=>{r.onprioritychange&&r.onprioritychange(e)})}setPriority(t){if(!e.includes(t))throw TypeError(`Invalid task priority: `+t);if(this.R)throw new DOMException(``,`NotAllowedError`);if(this.signal.priority!==t){this.R=!0;var n=this.H;this.H=t;var r=new o(`prioritychange`,{previousPriority:n});this.signal.dispatchEvent(r),this.R=!1}}}self.scheduler===void 0?(self.scheduler=new class{constructor(){this.S={},e.forEach(e=>{this.S[e]=[new a,new a]}),this.U=null,this.W=new WeakMap}yield(){return this.B(()=>{},{priority:`user-visible`},!0)}postTask(e,t){return this.B(e,t,!1)}B(t,n,r){if((n=Object.assign({},n)).signal!==void 0){if(n.signal===null||!(`aborted`in n.signal)||typeof n.signal.addEventListener!=`function`)return Promise.reject(TypeError(`'signal' is not a valid 'AbortSignal'`));if(n.signal&&n.signal.priority&&!e.includes(n.signal.priority))return Promise.reject(TypeError(`Invalid task priority: '`+n.signal.priority+`'`))}if(n.priority!==void 0&&(n.priority===null||!e.includes(n.priority)))return Promise.reject(TypeError(`Invalid task priority: '`+n.priority+`'`));if(n.delay===void 0&&(n.delay=0),n.delay=Number(n.delay),n.delay<0)return Promise.reject(TypeError(`'delay' must be a positive number.`));var i={callback:t,options:n,resolve:null,reject:null,hostCallback:null,abortCallback:null,onTaskCompleted:function(){this.options.signal&&this.abortCallback&&(this.options.signal.removeEventListener(`abort`,this.abortCallback),this.abortCallback=null)},onTaskAborted:function(){this.hostCallback&&=(this.hostCallback.cancel(),null),this.options.signal.removeEventListener(`abort`,this.abortCallback),this.abortCallback=null,this.reject(this.options.signal.reason)},isAborted:function(){return this.options.signal&&this.options.signal.aborted},isContinuation:r},a=new Promise((e,t)=>{i.resolve=e,i.reject=t});return this._(i),a}_(e){var t=e.options.signal;if(t){if(t.aborted)return void e.reject(t.reason);e.abortCallback=()=>{e.onTaskAborted()},t.addEventListener(`abort`,e.abortCallback)}e.options.delay>0?e.hostCallback=new r(()=>{e.hostCallback=null,this.F(e)},null,e.options.delay):(this.G(e),this.J())}F(e){this.G(e),this.U&&=(this.U.cancel(),null),this.K()}L(e){var t=this.W.get(e);if(t===void 0)throw Error(`Attempting to change priority on an unregistered signal`);if(t!==e.priority){for(var n=0;n<2;n++)this.S[e.priority][n].merge(this.S[t][n],t=>t.options.signal===e);this.W.set(e,e.priority)}}K(){this.U=null,this.V(),this.J()}J(){var{priority:e}=this.X();e!=null&&(e!==`background`&&this.U&&this.U.isIdleCallback()&&(this.U.cancel(),this.U=null),this.U||=new r(()=>{this.K()},e,0))}G(t){var n;if(!e.includes(n=t.options.priority?t.options.priority:t.options.signal&&t.options.signal.priority?t.options.signal.priority:`user-visible`))throw TypeError(`Invalid task priority: `+n);if(t.options.signal&&t.options.signal.priority){var r=t.options.signal;this.W.has(r)||(r.addEventListener(`prioritychange`,()=>{this.L(r)}),this.W.set(r,r.priority))}this.S[n][+!t.isContinuation].push(t)}V(){var e=null;do{var{priority:t,type:n}=this.X();if(t==null)return;e=this.S[t][n].takeNextTask()}while(e.isAborted());try{var r=e.callback();e.resolve(r)}catch(t){e.reject(t)}finally{e.onTaskCompleted()}}X(){for(var t=0;t<e.length;t++)for(var n=e[t],r=0;r<2;r++)if(!this.S[n][r].isEmpty())return{priority:n,type:r};return{priority:null,type:0}}},self.TaskController=s,self.TaskPriorityChangeEvent=o):self.scheduler.yield||(self.scheduler.yield=function(){return self.scheduler.postTask(()=>{},{priority:`user-blocking`})})})();var Bi=J(`app-window`,[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]),Vi=J(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),Hi=J(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),Ui=J(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Wi=J(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Gi=J(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),Ki=J(`box`,[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]),qi=J(`bug`,[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]),Ji=J(`chart-column`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]),Yi=J(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Xi=J(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Zi=J(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Qi=J(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),$i=J(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),ea=J(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),ta=J(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),na=J(`eraser`,[[`path`,{d:`M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21`,key:`g5wo59`}],[`path`,{d:`m5.082 11.09 8.828 8.828`,key:`1wx5vj`}]]),ra=J(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),ia=J(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),aa=J(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),oa=J(`file-image`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`10`,cy:`12`,r:`2`,key:`737tya`}],[`path`,{d:`m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22`,key:`wt3hpn`}]]),sa=J(`file-plus-corner`,[[`path`,{d:`M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35`,key:`17jvcc`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M14 19h6`,key:`bvotb8`}],[`path`,{d:`M17 16v6`,key:`18yu1i`}]]),ca=J(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),la=J(`file-up`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`m15 15-3-3-3 3`,key:`15xj92`}]]),ua=J(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),da=J(`film`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M7 3v18`,key:`bbkbws`}],[`path`,{d:`M3 7.5h4`,key:`zfgn84`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`path`,{d:`M3 16.5h4`,key:`1230mu`}],[`path`,{d:`M17 3v18`,key:`in4fa5`}],[`path`,{d:`M17 7.5h4`,key:`myr1c1`}],[`path`,{d:`M17 16.5h4`,key:`go4c1d`}]]),fa=J(`flask-conical`,[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]),pa=J(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),ma=J(`hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]),ha=J(`heading-1`,[[`path`,{d:`M4 12h8`,key:`17cfdx`}],[`path`,{d:`M4 18V6`,key:`1rz3zl`}],[`path`,{d:`M12 18V6`,key:`zqpxq5`}],[`path`,{d:`m17 12 3-2v8`,key:`1hhhft`}]]),ga=J(`heading-2`,[[`path`,{d:`M4 12h8`,key:`17cfdx`}],[`path`,{d:`M4 18V6`,key:`1rz3zl`}],[`path`,{d:`M12 18V6`,key:`zqpxq5`}],[`path`,{d:`M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1`,key:`9jr5yi`}]]),_a=J(`heading-3`,[[`path`,{d:`M4 12h8`,key:`17cfdx`}],[`path`,{d:`M4 18V6`,key:`1rz3zl`}],[`path`,{d:`M12 18V6`,key:`zqpxq5`}],[`path`,{d:`M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2`,key:`68ncm8`}],[`path`,{d:`M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2`,key:`1ejuhz`}]]),va=J(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),ya=J(`layout-grid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),ba=J(`layout-panel-top`,[[`rect`,{width:`18`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`f1a2em`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}]]),xa=J(`lightbulb`,[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),Sa=J(`link-2-off`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7`,key:`10o201`}],[`path`,{d:`M15 7h2a5 5 0 0 1 4 8`,key:`1d3206`}],[`line`,{x1:`8`,x2:`12`,y1:`12`,y2:`12`,key:`rvw6j4`}],[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}]]),Ca=[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]],wa=J(`link-2`,Ca),Ta=J(`list-ordered`,[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]),Ea=J(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),Da=J(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),Oa=J(`message-square-warning`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 15h.01`,key:`q59x07`}],[`path`,{d:`M12 7v4`,key:`xawao1`}]]),ka=J(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),Aa=J(`octagon-alert`,[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]]),ja=J(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),Ma=J(`panel-top`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]),Na=J(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),Pa=J(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Fa=J(`quote`,[[`path`,{d:`M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`rib7q0`}],[`path`,{d:`M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`1ymkrd`}]]),Ia=J(`refresh-ccw`,[[`path`,{d:`M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`14sxne`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16`,key:`1hlbsb`}],[`path`,{d:`M16 16h5v5`,key:`ccwih5`}]]),La=J(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Ra=J(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),za=J(`shapes`,[[`path`,{d:`M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z`,key:`1bo67w`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}],[`circle`,{cx:`17.5`,cy:`17.5`,r:`3.5`,key:`w3z12y`}]]),Ba=J(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),Va=J(`sigma`,[[`path`,{d:`M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2`,key:`wuwx1p`}]]),Ha=J(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),Ua=J(`square-play`,[[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z`,key:`kmsa83`}]]),Wa=J(`superscript`,[[`path`,{d:`m4 19 8-8`,key:`hr47gm`}],[`path`,{d:`m12 19-8-8`,key:`1dhhmo`}],[`path`,{d:`M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06`,key:`1dfcux`}]]),Ga=J(`table-2`,[[`path`,{d:`M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18`,key:`gugj83`}]]),Ka=J(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),qa=J(`volume-2`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]),Ja=J(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),Ya=J(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),Xa=J(`zoom-in`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),Za=J(`zoom-out`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),Qa=e(qt(),1),Q=a(),$=e(r(),1);function $a(e,t){let n=(0,Q.c)(7),r,i;n[0]!==e||n[1]!==t?(r=()=>{if(t!==`light`&&t!==`dark`&&t!==`system`||!e)return;let n=!1;return e.setThemeSource(t).catch(e=>{console.warn(JSON.stringify({event:`theme-source-set-failed`,themeValue:t,error:e instanceof Error?e.message:String(e)}))}).finally(()=>{if(n)return;let t=window.matchMedia(`(prefers-reduced-transparency: reduce)`).matches;e.signalThemeApplied({reducedTransparency:t})}),()=>{n=!0}},i=[e,t],n[0]=e,n[1]=t,n[2]=r,n[3]=i):(r=n[2],i=n[3]),(0,$.useEffect)(r,i);let a,o;n[4]===e?(a=n[5],o=n[6]):(a=()=>{if(!e)return;let t=window.matchMedia(`(prefers-reduced-transparency: reduce)`),n=t=>{e.signalThemeApplied({reducedTransparency:t.matches})};return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}},o=[e],n[4]=e,n[5]=a,n[6]=o),(0,$.useEffect)(a,o)}var eo=t((e=>{var t=r();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),to=t(((e,t)=>{t.exports=eo()}));function no(e,[t,n]){return Math.min(n,Math.max(t,e))}var ro=`Popover`,[io,ao]=$n(ro,[pr]),oo=pr(),[so,co]=io(ro),lo=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=oo(t),c=$.useRef(null),[l,u]=$.useState(!1),[d,f]=or({prop:r,defaultProp:i??!1,onChange:a,caller:ro});return(0,Z.jsx)(_r,{...s,children:(0,Z.jsx)(so,{scope:t,contentId:Zn(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:$.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:$.useCallback(()=>u(!0),[]),onCustomAnchorRemove:$.useCallback(()=>u(!1),[]),modal:o,children:n})})};lo.displayName=ro;var uo=`PopoverAnchor`,fo=$.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=co(uo,n),a=oo(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return $.useEffect(()=>(o(),()=>s()),[o,s]),(0,Z.jsx)(Cr,{...a,...r,ref:t})});fo.displayName=uo;var po=`PopoverTrigger`,mo=$.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=co(po,n),a=oo(n),o=$t(t,i.triggerRef),s=(0,Z.jsx)(er.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":ko(i.open),...r,ref:o,onClick:nr(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,Z.jsx)(Cr,{asChild:!0,...a,children:s})});mo.displayName=po;var ho=`PopoverPortal`,[go,_o]=io(ho,{forceMount:void 0}),vo=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=co(ho,t);return(0,Z.jsx)(go,{scope:t,forceMount:n,children:(0,Z.jsx)(ir,{present:n||a.open,children:(0,Z.jsx)(rr,{asChild:!0,container:i,children:r})})})};vo.displayName=ho;var yo=`PopoverContent`,bo=$.forwardRef((e,t)=>{let n=_o(yo,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=co(yo,e.__scopePopover);return(0,Z.jsx)(ir,{present:r||a.open,children:a.modal?(0,Z.jsx)(So,{...i,ref:t}):(0,Z.jsx)(Co,{...i,ref:t})})});bo.displayName=yo;var xo=Yt(`PopoverContent.RemoveScroll`),So=$.forwardRef((e,t)=>{let n=co(yo,e.__scopePopover),r=$.useRef(null),i=$t(t,r),a=$.useRef(!1);return $.useEffect(()=>{let e=r.current;if(e)return mn(e)},[]),(0,Z.jsx)(dn,{as:xo,allowPinchZoom:!0,children:(0,Z.jsx)(wo,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:nr(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:nr(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:nr(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Co=$.forwardRef((e,t)=>{let n=co(yo,e.__scopePopover),r=$.useRef(!1),i=$.useRef(!1);return(0,Z.jsx)(wo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),wo=$.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=co(yo,n),p=oo(n);return cn(),(0,Z.jsx)(sn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,Z.jsx)(ar,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,Z.jsx)(Sr,{"data-state":ko(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),To=`PopoverClose`,Eo=$.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=co(To,n);return(0,Z.jsx)(er.button,{type:`button`,...r,ref:t,onClick:nr(e.onClick,()=>i.onOpenChange(!1))})});Eo.displayName=To;var Do=`PopoverArrow`,Oo=$.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=oo(n);return(0,Z.jsx)(br,{...i,...r,ref:t})});Oo.displayName=Do;function ko(e){return e?`open`:`closed`}var Ao=lo,jo=fo,Mo=mo,No=vo,Po=bo,Fo=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Io=[` `,`Enter`],Lo=`Select`,[Ro,zo,Bo]=fr(Lo),[Vo,Ho]=$n(Lo,[Bo,pr]),Uo=pr(),[Wo,Go]=Vo(Lo),[Ko,qo]=Vo(Lo),Jo=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m}=e,h=Uo(t),[g,_]=$.useState(null),[v,y]=$.useState(null),[b,x]=$.useState(!1),S=hr(l),[C,w]=or({prop:r,defaultProp:i??!1,onChange:a,caller:Lo}),[T,E]=or({prop:o,defaultProp:s,onChange:c,caller:Lo}),D=$.useRef(null),O=g?m||!!g.closest(`form`):!0,[k,A]=$.useState(new Set),j=Array.from(k).map(e=>e.props.value).join(`;`);return(0,Z.jsx)(_r,{...h,children:(0,Z.jsxs)(Wo,{required:p,scope:t,trigger:g,onTriggerChange:_,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:x,contentId:Zn(),value:T,onValueChange:E,open:C,onOpenChange:w,dir:S,triggerPointerDownPosRef:D,disabled:f,children:[(0,Z.jsx)(Ro.Provider,{scope:t,children:(0,Z.jsx)(Ko,{scope:e.__scopeSelect,onNativeOptionAdd:$.useCallback(e=>{A(t=>new Set(t).add(e))},[]),onNativeOptionRemove:$.useCallback(e=>{A(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),O?(0,Z.jsxs)(Us,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:T,onChange:e=>E(e.target.value),disabled:f,form:m,children:[T===void 0?(0,Z.jsx)(`option`,{value:``}):null,Array.from(k)]},j):null]})})};Jo.displayName=Lo;var Yo=`SelectTrigger`,Xo=$.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=Uo(n),o=Go(Yo,n),s=o.disabled||r,c=$t(t,o.onTriggerChange),l=zo(n),u=$.useRef(`touch`),[d,f,p]=Gs(e=>{let t=l().filter(e=>!e.disabled),n=Ks(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,Z.jsx)(Cr,{asChild:!0,...a,children:(0,Z.jsx)(er.button,{type:`button`,role:`combobox`,"aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":Ws(o.value)?``:void 0,...i,ref:c,onClick:nr(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:nr(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:nr(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&Fo.includes(e.key)&&(m(),e.preventDefault())})})})});Xo.displayName=Yo;var Zo=`SelectValue`,Qo=$.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=Go(Zo,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=$t(t,c.onValueNodeChange);return Qn(()=>{l(u)},[l,u]),(0,Z.jsx)(er.span,{...s,ref:d,style:{pointerEvents:`none`},children:Ws(c.value)?(0,Z.jsx)(Z.Fragment,{children:o}):a})});Qo.displayName=Zo;var $o=`SelectIcon`,es=$.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,Z.jsx)(er.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});es.displayName=$o;var ts=`SelectPortal`,ns=e=>(0,Z.jsx)(rr,{asChild:!0,...e});ns.displayName=ts;var rs=`SelectContent`,is=$.forwardRef((e,t)=>{let n=Go(rs,e.__scopeSelect),[r,i]=$.useState();if(Qn(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?Qa.createPortal((0,Z.jsx)(os,{scope:e.__scopeSelect,children:(0,Z.jsx)(Ro.Slot,{scope:e.__scopeSelect,children:(0,Z.jsx)(`div`,{children:e.children})})}),t):null}return(0,Z.jsx)(us,{...e,ref:t})});is.displayName=rs;var as=10,[os,ss]=Vo(rs),cs=`SelectContentImpl`,ls=Yt(`SelectContent.RemoveScroll`),us=$.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=Go(rs,n),[y,b]=$.useState(null),[x,S]=$.useState(null),C=$t(t,e=>b(e)),[w,T]=$.useState(null),[E,D]=$.useState(null),O=zo(n),[k,A]=$.useState(!1),j=$.useRef(!1);$.useEffect(()=>{if(y)return mn(y)},[y]),cn();let M=$.useCallback(e=>{let[t,...n]=O().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[O,x]),N=$.useCallback(()=>M([w,y]),[M,w,y]);$.useEffect(()=>{k&&N()},[k,N]);let{onOpenChange:P,triggerPointerDownPosRef:F}=v;$.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(F.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||P(!1),document.removeEventListener(`pointermove`,t),F.current=null};return F.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,P,F]),$.useEffect(()=>{let e=()=>P(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[P]);let[I,L]=Gs(e=>{let t=O().filter(e=>!e.disabled),n=Ks(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),R=$.useCallback((e,t,n)=>{let r=!j.current&&!n;(v.value!==void 0&&v.value===t||r)&&(T(e),r&&(j.current=!0))},[v.value]),ee=$.useCallback(()=>y?.focus(),[y]),z=$.useCallback((e,t,n)=>{let r=!j.current&&!n;(v.value!==void 0&&v.value===t||r)&&D(e)},[v.value]),te=r===`popper`?ms:fs,B=te===ms?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,Z.jsx)(os,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:R,selectedItem:w,onItemLeave:ee,itemTextRefCallback:z,focusSelectedItem:N,selectedItemText:E,position:r,isPositioned:k,searchRef:I,children:(0,Z.jsx)(dn,{as:ls,allowPinchZoom:!0,children:(0,Z.jsx)(sn,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:nr(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,Z.jsx)(ar,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,Z.jsx)(te,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...B,onPlaced:()=>A(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:nr(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&L(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=O().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>M(t)),e.preventDefault()}})})})})})})});us.displayName=cs;var ds=`SelectItemAlignedPosition`,fs=$.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=Go(rs,n),o=ss(rs,n),[s,c]=$.useState(null),[l,u]=$.useState(null),d=$t(t,e=>u(e)),f=zo(n),p=$.useRef(!1),m=$.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=$.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-as,d=no(a,[as,Math.max(as,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-as,d=no(a,[as,Math.max(as,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-as*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-as,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${as}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);Qn(()=>y(),[y]);let[b,x]=$.useState();return Qn(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),(0,Z.jsx)(hs,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:$.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,Z.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,Z.jsx)(er.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});fs.displayName=ds;var ps=`SelectPopperPosition`,ms=$.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=as,...a}=e,o=Uo(n);return(0,Z.jsx)(Sr,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});ms.displayName=ps;var[hs,gs]=Vo(rs,{}),_s=`SelectViewport`,vs=$.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=ss(_s,n),o=gs(_s,n),s=$t(t,a.onViewportChange),c=$.useRef(0);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,Z.jsx)(Ro.Slot,{scope:n,children:(0,Z.jsx)(er.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:nr(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-as*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});vs.displayName=_s;var ys=`SelectGroup`,[bs,xs]=Vo(ys),Ss=$.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Zn();return(0,Z.jsx)(bs,{scope:n,id:i,children:(0,Z.jsx)(er.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});Ss.displayName=ys;var Cs=`SelectLabel`,ws=$.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=xs(Cs,n);return(0,Z.jsx)(er.div,{id:i.id,...r,ref:t})});ws.displayName=Cs;var Ts=`SelectItem`,[Es,Ds]=Vo(Ts),Os=$.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=Go(Ts,n),c=ss(Ts,n),l=s.value===r,[u,d]=$.useState(a??``),[f,p]=$.useState(!1),m=$t(t,e=>c.itemRefCallback?.(e,r,i)),h=Zn(),g=$.useRef(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,Z.jsx)(Es,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:$.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,Z.jsx)(Ro.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,Z.jsx)(er.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:nr(o.onFocus,()=>p(!0)),onBlur:nr(o.onBlur,()=>p(!1)),onClick:nr(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:nr(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:nr(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:nr(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:nr(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:nr(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(Io.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});Os.displayName=Ts;var ks=`SelectItemText`,As=$.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=Go(ks,n),s=ss(ks,n),c=Ds(ks,n),l=qo(ks,n),[u,d]=$.useState(null),f=$t(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=$.useMemo(()=>(0,Z.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return Qn(()=>(h(m),()=>g(m)),[h,g,m]),(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(er.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Qa.createPortal(a.children,o.valueNode):null]})});As.displayName=ks;var js=`SelectItemIndicator`,Ms=$.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return Ds(js,n).isSelected?(0,Z.jsx)(er.span,{"aria-hidden":!0,...r,ref:t}):null});Ms.displayName=js;var Ns=`SelectScrollUpButton`,Ps=$.forwardRef((e,t)=>{let n=ss(Ns,e.__scopeSelect),r=gs(Ns,e.__scopeSelect),[i,a]=$.useState(!1),o=$t(t,r.onScrollButtonChange);return Qn(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,Z.jsx)(Ls,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Ps.displayName=Ns;var Fs=`SelectScrollDownButton`,Is=$.forwardRef((e,t)=>{let n=ss(Fs,e.__scopeSelect),r=gs(Fs,e.__scopeSelect),[i,a]=$.useState(!1),o=$t(t,r.onScrollButtonChange);return Qn(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,Z.jsx)(Ls,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});Is.displayName=Fs;var Ls=$.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=ss(`SelectScrollButton`,n),o=$.useRef(null),s=zo(n),c=$.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return $.useEffect(()=>()=>c(),[c]),Qn(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,Z.jsx)(er.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:nr(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:nr(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:nr(i.onPointerLeave,()=>{c()})})}),Rs=`SelectSeparator`,zs=$.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,Z.jsx)(er.div,{"aria-hidden":!0,...r,ref:t})});zs.displayName=Rs;var Bs=`SelectArrow`,Vs=$.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Uo(n),a=Go(Bs,n),o=ss(Bs,n);return a.open&&o.position===`popper`?(0,Z.jsx)(br,{...i,...r,ref:t}):null});Vs.displayName=Bs;var Hs=`SelectBubbleInput`,Us=$.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=$.useRef(null),a=$t(r,i),o=Tr(t);return $.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,Z.jsx)(er.select,{...n,style:{...cr,...n.style},ref:a,defaultValue:t})});Us.displayName=Hs;function Ws(e){return e===``||e===void 0}function Gs(e){let t=tr(e),n=$.useRef(``),r=$.useRef(0),i=$.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=$.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return $.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function Ks(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=qs(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function qs(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Js=Jo,Ys=Xo,Xs=Qo,Zs=es,Qs=ns,$s=is,ec=vs,tc=Os,nc=As,rc=Ms,ic=Ps,ac=Is,oc=`Switch`,[sc,cc]=$n(oc),[lc,uc]=sc(oc),dc=$.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c=`on`,onCheckedChange:l,form:u,...d}=e,[f,p]=$.useState(null),m=$t(t,e=>p(e)),h=$.useRef(!1),g=f?u||!!f.closest(`form`):!0,[_,v]=or({prop:i,defaultProp:a??!1,onChange:l,caller:oc});return(0,Z.jsxs)(lc,{scope:n,checked:_,disabled:s,children:[(0,Z.jsx)(er.button,{type:`button`,role:`switch`,"aria-checked":_,"aria-required":o,"data-state":gc(_),"data-disabled":s?``:void 0,disabled:s,value:c,...d,ref:m,onClick:nr(e.onClick,e=>{v(e=>!e),g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})}),g&&(0,Z.jsx)(hc,{control:f,bubbles:!h.current,name:r,value:c,checked:_,required:o,disabled:s,form:u,style:{transform:`translateX(-100%)`}})]})});dc.displayName=oc;var fc=`SwitchThumb`,pc=$.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=uc(fc,n);return(0,Z.jsx)(er.span,{"data-state":gc(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});pc.displayName=fc;var mc=`SwitchBubbleInput`,hc=$.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=$.useRef(null),s=$t(o,a),c=Tr(n),l=sr(t);return $.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(c!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[c,n,r]),(0,Z.jsx)(`input`,{type:`checkbox`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...l,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});hc.displayName=mc;function gc(e){return e?`checked`:`unchecked`}var _c=dc,vc=pc,yc=to(),bc=Jt(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3! font-mono uppercase`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,warning:`bg-yellow-500/10 text-yellow-600 [a]:hover:bg-yellow-500/20`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`,dashed:`border-dashed border-border text-muted-foreground rounded-sm`,primary:`border border-primary/50 text-primary bg-primary/5 rounded-sm p-0.5 px-1.5 font-mono`,gray:`border border-border text-muted-foreground bg-muted rounded-sm p-0.5 px-1.5 font-mono`}},defaultVariants:{variant:`default`}});function xc(e){let t=(0,Q.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,variant:i,asChild:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=i===void 0?`default`:i,s=a!==void 0&&a?Qt:`span`,c;t[5]!==n||t[6]!==o?(c=Xt(bc({variant:o}),n),t[5]=n,t[6]=o,t[7]=c):c=t[7];let l;return t[8]!==s||t[9]!==r||t[10]!==c||t[11]!==o?(l=(0,Z.jsx)(s,{"data-slot":`badge`,"data-variant":o,className:c,...r}),t[8]=s,t[9]=r,t[10]=c,t[11]=o,t[12]=l):l=t[12],l}function Sc(e){let t=(0,Q.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Z.jsx)(Ao,{"data-slot":`popover`,...n}),t[2]=n,t[3]=r),r}function Cc(e){let t=(0,Q.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Z.jsx)(Mo,{"data-slot":`popover-trigger`,...n}),t[2]=n,t[3]=r),r}function wc(e){let t=(0,Q.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,align:i,sideOffset:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=i===void 0?`center`:i,s=a===void 0?4:a,c;t[5]===n?c=t[6]:(c=Xt(`z-50 w-72 rounded-lg border bg-popover p-4 text-popover-foreground shadow-md outline-hidden origin-(--radix-popover-content-transform-origin) duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:duration-0`,n),t[5]=n,t[6]=c);let l;return t[7]!==o||t[8]!==r||t[9]!==s||t[10]!==c?(l=(0,Z.jsx)(No,{children:(0,Z.jsx)(Po,{"data-slot":`popover-content`,align:o,sideOffset:s,className:c,...r})}),t[7]=o,t[8]=r,t[9]=s,t[10]=c,t[11]=l):l=t[11],l}function Tc(e){let t=(0,Q.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Z.jsx)(jo,{"data-slot":`popover-anchor`,...n}),t[2]=n,t[3]=r),r}var Ec={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.24.0`}?.VITE_APP_VERSION??`0.0.0-unknown`;function Dc(){return xt({kind:`web`,runtimeVersion:Ec})}function Oc(){return I({kind:`web`,runtimeVersion:Ec})}var{getOwnPropertyNames:kc,getOwnPropertySymbols:Ac}=Object,{hasOwnProperty:jc}=Object.prototype;function Mc(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function Nc(e){return function(t,n,r){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r);let{cache:i}=r,a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);let s=e(t,n,r);return i.delete(t),i.delete(n),s}}function Pc(e){return e?.[Symbol.toStringTag]}function Fc(e){return kc(e).concat(Ac(e))}var Ic=Object.hasOwn||((e,t)=>jc.call(e,t));function Lc(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var Rc=`__v`,zc=`__o`,Bc=`_owner`,{getOwnPropertyDescriptor:Vc,keys:Hc}=Object;function Uc(e,t){return e.byteLength===t.byteLength&&nl(new Uint8Array(e),new Uint8Array(t))}function Wc(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function Gc(e,t){return e.byteLength===t.byteLength&&nl(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Kc(e,t){return Lc(e.getTime(),t.getTime())}function qc(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Jc(e,t){return e===t}function Yc(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.entries(),o,s,c=0;for(;(o=a.next())&&!o.done;){let r=t.entries(),a=!1,l=0;for(;(s=r.next())&&!s.done;){if(i[l]){l++;continue}let r=o.value,u=s.value;if(n.equals(r[0],u[0],c,l,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1;c++}return!0}var Xc=Lc;function Zc(e,t,n){let r=Hc(e),i=r.length;if(Hc(t).length!==i)return!1;for(;i-- >0;)if(!il(e,t,n,r[i]))return!1;return!0}function Qc(e,t,n){let r=Fc(e),i=r.length;if(Fc(t).length!==i)return!1;let a,o,s;for(;i-- >0;)if(a=r[i],!il(e,t,n,a)||(o=Vc(e,a),s=Vc(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function $c(e,t){return Lc(e.valueOf(),t.valueOf())}function el(e,t){return e.source===t.source&&e.flags===t.flags}function tl(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.values(),o,s;for(;(o=a.next())&&!o.done;){let r=t.values(),a=!1,c=0;for(;(s=r.next())&&!s.done;){if(!i[c]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1}return!0}function nl(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function rl(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function il(e,t,n,r){return(r===Bc||r===zc||r===Rc)&&(e.$$typeof||t.$$typeof)?!0:Ic(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var al=`[object ArrayBuffer]`,ol=`[object Arguments]`,sl=`[object Boolean]`,cl=`[object DataView]`,ll=`[object Date]`,ul=`[object Error]`,dl=`[object Map]`,fl=`[object Number]`,pl=`[object Object]`,ml=`[object RegExp]`,hl=`[object Set]`,gl=`[object String]`,_l={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},vl=`[object URL]`,yl=Object.prototype.toString;function bl({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:m}){return function(h,g,_){if(h===g)return!0;if(h==null||g==null)return!1;let v=typeof h;if(v!==typeof g)return!1;if(v!==`object`)return v===`number`?s(h,g,_):v===`function`?a(h,g,_):!1;let y=h.constructor;if(y!==g.constructor)return!1;if(y===Object)return c(h,g,_);if(Array.isArray(h))return t(h,g,_);if(y===Date)return r(h,g,_);if(y===RegExp)return u(h,g,_);if(y===Map)return o(h,g,_);if(y===Set)return d(h,g,_);let b=yl.call(h);if(b===ll)return r(h,g,_);if(b===ml)return u(h,g,_);if(b===dl)return o(h,g,_);if(b===hl)return d(h,g,_);if(b===pl)return typeof h.then!=`function`&&typeof g.then!=`function`&&c(h,g,_);if(b===vl)return p(h,g,_);if(b===ul)return i(h,g,_);if(b===ol)return c(h,g,_);if(_l[b])return f(h,g,_);if(b===al)return e(h,g,_);if(b===cl)return n(h,g,_);if(b===sl||b===fl||b===gl)return l(h,g,_);if(m){let e=m[b];if(!e){let t=Pc(h);t&&(e=m[t])}if(e)return e(h,g,_)}return!1}}function xl({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:Uc,areArraysEqual:n?Qc:Wc,areDataViewsEqual:Gc,areDatesEqual:Kc,areErrorsEqual:qc,areFunctionsEqual:Jc,areMapsEqual:n?Mc(Yc,Qc):Yc,areNumbersEqual:Xc,areObjectsEqual:n?Qc:Zc,arePrimitiveWrappersEqual:$c,areRegExpsEqual:el,areSetsEqual:n?Mc(tl,Qc):tl,areTypedArraysEqual:n?Mc(nl,Qc):nl,areUrlsEqual:rl,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=Nc(r.areArraysEqual),t=Nc(r.areMapsEqual),n=Nc(r.areObjectsEqual),i=Nc(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}function Sl(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function Cl({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,o){let{cache:s=e?new WeakMap:void 0,meta:c}=n();return t(a,o,{cache:s,equals:r,meta:c,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let a={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}var wl=Tl();Tl({strict:!0}),Tl({circular:!0}),Tl({circular:!0,strict:!0}),Tl({createInternalComparator:()=>Lc}),Tl({strict:!0,createInternalComparator:()=>Lc}),Tl({circular:!0,createInternalComparator:()=>Lc}),Tl({circular:!0,createInternalComparator:()=>Lc,strict:!0});function Tl(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=bl(xl(e));return Cl({circular:t,comparator:a,createState:r,equals:n?n(a):Sl(a),strict:i})}var El=t((e=>{var t=r(),n=to();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=n.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),Dl=t(((e,t)=>{t.exports=El()}))(),Ol=(...e)=>t=>{e.forEach(e=>{typeof e==`function`?e(t):e&&(e.current=t)})},kl=({contentComponent:e})=>{let t=(0,yc.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,Z.jsx)(Z.Fragment,{children:Object.values(t)})};function Al(){let e=new Set,t={};return{subscribe(t){return e.add(t),()=>{e.delete(t)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:Qa.createPortal(r.reactElement,r.element,n)},e.forEach(e=>e())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(e=>e())}}}var jl=class extends $.Component{constructor(e){super(e),this.editorContentRef=$.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let e=this.props.editor;if(e&&!e.isDestroyed&&e.view.dom?.parentNode){if(e.contentComponent)return;let t=this.editorContentRef.current;t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t}),e.contentComponent=Al(),e.createNodeViews(),e.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){let e=this.props.editor;if(e){e.isEditorContentInitialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null;try{if(!e.view.dom?.parentNode)return;let t=document.createElement(`div`);t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{ref:Ol(t,this.editorContentRef),...n}),e?.contentComponent&&(0,Z.jsx)(kl,{contentComponent:e.contentComponent})]})}},Ml=(0,$.forwardRef)((e,t)=>{let n=$.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return $.createElement(jl,{key:n,innerRef:t,...e})}),Nl=$.memo(Ml),Pl=typeof window<`u`?$.useLayoutEffect:$.useEffect,Fl=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let e=()=>{this.transactionNumber+=1,this.subscribers.forEach(e=>e())},t=this.editor;return t.on(`transaction`,e),()=>{t.off(`transaction`,e)}}}};function Il(e){let[t]=(0,$.useState)(()=>new Fl(e.editor)),n=(0,Dl.useSyncExternalStoreWithSelector)(t.subscribe,t.getSnapshot,t.getServerSnapshot,e.selector,e.equalityFn??wl);return Pl(()=>t.watch(e.editor),[e.editor,t]),(0,$.useDebugValue)(n),n}var Ll=!1,Rl=typeof window>`u`,zl=Rl||!!(typeof window<`u`&&window.next),Bl=class e{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId=``,this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(e=>e())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0){if(Rl||zl){if(Ll)throw Error("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches.");return null}return this.createEditor()}if(this.options.current.immediatelyRender&&Rl&&Ll)throw Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){return new _({...this.options.current,onBeforeCreate:(...e)=>{var t;return(t=this.options.current).onBeforeCreate?.call(t,...e)},onBlur:(...e)=>{var t;return(t=this.options.current).onBlur?.call(t,...e)},onCreate:(...e)=>{var t;return(t=this.options.current).onCreate?.call(t,...e)},onDestroy:(...e)=>{var t;return(t=this.options.current).onDestroy?.call(t,...e)},onFocus:(...e)=>{var t;return(t=this.options.current).onFocus?.call(t,...e)},onSelectionUpdate:(...e)=>{var t;return(t=this.options.current).onSelectionUpdate?.call(t,...e)},onTransaction:(...e)=>{var t;return(t=this.options.current).onTransaction?.call(t,...e)},onUpdate:(...e)=>{var t;return(t=this.options.current).onUpdate?.call(t,...e)},onContentError:(...e)=>{var t;return(t=this.options.current).onContentError?.call(t,...e)},onDrop:(...e)=>{var t;return(t=this.options.current).onDrop?.call(t,...e)},onPaste:(...e)=>{var t;return(t=this.options.current).onPaste?.call(t,...e)},onDelete:(...e)=>{var t;return(t=this.options.current).onDelete?.call(t,...e)}})}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,t){return Object.keys(e).every(n=>[`onCreate`,`onBeforeCreate`,`onDestroy`,`onUpdate`,`onTransaction`,`onFocus`,`onBlur`,`onSelectionUpdate`,`onContentError`,`onDrop`,`onPaste`].includes(n)?!0:n===`extensions`&&e.extensions&&t.extensions?e.extensions.length===t.extensions.length?e.extensions.every((e,n)=>e===t.extensions?.[n]):!1:e[n]===t[n])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?e.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((t,n)=>t===e[n]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){let e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){t&&t.setOptions(this.options.current);return}t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function Vl(e={},t=[]){let n=(0,$.useRef)(e);n.current=e;let[r]=(0,$.useState)(()=>new Bl(n)),i=(0,yc.useSyncExternalStore)(r.subscribe,r.getEditor,r.getServerSnapshot);return(0,$.useDebugValue)(i),(0,$.useEffect)(r.onRender(t)),Il({editor:i,selector:({transactionNumber:t})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&t===0?0:t+1}),i}var Hl=(0,$.createContext)({editor:null});Hl.Consumer;var Ul=()=>(0,$.useContext)(Hl),Wl=(0,$.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),Gl=()=>(0,$.useContext)(Wl);function Kl({as:e=`div`,...t}){let{nodeViewContentRef:n,nodeViewContentChildren:r}=Gl();return(0,Z.jsx)(e,{...t,ref:n,"data-node-view-content":``,style:{whiteSpace:`pre-wrap`,...t.style},children:r})}var ql=$.forwardRef((e,t)=>{let{onDragStart:n}=Gl();return(0,Z.jsx)(e.as||`div`,{...e,ref:t,"data-node-view-wrapper":``,onDragStart:n,style:{whiteSpace:`normal`,...e.style}})});function Jl(e){return!!(typeof e==`function`&&e.prototype&&e.prototype.isReactComponent)}function Yl(e){return!!(typeof e==`object`&&e.$$typeof&&(e.$$typeof.toString()===`Symbol(react.forward_ref)`||e.$$typeof.description===`react.forward_ref`))}function Xl(e){return!!(typeof e==`object`&&e.$$typeof&&(e.$$typeof.toString()===`Symbol(react.memo)`||e.$$typeof.description===`react.memo`))}function Zl(e){if(Jl(e)||Yl(e))return!0;if(Xl(e)){let t=e.type;if(t)return Jl(t)||Yl(t)}return!1}function Ql(){try{if($.version)return parseInt($.version.split(`.`)[0],10)>=19}catch{}return!1}var $l=class{constructor(e,{editor:t,props:n={},as:r=`div`,className:i=``}){this.ref=null,this.destroyed=!1,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add(`react-renderer`),i&&this.element.classList.add(...i.split(` `)),this.editor.isEditorContentInitialized?(0,Qa.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}render(){var e;if(this.destroyed)return;let t=this.component,n=this.props,r=this.editor,i=Ql(),a=Zl(t),o={...n};o.ref&&!(i||a)&&delete o.ref,!o.ref&&(i||a)&&(o.ref=e=>{this.ref=e}),this.reactElement=(0,Z.jsx)(t,{...o}),(e=r?.contentComponent)==null||e.setRenderer(this.id,this)}updateProps(e={}){this.destroyed||(this.props={...this.props,...e},this.render())}destroy(){var e;this.destroyed=!0,(e=this.editor?.contentComponent)==null||e.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}};$.createContext({markViewContentRef:()=>{}});var eu=class extends xe{constructor(e,t,n){if(super(e,t,n),this.selectionRafId=null,this.positionCheckCallback=null,this.cachedExtensionWithSyncedStorage=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?`span`:`div`),this.contentDOMElement.dataset.nodeViewContentReact=``,this.contentDOMElement.dataset.nodeViewWrapper=``,this.contentDOMElement.style.whiteSpace=`inherit`;let e=this.dom.querySelector(`[data-node-view-content]`);if(!e)return;e.appendChild(this.contentDOMElement)}}get extensionWithSyncedStorage(){if(!this.cachedExtensionWithSyncedStorage){let e=this.editor,t=this.extension;this.cachedExtensionWithSyncedStorage=new Proxy(t,{get(n,r,i){return r===`storage`?e.storage[t.name]??{}:Reflect.get(n,r,i)}})}return this.cachedExtensionWithSyncedStorage}mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extensionWithSyncedStorage,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(e={})=>this.updateAttributes(e),deleteNode:()=>this.deleteNode(),ref:(0,$.createRef)()};if(!this.component.displayName){let e=e=>e.charAt(0).toUpperCase()+e.substring(1);this.component.displayName=e(this.extension.name)}let t={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:e=>{e&&this.contentDOMElement&&e.firstChild!==this.contentDOMElement&&(e.hasAttribute(`data-node-view-wrapper`)&&e.removeAttribute(`data-node-view-wrapper`),e.appendChild(this.contentDOMElement))}},n=this.component,r=(0,$.memo)(e=>(0,Z.jsx)(Wl.Provider,{value:t,children:(0,$.createElement)(n,e)}));r.displayName=`ReactNodeView`;let i=this.node.isInline?`span`:`div`;this.options.as&&(i=this.options.as);let{className:a=``}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new $l(r,{editor:this.editor,props:e,as:i,className:`node-${this.node.type.name} ${a}`.trim()}),this.editor.on(`selectionUpdate`,this.handleSelectionUpdate),this.updateElementAttributes(),this.currentPos=this.getPos(),this.positionCheckCallback=()=>{let e=this.getPos();typeof e!=`number`||e===this.currentPos||(this.currentPos=e,this.renderer.updateProps({getPos:()=>this.getPos()}),typeof this.options.attrs==`function`&&this.updateElementAttributes())},Qe(this.editor,this.positionCheckCallback)}get dom(){if(this.renderer.element.firstElementChild&&!this.renderer.element.firstElementChild?.hasAttribute(`data-node-view-wrapper`))throw Error(`Please use the NodeViewWrapper component for your node view.`);return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&=(cancelAnimationFrame(this.selectionRafId),null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;let{from:e,to:t}=this.editor.state.selection,n=this.currentPos;if(typeof n==`number`)if(e<=n&&t>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(e,t,n){let r=e=>{this.renderer.updateProps(e),typeof this.options.attrs==`function`&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update==`function`){let i=this.node,a=this.decorations,o=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.currentPos=this.getPos(),this.options.update({oldNode:i,oldDecorations:a,newNode:e,newDecorations:t,oldInnerDecorations:o,innerDecorations:n,updateProps:()=>r({node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage})})}let i=this.getPos();return e===this.node&&this.decorations===t&&this.innerDecorations===n?i===this.currentPos?!0:(this.currentPos=i,r({node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage,getPos:()=>this.getPos()}),!0):(this.node=e,this.decorations=t,this.innerDecorations=n,this.currentPos=i,r({node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage}),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add(`ProseMirror-selectednode`)}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove(`ProseMirror-selectednode`)}destroy(){this.renderer.destroy(),this.editor.off(`selectionUpdate`,this.handleSelectionUpdate),this.positionCheckCallback&&=(D(this.editor,this.positionCheckCallback),null),this.contentDOMElement=null,this.selectionRafId&&=(cancelAnimationFrame(this.selectionRafId),null)}updateElementAttributes(){if(this.options.attrs){let e={};if(typeof this.options.attrs==`function`){let t=this.editor.extensionManager.attributes,n=F(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}};function tu(e,t){return n=>n.editor.contentComponent?new eu(e,n,t):{}}var nu=(0,$.createContext)({get editor(){throw Error(`useTiptap must be used within a <Tiptap> provider`)}});nu.displayName=`TiptapContext`;var ru=()=>(0,$.useContext)(nu);function iu({editor:e,instance:t,children:n}){let r=e??t;if(!r)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let i=(0,$.useMemo)(()=>({editor:r}),[r]),a=(0,$.useMemo)(()=>({editor:r}),[r]);return(0,Z.jsx)(Hl.Provider,{value:a,children:(0,Z.jsx)(nu.Provider,{value:i,children:n})})}iu.displayName=`Tiptap`;function au({...e}){let{editor:t}=ru();return(0,Z.jsx)(Nl,{editor:t,...e})}au.displayName=`Tiptap.Content`,Object.assign(iu,{Content:au});var ou=()=>new Map,su=e=>{let t=ou();return e.forEach((e,n)=>{t.set(n,e)}),t},cu=(e,t,n)=>{let r=e.get(t);return r===void 0&&e.set(t,r=n()),r},lu=(e,t)=>{let n=[];for(let[r,i]of e)n.push(t(i,r));return n},uu=(e,t)=>{for(let[n,r]of e)if(t(r,n))return!0;return!1},du=()=>new Set,fu=e=>e[e.length-1],pu=(e,t)=>{for(let n=0;n<t.length;n++)e.push(t[n])},mu=Array.from,hu=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},gu=(e,t)=>{for(let n=0;n<e.length;n++)if(t(e[n],n,e))return!0;return!1},_u=(e,t)=>{let n=Array(e);for(let r=0;r<e;r++)n[r]=t(r,n);return n},vu=Array.isArray,yu=class{constructor(){this._observers=ou()}on(e,t){return cu(this._observers,e,du).add(t),t}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){let n=this._observers.get(e);n!==void 0&&(n.delete(t),n.size===0&&this._observers.delete(e))}emit(e,t){return mu((this._observers.get(e)||ou()).values()).forEach(e=>e(...t))}destroy(){this._observers=ou()}},bu=class{constructor(){this._observers=ou()}on(e,t){cu(this._observers,e,du).add(t)}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){let n=this._observers.get(e);n!==void 0&&(n.delete(t),n.size===0&&this._observers.delete(e))}emit(e,t){return mu((this._observers.get(e)||ou()).values()).forEach(e=>e(...t))}destroy(){this._observers=ou()}},xu=Math.floor,Su=Math.abs,Cu=(e,t)=>e<t?e:t,wu=(e,t)=>e>t?e:t;Number.isNaN;var Tu=e=>e===0?1/e<0:e<0,Eu=1<<17,Du=1<<18,Ou=1<<19,ku=1<<20,Au=1<<21,ju=1<<22,Mu=1<<23,Nu=1<<24,Pu=1<<25,Fu=1<<26,Iu=1<<27,Lu=1<<28,Ru=1<<29;Eu-1,Du-1,Ou-1,ku-1,Au-1,ju-1,Mu-1,Nu-1,Pu-1,Fu-1,Iu-1,Lu-1,Ru-1;var zu=2**53-1,Bu=-(2**53-1),Vu=Number.isInteger||(e=>typeof e==`number`&&isFinite(e)&&xu(e)===e);Number.isNaN,Number.parseInt;var Hu=String.fromCharCode;String.fromCodePoint,Hu(65535);var Uu=e=>e.toLowerCase(),Wu=/^\s*/g,Gu=e=>e.replace(Wu,``),Ku=/([A-Z])/g,qu=(e,t)=>Gu(e.replace(Ku,e=>`${t}${Uu(e)}`)),Ju=e=>{let t=unescape(encodeURIComponent(e)),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.codePointAt(e);return r},Yu=typeof TextEncoder<`u`?new TextEncoder:null,Xu=Yu?e=>Yu.encode(e):Ju,Zu=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});Zu&&Zu.decode(new Uint8Array).length===1&&(Zu=null);var Qu=(e,t)=>_u(t,()=>e).join(``),$u=class{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}},ed=()=>new $u,td=e=>{let t=ed();return e(t),rd(t)},nd=e=>{let t=e.cpos;for(let n=0;n<e.bufs.length;n++)t+=e.bufs[n].length;return t},rd=e=>{let t=new Uint8Array(nd(e)),n=0;for(let r=0;r<e.bufs.length;r++){let i=e.bufs[r];t.set(i,n),n+=i.length}return t.set(new Uint8Array(e.cbuf.buffer,0,e.cpos),n),t},id=(e,t)=>{let n=e.cbuf.length;n-e.cpos<t&&(e.bufs.push(new Uint8Array(e.cbuf.buffer,0,e.cpos)),e.cbuf=new Uint8Array(wu(n,t)*2),e.cpos=0)},ad=(e,t)=>{let n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(n*2),e.cpos=0),e.cbuf[e.cpos++]=t},od=ad,sd=(e,t)=>{for(;t>127;)ad(e,128|127&t),t=xu(t/128);ad(e,127&t)},cd=(e,t)=>{let n=Tu(t);for(n&&(t=-t),ad(e,(t>63?128:0)|(n?64:0)|63&t),t=xu(t/64);t>0;)ad(e,(t>127?128:0)|127&t),t=xu(t/128)},ld=new Uint8Array(3e4),ud=ld.length/3,dd=Yu&&Yu.encodeInto?(e,t)=>{if(t.length<ud){let n=Yu.encodeInto(t,ld).written||0;sd(e,n);for(let t=0;t<n;t++)ad(e,ld[t])}else pd(e,Xu(t))}:(e,t)=>{let n=unescape(encodeURIComponent(t)),r=n.length;sd(e,r);for(let t=0;t<r;t++)ad(e,n.codePointAt(t))},fd=(e,t)=>{let n=e.cbuf.length,r=e.cpos,i=Cu(n-r,t.length),a=t.length-i;e.cbuf.set(t.subarray(0,i),r),e.cpos+=i,a>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(wu(n*2,a)),e.cbuf.set(t.subarray(i)),e.cpos=a)},pd=(e,t)=>{sd(e,t.byteLength),fd(e,t)},md=(e,t)=>{id(e,t);let n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n},hd=(e,t)=>md(e,4).setFloat32(0,t,!1),gd=(e,t)=>md(e,8).setFloat64(0,t,!1),_d=(e,t)=>md(e,8).setBigInt64(0,t,!1),vd=new DataView(new ArrayBuffer(4)),yd=e=>(vd.setFloat32(0,e),vd.getFloat32(0)===e),bd=(e,t)=>{switch(typeof t){case`string`:ad(e,119),dd(e,t);break;case`number`:Vu(t)&&Su(t)<=2147483647?(ad(e,125),cd(e,t)):yd(t)?(ad(e,124),hd(e,t)):(ad(e,123),gd(e,t));break;case`bigint`:ad(e,122),_d(e,t);break;case`object`:if(t===null)ad(e,126);else if(vu(t)){ad(e,117),sd(e,t.length);for(let n=0;n<t.length;n++)bd(e,t[n])}else if(t instanceof Uint8Array)ad(e,116),pd(e,t);else{ad(e,118);let n=Object.keys(t);sd(e,n.length);for(let r=0;r<n.length;r++){let i=n[r];dd(e,i),bd(e,t[i])}}break;case`boolean`:ad(e,t?120:121);break;default:ad(e,127)}},xd=class extends $u{constructor(e){super(),this.w=e,this.s=null,this.count=0}write(e){this.s===e?this.count++:(this.count>0&&sd(this,this.count-1),this.count=1,this.w(this,e),this.s=e)}},Sd=e=>{e.count>0&&(cd(e.encoder,e.count===1?e.s:-e.s),e.count>1&&sd(e.encoder,e.count-2))},Cd=class{constructor(){this.encoder=new $u,this.s=0,this.count=0}write(e){this.s===e?this.count++:(Sd(this),this.count=1,this.s=e)}toUint8Array(){return Sd(this),rd(this.encoder)}},wd=e=>{if(e.count>0){let t=e.diff*2+(e.count===1?0:1);cd(e.encoder,t),e.count>1&&sd(e.encoder,e.count-2)}},Td=class{constructor(){this.encoder=new $u,this.s=0,this.count=0,this.diff=0}write(e){this.diff===e-this.s?(this.s=e,this.count++):(wd(this),this.count=1,this.diff=e-this.s,this.s=e)}toUint8Array(){return wd(this),rd(this.encoder)}},Ed=class{constructor(){this.sarr=[],this.s=``,this.lensE=new Cd}write(e){this.s+=e,this.s.length>19&&(this.sarr.push(this.s),this.s=``),this.lensE.write(e.length)}toUint8Array(){let e=new $u;return this.sarr.push(this.s),this.s=``,dd(e,this.sarr.join(``)),fd(e,this.lensE.toUint8Array()),rd(e)}},Dd=e=>Error(e),Od=()=>{throw Dd(`Method unimplemented`)},kd=()=>{throw Dd(`Unexpected case`)},Ad=Dd(`Unexpected end of array`),jd=Dd(`Integer out of Range`),Md=class{constructor(e){this.arr=e,this.pos=0}},Nd=e=>new Md(e),Pd=e=>e.pos!==e.arr.length,Fd=(e,t)=>{let n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n},Id=e=>Fd(e,Rd(e)),Ld=e=>e.arr[e.pos++],Rd=e=>{let t=0,n=1,r=e.arr.length;for(;e.pos<r;){let r=e.arr[e.pos++];if(t+=(r&127)*n,n*=128,r<128)return t;if(t>zu)throw jd}throw Ad},zd=e=>{let t=e.arr[e.pos++],n=t&63,r=64,i=(t&64)>0?-1:1;if(!(t&128))return i*n;let a=e.arr.length;for(;e.pos<a;){if(t=e.arr[e.pos++],n+=(t&127)*r,r*=128,t<128)return i*n;if(n>zu)throw jd}throw Ad},Bd=Zu?e=>Zu.decode(Id(e)):e=>{let t=Rd(e);if(t===0)return``;{let n=String.fromCodePoint(Ld(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(Ld(e));else for(;t>0;){let r=t<1e4?t:1e4,i=e.arr.subarray(e.pos,e.pos+r);e.pos+=r,n+=String.fromCodePoint.apply(null,i),t-=r}return decodeURIComponent(escape(n))}},Vd=(e,t)=>{let n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n},Hd=[e=>void 0,e=>null,zd,e=>Vd(e,4).getFloat32(0,!1),e=>Vd(e,8).getFloat64(0,!1),e=>Vd(e,8).getBigInt64(0,!1),e=>!1,e=>!0,Bd,e=>{let t=Rd(e),n={};for(let r=0;r<t;r++){let t=Bd(e);n[t]=Ud(e)}return n},e=>{let t=Rd(e),n=[];for(let r=0;r<t;r++)n.push(Ud(e));return n},Id],Ud=e=>Hd[127-Ld(e)](e),Wd=class extends Md{constructor(e,t){super(e),this.reader=t,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),Pd(this)?this.count=Rd(this)+1:this.count=-1),this.count--,this.s}},Gd=class extends Md{constructor(e){super(e),this.s=0,this.count=0}read(){if(this.count===0){this.s=zd(this);let e=Tu(this.s);this.count=1,e&&(this.s=-this.s,this.count=Rd(this)+2)}return this.count--,this.s}},Kd=class extends Md{constructor(e){super(e),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){let e=zd(this),t=e&1;this.diff=xu(e/2),this.count=1,t&&(this.count=Rd(this)+2)}return this.s+=this.diff,this.count--,this.s}},qd=class{constructor(e){this.decoder=new Gd(e),this.str=Bd(this.decoder),this.spos=0}read(){let e=this.spos+this.decoder.read(),t=this.str.slice(this.spos,e);return this.spos=e,t}};crypto.subtle;var Jd=crypto.getRandomValues.bind(crypto),Yd=Math.random,Xd=()=>Jd(new Uint32Array(1))[0],Zd=e=>e[xu(Yd()*e.length)],Qd=`10000000-1000-4000-8000-100000000000`,$d=()=>Qd.replace(/[018]/g,e=>(e^Xd()&15>>e/4).toString(16)),ef=Date.now,tf=e=>new Promise(e);Promise.all.bind(Promise);var nf=e=>e===void 0?null:e,rf=new class{constructor(){this.map=new Map}setItem(e,t){this.map.set(e,t)}getItem(e){return this.map.get(e)}};try{typeof localStorage<`u`&&localStorage&&(rf=localStorage)}catch{}var af=rf,of=Symbol(`Equality`),sf=(e,t)=>e===t||!!e?.[of]?.(t)||!1,cf=e=>typeof e==`object`,lf=Object.assign,uf=Object.keys,df=(e,t)=>{for(let n in e)t(e[n],n)},ff=e=>uf(e).length,pf=e=>{for(let t in e)return!1;return!0},mf=(e,t)=>{for(let n in e)if(!t(e[n],n))return!1;return!0},hf=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),gf=(e,t)=>e===t||ff(e)===ff(t)&&mf(e,(e,n)=>(e!==void 0||hf(t,n))&&sf(t[n],e)),_f=Object.freeze,vf=e=>{for(let t in e){let n=e[t];(typeof n==`object`||typeof n==`function`)&&vf(e[t])}return _f(e)},yf=(e,t,n=0)=>{try{for(;n<e.length;n++)e[n](...t)}finally{n<e.length&&yf(e,t,n+1)}},bf=e=>e,xf=(e,t)=>{if(e===t)return!0;if(e==null||t==null||e.constructor!==t.constructor&&(e.constructor||Object)!==(t.constructor||Object))return!1;if(e[of]!=null)return e[of](t);switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;break;case Set:if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;break;case Map:if(e.size!==t.size)return!1;for(let n of e.keys())if(!t.has(n)||!xf(e.get(n),t.get(n)))return!1;break;case void 0:case Object:if(ff(e)!==ff(t))return!1;for(let n in e)if(!hf(e,n)||!xf(e[n],t[n]))return!1;break;case Array:if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!xf(e[n],t[n]))return!1;break;default:return!1}return!0},Sf=(e,t)=>t.includes(e),Cf=typeof process<`u`&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`,wf=typeof window<`u`&&typeof document<`u`&&!Cf;typeof navigator<`u`&&/Mac/.test(navigator.platform);var Tf,Ef=[],Df=()=>{if(Tf===void 0)if(Cf){Tf=ou();let e=process.argv,t=null;for(let n=0;n<e.length;n++){let r=e[n];r[0]===`-`?(t!==null&&Tf.set(t,``),t=r):t===null?Ef.push(r):(Tf.set(t,r),t=null)}t!==null&&Tf.set(t,``)}else typeof location==`object`?(Tf=ou(),(location.search||`?`).slice(1).split(`&`).forEach(e=>{if(e.length!==0){let[t,n]=e.split(`=`);Tf.set(`--${qu(t,`-`)}`,n),Tf.set(`-${qu(t,`-`)}`,n)}})):Tf=ou();return Tf},Of=e=>Df().has(e),kf=e=>nf(Cf?{}[e.toUpperCase().replaceAll(`-`,`_`)]:af.getItem(e)),Af=e=>Of(`--`+e)||kf(e)!==null,jf=Af(`production`),Mf=Cf&&Sf({}.FORCE_COLOR,[`true`,`1`,`2`])||!Of(`--no-colors`)&&!Af(`no-color`)&&(!Cf||process.stdout.isTTY)&&(!Cf||Of(`--color`)||kf(`COLORTERM`)!==null||(kf(`TERM`)||``).includes(`color`)),Nf=e=>new Uint8Array(e),Pf=wf?e=>{let t=``;for(let n=0;n<e.byteLength;n++)t+=Hu(e[n]);return btoa(t)}:e=>Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString(`base64`),Ff=e=>{let t=Nf(e.byteLength);return t.set(e),t},If=e=>td(t=>bd(t,e)),Lf=class{constructor(e,t){this.left=e,this.right=t}},Rf=(e,t)=>new Lf(e,t),zf=(e,t)=>e.forEach(e=>t(e.left,e.right)),Bf=e=>e.next()>=.5,Vf=(e,t,n)=>xu(e.next()*(n+1-t)+t),Hf=(e,t,n)=>xu(e.next()*(n+1-t)+t),Uf=(e,t,n)=>Hf(e,t,n),Wf=e=>Hu(Uf(e,97,122)),Gf=(e,t=0,n=20)=>{let r=Uf(e,t,n),i=``;for(let t=0;t<r;t++)i+=Wf(e);return i},Kf=(e,t)=>t[Uf(e,0,t.length-1)],qf=Symbol(`0schema`),Jf=class{constructor(){this._rerrs=[]}extend(e,t,n,r=null){this._rerrs.push({path:e,expected:t,has:n,message:r})}toString(){let e=[];for(let t=this._rerrs.length-1;t>0;t--){let n=this._rerrs[t];e.push(Qu(` `,(this._rerrs.length-t)*2)+`${n.path==null?``:`[${n.path}] `}${n.has} doesn't match ${n.expected}. ${n.message}`)}return e.join(`
|
|
2
|
+
import{o as e,t}from"./chunk-CFjPhJqf.js";import{t as n}from"./preload-helper-2ej06EnG.js";import{n as r,r as i,t as a}from"./compiler-runtime-CVnuRdak.js";import{n as o,r as s}from"./dist-CQw2y-s3.js";import{$n as c,$r as l,A as u,Ai as d,An as f,At as p,B as m,Bi as h,Bn as g,Br as _,Ci as v,Cn as y,Cr as b,Di as x,Dn as S,Dr as C,Fi as w,Fn as T,G as E,Gr as D,Gt as O,H as k,Hr as A,I as j,In as M,Ir as N,It as P,Jr as F,Jt as I,K as L,Ki as R,Kn as ee,Kr as z,Kt as te,Ln as B,Lr as V,Mn as ne,Nn as H,Nt as U,Oi as W,On as G,Ot as K,P as re,Pn as ie,Pt as ae,Q as oe,Qn as q,Qr as se,R as ce,Rr as le,S as ue,Tn as de,Tt as fe,Un as pe,Ut as me,V as he,Vi as ge,Vr as _e,Vt as ve,W as ye,Wn as be,Wr as xe,Yn as Se,Yr as Ce,Yt as we,Z as Te,Zn as Ee,_ as De,_i as Oe,_n as ke,_r as Ae,ai as je,ar as Me,b as Ne,bi as Pe,c as Fe,ci as Ie,cn as Le,d as Re,di as ze,dt as Be,er as Ve,et as He,f as Ue,fi as We,fn as Ge,g as Ke,gi as qe,gn as Je,h as Ye,hi as Xe,hr as Ze,ii as Qe,jn as $e,ki as et,kn as tt,kt as nt,l as rt,ln as it,lt as at,m as ot,mi as st,mn as ct,mr as lt,mt as ut,ni as dt,nr as ft,nt as pt,o as mt,pi as ht,pn as gt,pt as _t,q as vt,qn as yt,qr as bt,qt as xt,ri as St,rr as Ct,rt as wt,s as Tt,si as Et,sn as Dt,sr as Ot,st as kt,tr as At,tt as jt,u as Mt,ui as Nt,ur as Pt,ut as Ft,vi as It,vr as Lt,wn as Rt,wr as zt,xi as Bt,xn as Vt,y as Ht,yi as Ut,z as Wt,zi as Gt,zr as Kt}from"./dist-GmorMgHF.js";import{t as qt}from"./react-dom-C-oc-P2K.js";import{c as Jt,i as Yt,l as Xt,o as Zt,r as Qt,s as $t,t as en,u as J}from"./button-DGf25ccp.js";import{_ as tn,a as nn,c as rn,d as an,f as on,g as sn,h as cn,i as ln,l as un,m as dn,n as fn,o as pn,p as mn,r as hn,s as gn,t as _n,u as vn}from"./dialog-CIq9aQLf.js";import{t as yn}from"./chevron-down-CzFz_0zd.js";import{t as bn}from"./chevron-right-jyIhGBkw.js";import{a as xn,c as Sn,i as Cn,l as wn,o as Tn,r as En,s as Dn,u as On}from"./prop-types-C_2IQGCC.js";import{d as kn,f as An,i as jn,l as Mn,m as Nn,n as Pn,p as Fn,t as In,u as Ln}from"./config-context-DhhN0rlf.js";import{i as Rn,n as zn,r as Bn,t as Vn}from"./collapsible-CjgfK1G5.js";import{n as Hn,r as Un}from"./dist-KBKQayVB.js";import{l as Wn,n as Gn,t as Kn,u as qn}from"./documents-events-CSQluyCM.js";import{t as Jn}from"./trace-api-MhJXZpsM.js";import{n as Yn,t as Xn}from"./propagation-api-CR2CQW4x.js";import{a as Zn,c as Qn,d as $n,f as er,i as tr,l as nr,n as rr,o as ir,r as ar,s as or,t as sr}from"./dist-BXd_K33i.js";import{a as cr,i as lr,n as ur,t as dr}from"./tooltip-DiL7DBhT.js";import{_ as fr,a as pr,c as mr,g as hr,h as gr,i as _r,l as vr,m as yr,n as br,p as xr,r as Sr,t as Cr,u as wr}from"./dist-ICp_3rWY.js";import{t as Tr}from"./dist-ug68MPTZ.js";import{t as Er}from"./input-DkQ8Zmzd.js";import{C as Dr,O as Or,S as kr,T as Ar,a as jr,l as Mr,n as Nr,s as Pr,v as Fr,w as Ir,y as Lr}from"./navigation-targets-CXdtVjj4.js";import{a as Y,o as Rr,t as zr}from"./startup-marks-CWTDb1CP.js";import{t as Br}from"./file-tree-rename-validation-BqGkSO9-.js";import{Bt as Vr,C as Hr,Ct as Ur,D as Wr,Dt as Gr,E as Kr,Et as qr,F as Jr,Ft as Yr,Ht as Xr,It as Zr,J as Qr,L as $r,Lt as ei,Mt as ti,N as ni,O as ri,Ot as ii,P as ai,Pt as oi,Q as si,R as X,S as ci,St as li,Tt as ui,V as di,Vt as fi,X as pi,Y as mi,a as hi,c as gi,dt as _i,f as vi,j as yi,l as bi,n as xi,o as Si,q as Ci,r as wi,t as Ti,ut as Ei,xt as Di}from"./dist-DWaLpHcz.js";import{n as Oi,r as ki,t as Ai}from"./dist-CHEQzAl9.js";import{t as ji}from"./dist-C3ftUzLd.js";import{n as Mi}from"./dist-BgLh90uo2.js";import{n as Ni}from"./dist-BZEgBj4N.js";import{n as Pi}from"./dist-Dtxdqotp.js";import{i as Fi,n as Ii,r as Li}from"./dist-E5KjgWw7.js";import{n as Ri}from"./dist-BdwnfcKi.js";import{t as zi}from"./stex-coA_FIxI.js";var Z=i();(function(){var e=[`user-blocking`,`user-visible`,`background`];class t{constructor(){this.t=new MessageChannel,this.i=this.t.port2,this.l={},this.o=1,this.t.port1.onmessage=e=>this.h(e)}u(e){var t=this.o++;return this.l[t]=e,this.i.postMessage(t),t}p(e){delete this.l[e]}h(e){var t=e.data;if(t in this.l){var n=this.l[t];delete this.l[t],n()}}}function n(){return n.v||=new t,n.v}class r{constructor(e,t,n){n===void 0&&(n=0),this.k=e,this.T=null,this.C=null,this.m=!1,this._(t,n)}isIdleCallback(){return this.T===0}I(){return this.T===2}cancel(){if(!this.m)switch(this.m=!0,this.T){case 0:cancelIdleCallback(this.C);break;case 1:clearTimeout(this.C);break;case 2:n().p(this.C);break;default:throw TypeError(`Unknown CallbackType`)}}_(t,r){if(r&&r>0)return this.T=1,void(this.C=setTimeout(()=>{this.P()},r));if(!e.includes(t))throw TypeError(`Invalid task priority : `+t);t===`background`&&typeof requestIdleCallback==`function`?(this.T=0,this.C=requestIdleCallback(()=>{this.P()})):typeof MessageChannel==`function`?(this.T=2,this.C=n().u(()=>{this.P()})):(this.T=1,this.C=setTimeout(()=>{this.P()}))}P(){this.m||this.k()}}var i=0;class a{constructor(){this.j=null,this.M=null}isEmpty(){return this.j==null}push(e){if(typeof e!=`object`)throw TypeError(`Task must be an Object`);e.A=i++,this.isEmpty()?(e.N=null,this.j=e):(e.N=this.M,this.M.O=e),e.O=null,this.M=e}takeNextTask(){if(this.isEmpty())return null;var e=this.j;return this.q(e),e}merge(e,t){if(typeof t!=`function`)throw TypeError(`Must provide a selector function.`);if(e==null)throw Error(`sourceQueue cannot be null`);for(var n=this.j,r=null,i=e.j;i;){var a=i;if(i=i.O,t(a)){for(e.q(a);n&&n.A<a.A;)r=n,n=n.O;this.D(a,r),r=a}}}D(e,t){if(t!=this.M){var n=t?t.O:this.j;e.O=n,n.N=e,e.N=t,t==null?this.j=e:t.O=e}else this.push(e)}q(e){if(e==null)throw Error(`Expected task to be non-null`);e===this.j&&(this.j=e.O),e===this.M&&(this.M=this.M.N),e.O&&(e.O.N=e.N),e.N&&(e.N.O=e.O)}}class o extends Event{constructor(t,n){if(!n||!e.includes(n.previousPriority))throw TypeError(`Invalid task priority: '`+n.previousPriority+`'`);super(t),this.previousPriority=n.previousPriority}}class s extends AbortController{constructor(t){if(t===void 0&&(t={}),super(),t??={},typeof t!=`object`)throw TypeError(`'init' is not an object`);var n,r,i=t.priority===void 0?`user-visible`:t.priority;if(!e.includes(i))throw TypeError(`Invalid task priority: '`+i+`'`);this.H=i,this.R=!1,r=(n=this).signal,Object.defineProperties(r,{priority:{get:function(){return n.H},enumerable:!0},onprioritychange:{value:null,writable:!0,enumerable:!0}}),r.addEventListener(`prioritychange`,e=>{r.onprioritychange&&r.onprioritychange(e)})}setPriority(t){if(!e.includes(t))throw TypeError(`Invalid task priority: `+t);if(this.R)throw new DOMException(``,`NotAllowedError`);if(this.signal.priority!==t){this.R=!0;var n=this.H;this.H=t;var r=new o(`prioritychange`,{previousPriority:n});this.signal.dispatchEvent(r),this.R=!1}}}self.scheduler===void 0?(self.scheduler=new class{constructor(){this.S={},e.forEach(e=>{this.S[e]=[new a,new a]}),this.U=null,this.W=new WeakMap}yield(){return this.B(()=>{},{priority:`user-visible`},!0)}postTask(e,t){return this.B(e,t,!1)}B(t,n,r){if((n=Object.assign({},n)).signal!==void 0){if(n.signal===null||!(`aborted`in n.signal)||typeof n.signal.addEventListener!=`function`)return Promise.reject(TypeError(`'signal' is not a valid 'AbortSignal'`));if(n.signal&&n.signal.priority&&!e.includes(n.signal.priority))return Promise.reject(TypeError(`Invalid task priority: '`+n.signal.priority+`'`))}if(n.priority!==void 0&&(n.priority===null||!e.includes(n.priority)))return Promise.reject(TypeError(`Invalid task priority: '`+n.priority+`'`));if(n.delay===void 0&&(n.delay=0),n.delay=Number(n.delay),n.delay<0)return Promise.reject(TypeError(`'delay' must be a positive number.`));var i={callback:t,options:n,resolve:null,reject:null,hostCallback:null,abortCallback:null,onTaskCompleted:function(){this.options.signal&&this.abortCallback&&(this.options.signal.removeEventListener(`abort`,this.abortCallback),this.abortCallback=null)},onTaskAborted:function(){this.hostCallback&&=(this.hostCallback.cancel(),null),this.options.signal.removeEventListener(`abort`,this.abortCallback),this.abortCallback=null,this.reject(this.options.signal.reason)},isAborted:function(){return this.options.signal&&this.options.signal.aborted},isContinuation:r},a=new Promise((e,t)=>{i.resolve=e,i.reject=t});return this._(i),a}_(e){var t=e.options.signal;if(t){if(t.aborted)return void e.reject(t.reason);e.abortCallback=()=>{e.onTaskAborted()},t.addEventListener(`abort`,e.abortCallback)}e.options.delay>0?e.hostCallback=new r(()=>{e.hostCallback=null,this.F(e)},null,e.options.delay):(this.G(e),this.J())}F(e){this.G(e),this.U&&=(this.U.cancel(),null),this.K()}L(e){var t=this.W.get(e);if(t===void 0)throw Error(`Attempting to change priority on an unregistered signal`);if(t!==e.priority){for(var n=0;n<2;n++)this.S[e.priority][n].merge(this.S[t][n],t=>t.options.signal===e);this.W.set(e,e.priority)}}K(){this.U=null,this.V(),this.J()}J(){var{priority:e}=this.X();e!=null&&(e!==`background`&&this.U&&this.U.isIdleCallback()&&(this.U.cancel(),this.U=null),this.U||=new r(()=>{this.K()},e,0))}G(t){var n;if(!e.includes(n=t.options.priority?t.options.priority:t.options.signal&&t.options.signal.priority?t.options.signal.priority:`user-visible`))throw TypeError(`Invalid task priority: `+n);if(t.options.signal&&t.options.signal.priority){var r=t.options.signal;this.W.has(r)||(r.addEventListener(`prioritychange`,()=>{this.L(r)}),this.W.set(r,r.priority))}this.S[n][+!t.isContinuation].push(t)}V(){var e=null;do{var{priority:t,type:n}=this.X();if(t==null)return;e=this.S[t][n].takeNextTask()}while(e.isAborted());try{var r=e.callback();e.resolve(r)}catch(t){e.reject(t)}finally{e.onTaskCompleted()}}X(){for(var t=0;t<e.length;t++)for(var n=e[t],r=0;r<2;r++)if(!this.S[n][r].isEmpty())return{priority:n,type:r};return{priority:null,type:0}}},self.TaskController=s,self.TaskPriorityChangeEvent=o):self.scheduler.yield||(self.scheduler.yield=function(){return self.scheduler.postTask(()=>{},{priority:`user-blocking`})})})();var Bi=J(`app-window`,[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]),Vi=J(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),Hi=J(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),Ui=J(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Wi=J(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Gi=J(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),Ki=J(`box`,[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]),qi=J(`bug`,[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]),Ji=J(`chart-column`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]),Yi=J(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Xi=J(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Zi=J(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Qi=J(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),$i=J(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),ea=J(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),ta=J(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),na=J(`eraser`,[[`path`,{d:`M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21`,key:`g5wo59`}],[`path`,{d:`m5.082 11.09 8.828 8.828`,key:`1wx5vj`}]]),ra=J(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),ia=J(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),aa=J(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),oa=J(`file-image`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`10`,cy:`12`,r:`2`,key:`737tya`}],[`path`,{d:`m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22`,key:`wt3hpn`}]]),sa=J(`file-plus-corner`,[[`path`,{d:`M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35`,key:`17jvcc`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M14 19h6`,key:`bvotb8`}],[`path`,{d:`M17 16v6`,key:`18yu1i`}]]),ca=J(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),la=J(`file-up`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`m15 15-3-3-3 3`,key:`15xj92`}]]),ua=J(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),da=J(`film`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M7 3v18`,key:`bbkbws`}],[`path`,{d:`M3 7.5h4`,key:`zfgn84`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`path`,{d:`M3 16.5h4`,key:`1230mu`}],[`path`,{d:`M17 3v18`,key:`in4fa5`}],[`path`,{d:`M17 7.5h4`,key:`myr1c1`}],[`path`,{d:`M17 16.5h4`,key:`go4c1d`}]]),fa=J(`flask-conical`,[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]),pa=J(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),ma=J(`hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]),ha=J(`heading-1`,[[`path`,{d:`M4 12h8`,key:`17cfdx`}],[`path`,{d:`M4 18V6`,key:`1rz3zl`}],[`path`,{d:`M12 18V6`,key:`zqpxq5`}],[`path`,{d:`m17 12 3-2v8`,key:`1hhhft`}]]),ga=J(`heading-2`,[[`path`,{d:`M4 12h8`,key:`17cfdx`}],[`path`,{d:`M4 18V6`,key:`1rz3zl`}],[`path`,{d:`M12 18V6`,key:`zqpxq5`}],[`path`,{d:`M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1`,key:`9jr5yi`}]]),_a=J(`heading-3`,[[`path`,{d:`M4 12h8`,key:`17cfdx`}],[`path`,{d:`M4 18V6`,key:`1rz3zl`}],[`path`,{d:`M12 18V6`,key:`zqpxq5`}],[`path`,{d:`M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2`,key:`68ncm8`}],[`path`,{d:`M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2`,key:`1ejuhz`}]]),va=J(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),ya=J(`layout-grid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),ba=J(`layout-panel-top`,[[`rect`,{width:`18`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`f1a2em`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}]]),xa=J(`lightbulb`,[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),Sa=J(`link-2-off`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7`,key:`10o201`}],[`path`,{d:`M15 7h2a5 5 0 0 1 4 8`,key:`1d3206`}],[`line`,{x1:`8`,x2:`12`,y1:`12`,y2:`12`,key:`rvw6j4`}],[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}]]),Ca=[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]],wa=J(`link-2`,Ca),Ta=J(`list-ordered`,[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]),Ea=J(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),Da=J(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),Oa=J(`message-square-warning`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 15h.01`,key:`q59x07`}],[`path`,{d:`M12 7v4`,key:`xawao1`}]]),ka=J(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),Aa=J(`octagon-alert`,[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]]),ja=J(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),Ma=J(`panel-top`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]),Na=J(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),Pa=J(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Fa=J(`quote`,[[`path`,{d:`M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`rib7q0`}],[`path`,{d:`M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`1ymkrd`}]]),Ia=J(`refresh-ccw`,[[`path`,{d:`M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`14sxne`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16`,key:`1hlbsb`}],[`path`,{d:`M16 16h5v5`,key:`ccwih5`}]]),La=J(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Ra=J(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),za=J(`shapes`,[[`path`,{d:`M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z`,key:`1bo67w`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}],[`circle`,{cx:`17.5`,cy:`17.5`,r:`3.5`,key:`w3z12y`}]]),Ba=J(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),Va=J(`sigma`,[[`path`,{d:`M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2`,key:`wuwx1p`}]]),Ha=J(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),Ua=J(`square-play`,[[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z`,key:`kmsa83`}]]),Wa=J(`superscript`,[[`path`,{d:`m4 19 8-8`,key:`hr47gm`}],[`path`,{d:`m12 19-8-8`,key:`1dhhmo`}],[`path`,{d:`M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06`,key:`1dfcux`}]]),Ga=J(`table-2`,[[`path`,{d:`M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18`,key:`gugj83`}]]),Ka=J(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),qa=J(`volume-2`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]),Ja=J(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),Ya=J(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),Xa=J(`zoom-in`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),Za=J(`zoom-out`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),Qa=e(qt(),1),Q=a(),$=e(r(),1);function $a(e,t){let n=(0,Q.c)(7),r,i;n[0]!==e||n[1]!==t?(r=()=>{if(t!==`light`&&t!==`dark`&&t!==`system`||!e)return;let n=!1;return e.setThemeSource(t).catch(e=>{console.warn(JSON.stringify({event:`theme-source-set-failed`,themeValue:t,error:e instanceof Error?e.message:String(e)}))}).finally(()=>{if(n)return;let t=window.matchMedia(`(prefers-reduced-transparency: reduce)`).matches;e.signalThemeApplied({reducedTransparency:t})}),()=>{n=!0}},i=[e,t],n[0]=e,n[1]=t,n[2]=r,n[3]=i):(r=n[2],i=n[3]),(0,$.useEffect)(r,i);let a,o;n[4]===e?(a=n[5],o=n[6]):(a=()=>{if(!e)return;let t=window.matchMedia(`(prefers-reduced-transparency: reduce)`),n=t=>{e.signalThemeApplied({reducedTransparency:t.matches})};return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}},o=[e],n[4]=e,n[5]=a,n[6]=o),(0,$.useEffect)(a,o)}var eo=t((e=>{var t=r();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),to=t(((e,t)=>{t.exports=eo()}));function no(e,[t,n]){return Math.min(n,Math.max(t,e))}var ro=`Popover`,[io,ao]=$n(ro,[pr]),oo=pr(),[so,co]=io(ro),lo=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=oo(t),c=$.useRef(null),[l,u]=$.useState(!1),[d,f]=or({prop:r,defaultProp:i??!1,onChange:a,caller:ro});return(0,Z.jsx)(_r,{...s,children:(0,Z.jsx)(so,{scope:t,contentId:Zn(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:$.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:$.useCallback(()=>u(!0),[]),onCustomAnchorRemove:$.useCallback(()=>u(!1),[]),modal:o,children:n})})};lo.displayName=ro;var uo=`PopoverAnchor`,fo=$.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=co(uo,n),a=oo(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return $.useEffect(()=>(o(),()=>s()),[o,s]),(0,Z.jsx)(Cr,{...a,...r,ref:t})});fo.displayName=uo;var po=`PopoverTrigger`,mo=$.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=co(po,n),a=oo(n),o=$t(t,i.triggerRef),s=(0,Z.jsx)(er.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":ko(i.open),...r,ref:o,onClick:nr(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,Z.jsx)(Cr,{asChild:!0,...a,children:s})});mo.displayName=po;var ho=`PopoverPortal`,[go,_o]=io(ho,{forceMount:void 0}),vo=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=co(ho,t);return(0,Z.jsx)(go,{scope:t,forceMount:n,children:(0,Z.jsx)(ir,{present:n||a.open,children:(0,Z.jsx)(rr,{asChild:!0,container:i,children:r})})})};vo.displayName=ho;var yo=`PopoverContent`,bo=$.forwardRef((e,t)=>{let n=_o(yo,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=co(yo,e.__scopePopover);return(0,Z.jsx)(ir,{present:r||a.open,children:a.modal?(0,Z.jsx)(So,{...i,ref:t}):(0,Z.jsx)(Co,{...i,ref:t})})});bo.displayName=yo;var xo=Yt(`PopoverContent.RemoveScroll`),So=$.forwardRef((e,t)=>{let n=co(yo,e.__scopePopover),r=$.useRef(null),i=$t(t,r),a=$.useRef(!1);return $.useEffect(()=>{let e=r.current;if(e)return mn(e)},[]),(0,Z.jsx)(dn,{as:xo,allowPinchZoom:!0,children:(0,Z.jsx)(wo,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:nr(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:nr(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:nr(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Co=$.forwardRef((e,t)=>{let n=co(yo,e.__scopePopover),r=$.useRef(!1),i=$.useRef(!1);return(0,Z.jsx)(wo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),wo=$.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=co(yo,n),p=oo(n);return cn(),(0,Z.jsx)(sn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,Z.jsx)(ar,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,Z.jsx)(Sr,{"data-state":ko(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),To=`PopoverClose`,Eo=$.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=co(To,n);return(0,Z.jsx)(er.button,{type:`button`,...r,ref:t,onClick:nr(e.onClick,()=>i.onOpenChange(!1))})});Eo.displayName=To;var Do=`PopoverArrow`,Oo=$.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=oo(n);return(0,Z.jsx)(br,{...i,...r,ref:t})});Oo.displayName=Do;function ko(e){return e?`open`:`closed`}var Ao=lo,jo=fo,Mo=mo,No=vo,Po=bo,Fo=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Io=[` `,`Enter`],Lo=`Select`,[Ro,zo,Bo]=fr(Lo),[Vo,Ho]=$n(Lo,[Bo,pr]),Uo=pr(),[Wo,Go]=Vo(Lo),[Ko,qo]=Vo(Lo),Jo=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m}=e,h=Uo(t),[g,_]=$.useState(null),[v,y]=$.useState(null),[b,x]=$.useState(!1),S=hr(l),[C,w]=or({prop:r,defaultProp:i??!1,onChange:a,caller:Lo}),[T,E]=or({prop:o,defaultProp:s,onChange:c,caller:Lo}),D=$.useRef(null),O=g?m||!!g.closest(`form`):!0,[k,A]=$.useState(new Set),j=Array.from(k).map(e=>e.props.value).join(`;`);return(0,Z.jsx)(_r,{...h,children:(0,Z.jsxs)(Wo,{required:p,scope:t,trigger:g,onTriggerChange:_,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:x,contentId:Zn(),value:T,onValueChange:E,open:C,onOpenChange:w,dir:S,triggerPointerDownPosRef:D,disabled:f,children:[(0,Z.jsx)(Ro.Provider,{scope:t,children:(0,Z.jsx)(Ko,{scope:e.__scopeSelect,onNativeOptionAdd:$.useCallback(e=>{A(t=>new Set(t).add(e))},[]),onNativeOptionRemove:$.useCallback(e=>{A(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),O?(0,Z.jsxs)(Us,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:T,onChange:e=>E(e.target.value),disabled:f,form:m,children:[T===void 0?(0,Z.jsx)(`option`,{value:``}):null,Array.from(k)]},j):null]})})};Jo.displayName=Lo;var Yo=`SelectTrigger`,Xo=$.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=Uo(n),o=Go(Yo,n),s=o.disabled||r,c=$t(t,o.onTriggerChange),l=zo(n),u=$.useRef(`touch`),[d,f,p]=Gs(e=>{let t=l().filter(e=>!e.disabled),n=Ks(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,Z.jsx)(Cr,{asChild:!0,...a,children:(0,Z.jsx)(er.button,{type:`button`,role:`combobox`,"aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":Ws(o.value)?``:void 0,...i,ref:c,onClick:nr(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:nr(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:nr(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&Fo.includes(e.key)&&(m(),e.preventDefault())})})})});Xo.displayName=Yo;var Zo=`SelectValue`,Qo=$.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=Go(Zo,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=$t(t,c.onValueNodeChange);return Qn(()=>{l(u)},[l,u]),(0,Z.jsx)(er.span,{...s,ref:d,style:{pointerEvents:`none`},children:Ws(c.value)?(0,Z.jsx)(Z.Fragment,{children:o}):a})});Qo.displayName=Zo;var $o=`SelectIcon`,es=$.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,Z.jsx)(er.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});es.displayName=$o;var ts=`SelectPortal`,ns=e=>(0,Z.jsx)(rr,{asChild:!0,...e});ns.displayName=ts;var rs=`SelectContent`,is=$.forwardRef((e,t)=>{let n=Go(rs,e.__scopeSelect),[r,i]=$.useState();if(Qn(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?Qa.createPortal((0,Z.jsx)(os,{scope:e.__scopeSelect,children:(0,Z.jsx)(Ro.Slot,{scope:e.__scopeSelect,children:(0,Z.jsx)(`div`,{children:e.children})})}),t):null}return(0,Z.jsx)(us,{...e,ref:t})});is.displayName=rs;var as=10,[os,ss]=Vo(rs),cs=`SelectContentImpl`,ls=Yt(`SelectContent.RemoveScroll`),us=$.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=Go(rs,n),[y,b]=$.useState(null),[x,S]=$.useState(null),C=$t(t,e=>b(e)),[w,T]=$.useState(null),[E,D]=$.useState(null),O=zo(n),[k,A]=$.useState(!1),j=$.useRef(!1);$.useEffect(()=>{if(y)return mn(y)},[y]),cn();let M=$.useCallback(e=>{let[t,...n]=O().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[O,x]),N=$.useCallback(()=>M([w,y]),[M,w,y]);$.useEffect(()=>{k&&N()},[k,N]);let{onOpenChange:P,triggerPointerDownPosRef:F}=v;$.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(F.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||P(!1),document.removeEventListener(`pointermove`,t),F.current=null};return F.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,P,F]),$.useEffect(()=>{let e=()=>P(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[P]);let[I,L]=Gs(e=>{let t=O().filter(e=>!e.disabled),n=Ks(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),R=$.useCallback((e,t,n)=>{let r=!j.current&&!n;(v.value!==void 0&&v.value===t||r)&&(T(e),r&&(j.current=!0))},[v.value]),ee=$.useCallback(()=>y?.focus(),[y]),z=$.useCallback((e,t,n)=>{let r=!j.current&&!n;(v.value!==void 0&&v.value===t||r)&&D(e)},[v.value]),te=r===`popper`?ms:fs,B=te===ms?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,Z.jsx)(os,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:R,selectedItem:w,onItemLeave:ee,itemTextRefCallback:z,focusSelectedItem:N,selectedItemText:E,position:r,isPositioned:k,searchRef:I,children:(0,Z.jsx)(dn,{as:ls,allowPinchZoom:!0,children:(0,Z.jsx)(sn,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:nr(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,Z.jsx)(ar,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,Z.jsx)(te,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...B,onPlaced:()=>A(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:nr(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&L(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=O().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>M(t)),e.preventDefault()}})})})})})})});us.displayName=cs;var ds=`SelectItemAlignedPosition`,fs=$.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=Go(rs,n),o=ss(rs,n),[s,c]=$.useState(null),[l,u]=$.useState(null),d=$t(t,e=>u(e)),f=zo(n),p=$.useRef(!1),m=$.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=$.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-as,d=no(a,[as,Math.max(as,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-as,d=no(a,[as,Math.max(as,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-as*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-as,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${as}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);Qn(()=>y(),[y]);let[b,x]=$.useState();return Qn(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),(0,Z.jsx)(hs,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:$.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,Z.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,Z.jsx)(er.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});fs.displayName=ds;var ps=`SelectPopperPosition`,ms=$.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=as,...a}=e,o=Uo(n);return(0,Z.jsx)(Sr,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});ms.displayName=ps;var[hs,gs]=Vo(rs,{}),_s=`SelectViewport`,vs=$.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=ss(_s,n),o=gs(_s,n),s=$t(t,a.onViewportChange),c=$.useRef(0);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,Z.jsx)(Ro.Slot,{scope:n,children:(0,Z.jsx)(er.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:nr(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-as*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});vs.displayName=_s;var ys=`SelectGroup`,[bs,xs]=Vo(ys),Ss=$.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Zn();return(0,Z.jsx)(bs,{scope:n,id:i,children:(0,Z.jsx)(er.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});Ss.displayName=ys;var Cs=`SelectLabel`,ws=$.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=xs(Cs,n);return(0,Z.jsx)(er.div,{id:i.id,...r,ref:t})});ws.displayName=Cs;var Ts=`SelectItem`,[Es,Ds]=Vo(Ts),Os=$.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=Go(Ts,n),c=ss(Ts,n),l=s.value===r,[u,d]=$.useState(a??``),[f,p]=$.useState(!1),m=$t(t,e=>c.itemRefCallback?.(e,r,i)),h=Zn(),g=$.useRef(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,Z.jsx)(Es,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:$.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,Z.jsx)(Ro.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,Z.jsx)(er.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:nr(o.onFocus,()=>p(!0)),onBlur:nr(o.onBlur,()=>p(!1)),onClick:nr(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:nr(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:nr(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:nr(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:nr(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:nr(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(Io.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});Os.displayName=Ts;var ks=`SelectItemText`,As=$.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=Go(ks,n),s=ss(ks,n),c=Ds(ks,n),l=qo(ks,n),[u,d]=$.useState(null),f=$t(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=$.useMemo(()=>(0,Z.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return Qn(()=>(h(m),()=>g(m)),[h,g,m]),(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(er.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Qa.createPortal(a.children,o.valueNode):null]})});As.displayName=ks;var js=`SelectItemIndicator`,Ms=$.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return Ds(js,n).isSelected?(0,Z.jsx)(er.span,{"aria-hidden":!0,...r,ref:t}):null});Ms.displayName=js;var Ns=`SelectScrollUpButton`,Ps=$.forwardRef((e,t)=>{let n=ss(Ns,e.__scopeSelect),r=gs(Ns,e.__scopeSelect),[i,a]=$.useState(!1),o=$t(t,r.onScrollButtonChange);return Qn(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,Z.jsx)(Ls,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Ps.displayName=Ns;var Fs=`SelectScrollDownButton`,Is=$.forwardRef((e,t)=>{let n=ss(Fs,e.__scopeSelect),r=gs(Fs,e.__scopeSelect),[i,a]=$.useState(!1),o=$t(t,r.onScrollButtonChange);return Qn(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,Z.jsx)(Ls,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});Is.displayName=Fs;var Ls=$.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=ss(`SelectScrollButton`,n),o=$.useRef(null),s=zo(n),c=$.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return $.useEffect(()=>()=>c(),[c]),Qn(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,Z.jsx)(er.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:nr(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:nr(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:nr(i.onPointerLeave,()=>{c()})})}),Rs=`SelectSeparator`,zs=$.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,Z.jsx)(er.div,{"aria-hidden":!0,...r,ref:t})});zs.displayName=Rs;var Bs=`SelectArrow`,Vs=$.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Uo(n),a=Go(Bs,n),o=ss(Bs,n);return a.open&&o.position===`popper`?(0,Z.jsx)(br,{...i,...r,ref:t}):null});Vs.displayName=Bs;var Hs=`SelectBubbleInput`,Us=$.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=$.useRef(null),a=$t(r,i),o=Tr(t);return $.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,Z.jsx)(er.select,{...n,style:{...cr,...n.style},ref:a,defaultValue:t})});Us.displayName=Hs;function Ws(e){return e===``||e===void 0}function Gs(e){let t=tr(e),n=$.useRef(``),r=$.useRef(0),i=$.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=$.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return $.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function Ks(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=qs(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function qs(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Js=Jo,Ys=Xo,Xs=Qo,Zs=es,Qs=ns,$s=is,ec=vs,tc=Os,nc=As,rc=Ms,ic=Ps,ac=Is,oc=`Switch`,[sc,cc]=$n(oc),[lc,uc]=sc(oc),dc=$.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c=`on`,onCheckedChange:l,form:u,...d}=e,[f,p]=$.useState(null),m=$t(t,e=>p(e)),h=$.useRef(!1),g=f?u||!!f.closest(`form`):!0,[_,v]=or({prop:i,defaultProp:a??!1,onChange:l,caller:oc});return(0,Z.jsxs)(lc,{scope:n,checked:_,disabled:s,children:[(0,Z.jsx)(er.button,{type:`button`,role:`switch`,"aria-checked":_,"aria-required":o,"data-state":gc(_),"data-disabled":s?``:void 0,disabled:s,value:c,...d,ref:m,onClick:nr(e.onClick,e=>{v(e=>!e),g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})}),g&&(0,Z.jsx)(hc,{control:f,bubbles:!h.current,name:r,value:c,checked:_,required:o,disabled:s,form:u,style:{transform:`translateX(-100%)`}})]})});dc.displayName=oc;var fc=`SwitchThumb`,pc=$.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=uc(fc,n);return(0,Z.jsx)(er.span,{"data-state":gc(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});pc.displayName=fc;var mc=`SwitchBubbleInput`,hc=$.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=$.useRef(null),s=$t(o,a),c=Tr(n),l=sr(t);return $.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(c!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[c,n,r]),(0,Z.jsx)(`input`,{type:`checkbox`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...l,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});hc.displayName=mc;function gc(e){return e?`checked`:`unchecked`}var _c=dc,vc=pc,yc=to(),bc=Jt(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3! font-mono uppercase`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,warning:`bg-yellow-500/10 text-yellow-600 [a]:hover:bg-yellow-500/20`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`,dashed:`border-dashed border-border text-muted-foreground rounded-sm`,primary:`border border-primary/50 text-primary bg-primary/5 rounded-sm p-0.5 px-1.5 font-mono`,gray:`border border-border text-muted-foreground bg-muted rounded-sm p-0.5 px-1.5 font-mono`}},defaultVariants:{variant:`default`}});function xc(e){let t=(0,Q.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,variant:i,asChild:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=i===void 0?`default`:i,s=a!==void 0&&a?Qt:`span`,c;t[5]!==n||t[6]!==o?(c=Xt(bc({variant:o}),n),t[5]=n,t[6]=o,t[7]=c):c=t[7];let l;return t[8]!==s||t[9]!==r||t[10]!==c||t[11]!==o?(l=(0,Z.jsx)(s,{"data-slot":`badge`,"data-variant":o,className:c,...r}),t[8]=s,t[9]=r,t[10]=c,t[11]=o,t[12]=l):l=t[12],l}function Sc(e){let t=(0,Q.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Z.jsx)(Ao,{"data-slot":`popover`,...n}),t[2]=n,t[3]=r),r}function Cc(e){let t=(0,Q.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Z.jsx)(Mo,{"data-slot":`popover-trigger`,...n}),t[2]=n,t[3]=r),r}function wc(e){let t=(0,Q.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,align:i,sideOffset:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=i===void 0?`center`:i,s=a===void 0?4:a,c;t[5]===n?c=t[6]:(c=Xt(`z-50 w-72 rounded-lg border bg-popover p-4 text-popover-foreground shadow-md outline-hidden origin-(--radix-popover-content-transform-origin) duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:duration-0`,n),t[5]=n,t[6]=c);let l;return t[7]!==o||t[8]!==r||t[9]!==s||t[10]!==c?(l=(0,Z.jsx)(No,{children:(0,Z.jsx)(Po,{"data-slot":`popover-content`,align:o,sideOffset:s,className:c,...r})}),t[7]=o,t[8]=r,t[9]=s,t[10]=c,t[11]=l):l=t[11],l}function Tc(e){let t=(0,Q.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Z.jsx)(jo,{"data-slot":`popover-anchor`,...n}),t[2]=n,t[3]=r),r}var Ec={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.24.0`}?.VITE_APP_VERSION??`0.0.0-unknown`;function Dc(){return xt({kind:`web`,runtimeVersion:Ec})}function Oc(){return I({kind:`web`,runtimeVersion:Ec})}var{getOwnPropertyNames:kc,getOwnPropertySymbols:Ac}=Object,{hasOwnProperty:jc}=Object.prototype;function Mc(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function Nc(e){return function(t,n,r){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r);let{cache:i}=r,a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);let s=e(t,n,r);return i.delete(t),i.delete(n),s}}function Pc(e){return e?.[Symbol.toStringTag]}function Fc(e){return kc(e).concat(Ac(e))}var Ic=Object.hasOwn||((e,t)=>jc.call(e,t));function Lc(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var Rc=`__v`,zc=`__o`,Bc=`_owner`,{getOwnPropertyDescriptor:Vc,keys:Hc}=Object;function Uc(e,t){return e.byteLength===t.byteLength&&nl(new Uint8Array(e),new Uint8Array(t))}function Wc(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function Gc(e,t){return e.byteLength===t.byteLength&&nl(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Kc(e,t){return Lc(e.getTime(),t.getTime())}function qc(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Jc(e,t){return e===t}function Yc(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.entries(),o,s,c=0;for(;(o=a.next())&&!o.done;){let r=t.entries(),a=!1,l=0;for(;(s=r.next())&&!s.done;){if(i[l]){l++;continue}let r=o.value,u=s.value;if(n.equals(r[0],u[0],c,l,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1;c++}return!0}var Xc=Lc;function Zc(e,t,n){let r=Hc(e),i=r.length;if(Hc(t).length!==i)return!1;for(;i-- >0;)if(!il(e,t,n,r[i]))return!1;return!0}function Qc(e,t,n){let r=Fc(e),i=r.length;if(Fc(t).length!==i)return!1;let a,o,s;for(;i-- >0;)if(a=r[i],!il(e,t,n,a)||(o=Vc(e,a),s=Vc(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function $c(e,t){return Lc(e.valueOf(),t.valueOf())}function el(e,t){return e.source===t.source&&e.flags===t.flags}function tl(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.values(),o,s;for(;(o=a.next())&&!o.done;){let r=t.values(),a=!1,c=0;for(;(s=r.next())&&!s.done;){if(!i[c]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1}return!0}function nl(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function rl(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function il(e,t,n,r){return(r===Bc||r===zc||r===Rc)&&(e.$$typeof||t.$$typeof)?!0:Ic(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var al=`[object ArrayBuffer]`,ol=`[object Arguments]`,sl=`[object Boolean]`,cl=`[object DataView]`,ll=`[object Date]`,ul=`[object Error]`,dl=`[object Map]`,fl=`[object Number]`,pl=`[object Object]`,ml=`[object RegExp]`,hl=`[object Set]`,gl=`[object String]`,_l={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},vl=`[object URL]`,yl=Object.prototype.toString;function bl({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:m}){return function(h,g,_){if(h===g)return!0;if(h==null||g==null)return!1;let v=typeof h;if(v!==typeof g)return!1;if(v!==`object`)return v===`number`?s(h,g,_):v===`function`?a(h,g,_):!1;let y=h.constructor;if(y!==g.constructor)return!1;if(y===Object)return c(h,g,_);if(Array.isArray(h))return t(h,g,_);if(y===Date)return r(h,g,_);if(y===RegExp)return u(h,g,_);if(y===Map)return o(h,g,_);if(y===Set)return d(h,g,_);let b=yl.call(h);if(b===ll)return r(h,g,_);if(b===ml)return u(h,g,_);if(b===dl)return o(h,g,_);if(b===hl)return d(h,g,_);if(b===pl)return typeof h.then!=`function`&&typeof g.then!=`function`&&c(h,g,_);if(b===vl)return p(h,g,_);if(b===ul)return i(h,g,_);if(b===ol)return c(h,g,_);if(_l[b])return f(h,g,_);if(b===al)return e(h,g,_);if(b===cl)return n(h,g,_);if(b===sl||b===fl||b===gl)return l(h,g,_);if(m){let e=m[b];if(!e){let t=Pc(h);t&&(e=m[t])}if(e)return e(h,g,_)}return!1}}function xl({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:Uc,areArraysEqual:n?Qc:Wc,areDataViewsEqual:Gc,areDatesEqual:Kc,areErrorsEqual:qc,areFunctionsEqual:Jc,areMapsEqual:n?Mc(Yc,Qc):Yc,areNumbersEqual:Xc,areObjectsEqual:n?Qc:Zc,arePrimitiveWrappersEqual:$c,areRegExpsEqual:el,areSetsEqual:n?Mc(tl,Qc):tl,areTypedArraysEqual:n?Mc(nl,Qc):nl,areUrlsEqual:rl,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=Nc(r.areArraysEqual),t=Nc(r.areMapsEqual),n=Nc(r.areObjectsEqual),i=Nc(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}function Sl(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function Cl({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,o){let{cache:s=e?new WeakMap:void 0,meta:c}=n();return t(a,o,{cache:s,equals:r,meta:c,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let a={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}var wl=Tl();Tl({strict:!0}),Tl({circular:!0}),Tl({circular:!0,strict:!0}),Tl({createInternalComparator:()=>Lc}),Tl({strict:!0,createInternalComparator:()=>Lc}),Tl({circular:!0,createInternalComparator:()=>Lc}),Tl({circular:!0,createInternalComparator:()=>Lc,strict:!0});function Tl(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=bl(xl(e));return Cl({circular:t,comparator:a,createState:r,equals:n?n(a):Sl(a),strict:i})}var El=t((e=>{var t=r(),n=to();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=n.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),Dl=t(((e,t)=>{t.exports=El()}))(),Ol=(...e)=>t=>{e.forEach(e=>{typeof e==`function`?e(t):e&&(e.current=t)})},kl=({contentComponent:e})=>{let t=(0,yc.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,Z.jsx)(Z.Fragment,{children:Object.values(t)})};function Al(){let e=new Set,t={};return{subscribe(t){return e.add(t),()=>{e.delete(t)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:Qa.createPortal(r.reactElement,r.element,n)},e.forEach(e=>e())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(e=>e())}}}var jl=class extends $.Component{constructor(e){super(e),this.editorContentRef=$.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let e=this.props.editor;if(e&&!e.isDestroyed&&e.view.dom?.parentNode){if(e.contentComponent)return;let t=this.editorContentRef.current;t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t}),e.contentComponent=Al(),e.createNodeViews(),e.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){let e=this.props.editor;if(e){e.isEditorContentInitialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null;try{if(!e.view.dom?.parentNode)return;let t=document.createElement(`div`);t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{ref:Ol(t,this.editorContentRef),...n}),e?.contentComponent&&(0,Z.jsx)(kl,{contentComponent:e.contentComponent})]})}},Ml=(0,$.forwardRef)((e,t)=>{let n=$.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return $.createElement(jl,{key:n,innerRef:t,...e})}),Nl=$.memo(Ml),Pl=typeof window<`u`?$.useLayoutEffect:$.useEffect,Fl=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let e=()=>{this.transactionNumber+=1,this.subscribers.forEach(e=>e())},t=this.editor;return t.on(`transaction`,e),()=>{t.off(`transaction`,e)}}}};function Il(e){let[t]=(0,$.useState)(()=>new Fl(e.editor)),n=(0,Dl.useSyncExternalStoreWithSelector)(t.subscribe,t.getSnapshot,t.getServerSnapshot,e.selector,e.equalityFn??wl);return Pl(()=>t.watch(e.editor),[e.editor,t]),(0,$.useDebugValue)(n),n}var Ll=!1,Rl=typeof window>`u`,zl=Rl||!!(typeof window<`u`&&window.next),Bl=class e{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId=``,this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(e=>e())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0){if(Rl||zl){if(Ll)throw Error("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches.");return null}return this.createEditor()}if(this.options.current.immediatelyRender&&Rl&&Ll)throw Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){return new _({...this.options.current,onBeforeCreate:(...e)=>{var t;return(t=this.options.current).onBeforeCreate?.call(t,...e)},onBlur:(...e)=>{var t;return(t=this.options.current).onBlur?.call(t,...e)},onCreate:(...e)=>{var t;return(t=this.options.current).onCreate?.call(t,...e)},onDestroy:(...e)=>{var t;return(t=this.options.current).onDestroy?.call(t,...e)},onFocus:(...e)=>{var t;return(t=this.options.current).onFocus?.call(t,...e)},onSelectionUpdate:(...e)=>{var t;return(t=this.options.current).onSelectionUpdate?.call(t,...e)},onTransaction:(...e)=>{var t;return(t=this.options.current).onTransaction?.call(t,...e)},onUpdate:(...e)=>{var t;return(t=this.options.current).onUpdate?.call(t,...e)},onContentError:(...e)=>{var t;return(t=this.options.current).onContentError?.call(t,...e)},onDrop:(...e)=>{var t;return(t=this.options.current).onDrop?.call(t,...e)},onPaste:(...e)=>{var t;return(t=this.options.current).onPaste?.call(t,...e)},onDelete:(...e)=>{var t;return(t=this.options.current).onDelete?.call(t,...e)}})}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,t){return Object.keys(e).every(n=>[`onCreate`,`onBeforeCreate`,`onDestroy`,`onUpdate`,`onTransaction`,`onFocus`,`onBlur`,`onSelectionUpdate`,`onContentError`,`onDrop`,`onPaste`].includes(n)?!0:n===`extensions`&&e.extensions&&t.extensions?e.extensions.length===t.extensions.length?e.extensions.every((e,n)=>e===t.extensions?.[n]):!1:e[n]===t[n])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?e.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((t,n)=>t===e[n]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){let e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){t&&t.setOptions(this.options.current);return}t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function Vl(e={},t=[]){let n=(0,$.useRef)(e);n.current=e;let[r]=(0,$.useState)(()=>new Bl(n)),i=(0,yc.useSyncExternalStore)(r.subscribe,r.getEditor,r.getServerSnapshot);return(0,$.useDebugValue)(i),(0,$.useEffect)(r.onRender(t)),Il({editor:i,selector:({transactionNumber:t})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&t===0?0:t+1}),i}var Hl=(0,$.createContext)({editor:null});Hl.Consumer;var Ul=()=>(0,$.useContext)(Hl),Wl=(0,$.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),Gl=()=>(0,$.useContext)(Wl);function Kl({as:e=`div`,...t}){let{nodeViewContentRef:n,nodeViewContentChildren:r}=Gl();return(0,Z.jsx)(e,{...t,ref:n,"data-node-view-content":``,style:{whiteSpace:`pre-wrap`,...t.style},children:r})}var ql=$.forwardRef((e,t)=>{let{onDragStart:n}=Gl();return(0,Z.jsx)(e.as||`div`,{...e,ref:t,"data-node-view-wrapper":``,onDragStart:n,style:{whiteSpace:`normal`,...e.style}})});function Jl(e){return!!(typeof e==`function`&&e.prototype&&e.prototype.isReactComponent)}function Yl(e){return!!(typeof e==`object`&&e.$$typeof&&(e.$$typeof.toString()===`Symbol(react.forward_ref)`||e.$$typeof.description===`react.forward_ref`))}function Xl(e){return!!(typeof e==`object`&&e.$$typeof&&(e.$$typeof.toString()===`Symbol(react.memo)`||e.$$typeof.description===`react.memo`))}function Zl(e){if(Jl(e)||Yl(e))return!0;if(Xl(e)){let t=e.type;if(t)return Jl(t)||Yl(t)}return!1}function Ql(){try{if($.version)return parseInt($.version.split(`.`)[0],10)>=19}catch{}return!1}var $l=class{constructor(e,{editor:t,props:n={},as:r=`div`,className:i=``}){this.ref=null,this.destroyed=!1,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add(`react-renderer`),i&&this.element.classList.add(...i.split(` `)),this.editor.isEditorContentInitialized?(0,Qa.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}render(){var e;if(this.destroyed)return;let t=this.component,n=this.props,r=this.editor,i=Ql(),a=Zl(t),o={...n};o.ref&&!(i||a)&&delete o.ref,!o.ref&&(i||a)&&(o.ref=e=>{this.ref=e}),this.reactElement=(0,Z.jsx)(t,{...o}),(e=r?.contentComponent)==null||e.setRenderer(this.id,this)}updateProps(e={}){this.destroyed||(this.props={...this.props,...e},this.render())}destroy(){var e;this.destroyed=!0,(e=this.editor?.contentComponent)==null||e.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}};$.createContext({markViewContentRef:()=>{}});var eu=class extends xe{constructor(e,t,n){if(super(e,t,n),this.selectionRafId=null,this.positionCheckCallback=null,this.cachedExtensionWithSyncedStorage=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?`span`:`div`),this.contentDOMElement.dataset.nodeViewContentReact=``,this.contentDOMElement.dataset.nodeViewWrapper=``,this.contentDOMElement.style.whiteSpace=`inherit`;let e=this.dom.querySelector(`[data-node-view-content]`);if(!e)return;e.appendChild(this.contentDOMElement)}}get extensionWithSyncedStorage(){if(!this.cachedExtensionWithSyncedStorage){let e=this.editor,t=this.extension;this.cachedExtensionWithSyncedStorage=new Proxy(t,{get(n,r,i){return r===`storage`?e.storage[t.name]??{}:Reflect.get(n,r,i)}})}return this.cachedExtensionWithSyncedStorage}mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extensionWithSyncedStorage,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(e={})=>this.updateAttributes(e),deleteNode:()=>this.deleteNode(),ref:(0,$.createRef)()};if(!this.component.displayName){let e=e=>e.charAt(0).toUpperCase()+e.substring(1);this.component.displayName=e(this.extension.name)}let t={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:e=>{e&&this.contentDOMElement&&e.firstChild!==this.contentDOMElement&&(e.hasAttribute(`data-node-view-wrapper`)&&e.removeAttribute(`data-node-view-wrapper`),e.appendChild(this.contentDOMElement))}},n=this.component,r=(0,$.memo)(e=>(0,Z.jsx)(Wl.Provider,{value:t,children:(0,$.createElement)(n,e)}));r.displayName=`ReactNodeView`;let i=this.node.isInline?`span`:`div`;this.options.as&&(i=this.options.as);let{className:a=``}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new $l(r,{editor:this.editor,props:e,as:i,className:`node-${this.node.type.name} ${a}`.trim()}),this.editor.on(`selectionUpdate`,this.handleSelectionUpdate),this.updateElementAttributes(),this.currentPos=this.getPos(),this.positionCheckCallback=()=>{let e=this.getPos();typeof e!=`number`||e===this.currentPos||(this.currentPos=e,this.renderer.updateProps({getPos:()=>this.getPos()}),typeof this.options.attrs==`function`&&this.updateElementAttributes())},Qe(this.editor,this.positionCheckCallback)}get dom(){if(this.renderer.element.firstElementChild&&!this.renderer.element.firstElementChild?.hasAttribute(`data-node-view-wrapper`))throw Error(`Please use the NodeViewWrapper component for your node view.`);return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&=(cancelAnimationFrame(this.selectionRafId),null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;let{from:e,to:t}=this.editor.state.selection,n=this.currentPos;if(typeof n==`number`)if(e<=n&&t>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(e,t,n){let r=e=>{this.renderer.updateProps(e),typeof this.options.attrs==`function`&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update==`function`){let i=this.node,a=this.decorations,o=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.currentPos=this.getPos(),this.options.update({oldNode:i,oldDecorations:a,newNode:e,newDecorations:t,oldInnerDecorations:o,innerDecorations:n,updateProps:()=>r({node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage})})}let i=this.getPos();return e===this.node&&this.decorations===t&&this.innerDecorations===n?i===this.currentPos?!0:(this.currentPos=i,r({node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage,getPos:()=>this.getPos()}),!0):(this.node=e,this.decorations=t,this.innerDecorations=n,this.currentPos=i,r({node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage}),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add(`ProseMirror-selectednode`)}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove(`ProseMirror-selectednode`)}destroy(){this.renderer.destroy(),this.editor.off(`selectionUpdate`,this.handleSelectionUpdate),this.positionCheckCallback&&=(D(this.editor,this.positionCheckCallback),null),this.contentDOMElement=null,this.selectionRafId&&=(cancelAnimationFrame(this.selectionRafId),null)}updateElementAttributes(){if(this.options.attrs){let e={};if(typeof this.options.attrs==`function`){let t=this.editor.extensionManager.attributes,n=F(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}};function tu(e,t){return n=>n.editor.contentComponent?new eu(e,n,t):{}}var nu=(0,$.createContext)({get editor(){throw Error(`useTiptap must be used within a <Tiptap> provider`)}});nu.displayName=`TiptapContext`;var ru=()=>(0,$.useContext)(nu);function iu({editor:e,instance:t,children:n}){let r=e??t;if(!r)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let i=(0,$.useMemo)(()=>({editor:r}),[r]),a=(0,$.useMemo)(()=>({editor:r}),[r]);return(0,Z.jsx)(Hl.Provider,{value:a,children:(0,Z.jsx)(nu.Provider,{value:i,children:n})})}iu.displayName=`Tiptap`;function au({...e}){let{editor:t}=ru();return(0,Z.jsx)(Nl,{editor:t,...e})}au.displayName=`Tiptap.Content`,Object.assign(iu,{Content:au});var ou=()=>new Map,su=e=>{let t=ou();return e.forEach((e,n)=>{t.set(n,e)}),t},cu=(e,t,n)=>{let r=e.get(t);return r===void 0&&e.set(t,r=n()),r},lu=(e,t)=>{let n=[];for(let[r,i]of e)n.push(t(i,r));return n},uu=(e,t)=>{for(let[n,r]of e)if(t(r,n))return!0;return!1},du=()=>new Set,fu=e=>e[e.length-1],pu=(e,t)=>{for(let n=0;n<t.length;n++)e.push(t[n])},mu=Array.from,hu=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},gu=(e,t)=>{for(let n=0;n<e.length;n++)if(t(e[n],n,e))return!0;return!1},_u=(e,t)=>{let n=Array(e);for(let r=0;r<e;r++)n[r]=t(r,n);return n},vu=Array.isArray,yu=class{constructor(){this._observers=ou()}on(e,t){return cu(this._observers,e,du).add(t),t}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){let n=this._observers.get(e);n!==void 0&&(n.delete(t),n.size===0&&this._observers.delete(e))}emit(e,t){return mu((this._observers.get(e)||ou()).values()).forEach(e=>e(...t))}destroy(){this._observers=ou()}},bu=class{constructor(){this._observers=ou()}on(e,t){cu(this._observers,e,du).add(t)}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){let n=this._observers.get(e);n!==void 0&&(n.delete(t),n.size===0&&this._observers.delete(e))}emit(e,t){return mu((this._observers.get(e)||ou()).values()).forEach(e=>e(...t))}destroy(){this._observers=ou()}},xu=Math.floor,Su=Math.abs,Cu=(e,t)=>e<t?e:t,wu=(e,t)=>e>t?e:t;Number.isNaN;var Tu=e=>e===0?1/e<0:e<0,Eu=1<<17,Du=1<<18,Ou=1<<19,ku=1<<20,Au=1<<21,ju=1<<22,Mu=1<<23,Nu=1<<24,Pu=1<<25,Fu=1<<26,Iu=1<<27,Lu=1<<28,Ru=1<<29;Eu-1,Du-1,Ou-1,ku-1,Au-1,ju-1,Mu-1,Nu-1,Pu-1,Fu-1,Iu-1,Lu-1,Ru-1;var zu=2**53-1,Bu=-(2**53-1),Vu=Number.isInteger||(e=>typeof e==`number`&&isFinite(e)&&xu(e)===e);Number.isNaN,Number.parseInt;var Hu=String.fromCharCode;String.fromCodePoint,Hu(65535);var Uu=e=>e.toLowerCase(),Wu=/^\s*/g,Gu=e=>e.replace(Wu,``),Ku=/([A-Z])/g,qu=(e,t)=>Gu(e.replace(Ku,e=>`${t}${Uu(e)}`)),Ju=e=>{let t=unescape(encodeURIComponent(e)),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.codePointAt(e);return r},Yu=typeof TextEncoder<`u`?new TextEncoder:null,Xu=Yu?e=>Yu.encode(e):Ju,Zu=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});Zu&&Zu.decode(new Uint8Array).length===1&&(Zu=null);var Qu=(e,t)=>_u(t,()=>e).join(``),$u=class{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}},ed=()=>new $u,td=e=>{let t=ed();return e(t),rd(t)},nd=e=>{let t=e.cpos;for(let n=0;n<e.bufs.length;n++)t+=e.bufs[n].length;return t},rd=e=>{let t=new Uint8Array(nd(e)),n=0;for(let r=0;r<e.bufs.length;r++){let i=e.bufs[r];t.set(i,n),n+=i.length}return t.set(new Uint8Array(e.cbuf.buffer,0,e.cpos),n),t},id=(e,t)=>{let n=e.cbuf.length;n-e.cpos<t&&(e.bufs.push(new Uint8Array(e.cbuf.buffer,0,e.cpos)),e.cbuf=new Uint8Array(wu(n,t)*2),e.cpos=0)},ad=(e,t)=>{let n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(n*2),e.cpos=0),e.cbuf[e.cpos++]=t},od=ad,sd=(e,t)=>{for(;t>127;)ad(e,128|127&t),t=xu(t/128);ad(e,127&t)},cd=(e,t)=>{let n=Tu(t);for(n&&(t=-t),ad(e,(t>63?128:0)|(n?64:0)|63&t),t=xu(t/64);t>0;)ad(e,(t>127?128:0)|127&t),t=xu(t/128)},ld=new Uint8Array(3e4),ud=ld.length/3,dd=Yu&&Yu.encodeInto?(e,t)=>{if(t.length<ud){let n=Yu.encodeInto(t,ld).written||0;sd(e,n);for(let t=0;t<n;t++)ad(e,ld[t])}else pd(e,Xu(t))}:(e,t)=>{let n=unescape(encodeURIComponent(t)),r=n.length;sd(e,r);for(let t=0;t<r;t++)ad(e,n.codePointAt(t))},fd=(e,t)=>{let n=e.cbuf.length,r=e.cpos,i=Cu(n-r,t.length),a=t.length-i;e.cbuf.set(t.subarray(0,i),r),e.cpos+=i,a>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(wu(n*2,a)),e.cbuf.set(t.subarray(i)),e.cpos=a)},pd=(e,t)=>{sd(e,t.byteLength),fd(e,t)},md=(e,t)=>{id(e,t);let n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n},hd=(e,t)=>md(e,4).setFloat32(0,t,!1),gd=(e,t)=>md(e,8).setFloat64(0,t,!1),_d=(e,t)=>md(e,8).setBigInt64(0,t,!1),vd=new DataView(new ArrayBuffer(4)),yd=e=>(vd.setFloat32(0,e),vd.getFloat32(0)===e),bd=(e,t)=>{switch(typeof t){case`string`:ad(e,119),dd(e,t);break;case`number`:Vu(t)&&Su(t)<=2147483647?(ad(e,125),cd(e,t)):yd(t)?(ad(e,124),hd(e,t)):(ad(e,123),gd(e,t));break;case`bigint`:ad(e,122),_d(e,t);break;case`object`:if(t===null)ad(e,126);else if(vu(t)){ad(e,117),sd(e,t.length);for(let n=0;n<t.length;n++)bd(e,t[n])}else if(t instanceof Uint8Array)ad(e,116),pd(e,t);else{ad(e,118);let n=Object.keys(t);sd(e,n.length);for(let r=0;r<n.length;r++){let i=n[r];dd(e,i),bd(e,t[i])}}break;case`boolean`:ad(e,t?120:121);break;default:ad(e,127)}},xd=class extends $u{constructor(e){super(),this.w=e,this.s=null,this.count=0}write(e){this.s===e?this.count++:(this.count>0&&sd(this,this.count-1),this.count=1,this.w(this,e),this.s=e)}},Sd=e=>{e.count>0&&(cd(e.encoder,e.count===1?e.s:-e.s),e.count>1&&sd(e.encoder,e.count-2))},Cd=class{constructor(){this.encoder=new $u,this.s=0,this.count=0}write(e){this.s===e?this.count++:(Sd(this),this.count=1,this.s=e)}toUint8Array(){return Sd(this),rd(this.encoder)}},wd=e=>{if(e.count>0){let t=e.diff*2+(e.count===1?0:1);cd(e.encoder,t),e.count>1&&sd(e.encoder,e.count-2)}},Td=class{constructor(){this.encoder=new $u,this.s=0,this.count=0,this.diff=0}write(e){this.diff===e-this.s?(this.s=e,this.count++):(wd(this),this.count=1,this.diff=e-this.s,this.s=e)}toUint8Array(){return wd(this),rd(this.encoder)}},Ed=class{constructor(){this.sarr=[],this.s=``,this.lensE=new Cd}write(e){this.s+=e,this.s.length>19&&(this.sarr.push(this.s),this.s=``),this.lensE.write(e.length)}toUint8Array(){let e=new $u;return this.sarr.push(this.s),this.s=``,dd(e,this.sarr.join(``)),fd(e,this.lensE.toUint8Array()),rd(e)}},Dd=e=>Error(e),Od=()=>{throw Dd(`Method unimplemented`)},kd=()=>{throw Dd(`Unexpected case`)},Ad=Dd(`Unexpected end of array`),jd=Dd(`Integer out of Range`),Md=class{constructor(e){this.arr=e,this.pos=0}},Nd=e=>new Md(e),Pd=e=>e.pos!==e.arr.length,Fd=(e,t)=>{let n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n},Id=e=>Fd(e,Rd(e)),Ld=e=>e.arr[e.pos++],Rd=e=>{let t=0,n=1,r=e.arr.length;for(;e.pos<r;){let r=e.arr[e.pos++];if(t+=(r&127)*n,n*=128,r<128)return t;if(t>zu)throw jd}throw Ad},zd=e=>{let t=e.arr[e.pos++],n=t&63,r=64,i=(t&64)>0?-1:1;if(!(t&128))return i*n;let a=e.arr.length;for(;e.pos<a;){if(t=e.arr[e.pos++],n+=(t&127)*r,r*=128,t<128)return i*n;if(n>zu)throw jd}throw Ad},Bd=Zu?e=>Zu.decode(Id(e)):e=>{let t=Rd(e);if(t===0)return``;{let n=String.fromCodePoint(Ld(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(Ld(e));else for(;t>0;){let r=t<1e4?t:1e4,i=e.arr.subarray(e.pos,e.pos+r);e.pos+=r,n+=String.fromCodePoint.apply(null,i),t-=r}return decodeURIComponent(escape(n))}},Vd=(e,t)=>{let n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n},Hd=[e=>void 0,e=>null,zd,e=>Vd(e,4).getFloat32(0,!1),e=>Vd(e,8).getFloat64(0,!1),e=>Vd(e,8).getBigInt64(0,!1),e=>!1,e=>!0,Bd,e=>{let t=Rd(e),n={};for(let r=0;r<t;r++){let t=Bd(e);n[t]=Ud(e)}return n},e=>{let t=Rd(e),n=[];for(let r=0;r<t;r++)n.push(Ud(e));return n},Id],Ud=e=>Hd[127-Ld(e)](e),Wd=class extends Md{constructor(e,t){super(e),this.reader=t,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),Pd(this)?this.count=Rd(this)+1:this.count=-1),this.count--,this.s}},Gd=class extends Md{constructor(e){super(e),this.s=0,this.count=0}read(){if(this.count===0){this.s=zd(this);let e=Tu(this.s);this.count=1,e&&(this.s=-this.s,this.count=Rd(this)+2)}return this.count--,this.s}},Kd=class extends Md{constructor(e){super(e),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){let e=zd(this),t=e&1;this.diff=xu(e/2),this.count=1,t&&(this.count=Rd(this)+2)}return this.s+=this.diff,this.count--,this.s}},qd=class{constructor(e){this.decoder=new Gd(e),this.str=Bd(this.decoder),this.spos=0}read(){let e=this.spos+this.decoder.read(),t=this.str.slice(this.spos,e);return this.spos=e,t}};crypto.subtle;var Jd=crypto.getRandomValues.bind(crypto),Yd=Math.random,Xd=()=>Jd(new Uint32Array(1))[0],Zd=e=>e[xu(Yd()*e.length)],Qd=`10000000-1000-4000-8000-100000000000`,$d=()=>Qd.replace(/[018]/g,e=>(e^Xd()&15>>e/4).toString(16)),ef=Date.now,tf=e=>new Promise(e);Promise.all.bind(Promise);var nf=e=>e===void 0?null:e,rf=new class{constructor(){this.map=new Map}setItem(e,t){this.map.set(e,t)}getItem(e){return this.map.get(e)}};try{typeof localStorage<`u`&&localStorage&&(rf=localStorage)}catch{}var af=rf,of=Symbol(`Equality`),sf=(e,t)=>e===t||!!e?.[of]?.(t)||!1,cf=e=>typeof e==`object`,lf=Object.assign,uf=Object.keys,df=(e,t)=>{for(let n in e)t(e[n],n)},ff=e=>uf(e).length,pf=e=>{for(let t in e)return!1;return!0},mf=(e,t)=>{for(let n in e)if(!t(e[n],n))return!1;return!0},hf=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),gf=(e,t)=>e===t||ff(e)===ff(t)&&mf(e,(e,n)=>(e!==void 0||hf(t,n))&&sf(t[n],e)),_f=Object.freeze,vf=e=>{for(let t in e){let n=e[t];(typeof n==`object`||typeof n==`function`)&&vf(e[t])}return _f(e)},yf=(e,t,n=0)=>{try{for(;n<e.length;n++)e[n](...t)}finally{n<e.length&&yf(e,t,n+1)}},bf=e=>e,xf=(e,t)=>{if(e===t)return!0;if(e==null||t==null||e.constructor!==t.constructor&&(e.constructor||Object)!==(t.constructor||Object))return!1;if(e[of]!=null)return e[of](t);switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;break;case Set:if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;break;case Map:if(e.size!==t.size)return!1;for(let n of e.keys())if(!t.has(n)||!xf(e.get(n),t.get(n)))return!1;break;case void 0:case Object:if(ff(e)!==ff(t))return!1;for(let n in e)if(!hf(e,n)||!xf(e[n],t[n]))return!1;break;case Array:if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!xf(e[n],t[n]))return!1;break;default:return!1}return!0},Sf=(e,t)=>t.includes(e),Cf=typeof process<`u`&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`,wf=typeof window<`u`&&typeof document<`u`&&!Cf;typeof navigator<`u`&&/Mac/.test(navigator.platform);var Tf,Ef=[],Df=()=>{if(Tf===void 0)if(Cf){Tf=ou();let e=process.argv,t=null;for(let n=0;n<e.length;n++){let r=e[n];r[0]===`-`?(t!==null&&Tf.set(t,``),t=r):t===null?Ef.push(r):(Tf.set(t,r),t=null)}t!==null&&Tf.set(t,``)}else typeof location==`object`?(Tf=ou(),(location.search||`?`).slice(1).split(`&`).forEach(e=>{if(e.length!==0){let[t,n]=e.split(`=`);Tf.set(`--${qu(t,`-`)}`,n),Tf.set(`-${qu(t,`-`)}`,n)}})):Tf=ou();return Tf},Of=e=>Df().has(e),kf=e=>nf(Cf?{}[e.toUpperCase().replaceAll(`-`,`_`)]:af.getItem(e)),Af=e=>Of(`--`+e)||kf(e)!==null,jf=Af(`production`),Mf=Cf&&Sf({}.FORCE_COLOR,[`true`,`1`,`2`])||!Of(`--no-colors`)&&!Af(`no-color`)&&(!Cf||process.stdout.isTTY)&&(!Cf||Of(`--color`)||kf(`COLORTERM`)!==null||(kf(`TERM`)||``).includes(`color`)),Nf=e=>new Uint8Array(e),Pf=wf?e=>{let t=``;for(let n=0;n<e.byteLength;n++)t+=Hu(e[n]);return btoa(t)}:e=>Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString(`base64`),Ff=e=>{let t=Nf(e.byteLength);return t.set(e),t},If=e=>td(t=>bd(t,e)),Lf=class{constructor(e,t){this.left=e,this.right=t}},Rf=(e,t)=>new Lf(e,t),zf=(e,t)=>e.forEach(e=>t(e.left,e.right)),Bf=e=>e.next()>=.5,Vf=(e,t,n)=>xu(e.next()*(n+1-t)+t),Hf=(e,t,n)=>xu(e.next()*(n+1-t)+t),Uf=(e,t,n)=>Hf(e,t,n),Wf=e=>Hu(Uf(e,97,122)),Gf=(e,t=0,n=20)=>{let r=Uf(e,t,n),i=``;for(let t=0;t<r;t++)i+=Wf(e);return i},Kf=(e,t)=>t[Uf(e,0,t.length-1)],qf=Symbol(`0schema`),Jf=class{constructor(){this._rerrs=[]}extend(e,t,n,r=null){this._rerrs.push({path:e,expected:t,has:n,message:r})}toString(){let e=[];for(let t=this._rerrs.length-1;t>0;t--){let n=this._rerrs[t];e.push(Qu(` `,(this._rerrs.length-t)*2)+`${n.path==null?``:`[${n.path}] `}${n.has} doesn't match ${n.expected}. ${n.message}`)}return e.join(`
|
|
3
3
|
`)}},Yf=(e,t)=>e===t?!0:e==null||t==null||e.constructor!==t.constructor?!1:e[of]?sf(e,t):vu(e)?hu(e,e=>gu(t,t=>Yf(e,t))):cf(e)?mf(e,(e,n)=>Yf(e,t[n])):!1,Xf=class{static _dilutes=!1;extends(e){let[t,n]=[this.shape,e.shape];return this.constructor._dilutes&&([n,t]=[t,n]),Yf(t,n)}equals(e){return this.constructor===e.constructor&&xf(this.shape,e.shape)}[qf](){return!0}[of](e){return this.equals(e)}validate(e){return this.check(e)}check(e,t){Od()}get nullable(){return kp(this,Wp)}get optional(){return new sp(this)}cast(e){return Jp(e,this),e}expect(e){return Jp(e,this),e}},Zf=class extends Xf{constructor(e,t){super(),this.shape=e,this._c=t}check(e,t=void 0){let n=e?.constructor===this.shape&&(this._c==null||this._c(e));return!n&&t?.extend(null,this.shape.name,e?.constructor.name,e?.constructor===this.shape?`Check failed`:`Constructor match failed`),n}},Qf=(e,t=null)=>new Zf(e,t);Qf(Zf);var $f=class extends Xf{constructor(e){super(),this.shape=e}check(e,t){let n=this.shape(e);return!n&&t?.extend(null,`custom prop`,e?.constructor.name,`failed to check custom prop`),n}},ep=e=>new $f(e);Qf($f);var tp=class extends Xf{constructor(e){super(),this.shape=e}check(e,t){let n=this.shape.some(t=>t===e);return!n&&t?.extend(null,this.shape.join(` | `),e.toString()),n}},np=(...e)=>new tp(e),rp=Qf(tp),ip=RegExp.escape||(e=>e.replace(/[().|&,$^[\]]/g,e=>`\\`+e)),ap=e=>{if(zp.check(e))return[ip(e)];if(rp.check(e))return e.shape.map(e=>e+``);if(Rp.check(e))return[`[+-]?\\d+.?\\d*`];if(Bp.check(e))return[`.*`];if(Ap.check(e))return e.shape.map(ap).flat(1);kd()};Qf(class extends Xf{constructor(e){super(),this.shape=e,this._r=RegExp(`^`+e.map(ap).map(e=>`(${e.join(`|`)})`).join(``)+`$`)}check(e,t){let n=this._r.exec(e)!=null;return!n&&t?.extend(null,this._r.toString(),e.toString(),`String doesn't match string template.`),n}});var op=Symbol(`optional`),sp=class extends Xf{constructor(e){super(),this.shape=e}check(e,t){let n=e===void 0||this.shape.check(e);return!n&&t?.extend(null,`undefined (optional)`,`()`),n}get[op](){return!0}},cp=Qf(sp),lp=class extends Xf{check(e,t){return t?.extend(null,`never`,typeof e),!1}};new lp,Qf(lp);var up=class e extends Xf{constructor(e,t=!1){super(),this.shape=e,this._isPartial=t}static _dilutes=!0;get partial(){return new e(this.shape,!0)}check(e,t){return e==null?(t?.extend(null,`object`,`null`),!1):mf(this.shape,(n,r)=>{let i=this._isPartial&&!hf(e,r)||n.check(e[r],t);return!i&&t?.extend(r.toString(),n.toString(),typeof e[r],`Object property does not match`),i})}},dp=e=>new up(e),fp=Qf(up),pp=ep(e=>e!=null&&(e.constructor===Object||e.constructor==null)),mp=class extends Xf{constructor(e,t){super(),this.shape={keys:e,values:t}}check(e,t){return e!=null&&mf(e,(n,r)=>{let i=this.shape.keys.check(r,t);return!i&&t?.extend(r+``,`Record`,typeof e,i?`Key doesn't match schema`:`Value doesn't match value`),i&&this.shape.values.check(n,t)})}},hp=(e,t)=>new mp(e,t),gp=Qf(mp),_p=class extends Xf{constructor(e){super(),this.shape=e}check(e,t){return e!=null&&mf(this.shape,(n,r)=>{let i=n.check(e[r],t);return!i&&t?.extend(r.toString(),`Tuple`,typeof n),i})}},vp=(...e)=>new _p(e);Qf(_p);var yp=class extends Xf{constructor(e){super(),this.shape=e.length===1?e[0]:new Op(e)}check(e,t){let n=vu(e)&&hu(e,e=>this.shape.check(e));return!n&&t?.extend(null,`Array`,``),n}},bp=(...e)=>new yp(e),xp=Qf(yp),Sp=ep(e=>vu(e)),Cp=class extends Xf{constructor(e,t){super(),this.shape=e,this._c=t}check(e,t){let n=e instanceof this.shape&&(this._c==null||this._c(e));return!n&&t?.extend(null,this.shape.name,e?.constructor.name),n}},wp=(e,t=null)=>new Cp(e,t);Qf(Cp);var Tp=wp(Xf),Ep=Qf(class extends Xf{constructor(e){super(),this.len=e.length-1,this.args=vp(...e.slice(-1)),this.res=e[this.len]}check(e,t){let n=e.constructor===Function&&e.length<=this.len;return!n&&t?.extend(null,`function`,typeof e),n}}),Dp=ep(e=>typeof e==`function`);Qf(class extends Xf{constructor(e){super(),this.shape=e}check(e,t){let n=hu(this.shape,n=>n.check(e,t));return!n&&t?.extend(null,`Intersectinon`,typeof e),n}},e=>e.shape.length>0);var Op=class extends Xf{static _dilutes=!0;constructor(e){super(),this.shape=e}check(e,t){let n=gu(this.shape,n=>n.check(e,t));return t?.extend(null,`Union`,typeof e),n}},kp=(...e)=>e.findIndex(e=>Ap.check(e))>=0?kp(...e.map(e=>qp(e)).map(e=>Ap.check(e)?e.shape:[e]).flat(1)):e.length===1?e[0]:new Op(e),Ap=Qf(Op),jp=()=>!0,Mp=ep(jp),Np=Qf($f,e=>e.shape===jp),Pp=ep(e=>typeof e==`bigint`),Fp=ep(e=>e===Pp),Ip=ep(e=>typeof e==`symbol`);ep(e=>e===Ip);var Lp=ep(e=>typeof e==`number`),Rp=ep(e=>e===Lp),zp=ep(e=>typeof e==`string`),Bp=ep(e=>e===zp),Vp=ep(e=>typeof e==`boolean`),Hp=ep(e=>e===Vp),Up=np(void 0);Qf(tp,e=>e.shape.length===1&&e.shape[0]===void 0),np(void 0);var Wp=np(null),Gp=Qf(tp,e=>e.shape.length===1&&e.shape[0]===null);Qf(Uint8Array),Qf(Zf,e=>e.shape===Uint8Array);var Kp=kp(Lp,zp,Wp,Up,Pp,Vp,Ip);(()=>{let e=bp(Mp),t=hp(zp,Mp),n=kp(Lp,zp,Wp,Vp,e,t);return e.shape=n,t.shape.values=n,n})();var qp=e=>{if(Tp.check(e))return e;if(pp.check(e)){let t={};for(let n in e)t[n]=qp(e[n]);return dp(t)}else if(Sp.check(e))return kp(...e.map(qp));else if(Kp.check(e))return np(e);else if(Dp.check(e))return Qf(e);kd()},Jp=jf?()=>{}:(e,t)=>{let n=new Jf;if(!t.check(e,n))throw Dd(`Expected value to be of type ${t.constructor.name}.\n${n.toString()}`)},Yp=class{constructor(e){this.patterns=[],this.$state=e}if(e,t){return this.patterns.push({if:qp(e),h:t}),this}else(e){return this.if(Mp,e)}done(){return(e,t)=>{for(let n=0;n<this.patterns.length;n++){let r=this.patterns[n];if(r.if.check(e))return r.h(e,t)}throw Dd(`Unhandled pattern`)}}},Xp=(e=>new Yp(e))(Mp).if(Rp,(e,t)=>Vf(t,Bu,zu)).if(Bp,(e,t)=>Gf(t)).if(Hp,(e,t)=>Bf(t)).if(Fp,(e,t)=>BigInt(Vf(t,Bu,zu))).if(Ap,(e,t)=>Zp(t,Kf(t,e.shape))).if(fp,(e,t)=>{let n={};for(let r in e.shape){let i=e.shape[r];if(cp.check(i)){if(Bf(t))continue;i=i.shape}n[r]=Xp(i,t)}return n}).if(xp,(e,t)=>{let n=[],r=Hf(t,0,42);for(let i=0;i<r;i++)n.push(Zp(t,e.shape));return n}).if(rp,(e,t)=>Kf(t,e.shape)).if(Gp,(e,t)=>null).if(Ep,(e,t)=>{let n=Zp(t,e.res);return()=>n}).if(Np,(e,t)=>Zp(t,Kf(t,[Lp,zp,Wp,Up,Pp,Vp,bp(Lp),hp(kp(`a`,`b`,`c`),Lp)]))).if(gp,(e,t)=>{let n={},r=Vf(t,0,3);for(let i=0;i<r;i++){let r=Zp(t,e.shape.keys);n[r]=Zp(t,e.shape.values)}return n}).done(),Zp=(e,t)=>Xp(qp(t),e),Qp=typeof document<`u`?document:{},$p=e=>Qp.createElement(e),em=()=>Qp.createDocumentFragment();ep(e=>e.nodeType===fm);var tm=e=>Qp.createTextNode(e);typeof DOMParser<`u`&&new DOMParser;var nm=(e,t)=>(zf(t,(t,n)=>{n===!1?e.removeAttribute(t):n===!0?e.setAttribute(t,``):e.setAttribute(t,n)}),e),rm=e=>{let t=em();for(let n=0;n<e.length;n++)cm(t,e[n]);return t},im=(e,t)=>(cm(e,rm(t)),e),am=(e,t=[],n=[])=>im(nm($p(e),t),n);ep(e=>e.nodeType===lm);var om=tm;ep(e=>e.nodeType===um);var sm=e=>lu(e,(e,t)=>`${t}:${e};`).join(``),cm=(e,t)=>e.appendChild(t),lm=Qp.ELEMENT_NODE,um=Qp.TEXT_NODE;Qp.CDATA_SECTION_NODE,Qp.COMMENT_NODE;var dm=Qp.DOCUMENT_NODE;Qp.DOCUMENT_TYPE_NODE;var fm=Qp.DOCUMENT_FRAGMENT_NODE;ep(e=>e.nodeType===dm);var pm=(e=>class{constructor(e){this._=e}destroy(){e(this._)}})(clearTimeout),mm=(e,t)=>new pm(setTimeout(t,e)),hm=Symbol,gm=hm(),_m=hm(),vm=hm(),ym=hm(),bm=hm(),xm=hm(),Sm=hm(),Cm=hm(),wm=hm(),Tm=e=>{e.length===1&&e[0]?.constructor===Function&&(e=e[0]());let t=[],n=[],r=0;for(;r<e.length;r++){let n=e[r];if(n===void 0)break;if(n.constructor===String||n.constructor===Number)t.push(n);else if(n.constructor===Object)break}for(r>0&&n.push(t.join(``));r<e.length;r++){let t=e[r];t instanceof Symbol||n.push(t)}return n};ef();var Em={[gm]:Rf(`font-weight`,`bold`),[_m]:Rf(`font-weight`,`normal`),[vm]:Rf(`color`,`blue`),[bm]:Rf(`color`,`green`),[ym]:Rf(`color`,`grey`),[xm]:Rf(`color`,`red`),[Sm]:Rf(`color`,`purple`),[Cm]:Rf(`color`,`orange`),[wm]:Rf(`color`,`black`)},Dm=Mf?e=>{e.length===1&&e[0]?.constructor===Function&&(e=e[0]());let t=[],n=[],r=ou(),i=[],a=0;for(;a<e.length;a++){let i=e[a],o=Em[i];if(o!==void 0)r.set(o.left,o.right);else{if(i===void 0)break;if(i.constructor===String||i.constructor===Number){let e=sm(r);a>0||e.length>0?(t.push(`%c`+i),n.push(e)):t.push(i)}else break}}for(a>0&&(i=n,i.unshift(t.join(``)));a<e.length;a++){let t=e[a];t instanceof Symbol||i.push(t)}return i}:Tm,Om=(...e)=>{console.log(...Dm(e)),Am.forEach(t=>t.print(e))},km=(...e)=>{console.warn(...Dm(e)),e.unshift(Cm),Am.forEach(t=>t.print(e))},Am=du(),jm=e=>({[Symbol.iterator](){return this},next:e}),Mm=(e,t)=>jm(()=>{let n;do n=e.next();while(!n.done&&!t(n.value));return n}),Nm=(e,t)=>jm(()=>{let{done:n,value:r}=e.next();return{done:n,value:n?void 0:t(r)}}),Pm=class{constructor(e,t){this.clock=e,this.len=t}},Fm=class{constructor(){this.clients=new Map}},Im=(e,t,n)=>t.clients.forEach((t,r)=>{let i=e.doc.store.clients.get(r);if(i!=null){let r=i[i.length-1],a=r.id.clock+r.length;for(let r=0,o=t[r];r<t.length&&o.clock<a;o=t[++r])tg(e,i,o.clock,o.len,n)}}),Lm=(e,t)=>{let n=0,r=e.length-1;for(;n<=r;){let i=xu((n+r)/2),a=e[i],o=a.clock;if(o<=t){if(t<o+a.len)return i;n=i+1}else r=i-1}return null},Rm=(e,t)=>{let n=e.clients.get(t.client);return n!==void 0&&Lm(n,t.clock)!==null},zm=e=>{e.clients.forEach(e=>{e.sort((e,t)=>e.clock-t.clock);let t,n;for(t=1,n=1;t<e.length;t++){let r=e[n-1],i=e[t];r.clock+r.len>=i.clock?e[n-1]=new Pm(r.clock,wu(r.len,i.clock+i.len-r.clock)):(n<t&&(e[n]=i),n++)}e.length=n})},Bm=e=>{let t=new Fm;for(let n=0;n<e.length;n++)e[n].clients.forEach((r,i)=>{if(!t.clients.has(i)){let a=r.slice();for(let t=n+1;t<e.length;t++)pu(a,e[t].clients.get(i)||[]);t.clients.set(i,a)}});return zm(t),t},Vm=(e,t,n,r)=>{cu(e.clients,t,()=>[]).push(new Pm(n,r))},Hm=()=>new Fm,Um=e=>{let t=Hm();return e.clients.forEach((e,n)=>{let r=[];for(let t=0;t<e.length;t++){let n=e[t];if(n.deleted){let i=n.id.clock,a=n.length;if(t+1<e.length)for(let n=e[t+1];t+1<e.length&&n.deleted;n=e[++t+1])a+=n.length;r.push(new Pm(i,a))}}r.length>0&&t.clients.set(n,r)}),t},Wm=(e,t)=>{sd(e.restEncoder,t.clients.size),mu(t.clients.entries()).sort((e,t)=>t[0]-e[0]).forEach(([t,n])=>{e.resetDsCurVal(),sd(e.restEncoder,t);let r=n.length;sd(e.restEncoder,r);for(let t=0;t<r;t++){let r=n[t];e.writeDsClock(r.clock),e.writeDsLen(r.len)}})},Gm=e=>{let t=new Fm,n=Rd(e.restDecoder);for(let r=0;r<n;r++){e.resetDsCurVal();let n=Rd(e.restDecoder),r=Rd(e.restDecoder);if(r>0){let i=cu(t.clients,n,()=>[]);for(let t=0;t<r;t++)i.push(new Pm(e.readDsClock(),e.readDsLen()))}}return t},Km=(e,t,n)=>{let r=new Fm,i=Rd(e.restDecoder);for(let a=0;a<i;a++){e.resetDsCurVal();let i=Rd(e.restDecoder),a=Rd(e.restDecoder),o=n.clients.get(i)||[],s=qh(n,i);for(let n=0;n<a;n++){let n=e.readDsClock(),a=n+e.readDsLen();if(n<s){s<a&&Vm(r,i,s,a-s);let e=Yh(o,n),c=o[e];for(!c.deleted&&c.id.clock<n&&(o.splice(e+1,0,vv(t,c,n-c.id.clock)),e++);e<o.length&&(c=o[e++],c.id.clock<a);)c.deleted||(a<c.id.clock+c.length&&o.splice(e,0,vv(t,c,a-c.id.clock)),c.delete(t))}else Vm(r,i,n,a-n)}}if(r.clients.size>0){let e=new nh;return sd(e.restEncoder,0),Wm(e,r),e.toUint8Array()}return null},qm=Xd,Jm=class e extends yu{constructor({guid:e=$d(),collectionid:t=null,gc:n=!0,gcFilter:r=()=>!0,meta:i=null,autoLoad:a=!1,shouldLoad:o=!0}={}){super(),this.gc=n,this.gcFilter=r,this.clientID=qm(),this.guid=e,this.collectionid=t,this.share=new Map,this.store=new Gh,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=o,this.autoLoad=a,this.meta=i,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=tf(e=>{this.on(`load`,()=>{this.isLoaded=!0,e(this)})});let s=()=>tf(e=>{let t=n=>{(n===void 0||n===!0)&&(this.off(`sync`,t),e())};this.on(`sync`,t)});this.on(`sync`,e=>{e===!1&&this.isSynced&&(this.whenSynced=s()),this.isSynced=e===void 0||e===!0,this.isSynced&&!this.isLoaded&&this.emit(`load`,[this])}),this.whenSynced=s()}load(){let e=this._item;e!==null&&!this.shouldLoad&&lg(e.parent.doc,e=>{e.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(mu(this.subdocs).map(e=>e.guid))}transact(e,t=null){return lg(this,e,t)}get(e,t=zg){let n=cu(this.share,e,()=>{let e=new t;return e._integrate(this,null),e}),r=n.constructor;if(t!==zg&&r!==t)if(r===zg){let r=new t;r._map=n._map,n._map.forEach(e=>{for(;e!==null;e=e.left)e.parent=r}),r._start=n._start;for(let e=r._start;e!==null;e=e.right)e.parent=r;return r._length=n._length,this.share.set(e,r),r._integrate(this,null),r}else throw Error(`Type with the name ${e} has already been defined with a different constructor`);return n}getArray(e=``){return this.get(e,o_)}getText(e=``){return this.get(e,D_)}getMap(e=``){return this.get(e,l_)}getXmlElement(e=``){return this.get(e,M_)}getXmlFragment(e=``){return this.get(e,A_)}toJSON(){let e={};return this.share.forEach((t,n)=>{e[n]=t.toJSON()}),e}destroy(){this.isDestroyed=!0,mu(this.subdocs).forEach(e=>e.destroy());let t=this._item;if(t!==null){this._item=null;let n=t.content;n.doc=new e({guid:this.guid,...n.opts,shouldLoad:!1}),n.doc._item=t,lg(t.parent.doc,e=>{let r=n.doc;t.deleted||e.subdocsAdded.add(r),e.subdocsRemoved.add(this)},null,!0)}this.emit(`destroyed`,[!0]),this.emit(`destroy`,[this]),super.destroy()}},Ym=class{constructor(e){this.restDecoder=e}resetDsCurVal(){}readDsClock(){return Rd(this.restDecoder)}readDsLen(){return Rd(this.restDecoder)}},Xm=class extends Ym{readLeftID(){return Dh(Rd(this.restDecoder),Rd(this.restDecoder))}readRightID(){return Dh(Rd(this.restDecoder),Rd(this.restDecoder))}readClient(){return Rd(this.restDecoder)}readInfo(){return Ld(this.restDecoder)}readString(){return Bd(this.restDecoder)}readParentInfo(){return Rd(this.restDecoder)===1}readTypeRef(){return Rd(this.restDecoder)}readLen(){return Rd(this.restDecoder)}readAny(){return Ud(this.restDecoder)}readBuf(){return Ff(Id(this.restDecoder))}readJSON(){return JSON.parse(Bd(this.restDecoder))}readKey(){return Bd(this.restDecoder)}},Zm=class{constructor(e){this.dsCurrVal=0,this.restDecoder=e}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=Rd(this.restDecoder),this.dsCurrVal}readDsLen(){let e=Rd(this.restDecoder)+1;return this.dsCurrVal+=e,e}},Qm=class extends Zm{constructor(e){super(e),this.keys=[],Rd(e),this.keyClockDecoder=new Kd(Id(e)),this.clientDecoder=new Gd(Id(e)),this.leftClockDecoder=new Kd(Id(e)),this.rightClockDecoder=new Kd(Id(e)),this.infoDecoder=new Wd(Id(e),Ld),this.stringDecoder=new qd(Id(e)),this.parentInfoDecoder=new Wd(Id(e),Ld),this.typeRefDecoder=new Gd(Id(e)),this.lenDecoder=new Gd(Id(e))}readLeftID(){return new Th(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new Th(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return Ud(this.restDecoder)}readBuf(){return Id(this.restDecoder)}readJSON(){return Ud(this.restDecoder)}readKey(){let e=this.keyClockDecoder.read();if(e<this.keys.length)return this.keys[e];{let e=this.stringDecoder.read();return this.keys.push(e),e}}},$m=class{constructor(){this.restEncoder=ed()}toUint8Array(){return rd(this.restEncoder)}resetDsCurVal(){}writeDsClock(e){sd(this.restEncoder,e)}writeDsLen(e){sd(this.restEncoder,e)}},eh=class extends $m{writeLeftID(e){sd(this.restEncoder,e.client),sd(this.restEncoder,e.clock)}writeRightID(e){sd(this.restEncoder,e.client),sd(this.restEncoder,e.clock)}writeClient(e){sd(this.restEncoder,e)}writeInfo(e){od(this.restEncoder,e)}writeString(e){dd(this.restEncoder,e)}writeParentInfo(e){sd(this.restEncoder,+!!e)}writeTypeRef(e){sd(this.restEncoder,e)}writeLen(e){sd(this.restEncoder,e)}writeAny(e){bd(this.restEncoder,e)}writeBuf(e){pd(this.restEncoder,e)}writeJSON(e){dd(this.restEncoder,JSON.stringify(e))}writeKey(e){dd(this.restEncoder,e)}},th=class{constructor(){this.restEncoder=ed(),this.dsCurrVal=0}toUint8Array(){return rd(this.restEncoder)}resetDsCurVal(){this.dsCurrVal=0}writeDsClock(e){let t=e-this.dsCurrVal;this.dsCurrVal=e,sd(this.restEncoder,t)}writeDsLen(e){e===0&&kd(),sd(this.restEncoder,e-1),this.dsCurrVal+=e}},nh=class extends th{constructor(){super(),this.keyMap=new Map,this.keyClock=0,this.keyClockEncoder=new Td,this.clientEncoder=new Cd,this.leftClockEncoder=new Td,this.rightClockEncoder=new Td,this.infoEncoder=new xd(od),this.stringEncoder=new Ed,this.parentInfoEncoder=new xd(od),this.typeRefEncoder=new Cd,this.lenEncoder=new Cd}toUint8Array(){let e=ed();return sd(e,0),pd(e,this.keyClockEncoder.toUint8Array()),pd(e,this.clientEncoder.toUint8Array()),pd(e,this.leftClockEncoder.toUint8Array()),pd(e,this.rightClockEncoder.toUint8Array()),pd(e,rd(this.infoEncoder)),pd(e,this.stringEncoder.toUint8Array()),pd(e,rd(this.parentInfoEncoder)),pd(e,this.typeRefEncoder.toUint8Array()),pd(e,this.lenEncoder.toUint8Array()),fd(e,rd(this.restEncoder)),rd(e)}writeLeftID(e){this.clientEncoder.write(e.client),this.leftClockEncoder.write(e.clock)}writeRightID(e){this.clientEncoder.write(e.client),this.rightClockEncoder.write(e.clock)}writeClient(e){this.clientEncoder.write(e)}writeInfo(e){this.infoEncoder.write(e)}writeString(e){this.stringEncoder.write(e)}writeParentInfo(e){this.parentInfoEncoder.write(+!!e)}writeTypeRef(e){this.typeRefEncoder.write(e)}writeLen(e){this.lenEncoder.write(e)}writeAny(e){bd(this.restEncoder,e)}writeBuf(e){pd(this.restEncoder,e)}writeJSON(e){bd(this.restEncoder,e)}writeKey(e){let t=this.keyMap.get(e);t===void 0?(this.keyClockEncoder.write(this.keyClock++),this.stringEncoder.write(e)):this.keyClockEncoder.write(t)}},rh=(e,t,n,r)=>{r=wu(r,t[0].id.clock);let i=Yh(t,r);sd(e.restEncoder,t.length-i),e.writeClient(n),sd(e.restEncoder,r);let a=t[i];a.write(e,r-a.id.clock);for(let n=i+1;n<t.length;n++)t[n].write(e,0)},ih=(e,t,n)=>{let r=new Map;n.forEach((e,n)=>{qh(t,n)>e&&r.set(n,e)}),Kh(t).forEach((e,t)=>{n.has(t)||r.set(t,0)}),sd(e.restEncoder,r.size),mu(r.entries()).sort((e,t)=>t[0]-e[0]).forEach(([n,r])=>{rh(e,t.clients.get(n),n,r)})},ah=(e,t)=>{let n=ou(),r=Rd(e.restDecoder);for(let i=0;i<r;i++){let r=Rd(e.restDecoder),i=Array(r),a=e.readClient(),o=Rd(e.restDecoder);n.set(a,{i:0,refs:i});for(let n=0;n<r;n++){let r=e.readInfo();switch(31&r){case 0:{let t=e.readLen();i[n]=new V_(Dh(a,o),t),o+=t;break}case 10:{let t=Rd(e.restDecoder);i[n]=new Tv(Dh(a,o),t),o+=t;break}default:{let s=(r&192)==0,c=new xv(Dh(a,o),null,(r&128)==128?e.readLeftID():null,null,(r&64)==64?e.readRightID():null,s?e.readParentInfo()?t.get(e.readString()):e.readLeftID():null,s&&(r&32)==32?e.readString():null,Sv(e,r));i[n]=c,o+=c.length}}}}return n},oh=(e,t,n)=>{let r=[],i=mu(n.keys()).sort((e,t)=>e-t);if(i.length===0)return null;let a=()=>{if(i.length===0)return null;let e=n.get(i[i.length-1]);for(;e.refs.length===e.i;)if(i.pop(),i.length>0)e=n.get(i[i.length-1]);else return null;return e},o=a();if(o===null)return null;let s=new Gh,c=new Map,l=(e,t)=>{let n=c.get(e);(n==null||n>t)&&c.set(e,t)},u=o.refs[o.i++],d=new Map,f=()=>{for(let e of r){let t=e.id.client,r=n.get(t);r?(r.i--,s.clients.set(t,r.refs.slice(r.i)),n.delete(t),r.i=0,r.refs=[]):s.clients.set(t,[e]),i=i.filter(e=>e!==t)}r.length=0};for(;;){if(u.constructor!==Tv){let i=cu(d,u.id.client,()=>qh(t,u.id.client))-u.id.clock;if(i<0)r.push(u),l(u.id.client,u.id.clock-1),f();else{let a=u.getMissing(e,t);if(a!==null){r.push(u);let e=n.get(a)||{refs:[],i:0};if(e.refs.length===e.i)l(a,qh(t,a)),f();else{u=e.refs[e.i++];continue}}else (i===0||i<u.length)&&(u.integrate(e,i),d.set(u.id.client,u.id.clock+u.length))}}if(r.length>0)u=r.pop();else if(o!==null&&o.i<o.refs.length)u=o.refs[o.i++];else{if(o=a(),o===null)break;u=o.refs[o.i++]}}if(s.clients.size>0){let e=new nh;return ih(e,s,new Map),sd(e.restEncoder,0),{missing:c,update:e.toUint8Array()}}return null},sh=(e,t)=>ih(e,t.doc.store,t.beforeState),ch=(e,t,n,r=new Qm(e))=>lg(t,e=>{e.local=!1;let t=!1,n=e.doc,i=n.store,a=oh(e,i,ah(r,n)),o=i.pendingStructs;if(o){for(let[e,n]of o.missing)if(n<qh(i,e)){t=!0;break}if(a){for(let[e,t]of a.missing){let n=o.missing.get(e);(n==null||n>t)&&o.missing.set(e,t)}o.update=yg([o.update,a.update])}}else i.pendingStructs=a;let s=Km(r,e,i);if(i.pendingDs){let t=new Qm(Nd(i.pendingDs));Rd(t.restDecoder);let n=Km(t,e,i);s&&n?i.pendingDs=yg([s,n]):i.pendingDs=s||n}else i.pendingDs=s;if(t){let t=i.pendingStructs.update;i.pendingStructs=null,lh(e.doc,t)}},n,!1),lh=(e,t,n,r=Qm)=>{let i=Nd(t);ch(i,e,n,new r(i))},uh=(e,t,n)=>lh(e,t,n,Xm),dh=(e,t,n=new Map)=>{ih(e,t.store,n),Wm(e,Um(t.store))},fh=(e,t=new Uint8Array([0]),n=new nh)=>{dh(n,e,hh(t));let r=[n.toUint8Array()];if(e.store.pendingDs&&r.push(e.store.pendingDs),e.store.pendingStructs&&r.push(bg(e.store.pendingStructs.update,t)),r.length>1){if(n.constructor===eh)return _g(r.map((e,t)=>t===0?e:Tg(e)));if(n.constructor===nh)return yg(r)}return r[0]},ph=(e,t)=>fh(e,t,new eh),mh=e=>{let t=new Map,n=Rd(e.restDecoder);for(let r=0;r<n;r++){let n=Rd(e.restDecoder),r=Rd(e.restDecoder);t.set(n,r)}return t},hh=e=>mh(new Ym(Nd(e))),gh=(e,t)=>(sd(e.restEncoder,t.size),mu(t.entries()).sort((e,t)=>t[0]-e[0]).forEach(([t,n])=>{sd(e.restEncoder,t),sd(e.restEncoder,n)}),e),_h=(e,t)=>gh(e,Kh(t.store)),vh=(e,t=new th)=>(e instanceof Map?gh(t,e):_h(t,e),t.toUint8Array()),yh=e=>vh(e,new $m),bh=class{constructor(){this.l=[]}},xh=()=>new bh,Sh=(e,t)=>e.l.push(t),Ch=(e,t)=>{let n=e.l,r=n.length;e.l=n.filter(e=>t!==e),r===e.l.length&&console.error(`[yjs] Tried to remove event handler that doesn't exist.`)},wh=(e,t,n)=>yf(e.l,[t,n]),Th=class{constructor(e,t){this.client=e,this.clock=t}},Eh=(e,t)=>e===t||e!==null&&t!==null&&e.client===t.client&&e.clock===t.clock,Dh=(e,t)=>new Th(e,t),Oh=e=>{for(let[t,n]of e.doc.share.entries())if(n===e)return t;throw kd()},kh=(e,t)=>{for(;t!==null;){if(t.parent===e)return!0;t=t.parent._item}return!1},Ah=class{constructor(e,t,n,r=0){this.type=e,this.tname=t,this.item=n,this.assoc=r}},jh=e=>{let t={};return e.type&&(t.type=e.type),e.tname&&(t.tname=e.tname),e.item&&(t.item=e.item),e.assoc!=null&&(t.assoc=e.assoc),t},Mh=e=>new Ah(e.type==null?null:Dh(e.type.client,e.type.clock),e.tname??null,e.item==null?null:Dh(e.item.client,e.item.clock),e.assoc==null?0:e.assoc),Nh=class{constructor(e,t,n=0){this.type=e,this.index=t,this.assoc=n}},Ph=(e,t,n=0)=>new Nh(e,t,n),Fh=(e,t,n)=>{let r=null,i=null;return e._item===null?i=Oh(e):r=Dh(e._item.id.client,e._item.id.clock),new Ah(r,i,t,n)},Ih=(e,t,n=0)=>{let r=e._start;if(n<0){if(t===0)return Fh(e,null,n);t--}for(;r!==null;){if(!r.deleted&&r.countable){if(r.length>t)return Fh(e,Dh(r.id.client,r.id.clock+t),n);t-=r.length}if(r.right===null&&n<0)return Fh(e,r.lastId,n);r=r.right}return Fh(e,null,n)},Lh=(e,t)=>{let n=Xh(e,t);return{item:n,diff:t.clock-n.id.clock}},Rh=(e,t,n=!0)=>{let r=t.store,i=e.item,a=e.type,o=e.tname,s=e.assoc,c=null,l=0;if(i!==null){if(qh(r,i.client)<=i.clock)return null;let e=n?gv(r,i):Lh(r,i),t=e.item;if(!(t instanceof xv))return null;if(c=t.parent,c._item===null||!c._item.deleted){l=t.deleted||!t.countable?0:e.diff+(s>=0?0:1);let n=t.left;for(;n!==null;)!n.deleted&&n.countable&&(l+=n.length),n=n.left}}else{if(o!==null)c=t.get(o);else if(a!==null){if(qh(r,a.client)<=a.clock)return null;let{item:e}=n?gv(r,a):{item:Xh(r,a)};if(e instanceof xv&&e.content instanceof mv)c=e.content.type;else return null}else throw kd();l=s>=0?c._length:0}return Ph(c,l,e.assoc)},zh=(e,t)=>e===t||e!==null&&t!==null&&e.tname===t.tname&&Eh(e.item,t.item)&&Eh(e.type,t.type)&&e.assoc===t.assoc,Bh=class{constructor(e,t){this.ds=e,this.sv=t}},Vh=(e,t)=>new Bh(e,t);Vh(Hm(),new Map);var Hh=e=>Vh(Um(e.store),Kh(e.store)),Uh=(e,t)=>t===void 0?!e.deleted:t.sv.has(e.id.client)&&(t.sv.get(e.id.client)||0)>e.id.clock&&!Rm(t.ds,e.id),Wh=(e,t)=>{let n=cu(e.meta,Wh,du),r=e.doc.store;n.has(t)||(t.sv.forEach((t,n)=>{t<qh(r,n)&&Qh(e,Dh(n,t))}),Im(e,t.ds,e=>{}),n.add(t))},Gh=class{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}},Kh=e=>{let t=new Map;return e.clients.forEach((e,n)=>{let r=e[e.length-1];t.set(n,r.id.clock+r.length)}),t},qh=(e,t)=>{let n=e.clients.get(t);if(n===void 0)return 0;let r=n[n.length-1];return r.id.clock+r.length},Jh=(e,t)=>{let n=e.clients.get(t.id.client);if(n===void 0)n=[],e.clients.set(t.id.client,n);else{let e=n[n.length-1];if(e.id.clock+e.length!==t.id.clock)throw kd()}n.push(t)},Yh=(e,t)=>{let n=0,r=e.length-1,i=e[r],a=i.id.clock;if(a===t)return r;let o=xu(t/(a+i.length-1)*r);for(;n<=r;){if(i=e[o],a=i.id.clock,a<=t){if(t<a+i.length)return o;n=o+1}else r=o-1;o=xu((n+r)/2)}throw kd()},Xh=(e,t)=>{let n=e.clients.get(t.client);return n[Yh(n,t.clock)]},Zh=(e,t,n)=>{let r=Yh(t,n),i=t[r];return i.id.clock<n&&i instanceof xv?(t.splice(r+1,0,vv(e,i,n-i.id.clock)),r+1):r},Qh=(e,t)=>{let n=e.doc.store.clients.get(t.client);return n[Zh(e,n,t.clock)]},$h=(e,t,n)=>{let r=t.clients.get(n.client),i=Yh(r,n.clock),a=r[i];return n.clock!==a.id.clock+a.length-1&&a.constructor!==V_&&r.splice(i+1,0,vv(e,a,n.clock-a.id.clock+1)),a},eg=(e,t,n)=>{let r=e.clients.get(t.id.client);r[Yh(r,t.id.clock)]=n},tg=(e,t,n,r,i)=>{if(r===0)return;let a=n+r,o=Zh(e,t,n),s;do s=t[o++],a<s.id.clock+s.length&&Zh(e,t,a),i(s);while(o<t.length&&t[o].id.clock<a)},ng=class{constructor(e,t,n){this.doc=e,this.deleteSet=new Fm,this.beforeState=Kh(e.store),this.afterState=new Map,this.changed=new Map,this.changedParentTypes=new Map,this._mergeStructs=[],this.origin=t,this.meta=new Map,this.local=n,this.subdocsAdded=new Set,this.subdocsRemoved=new Set,this.subdocsLoaded=new Set,this._needFormattingCleanup=!1}},rg=(e,t)=>t.deleteSet.clients.size===0&&!uu(t.afterState,(e,n)=>t.beforeState.get(n)!==e)?!1:(zm(t.deleteSet),sh(e,t),Wm(e,t.deleteSet),!0),ig=(e,t,n)=>{let r=t._item;(r===null||r.id.clock<(e.beforeState.get(r.id.client)||0)&&!r.deleted)&&cu(e.changed,t,du).add(n)},ag=(e,t)=>{let n=e[t],r=e[t-1],i=t;for(;i>0;n=r,r=e[--i-1]){if(r.deleted===n.deleted&&r.constructor===n.constructor&&r.mergeWith(n)){n instanceof xv&&n.parentSub!==null&&n.parent._map.get(n.parentSub)===n&&n.parent._map.set(n.parentSub,r);continue}break}let a=t-i;return a&&e.splice(t+1-a,a),a},og=(e,t,n)=>{for(let[r,i]of e.clients.entries()){let e=t.clients.get(r);for(let r=i.length-1;r>=0;r--){let a=i[r],o=a.clock+a.len;for(let r=Yh(e,a.clock),i=e[r];r<e.length&&i.id.clock<o;i=e[++r]){let i=e[r];if(a.clock+a.len<=i.id.clock)break;i instanceof xv&&i.deleted&&!i.keep&&n(i)&&i.gc(t,!1)}}}},sg=(e,t)=>{e.clients.forEach((e,n)=>{let r=t.clients.get(n);for(let t=e.length-1;t>=0;t--){let n=e[t],i=Cu(r.length-1,1+Yh(r,n.clock+n.len-1));for(let e=i,t=r[e];e>0&&t.id.clock>=n.clock;t=r[e])e-=1+ag(r,e)}})},cg=(e,t)=>{if(t<e.length){let n=e[t],r=n.doc,i=r.store,a=n.deleteSet,o=n._mergeStructs;try{zm(a),n.afterState=Kh(n.doc.store),r.emit(`beforeObserverCalls`,[n,r]);let e=[];n.changed.forEach((t,r)=>e.push(()=>{(r._item===null||!r._item.deleted)&&r._callObserver(n,t)})),e.push(()=>{n.changedParentTypes.forEach((t,r)=>{r._dEH.l.length>0&&(r._item===null||!r._item.deleted)&&(t=t.filter(e=>e.target._item===null||!e.target._item.deleted),t.forEach(e=>{e.currentTarget=r,e._path=null}),t.sort((e,t)=>e.path.length-t.path.length),e.push(()=>{wh(r._dEH,t,n)}))}),e.push(()=>r.emit(`afterTransaction`,[n,r])),e.push(()=>{n._needFormattingCleanup&&w_(n)})}),yf(e,[])}finally{r.gc&&og(a,i,r.gcFilter),sg(a,i),n.afterState.forEach((e,t)=>{let r=n.beforeState.get(t)||0;if(r!==e){let e=i.clients.get(t),n=wu(Yh(e,r),1);for(let t=e.length-1;t>=n;)t-=1+ag(e,t)}});for(let e=o.length-1;e>=0;e--){let{client:t,clock:n}=o[e].id,r=i.clients.get(t),a=Yh(r,n);a+1<r.length&&ag(r,a+1)>1||a>0&&ag(r,a)}if(!n.local&&n.afterState.get(r.clientID)!==n.beforeState.get(r.clientID)&&(Om(Cm,gm,`[yjs] `,_m,xm,`Changed the client-id because another client seems to be using it.`),r.clientID=qm()),r.emit(`afterTransactionCleanup`,[n,r]),r._observers.has(`update`)){let e=new eh;rg(e,n)&&r.emit(`update`,[e.toUint8Array(),n.origin,r,n])}if(r._observers.has(`updateV2`)){let e=new nh;rg(e,n)&&r.emit(`updateV2`,[e.toUint8Array(),n.origin,r,n])}let{subdocsAdded:s,subdocsLoaded:c,subdocsRemoved:l}=n;(s.size>0||l.size>0||c.size>0)&&(s.forEach(e=>{e.clientID=r.clientID,e.collectionid??=r.collectionid,r.subdocs.add(e)}),l.forEach(e=>r.subdocs.delete(e)),r.emit(`subdocs`,[{loaded:c,added:s,removed:l},r,n]),l.forEach(e=>e.destroy())),e.length<=t+1?(r._transactionCleanups=[],r.emit(`afterAllTransactions`,[r,e])):cg(e,t+1)}}},lg=(e,t,n=null,r=!0)=>{let i=e._transactionCleanups,a=!1,o=null;e._transaction===null&&(a=!0,e._transaction=new ng(e,n,r),i.push(e._transaction),i.length===1&&e.emit(`beforeAllTransactions`,[e]),e.emit(`beforeTransaction`,[e._transaction,e]));try{o=t(e._transaction)}finally{if(a){let t=e._transaction===i[0];e._transaction=null,t&&cg(i,0)}}return o},ug=class{constructor(e,t){this.insertions=t,this.deletions=e,this.meta=new Map}},dg=(e,t,n)=>{Im(e,n.deletions,n=>{n instanceof xv&&t.scope.some(t=>t===e.doc||kh(t,n))&&_v(n,!1)})},fg=(e,t,n)=>{let r=null,i=e.doc,a=e.scope;lg(i,n=>{for(;t.length>0&&e.currStackItem===null;){let r=i.store,o=t.pop(),s=new Set,c=[],l=!1;Im(n,o.insertions,e=>{if(e instanceof xv){if(e.redone!==null){let{item:t,diff:i}=gv(r,e.id);i>0&&(t=Qh(n,Dh(t.id.client,t.id.clock+i))),e=t}!e.deleted&&a.some(t=>t===n.doc||kh(t,e))&&c.push(e)}}),Im(n,o.deletions,e=>{e instanceof xv&&a.some(t=>t===n.doc||kh(t,e))&&!Rm(o.insertions,e.id)&&s.add(e)}),s.forEach(t=>{l=bv(n,t,s,o.insertions,e.ignoreRemoteMapChanges,e)!==null||l});for(let t=c.length-1;t>=0;t--){let r=c[t];e.deleteFilter(r)&&(r.delete(n),l=!0)}e.currStackItem=l?o:null}n.changed.forEach((e,t)=>{e.has(null)&&t._searchMarker&&(t._searchMarker.length=0)}),r=n},e);let o=e.currStackItem;if(o!=null){let t=r.changedParentTypes;e.emit(`stack-item-popped`,[{stackItem:o,type:n,changedParentTypes:t,origin:e},e]),e.currStackItem=null}return o},pg=class extends yu{constructor(e,{captureTimeout:t=500,captureTransaction:n=e=>!0,deleteFilter:r=()=>!0,trackedOrigins:i=new Set([null]),ignoreRemoteMapChanges:a=!1,doc:o=vu(e)?e[0].doc:e instanceof Jm?e:e.doc}={}){super(),this.scope=[],this.doc=o,this.addToScope(e),this.deleteFilter=r,i.add(this),this.trackedOrigins=i,this.captureTransaction=n,this.undoStack=[],this.redoStack=[],this.undoing=!1,this.redoing=!1,this.currStackItem=null,this.lastChange=0,this.ignoreRemoteMapChanges=a,this.captureTimeout=t,this.afterTransactionHandler=e=>{if(!this.captureTransaction(e)||!this.scope.some(t=>e.changedParentTypes.has(t)||t===this.doc)||!this.trackedOrigins.has(e.origin)&&(!e.origin||!this.trackedOrigins.has(e.origin.constructor)))return;let t=this.undoing,n=this.redoing,r=t?this.redoStack:this.undoStack;t?this.stopCapturing():n||this.clear(!1,!0);let i=new Fm;e.afterState.forEach((t,n)=>{let r=e.beforeState.get(n)||0,a=t-r;a>0&&Vm(i,n,r,a)});let a=ef(),o=!1;if(this.lastChange>0&&a-this.lastChange<this.captureTimeout&&r.length>0&&!t&&!n){let t=r[r.length-1];t.deletions=Bm([t.deletions,e.deleteSet]),t.insertions=Bm([t.insertions,i])}else r.push(new ug(e.deleteSet,i)),o=!0;!t&&!n&&(this.lastChange=a),Im(e,e.deleteSet,t=>{t instanceof xv&&this.scope.some(n=>n===e.doc||kh(n,t))&&_v(t,!0)});let s=[{stackItem:r[r.length-1],origin:e.origin,type:t?`redo`:`undo`,changedParentTypes:e.changedParentTypes},this];o?this.emit(`stack-item-added`,s):this.emit(`stack-item-updated`,s)},this.doc.on(`afterTransaction`,this.afterTransactionHandler),this.doc.on(`destroy`,()=>{this.destroy()})}addToScope(e){let t=new Set(this.scope);e=vu(e)?e:[e],e.forEach(e=>{t.has(e)||(t.add(e),(e instanceof zg?e.doc!==this.doc:e!==this.doc)&&km(`[yjs#509] Not same Y.Doc`),this.scope.push(e))})}addTrackedOrigin(e){this.trackedOrigins.add(e)}removeTrackedOrigin(e){this.trackedOrigins.delete(e)}clear(e=!0,t=!0){(e&&this.canUndo()||t&&this.canRedo())&&this.doc.transact(n=>{e&&(this.undoStack.forEach(e=>dg(n,this,e)),this.undoStack=[]),t&&(this.redoStack.forEach(e=>dg(n,this,e)),this.redoStack=[]),this.emit(`stack-cleared`,[{undoStackCleared:e,redoStackCleared:t}])})}stopCapturing(){this.lastChange=0}undo(){this.undoing=!0;let e;try{e=fg(this,this.undoStack,`undo`)}finally{this.undoing=!1}return e}redo(){this.redoing=!0;let e;try{e=fg(this,this.redoStack,`redo`)}finally{this.redoing=!1}return e}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}destroy(){this.trackedOrigins.delete(this),this.doc.off(`afterTransaction`,this.afterTransactionHandler),super.destroy()}};function*mg(e){let t=Rd(e.restDecoder);for(let n=0;n<t;n++){let t=Rd(e.restDecoder),n=e.readClient(),r=Rd(e.restDecoder);for(let i=0;i<t;i++){let t=e.readInfo();if(t===10){let t=Rd(e.restDecoder);yield new Tv(Dh(n,r),t),r+=t}else if(31&t){let i=(t&192)==0,a=new xv(Dh(n,r),null,(t&128)==128?e.readLeftID():null,null,(t&64)==64?e.readRightID():null,i?e.readParentInfo()?e.readString():e.readLeftID():null,i&&(t&32)==32?e.readString():null,Sv(e,t));yield a,r+=a.length}else{let t=e.readLen();yield new V_(Dh(n,r),t),r+=t}}}}var hg=class{constructor(e,t){this.gen=mg(e),this.curr=null,this.done=!1,this.filterSkips=t,this.next()}next(){do this.curr=this.gen.next().value||null;while(this.filterSkips&&this.curr!==null&&this.curr.constructor===Tv);return this.curr}},gg=class{constructor(e){this.currClient=0,this.startClock=0,this.written=0,this.encoder=e,this.clientStructs=[]}},_g=e=>yg(e,Xm,eh),vg=(e,t)=>{if(e.constructor===V_){let{client:n,clock:r}=e.id;return new V_(Dh(n,r+t),e.length-t)}else if(e.constructor===Tv){let{client:n,clock:r}=e.id;return new Tv(Dh(n,r+t),e.length-t)}else{let n=e,{client:r,clock:i}=n.id;return new xv(Dh(r,i+t),null,Dh(r,i+t-1),null,n.rightOrigin,n.parent,n.parentSub,n.content.splice(t))}},yg=(e,t=Qm,n=nh)=>{if(e.length===1)return e[0];let r=e.map(e=>new t(Nd(e))),i=r.map(e=>new hg(e,!0)),a=null,o=new n,s=new gg(o);for(;i=i.filter(e=>e.curr!==null),i.sort((e,t)=>{if(e.curr.id.client===t.curr.id.client){let n=e.curr.id.clock-t.curr.id.clock;return n===0?e.curr.constructor===t.curr.constructor?0:e.curr.constructor===Tv?1:-1:n}else return t.curr.id.client-e.curr.id.client}),i.length!==0;){let e=i[0],t=e.curr.id.client;if(a!==null){let n=e.curr,r=!1;for(;n!==null&&n.id.clock+n.length<=a.struct.id.clock+a.struct.length&&n.id.client>=a.struct.id.client;)n=e.next(),r=!0;if(n===null||n.id.client!==t||r&&n.id.clock>a.struct.id.clock+a.struct.length)continue;if(t!==a.struct.id.client)Sg(s,a.struct,a.offset),a={struct:n,offset:0},e.next();else if(a.struct.id.clock+a.struct.length<n.id.clock)if(a.struct.constructor===Tv)a.struct.length=n.id.clock+n.length-a.struct.id.clock;else{Sg(s,a.struct,a.offset);let e=n.id.clock-a.struct.id.clock-a.struct.length;a={struct:new Tv(Dh(t,a.struct.id.clock+a.struct.length),e),offset:0}}else{let t=a.struct.id.clock+a.struct.length-n.id.clock;t>0&&(a.struct.constructor===Tv?a.struct.length-=t:n=vg(n,t)),a.struct.mergeWith(n)||(Sg(s,a.struct,a.offset),a={struct:n,offset:0},e.next())}}else a={struct:e.curr,offset:0},e.next();for(let n=e.curr;n!==null&&n.id.client===t&&n.id.clock===a.struct.id.clock+a.struct.length&&n.constructor!==Tv;n=e.next())Sg(s,a.struct,a.offset),a={struct:n,offset:0}}return a!==null&&(Sg(s,a.struct,a.offset),a=null),Cg(s),Wm(o,Bm(r.map(e=>Gm(e)))),o.toUint8Array()},bg=(e,t,n=Qm,r=nh)=>{let i=hh(t),a=new r,o=new gg(a),s=new n(Nd(e)),c=new hg(s,!1);for(;c.curr;){let e=c.curr,t=e.id.client,n=i.get(t)||0;if(c.curr.constructor===Tv){c.next();continue}if(e.id.clock+e.length>n)for(Sg(o,e,wu(n-e.id.clock,0)),c.next();c.curr&&c.curr.id.client===t;)Sg(o,c.curr,0),c.next();else for(;c.curr&&c.curr.id.client===t&&c.curr.id.clock+c.curr.length<=n;)c.next()}return Cg(o),Wm(a,Gm(s)),a.toUint8Array()},xg=e=>{e.written>0&&(e.clientStructs.push({written:e.written,restEncoder:rd(e.encoder.restEncoder)}),e.encoder.restEncoder=ed(),e.written=0)},Sg=(e,t,n)=>{e.written>0&&e.currClient!==t.id.client&&xg(e),e.written===0&&(e.currClient=t.id.client,e.encoder.writeClient(t.id.client),sd(e.encoder.restEncoder,t.id.clock+n)),t.write(e.encoder,n),e.written++},Cg=e=>{xg(e);let t=e.encoder.restEncoder;sd(t,e.clientStructs.length);for(let n=0;n<e.clientStructs.length;n++){let r=e.clientStructs[n];sd(t,r.written),fd(t,r.restEncoder)}},wg=(e,t,n,r)=>{let i=new n(Nd(e)),a=new hg(i,!1),o=new r,s=new gg(o);for(let e=a.curr;e!==null;e=a.next())Sg(s,t(e),0);return Cg(s),Wm(o,Gm(i)),o.toUint8Array()},Tg=e=>wg(e,bf,Qm,eh),Eg=`You must not compute changes after the event-handler fired.`,Dg=class{constructor(e,t){this.target=e,this.currentTarget=e,this.transaction=t,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||=Og(this.currentTarget,this.target)}deletes(e){return Rm(this.transaction.deleteSet,e.id)}get keys(){if(this._keys===null){if(this.transaction.doc._transactionCleanups.length===0)throw Dd(Eg);let e=new Map,t=this.target;this.transaction.changed.get(t).forEach(n=>{if(n!==null){let r=t._map.get(n),i,a;if(this.adds(r)){let e=r.left;for(;e!==null&&this.adds(e);)e=e.left;if(this.deletes(r))if(e!==null&&this.deletes(e))i=`delete`,a=fu(e.content.getContent());else return;else e!==null&&this.deletes(e)?(i=`update`,a=fu(e.content.getContent())):(i=`add`,a=void 0)}else if(this.deletes(r))i=`delete`,a=fu(r.content.getContent());else return;e.set(n,{action:i,oldValue:a})}}),this._keys=e}return this._keys}get delta(){return this.changes.delta}adds(e){return e.id.clock>=(this.transaction.beforeState.get(e.id.client)||0)}get changes(){let e=this._changes;if(e===null){if(this.transaction.doc._transactionCleanups.length===0)throw Dd(Eg);let t=this.target,n=du(),r=du(),i=[];if(e={added:n,deleted:r,delta:i,keys:this.keys},this.transaction.changed.get(t).has(null)){let e=null,a=()=>{e&&i.push(e)};for(let i=t._start;i!==null;i=i.right)i.deleted?this.deletes(i)&&!this.adds(i)&&((e===null||e.delete===void 0)&&(a(),e={delete:0}),e.delete+=i.length,r.add(i)):this.adds(i)?((e===null||e.insert===void 0)&&(a(),e={insert:[]}),e.insert=e.insert.concat(i.content.getContent()),n.add(i)):((e===null||e.retain===void 0)&&(a(),e={retain:0}),e.retain+=i.length);e!==null&&e.retain===void 0&&a()}this._changes=e}return e}},Og=(e,t)=>{let n=[];for(;t._item!==null&&t!==e;){if(t._item.parentSub!==null)n.unshift(t._item.parentSub);else{let e=0,r=t._item.parent._start;for(;r!==t._item&&r!==null;)!r.deleted&&r.countable&&(e+=r.length),r=r.right;n.unshift(e)}t=t._item.parent}return n},kg=()=>{km(`Invalid access: Add Yjs type to a document before reading data.`)},Ag=80,jg=0,Mg=class{constructor(e,t){e.marker=!0,this.p=e,this.index=t,this.timestamp=jg++}},Ng=e=>{e.timestamp=jg++},Pg=(e,t,n)=>{e.p.marker=!1,e.p=t,t.marker=!0,e.index=n,e.timestamp=jg++},Fg=(e,t,n)=>{if(e.length>=Ag){let r=e.reduce((e,t)=>e.timestamp<t.timestamp?e:t);return Pg(r,t,n),r}else{let r=new Mg(t,n);return e.push(r),r}},Ig=(e,t)=>{if(e._start===null||t===0||e._searchMarker===null)return null;let n=e._searchMarker.length===0?null:e._searchMarker.reduce((e,n)=>Su(t-e.index)<Su(t-n.index)?e:n),r=e._start,i=0;for(n!==null&&(r=n.p,i=n.index,Ng(n));r.right!==null&&i<t;){if(!r.deleted&&r.countable){if(t<i+r.length)break;i+=r.length}r=r.right}for(;r.left!==null&&i>t;)r=r.left,!r.deleted&&r.countable&&(i-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(i-=r.length);return n!==null&&Su(n.index-i)<r.parent.length/Ag?(Pg(n,r,i),n):Fg(e._searchMarker,r,i)},Lg=(e,t,n)=>{for(let r=e.length-1;r>=0;r--){let i=e[r];if(n>0){let t=i.p;for(t.marker=!1;t&&(t.deleted||!t.countable);)t=t.left,t&&!t.deleted&&t.countable&&(i.index-=t.length);if(t===null||t.marker===!0){e.splice(r,1);continue}i.p=t,t.marker=!0}(t<i.index||n>0&&t===i.index)&&(i.index=wu(t,i.index+n))}},Rg=(e,t,n)=>{let r=e,i=t.changedParentTypes;for(;cu(i,e,()=>[]).push(n),e._item!==null;)e=e._item.parent;wh(r._eH,n,t)},zg=class{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=xh(),this._dEH=xh(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(e,t){this.doc=e,this._item=t}_copy(){throw Od()}clone(){throw Od()}_write(e){}get _first(){let e=this._start;for(;e!==null&&e.deleted;)e=e.right;return e}_callObserver(e,t){!e.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(e){Sh(this._eH,e)}observeDeep(e){Sh(this._dEH,e)}unobserve(e){Ch(this._eH,e)}unobserveDeep(e){Ch(this._dEH,e)}toJSON(){}},Bg=(e,t,n)=>{e.doc??kg(),t<0&&(t=e._length+t),n<0&&(n=e._length+n);let r=n-t,i=[],a=e._start;for(;a!==null&&r>0;){if(a.countable&&!a.deleted){let e=a.content.getContent();if(e.length<=t)t-=e.length;else{for(let n=t;n<e.length&&r>0;n++)i.push(e[n]),r--;t=0}}a=a.right}return i},Vg=e=>{e.doc??kg();let t=[],n=e._start;for(;n!==null;){if(n.countable&&!n.deleted){let e=n.content.getContent();for(let n=0;n<e.length;n++)t.push(e[n])}n=n.right}return t},Hg=(e,t)=>{let n=[],r=e._start;for(;r!==null;){if(r.countable&&Uh(r,t)){let e=r.content.getContent();for(let t=0;t<e.length;t++)n.push(e[t])}r=r.right}return n},Ug=(e,t)=>{let n=0,r=e._start;for(e.doc??kg();r!==null;){if(r.countable&&!r.deleted){let i=r.content.getContent();for(let r=0;r<i.length;r++)t(i[r],n++,e)}r=r.right}},Wg=(e,t)=>{let n=[];return Ug(e,(r,i)=>{n.push(t(r,i,e))}),n},Gg=e=>{let t=e._start,n=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(n===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};n=t.content.getContent(),r=0,t=t.right}let e=n[r++];return n.length<=r&&(n=null),{done:!1,value:e}}}},Kg=(e,t)=>{e.doc??kg();let n=Ig(e,t),r=e._start;for(n!==null&&(r=n.p,t-=n.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t<r.length)return r.content.getContent()[t];t-=r.length}},qg=(e,t,n,r)=>{let i=n,a=e.doc,o=a.clientID,s=a.store,c=n===null?t._start:n.right,l=[],u=()=>{l.length>0&&(i=new xv(Dh(o,qh(s,o)),i,i&&i.lastId,c,c&&c.id,t,null,new nv(l)),i.integrate(e,0),l=[])};r.forEach(n=>{if(n===null)l.push(n);else switch(n.constructor){case Number:case Object:case Boolean:case Array:case String:l.push(n);break;default:switch(u(),n.constructor){case Uint8Array:case ArrayBuffer:i=new xv(Dh(o,qh(s,o)),i,i&&i.lastId,c,c&&c.id,t,null,new H_(new Uint8Array(n))),i.integrate(e,0);break;case Jm:i=new xv(Dh(o,qh(s,o)),i,i&&i.lastId,c,c&&c.id,t,null,new q_(n)),i.integrate(e,0);break;default:if(n instanceof zg)i=new xv(Dh(o,qh(s,o)),i,i&&i.lastId,c,c&&c.id,t,null,new mv(n)),i.integrate(e,0);else throw Error(`Unexpected content type in insert operation`)}}}),u()},Jg=()=>Dd(`Length exceeded!`),Yg=(e,t,n,r)=>{if(n>t._length)throw Jg();if(n===0)return t._searchMarker&&Lg(t._searchMarker,n,r.length),qg(e,t,null,r);let i=n,a=Ig(t,n),o=t._start;for(a!==null&&(o=a.p,n-=a.index,n===0&&(o=o.prev,n+=o&&o.countable&&!o.deleted?o.length:0));o!==null;o=o.right)if(!o.deleted&&o.countable){if(n<=o.length){n<o.length&&Qh(e,Dh(o.id.client,o.id.clock+n));break}n-=o.length}return t._searchMarker&&Lg(t._searchMarker,i,r.length),qg(e,t,o,r)},Xg=(e,t,n)=>{let r=(t._searchMarker||[]).reduce((e,t)=>t.index>e.index?t:e,{index:0,p:t._start}).p;if(r)for(;r.right;)r=r.right;return qg(e,t,r,n)},Zg=(e,t,n,r)=>{if(r===0)return;let i=n,a=r,o=Ig(t,n),s=t._start;for(o!==null&&(s=o.p,n-=o.index);s!==null&&n>0;s=s.right)!s.deleted&&s.countable&&(n<s.length&&Qh(e,Dh(s.id.client,s.id.clock+n)),n-=s.length);for(;r>0&&s!==null;)s.deleted||(r<s.length&&Qh(e,Dh(s.id.client,s.id.clock+r)),s.delete(e),r-=s.length),s=s.right;if(r>0)throw Jg();t._searchMarker&&Lg(t._searchMarker,i,-a+r)},Qg=(e,t,n)=>{let r=t._map.get(n);r!==void 0&&r.delete(e)},$g=(e,t,n,r)=>{let i=t._map.get(n)||null,a=e.doc,o=a.clientID,s;if(r==null)s=new nv([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:s=new nv([r]);break;case Uint8Array:s=new H_(r);break;case Jm:s=new q_(r);break;default:if(r instanceof zg)s=new mv(r);else throw Error(`Unexpected content type`)}new xv(Dh(o,qh(a.store,o)),i,i&&i.lastId,null,null,t,n,s).integrate(e,0)},e_=(e,t)=>{e.doc??kg();let n=e._map.get(t);return n!==void 0&&!n.deleted?n.content.getContent()[n.length-1]:void 0},t_=e=>{let t={};return e.doc??kg(),e._map.forEach((e,n)=>{e.deleted||(t[n]=e.content.getContent()[e.length-1])}),t},n_=(e,t)=>{e.doc??kg();let n=e._map.get(t);return n!==void 0&&!n.deleted},r_=(e,t)=>{let n={};return e._map.forEach((e,r)=>{let i=e;for(;i!==null&&(!t.sv.has(i.id.client)||i.id.clock>=(t.sv.get(i.id.client)||0));)i=i.left;i!==null&&Uh(i,t)&&(n[r]=i.content.getContent()[i.length-1])}),n},i_=e=>(e.doc??kg(),Mm(e._map.entries(),e=>!e[1].deleted)),a_=class extends Dg{},o_=class e extends zg{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){let n=new e;return n.push(t),n}_integrate(e,t){super._integrate(e,t),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new e}clone(){let t=new e;return t.insert(0,this.toArray().map(e=>e instanceof zg?e.clone():e)),t}get length(){return this.doc??kg(),this._length}_callObserver(e,t){super._callObserver(e,t),Rg(this,e,new a_(this,e))}insert(e,t){this.doc===null?this._prelimContent.splice(e,0,...t):lg(this.doc,n=>{Yg(n,this,e,t)})}push(e){this.doc===null?this._prelimContent.push(...e):lg(this.doc,t=>{Xg(t,this,e)})}unshift(e){this.insert(0,e)}delete(e,t=1){this.doc===null?this._prelimContent.splice(e,t):lg(this.doc,n=>{Zg(n,this,e,t)})}get(e){return Kg(this,e)}toArray(){return Vg(this)}slice(e=0,t=this.length){return Bg(this,e,t)}toJSON(){return this.map(e=>e instanceof zg?e.toJSON():e)}map(e){return Wg(this,e)}forEach(e){Ug(this,e)}[Symbol.iterator](){return Gg(this)}_write(e){e.writeTypeRef(sv)}},s_=e=>new o_,c_=class extends Dg{constructor(e,t,n){super(e,t),this.keysChanged=n}},l_=class e extends zg{constructor(e){super(),this._prelimContent=null,e===void 0?this._prelimContent=new Map:this._prelimContent=new Map(e)}_integrate(e,t){super._integrate(e,t),this._prelimContent.forEach((e,t)=>{this.set(t,e)}),this._prelimContent=null}_copy(){return new e}clone(){let t=new e;return this.forEach((e,n)=>{t.set(n,e instanceof zg?e.clone():e)}),t}_callObserver(e,t){Rg(this,e,new c_(this,e,t))}toJSON(){this.doc??kg();let e={};return this._map.forEach((t,n)=>{if(!t.deleted){let r=t.content.getContent()[t.length-1];e[n]=r instanceof zg?r.toJSON():r}}),e}get size(){return[...i_(this)].length}keys(){return Nm(i_(this),e=>e[0])}values(){return Nm(i_(this),e=>e[1].content.getContent()[e[1].length-1])}entries(){return Nm(i_(this),e=>[e[0],e[1].content.getContent()[e[1].length-1]])}forEach(e){this.doc??kg(),this._map.forEach((t,n)=>{t.deleted||e(t.content.getContent()[t.length-1],n,this)})}[Symbol.iterator](){return this.entries()}delete(e){this.doc===null?this._prelimContent.delete(e):lg(this.doc,t=>{Qg(t,this,e)})}set(e,t){return this.doc===null?this._prelimContent.set(e,t):lg(this.doc,n=>{$g(n,this,e,t)}),t}get(e){return e_(this,e)}has(e){return n_(this,e)}clear(){this.doc===null?this._prelimContent.clear():lg(this.doc,e=>{this.forEach(function(t,n,r){Qg(e,r,n)})})}_write(e){e.writeTypeRef(cv)}},u_=e=>new l_,d_=(e,t)=>e===t||typeof e==`object`&&typeof t==`object`&&e&&t&&gf(e,t),f_=class{constructor(e,t,n,r){this.left=e,this.right=t,this.index=n,this.currentAttributes=r}forward(){switch(this.right===null&&kd(),this.right.content.constructor){case Z_:this.right.deleted||g_(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}},p_=(e,t,n)=>{for(;t.right!==null&&n>0;){switch(t.right.content.constructor){case Z_:t.right.deleted||g_(t.currentAttributes,t.right.content);break;default:t.right.deleted||(n<t.right.length&&Qh(e,Dh(t.right.id.client,t.right.id.clock+n)),t.index+=t.right.length,n-=t.right.length);break}t.left=t.right,t.right=t.right.right}return t},m_=(e,t,n,r)=>{let i=new Map,a=r?Ig(t,n):null;return a?p_(e,new f_(a.p.left,a.p,a.index,i),n-a.index):p_(e,new f_(null,t._start,0,i),n)},h_=(e,t,n,r)=>{for(;n.right!==null&&(n.right.deleted===!0||n.right.content.constructor===Z_&&d_(r.get(n.right.content.key),n.right.content.value));)n.right.deleted||r.delete(n.right.content.key),n.forward();let i=e.doc,a=i.clientID;r.forEach((r,o)=>{let s=n.left,c=n.right,l=new xv(Dh(a,qh(i.store,a)),s,s&&s.lastId,c,c&&c.id,t,null,new Z_(o,r));l.integrate(e,0),n.right=l,n.forward()})},g_=(e,t)=>{let{key:n,value:r}=t;r===null?e.delete(n):e.set(n,r)},__=(e,t)=>{for(;e.right!==null&&(e.right.deleted||e.right.content.constructor===Z_&&d_(t[e.right.content.key]??null,e.right.content.value));)e.forward()},v_=(e,t,n,r)=>{let i=e.doc,a=i.clientID,o=new Map;for(let s in r){let c=r[s],l=n.currentAttributes.get(s)??null;if(!d_(l,c)){o.set(s,l);let{left:r,right:u}=n;n.right=new xv(Dh(a,qh(i.store,a)),r,r&&r.lastId,u,u&&u.id,t,null,new Z_(s,c)),n.right.integrate(e,0),n.forward()}}return o},y_=(e,t,n,r,i)=>{n.currentAttributes.forEach((e,t)=>{i[t]===void 0&&(i[t]=null)});let a=e.doc,o=a.clientID;__(n,i);let s=v_(e,t,n,i),c=r.constructor===String?new iv(r):r instanceof zg?new mv(r):new Y_(r),{left:l,right:u,index:d}=n;t._searchMarker&&Lg(t._searchMarker,n.index,c.getLength()),u=new xv(Dh(o,qh(a.store,o)),l,l&&l.lastId,u,u&&u.id,t,null,c),u.integrate(e,0),n.right=u,n.index=d,n.forward(),h_(e,t,n,s)},b_=(e,t,n,r,i)=>{let a=e.doc,o=a.clientID;__(n,i);let s=v_(e,t,n,i);iterationLoop:for(;n.right!==null&&(r>0||s.size>0&&(n.right.deleted||n.right.content.constructor===Z_));){if(!n.right.deleted)switch(n.right.content.constructor){case Z_:{let{key:t,value:a}=n.right.content,o=i[t];if(o!==void 0){if(d_(o,a))s.delete(t);else{if(r===0)break iterationLoop;s.set(t,a)}n.right.delete(e)}else n.currentAttributes.set(t,a);break}default:r<n.right.length&&Qh(e,Dh(n.right.id.client,n.right.id.clock+r)),r-=n.right.length;break}n.forward()}if(r>0){let i=``;for(;r>0;r--)i+=`
|
|
4
4
|
`;n.right=new xv(Dh(o,qh(a.store,o)),n.left,n.left&&n.left.lastId,n.right,n.right&&n.right.id,t,null,new iv(i)),n.right.integrate(e,0),n.forward()}h_(e,t,n,s)},x_=(e,t,n,r,i)=>{let a=t,o=ou();for(;a&&(!a.countable||a.deleted);){if(!a.deleted&&a.content.constructor===Z_){let e=a.content;o.set(e.key,e)}a=a.right}let s=0,c=!1;for(;t!==a;){if(n===t&&(c=!0),!t.deleted){let n=t.content;switch(n.constructor){case Z_:{let{key:a,value:l}=n,u=r.get(a)??null;(o.get(a)!==n||u===l)&&(t.delete(e),s++,!c&&(i.get(a)??null)===l&&u!==l&&(u===null?i.delete(a):i.set(a,u))),!c&&!t.deleted&&g_(i,n);break}}}t=t.right}return s},S_=(e,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;let n=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===Z_){let r=t.content.key;n.has(r)?t.delete(e):n.add(r)}t=t.left}},C_=e=>{let t=0;return lg(e.doc,n=>{let r=e._start,i=e._start,a=ou(),o=su(a);for(;i;){if(i.deleted===!1)switch(i.content.constructor){case Z_:g_(o,i.content);break;default:t+=x_(n,r,i,a,o),a=su(o),r=i;break}i=i.right}}),t},w_=e=>{let t=new Set,n=e.doc;for(let[r,i]of e.afterState.entries()){let a=e.beforeState.get(r)||0;i!==a&&tg(e,n.store.clients.get(r),a,i,e=>{!e.deleted&&e.content.constructor===Z_&&e.constructor!==V_&&t.add(e.parent)})}lg(n,n=>{Im(e,e.deleteSet,e=>{if(e instanceof V_||!e.parent._hasFormatting||t.has(e.parent))return;let r=e.parent;e.content.constructor===Z_?t.add(r):S_(n,e)});for(let e of t)C_(e)})},T_=(e,t,n)=>{let r=n,i=su(t.currentAttributes),a=t.right;for(;n>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case mv:case Y_:case iv:n<t.right.length&&Qh(e,Dh(t.right.id.client,t.right.id.clock+n)),n-=t.right.length,t.right.delete(e);break}t.forward()}a&&x_(e,a,t.right,i,t.currentAttributes);let o=(t.left||t.right).parent;return o._searchMarker&&Lg(o._searchMarker,t.index,-r+n),t},E_=class extends Dg{constructor(e,t,n){super(e,t),this.childListChanged=!1,this.keysChanged=new Set,n.forEach(e=>{e===null?this.childListChanged=!0:this.keysChanged.add(e)})}get changes(){return this._changes===null&&(this._changes={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set}),this._changes}get delta(){if(this._delta===null){let e=this.target.doc,t=[];lg(e,e=>{let n=new Map,r=new Map,i=this.target._start,a=null,o={},s=``,c=0,l=0,u=()=>{if(a!==null){let e=null;switch(a){case`delete`:l>0&&(e={delete:l}),l=0;break;case`insert`:(typeof s==`object`||s.length>0)&&(e={insert:s},n.size>0&&(e.attributes={},n.forEach((t,n)=>{t!==null&&(e.attributes[n]=t)}))),s=``;break;case`retain`:c>0&&(e={retain:c},pf(o)||(e.attributes=lf({},o))),c=0;break}e&&t.push(e),a=null}};for(;i!==null;){switch(i.content.constructor){case mv:case Y_:this.adds(i)?this.deletes(i)||(u(),a=`insert`,s=i.content.getContent()[0],u()):this.deletes(i)?(a!==`delete`&&(u(),a=`delete`),l+=1):i.deleted||(a!==`retain`&&(u(),a=`retain`),c+=1);break;case iv:this.adds(i)?this.deletes(i)||(a!==`insert`&&(u(),a=`insert`),s+=i.content.str):this.deletes(i)?(a!==`delete`&&(u(),a=`delete`),l+=i.length):i.deleted||(a!==`retain`&&(u(),a=`retain`),c+=i.length);break;case Z_:{let{key:t,value:s}=i.content;if(this.adds(i))this.deletes(i)||(d_(n.get(t)??null,s)?s!==null&&i.delete(e):(a===`retain`&&u(),d_(s,r.get(t)??null)?delete o[t]:o[t]=s));else if(this.deletes(i)){r.set(t,s);let e=n.get(t)??null;d_(e,s)||(a===`retain`&&u(),o[t]=e)}else if(!i.deleted){r.set(t,s);let n=o[t];n!==void 0&&(d_(n,s)?n!==null&&i.delete(e):(a===`retain`&&u(),s===null?delete o[t]:o[t]=s))}i.deleted||(a===`insert`&&u(),g_(n,i.content));break}}i=i.right}for(u();t.length>0;){let e=t[t.length-1];if(e.retain!==void 0&&e.attributes===void 0)t.pop();else break}}),this._delta=t}return this._delta}},D_=class e extends zg{constructor(e){super(),this._pending=e===void 0?[]:[()=>this.insert(0,e)],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??kg(),this._length}_integrate(e,t){super._integrate(e,t);try{this._pending.forEach(e=>e())}catch(e){console.error(e)}this._pending=null}_copy(){return new e}clone(){let t=new e;return t.applyDelta(this.toDelta()),t}_callObserver(e,t){super._callObserver(e,t);let n=new E_(this,e,t);Rg(this,e,n),!e.local&&this._hasFormatting&&(e._needFormattingCleanup=!0)}toString(){this.doc??kg();let e=``,t=this._start;for(;t!==null;)!t.deleted&&t.countable&&t.content.constructor===iv&&(e+=t.content.str),t=t.right;return e}toJSON(){return this.toString()}applyDelta(e,{sanitize:t=!0}={}){this.doc===null?this._pending.push(()=>this.applyDelta(e)):lg(this.doc,n=>{let r=new f_(null,this._start,0,new Map);for(let i=0;i<e.length;i++){let a=e[i];if(a.insert!==void 0){let o=!t&&typeof a.insert==`string`&&i===e.length-1&&r.right===null&&a.insert.slice(-1)===`
|
|
5
5
|
`?a.insert.slice(0,-1):a.insert;(typeof o!=`string`||o.length>0)&&y_(n,this,r,o,a.attributes||{})}else a.retain===void 0?a.delete!==void 0&&T_(n,r,a.delete):b_(n,this,r,a.retain,a.attributes||{})}})}toDelta(e,t,n){this.doc??kg();let r=[],i=new Map,a=this.doc,o=``,s=this._start;function c(){if(o.length>0){let e={},t=!1;i.forEach((n,r)=>{t=!0,e[r]=n});let n={insert:o};t&&(n.attributes=e),r.push(n),o=``}}let l=()=>{for(;s!==null;){if(Uh(s,e)||t!==void 0&&Uh(s,t))switch(s.content.constructor){case iv:{let r=i.get(`ychange`);e!==void 0&&!Uh(s,e)?(r===void 0||r.user!==s.id.client||r.type!==`removed`)&&(c(),i.set(`ychange`,n?n(`removed`,s.id):{type:`removed`})):t!==void 0&&!Uh(s,t)?(r===void 0||r.user!==s.id.client||r.type!==`added`)&&(c(),i.set(`ychange`,n?n(`added`,s.id):{type:`added`})):r!==void 0&&(c(),i.delete(`ychange`)),o+=s.content.str;break}case mv:case Y_:{c();let e={insert:s.content.getContent()[0]};if(i.size>0){let t={};e.attributes=t,i.forEach((e,n)=>{t[n]=e})}r.push(e);break}case Z_:Uh(s,e)&&(c(),g_(i,s.content));break}s=s.right}c()};return e||t?lg(a,n=>{e&&Wh(n,e),t&&Wh(n,t),l()},`cleanup`):l(),r}insert(e,t,n){if(t.length<=0)return;let r=this.doc;r===null?this._pending.push(()=>this.insert(e,t,n)):lg(r,r=>{let i=m_(r,this,e,!n);n||(n={},i.currentAttributes.forEach((e,t)=>{n[t]=e})),y_(r,this,i,t,n)})}insertEmbed(e,t,n){let r=this.doc;r===null?this._pending.push(()=>this.insertEmbed(e,t,n||{})):lg(r,r=>{let i=m_(r,this,e,!n);y_(r,this,i,t,n||{})})}delete(e,t){if(t===0)return;let n=this.doc;n===null?this._pending.push(()=>this.delete(e,t)):lg(n,n=>{T_(n,m_(n,this,e,!0),t)})}format(e,t,n){if(t===0)return;let r=this.doc;r===null?this._pending.push(()=>this.format(e,t,n)):lg(r,r=>{let i=m_(r,this,e,!1);i.right!==null&&b_(r,this,i,t,n)})}removeAttribute(e){this.doc===null?this._pending.push(()=>this.removeAttribute(e)):lg(this.doc,t=>{Qg(t,this,e)})}setAttribute(e,t){this.doc===null?this._pending.push(()=>this.setAttribute(e,t)):lg(this.doc,n=>{$g(n,this,e,t)})}getAttribute(e){return e_(this,e)}getAttributes(){return t_(this)}_write(e){e.writeTypeRef(lv)}},O_=e=>new D_,k_=class{constructor(e,t=()=>!0){this._filter=t,this._root=e,this._currentNode=e._start,this._firstCall=!0,e.doc??kg()}[Symbol.iterator](){return this}next(){let e=this._currentNode,t=e&&e.content&&e.content.type;if(e!==null&&(!this._firstCall||e.deleted||!this._filter(t)))do if(t=e.content.type,!e.deleted&&(t.constructor===M_||t.constructor===A_)&&t._start!==null)e=t._start;else for(;e!==null;){let t=e.next;if(t!==null){e=t;break}else e=e.parent===this._root?null:e.parent._item}while(e!==null&&(e.deleted||!this._filter(e.content.type)));return this._firstCall=!1,e===null?{value:void 0,done:!0}:(this._currentNode=e,{value:e.content.type,done:!1})}},A_=class e extends zg{constructor(){super(),this._prelimContent=[]}get firstChild(){let e=this._first;return e?e.content.getContent()[0]:null}_integrate(e,t){super._integrate(e,t),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new e}clone(){let t=new e;return t.insert(0,this.toArray().map(e=>e instanceof zg?e.clone():e)),t}get length(){return this.doc??kg(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(e){return new k_(this,e)}querySelector(e){e=e.toUpperCase();let t=new k_(this,t=>t.nodeName&&t.nodeName.toUpperCase()===e).next();return t.done?null:t.value}querySelectorAll(e){return e=e.toUpperCase(),mu(new k_(this,t=>t.nodeName&&t.nodeName.toUpperCase()===e))}_callObserver(e,t){Rg(this,e,new P_(this,t,e))}toString(){return Wg(this,e=>e.toString()).join(``)}toJSON(){return this.toString()}toDOM(e=document,t={},n){let r=e.createDocumentFragment();return n!==void 0&&n._createAssociation(r,this),Ug(this,i=>{r.insertBefore(i.toDOM(e,t,n),null)}),r}insert(e,t){this.doc===null?this._prelimContent.splice(e,0,...t):lg(this.doc,n=>{Yg(n,this,e,t)})}insertAfter(e,t){if(this.doc!==null)lg(this.doc,n=>{let r=e&&e instanceof zg?e._item:e;qg(n,this,r,t)});else{let n=this._prelimContent,r=e===null?0:n.findIndex(t=>t===e)+1;if(r===0&&e!==null)throw Dd(`Reference item not found`);n.splice(r,0,...t)}}delete(e,t=1){this.doc===null?this._prelimContent.splice(e,t):lg(this.doc,n=>{Zg(n,this,e,t)})}toArray(){return Vg(this)}push(e){this.insert(this.length,e)}unshift(e){this.insert(0,e)}get(e){return Kg(this,e)}slice(e=0,t=this.length){return Bg(this,e,t)}forEach(e){Ug(this,e)}_write(e){e.writeTypeRef(dv)}},j_=e=>new A_,M_=class e extends A_{constructor(e=`UNDEFINED`){super(),this.nodeName=e,this._prelimAttrs=new Map}get nextSibling(){let e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){let e=this._item?this._item.prev:null;return e?e.content.type:null}_integrate(e,t){super._integrate(e,t),this._prelimAttrs.forEach((e,t)=>{this.setAttribute(t,e)}),this._prelimAttrs=null}_copy(){return new e(this.nodeName)}clone(){let t=new e(this.nodeName);return df(this.getAttributes(),(e,n)=>{t.setAttribute(n,e)}),t.insert(0,this.toArray().map(e=>e instanceof zg?e.clone():e)),t}toString(){let e=this.getAttributes(),t=[],n=[];for(let t in e)n.push(t);n.sort();let r=n.length;for(let i=0;i<r;i++){let r=n[i];t.push(r+`="`+e[r]+`"`)}let i=this.nodeName.toLocaleLowerCase();return`<${i}${t.length>0?` `+t.join(` `):``}>${super.toString()}</${i}>`}removeAttribute(e){this.doc===null?this._prelimAttrs.delete(e):lg(this.doc,t=>{Qg(t,this,e)})}setAttribute(e,t){this.doc===null?this._prelimAttrs.set(e,t):lg(this.doc,n=>{$g(n,this,e,t)})}getAttribute(e){return e_(this,e)}hasAttribute(e){return n_(this,e)}getAttributes(e){return e?r_(this,e):t_(this)}toDOM(e=document,t={},n){let r=e.createElement(this.nodeName),i=this.getAttributes();for(let e in i){let t=i[e];typeof t==`string`&&r.setAttribute(e,t)}return Ug(this,i=>{r.appendChild(i.toDOM(e,t,n))}),n!==void 0&&n._createAssociation(r,this),r}_write(e){e.writeTypeRef(uv),e.writeKey(this.nodeName)}},N_=e=>new M_(e.readKey()),P_=class extends Dg{constructor(e,t,n){super(e,n),this.childListChanged=!1,this.attributesChanged=new Set,t.forEach(e=>{e===null?this.childListChanged=!0:this.attributesChanged.add(e)})}},F_=class e extends l_{constructor(e){super(),this.hookName=e}_copy(){return new e(this.hookName)}clone(){let t=new e(this.hookName);return this.forEach((e,n)=>{t.set(n,e)}),t}toDOM(e=document,t={},n){let r=t[this.hookName],i;return i=r===void 0?document.createElement(this.hookName):r.createDom(this),i.setAttribute(`data-yjs-hook`,this.hookName),n!==void 0&&n._createAssociation(i,this),i}_write(e){e.writeTypeRef(fv),e.writeKey(this.hookName)}},I_=e=>new F_(e.readKey()),L_=class e extends D_{get nextSibling(){let e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){let e=this._item?this._item.prev:null;return e?e.content.type:null}_copy(){return new e}clone(){let t=new e;return t.applyDelta(this.toDelta()),t}toDOM(e=document,t,n){let r=e.createTextNode(this.toString());return n!==void 0&&n._createAssociation(r,this),r}toString(){return this.toDelta().map(e=>{let t=[];for(let n in e.attributes){let r=[];for(let t in e.attributes[n])r.push({key:t,value:e.attributes[n][t]});r.sort((e,t)=>e.key<t.key?-1:1),t.push({nodeName:n,attrs:r})}t.sort((e,t)=>e.nodeName<t.nodeName?-1:1);let n=``;for(let e=0;e<t.length;e++){let r=t[e];n+=`<${r.nodeName}`;for(let e=0;e<r.attrs.length;e++){let t=r.attrs[e];n+=` ${t.key}="${t.value}"`}n+=`>`}n+=e.insert;for(let e=t.length-1;e>=0;e--)n+=`</${t[e].nodeName}>`;return n}).join(``)}toJSON(){return this.toString()}_write(e){e.writeTypeRef(pv)}},R_=e=>new L_,z_=class{constructor(e,t){this.id=e,this.length=t}get deleted(){throw Od()}mergeWith(e){return!1}write(e,t,n){throw Od()}integrate(e,t){throw Od()}},B_=0,V_=class extends z_{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor===e.constructor?(this.length+=e.length,!0):!1}integrate(e,t){t>0&&(this.id.clock+=t,this.length-=t),Jh(e.doc.store,this)}write(e,t){e.writeInfo(B_),e.writeLen(this.length-t)}getMissing(e,t){return null}},H_=class e{constructor(e){this.content=e}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new e(this.content)}splice(e){throw Od()}mergeWith(e){return!1}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeBuf(this.content)}getRef(){return 3}},U_=e=>new H_(e.readBuf()),W_=class e{constructor(e){this.len=e}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new e(this.len)}splice(t){let n=new e(this.len-t);return this.len=t,n}mergeWith(e){return this.len+=e.len,!0}integrate(e,t){Vm(e.deleteSet,t.id.client,t.id.clock,this.len),t.markDeleted()}delete(e){}gc(e){}write(e,t){e.writeLen(this.len-t)}getRef(){return 1}},G_=e=>new W_(e.readLen()),K_=(e,t)=>new Jm({guid:e,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1}),q_=class e{constructor(e){e._item&&console.error(`This document was already integrated as a sub-document. You should create a second instance instead with the same guid.`),this.doc=e;let t={};this.opts=t,e.gc||(t.gc=!1),e.autoLoad&&(t.autoLoad=!0),e.meta!==null&&(t.meta=e.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new e(K_(this.doc.guid,this.opts))}splice(e){throw Od()}mergeWith(e){return!1}integrate(e,t){this.doc._item=t,e.subdocsAdded.add(this.doc),this.doc.shouldLoad&&e.subdocsLoaded.add(this.doc)}delete(e){e.subdocsAdded.has(this.doc)?e.subdocsAdded.delete(this.doc):e.subdocsRemoved.add(this.doc)}gc(e){}write(e,t){e.writeString(this.doc.guid),e.writeAny(this.opts)}getRef(){return 9}},J_=e=>new q_(K_(e.readString(),e.readAny())),Y_=class e{constructor(e){this.embed=e}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new e(this.embed)}splice(e){throw Od()}mergeWith(e){return!1}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeJSON(this.embed)}getRef(){return 5}},X_=e=>new Y_(e.readJSON()),Z_=class e{constructor(e,t){this.key=e,this.value=t}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new e(this.key,this.value)}splice(e){throw Od()}mergeWith(e){return!1}integrate(e,t){let n=t.parent;n._searchMarker=null,n._hasFormatting=!0}delete(e){}gc(e){}write(e,t){e.writeKey(this.key),e.writeJSON(this.value)}getRef(){return 6}},Q_=e=>new Z_(e.readKey(),e.readJSON()),$_=class e{constructor(e){this.arr=e}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new e(this.arr)}splice(t){let n=new e(this.arr.slice(t));return this.arr=this.arr.slice(0,t),n}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){let n=this.arr.length;e.writeLen(n-t);for(let r=t;r<n;r++){let t=this.arr[r];e.writeString(t===void 0?`undefined`:JSON.stringify(t))}}getRef(){return 2}},ev=e=>{let t=e.readLen(),n=[];for(let r=0;r<t;r++){let t=e.readString();t===`undefined`?n.push(void 0):n.push(JSON.parse(t))}return new $_(n)},tv=kf(`node_env`)===`development`,nv=class e{constructor(e){this.arr=e,tv&&vf(e)}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new e(this.arr)}splice(t){let n=new e(this.arr.slice(t));return this.arr=this.arr.slice(0,t),n}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){let n=this.arr.length;e.writeLen(n-t);for(let r=t;r<n;r++){let t=this.arr[r];e.writeAny(t)}}getRef(){return 8}},rv=e=>{let t=e.readLen(),n=[];for(let r=0;r<t;r++)n.push(e.readAny());return new nv(n)},iv=class e{constructor(e){this.str=e}getLength(){return this.str.length}getContent(){return this.str.split(``)}isCountable(){return!0}copy(){return new e(this.str)}splice(t){let n=new e(this.str.slice(t));this.str=this.str.slice(0,t);let r=this.str.charCodeAt(t-1);return r>=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+`�`,n.str=`�`+n.str.slice(1)),n}mergeWith(e){return this.str+=e.str,!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeString(t===0?this.str:this.str.slice(t))}getRef(){return 4}},av=e=>new iv(e.readString()),ov=[s_,u_,O_,N_,j_,I_,R_],sv=0,cv=1,lv=2,uv=3,dv=4,fv=5,pv=6,mv=class e{constructor(e){this.type=e}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new e(this.type._copy())}splice(e){throw Od()}mergeWith(e){return!1}integrate(e,t){this.type._integrate(e.doc,t)}delete(e){let t=this.type._start;for(;t!==null;)t.deleted?t.id.clock<(e.beforeState.get(t.id.client)||0)&&e._mergeStructs.push(t):t.delete(e),t=t.right;this.type._map.forEach(t=>{t.deleted?t.id.clock<(e.beforeState.get(t.id.client)||0)&&e._mergeStructs.push(t):t.delete(e)}),e.changed.delete(this.type)}gc(e){let t=this.type._start;for(;t!==null;)t.gc(e,!0),t=t.right;this.type._start=null,this.type._map.forEach(t=>{for(;t!==null;)t.gc(e,!0),t=t.left}),this.type._map=new Map}write(e,t){this.type._write(e)}getRef(){return 7}},hv=e=>new mv(ov[e.readTypeRef()](e)),gv=(e,t)=>{let n=t,r=0,i;do r>0&&(n=Dh(n.client,n.clock+r)),i=Xh(e,n),r=n.clock-i.id.clock,n=i.redone;while(n!==null&&i instanceof xv);return{item:i,diff:r}},_v=(e,t)=>{for(;e!==null&&e.keep!==t;)e.keep=t,e=e.parent._item},vv=(e,t,n)=>{let{client:r,clock:i}=t.id,a=new xv(Dh(r,i+n),t,Dh(r,i+n-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(n));return t.deleted&&a.markDeleted(),t.keep&&(a.keep=!0),t.redone!==null&&(a.redone=Dh(t.redone.client,t.redone.clock+n)),t.right=a,a.right!==null&&(a.right.left=a),e._mergeStructs.push(a),a.parentSub!==null&&a.right===null&&a.parent._map.set(a.parentSub,a),t.length=n,a},yv=(e,t)=>gu(e,e=>Rm(e.deletions,t)),bv=(e,t,n,r,i,a)=>{let o=e.doc,s=o.store,c=o.clientID,l=t.redone;if(l!==null)return Qh(e,l);let u=t.parent._item,d=null,f;if(u!==null&&u.deleted===!0){if(u.redone===null&&(!n.has(u)||bv(e,u,n,r,i,a)===null))return null;for(;u.redone!==null;)u=Qh(e,u.redone)}let p=u===null?t.parent:u.content.type;if(t.parentSub===null){for(d=t.left,f=t;d!==null;){let t=d;for(;t!==null&&t.parent._item!==u;)t=t.redone===null?null:Qh(e,t.redone);if(t!==null&&t.parent._item===u){d=t;break}d=d.left}for(;f!==null;){let t=f;for(;t!==null&&t.parent._item!==u;)t=t.redone===null?null:Qh(e,t.redone);if(t!==null&&t.parent._item===u){f=t;break}f=f.right}}else if(f=null,t.right&&!i){for(d=t;d!==null&&d.right!==null&&(d.right.redone||Rm(r,d.right.id)||yv(a.undoStack,d.right.id)||yv(a.redoStack,d.right.id));)for(d=d.right;d.redone;)d=Qh(e,d.redone);if(d&&d.right!==null)return null}else d=p._map.get(t.parentSub)||null;let m=Dh(c,qh(s,c)),h=new xv(m,d,d&&d.lastId,f,f&&f.id,p,t.parentSub,t.content.copy());return t.redone=m,_v(h,!0),h.integrate(e,0),h},xv=class e extends z_{constructor(e,t,n,r,i,a,o,s){super(e,s.getLength()),this.origin=n,this.left=t,this.right=r,this.rightOrigin=i,this.parent=a,this.parentSub=o,this.redone=null,this.content=s,this.info=this.content.isCountable()?2:0}set marker(e){(this.info&8)>0!==e&&(this.info^=8)}get marker(){return(this.info&8)>0}get keep(){return(this.info&1)>0}set keep(e){this.keep!==e&&(this.info^=1)}get countable(){return(this.info&2)>0}get deleted(){return(this.info&4)>0}set deleted(e){this.deleted!==e&&(this.info^=4)}markDeleted(){this.info|=4}getMissing(t,n){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=qh(n,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=qh(n,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Th&&this.id.client!==this.parent.client&&this.parent.clock>=qh(n,this.parent.client))return this.parent.client;if(this.origin&&=(this.left=$h(t,n,this.origin),this.left.lastId),this.rightOrigin&&=(this.right=Qh(t,this.rightOrigin),this.right.id),this.left&&this.left.constructor===V_||this.right&&this.right.constructor===V_)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===e?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===e&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===Th){let e=Xh(n,this.parent);e.constructor===V_?this.parent=null:this.parent=e.content.type}return null}integrate(e,t){if(t>0&&(this.id.clock+=t,this.left=$h(e,e.doc.store,Dh(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(t),this.length-=t),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let t=this.left,n;if(t!==null)n=t.right;else if(this.parentSub!==null)for(n=this.parent._map.get(this.parentSub)||null;n!==null&&n.left!==null;)n=n.left;else n=this.parent._start;let r=new Set,i=new Set;for(;n!==null&&n!==this.right;){if(i.add(n),r.add(n),Eh(this.origin,n.origin)){if(n.id.client<this.id.client)t=n,r.clear();else if(Eh(this.rightOrigin,n.rightOrigin))break}else if(n.origin!==null&&i.has(Xh(e.doc.store,n.origin)))r.has(Xh(e.doc.store,n.origin))||(t=n,r.clear());else break;n=n.right}this.left=t}if(this.left!==null)this.right=this.left.right,this.left.right=this;else{let e;if(this.parentSub!==null)for(e=this.parent._map.get(this.parentSub)||null;e!==null&&e.left!==null;)e=e.left;else e=this.parent._start,this.parent._start=this;this.right=e}this.right===null?this.parentSub!==null&&(this.parent._map.set(this.parentSub,this),this.left!==null&&this.left.delete(e)):this.right.left=this,this.parentSub===null&&this.countable&&!this.deleted&&(this.parent._length+=this.length),Jh(e.doc.store,this),this.content.integrate(e,this),ig(e,this.parent,this.parentSub),(this.parent._item!==null&&this.parent._item.deleted||this.parentSub!==null&&this.right!==null)&&this.delete(e)}else new V_(this.id,this.length).integrate(e,0)}get next(){let e=this.right;for(;e!==null&&e.deleted;)e=e.right;return e}get prev(){let e=this.left;for(;e!==null&&e.deleted;)e=e.left;return e}get lastId(){return this.length===1?this.id:Dh(this.id.client,this.id.clock+this.length-1)}mergeWith(e){if(this.constructor===e.constructor&&Eh(e.origin,this.lastId)&&this.right===e&&Eh(this.rightOrigin,e.rightOrigin)&&this.id.client===e.id.client&&this.id.clock+this.length===e.id.clock&&this.deleted===e.deleted&&this.redone===null&&e.redone===null&&this.content.constructor===e.content.constructor&&this.content.mergeWith(e.content)){let t=this.parent._searchMarker;return t&&t.forEach(t=>{t.p===e&&(t.p=this,!this.deleted&&this.countable&&(t.index-=this.length))}),e.keep&&(this.keep=!0),this.right=e.right,this.right!==null&&(this.right.left=this),this.length+=e.length,!0}return!1}delete(e){if(!this.deleted){let t=this.parent;this.countable&&this.parentSub===null&&(t._length-=this.length),this.markDeleted(),Vm(e.deleteSet,this.id.client,this.id.clock,this.length),ig(e,t,this.parentSub),this.content.delete(e)}}gc(e,t){if(!this.deleted)throw kd();this.content.gc(e),t?eg(e,this,new V_(this.id,this.length)):this.content=new W_(this.length)}write(e,t){let n=t>0?Dh(this.id.client,this.id.clock+t-1):this.origin,r=this.rightOrigin,i=this.parentSub,a=this.content.getRef()&31|(n===null?0:128)|(r===null?0:64)|(i===null?0:32);if(e.writeInfo(a),n!==null&&e.writeLeftID(n),r!==null&&e.writeRightID(r),n===null&&r===null){let t=this.parent;if(t._item!==void 0){let n=t._item;if(n===null){let n=Oh(t);e.writeParentInfo(!0),e.writeString(n)}else e.writeParentInfo(!1),e.writeLeftID(n.id)}else t.constructor===String?(e.writeParentInfo(!0),e.writeString(t)):t.constructor===Th?(e.writeParentInfo(!1),e.writeLeftID(t)):kd();i!==null&&e.writeString(i)}this.content.write(e,t)}},Sv=(e,t)=>Cv[t&31](e),Cv=[()=>{kd()},G_,ev,U_,av,X_,Q_,hv,rv,J_,()=>{kd()}],wv=10,Tv=class extends z_{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor===e.constructor?(this.length+=e.length,!0):!1}integrate(e,t){kd()}write(e,t){e.writeInfo(wv),sd(e.restEncoder,this.length-t)}getMissing(e,t){return null}},Ev=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:{},Dv=`__ $YJS$ __`;Ev[Dv]===!0&&console.error(`Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438`),Ev[Dv]=!0;var Ov=()=>{let e=!0;return(t,n)=>{if(e){e=!1;try{t()}finally{e=!0}}else n!==void 0&&n()}},kv=/[\uD800-\uDBFF]/,Av=/[\uDC00-\uDFFF]/,jv=(e,t)=>{let n=0,r=0;for(;n<e.length&&n<t.length&&e[n]===t[n];)n++;for(n>0&&kv.test(e[n-1])&&n--;r+n<e.length&&r+n<t.length&&e[e.length-r-1]===t[t.length-r-1];)r++;return r>0&&Av.test(e[e.length-r])&&r--,{index:n,remove:e.length-n-r,insert:t.slice(n,t.length-r)}},Mv=(e,t)=>e>>>t|e<<32-t,Nv=e=>Mv(e,2)^Mv(e,13)^Mv(e,22),Pv=e=>Mv(e,6)^Mv(e,11)^Mv(e,25),Fv=e=>Mv(e,7)^Mv(e,18)^e>>>3,Iv=e=>Mv(e,17)^Mv(e,19)^e>>>10,Lv=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Rv=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),zv=class{constructor(){let e=new ArrayBuffer(320);this._H=new Uint32Array(e,0,8),this._H.set(Rv),this._W=new Uint32Array(e,64,64)}_updateHash(){let e=this._H,t=this._W;for(let e=16;e<64;e++)t[e]=Iv(t[e-2])+t[e-7]+Fv(t[e-15])+t[e-16];let n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=e[6],l=e[7];for(let e=0,u,d;e<64;e++)u=l+Pv(o)+(o&s^~o&c)+Lv[e]+t[e]>>>0,d=Nv(n)+(n&r^n&i^r&i)>>>0,l=c,c=s,s=o,o=a+u>>>0,a=i,i=r,r=n,n=u+d>>>0;e[0]+=n,e[1]+=r,e[2]+=i,e[3]+=a,e[4]+=o,e[5]+=s,e[6]+=c,e[7]+=l}digest(e){let t=0;for(;t+56<=e.length;){let n=0;for(;n<16&&t+3<e.length;n++)this._W[n]=e[t++]<<24|e[t++]<<16|e[t++]<<8|e[t++];if(t%64!=0){for(this._W.fill(0,n,16);t<e.length;)this._W[n]|=e[t]<<(3-t%4)*8,t++;this._W[n]|=128<<(3-t%4)*8}this._updateHash()}let n=t%64!=0;this._W.fill(0,0,16);let r=0;for(;t<e.length;r++)for(let n=3;n>=0&&t<e.length;n--)this._W[r]|=e[t++]<<n*8;n||(this._W[r-(t%4==0?0:1)]|=128<<(3-t%4)*8),this._W[14]=e.byteLength/Ru,this._W[15]=e.byteLength*8,this._updateHash();let i=new Uint8Array(32);for(let e=0;e<this._H.length;e++)for(let t=0;t<4;t++)i[e*4+t]=this._H[e]>>>(3-t)*8;return i}},Bv=e=>new zv().digest(e),Vv=new ht(`y-sync`),Hv=new ht(`y-undo`),Uv=new ht(`yjs-cursor`),Wv=e=>{for(let t=6;t<e.length;t++)e[t%6]=e[t%6]^e[t];return e.slice(0,6)},Gv=e=>Pf(Wv(Bv(If(e)))),Kv=()=>({mapping:new Map,isOMark:new Map}),qv=(e,t)=>t===void 0?!e.deleted:t.sv.has(e.id.client)&&t.sv.get(e.id.client)>e.id.clock&&!Rm(t.ds,e.id),Jv=[{light:`#ecd44433`,dark:`#ecd444`}],Yv=(e,t,n)=>{if(!e.has(n)){if(e.size<t.length){let n=du();e.forEach(e=>n.add(e)),t=t.filter(e=>!n.has(e))}e.set(n,Zd(t))}return e.get(n)},Xv=(e,{colors:t=Jv,colorMapping:n=new Map,permanentUserData:r=null,onFirstRender:i=()=>{},mapping:a}={})=>{let o=!1,s=new ey(e,a),c=new We({props:{editable:e=>{let t=Vv.getState(e);return t.snapshot==null&&t.prevSnapshot==null}},key:Vv,state:{init:(i,a)=>({type:e,doc:e.doc,binding:s,snapshot:null,prevSnapshot:null,isChangeOrigin:!1,isUndoRedoOperation:!1,addToHistory:!0,colors:t,colorMapping:n,permanentUserData:r}),apply:(e,t)=>{let n=e.getMeta(Vv);if(n!==void 0){t=Object.assign({},t);for(let e in n)t[e]=n[e]}return t.addToHistory=e.getMeta(`addToHistory`)!==!1,t.isChangeOrigin=n!==void 0&&!!n.isChangeOrigin,t.isUndoRedoOperation=n!==void 0&&!!n.isChangeOrigin&&!!n.isUndoRedoOperation,s.prosemirrorView!==null&&n!==void 0&&(n.snapshot!=null||n.prevSnapshot!=null)&&mm(0,()=>{s.prosemirrorView!=null&&(n.restore==null?s._renderSnapshot(n.snapshot,n.prevSnapshot,t):(s._renderSnapshot(n.snapshot,n.snapshot,t),delete t.restore,delete t.snapshot,delete t.prevSnapshot,s.mux(()=>{s._prosemirrorChanged(s.prosemirrorView.state.doc)})))}),t}},view:e=>(s.initView(e),a??s._forceRerender(),i(),{update:()=>{let t=c.getState(e.state);if(t.snapshot==null&&t.prevSnapshot==null&&(o||e.state.doc.content.findDiffStart(e.state.doc.type.createAndFill().content)!==null)){if(o=!0,t.addToHistory===!1&&!t.isChangeOrigin){let t=Hv.getState(e.state),n=t&&t.undoManager;n&&n.stopCapturing()}s.mux(()=>{t.doc.transact(n=>{n.meta.set(`addToHistory`,t.addToHistory),s._prosemirrorChanged(e.state.doc)},Vv)})}},destroy:()=>{s.destroy()}})});return c},Zv=(e,t,n)=>{if(t!==null&&t.anchor!==null&&t.head!==null)if(t.type===`all`)e.setSelection(new Nt(e.doc));else if(t.type===`node`){let r=ky(n.doc,n.type,t.anchor,n.mapping);e.setSelection(Qv(e,r))}else{let r=ky(n.doc,n.type,t.anchor,n.mapping),i=ky(n.doc,n.type,t.head,n.mapping);r!==null&&i!==null&&e.setSelection(qe.between(e.doc.resolve(r),e.doc.resolve(i)))}},Qv=(e,t)=>{let n=e.doc.resolve(t);return n.nodeAfter?ze.create(e.doc,t):qe.near(n)},$v=(e,t)=>({type:t.selection.jsonID,anchor:Dy(t.selection.anchor,e.type,e.mapping),head:Dy(t.selection.head,e.type,e.mapping)}),ey=class{constructor(e,t=new Map){this.type=e,this.prosemirrorView=null,this.mux=Ov(),this.mapping=t,this.isOMark=new Map,this._observeFunction=this._typeChanged.bind(this),this.doc=e.doc,this.beforeTransactionSelection=null,this.beforeAllTransactions=()=>{this.beforeTransactionSelection===null&&this.prosemirrorView!=null&&(this.beforeTransactionSelection=$v(this,this.prosemirrorView.state))},this.afterAllTransactions=()=>{this.beforeTransactionSelection=null},this._domSelectionInView=null}get _tr(){return this.prosemirrorView.state.tr.setMeta(`addToHistory`,!1)}_isLocalCursorInView(){return this.prosemirrorView.hasFocus()?(wf&&this._domSelectionInView===null&&(mm(0,()=>{this._domSelectionInView=null}),this._domSelectionInView=this._isDomSelectionInView()),this._domSelectionInView):!1}_isDomSelectionInView(){let e=this.prosemirrorView._root.getSelection();if(e==null||e.anchorNode==null)return!1;let t=this.prosemirrorView._root.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset),t.getClientRects().length===0&&t.startContainer&&t.collapsed&&t.selectNodeContents(t.startContainer);let n=t.getBoundingClientRect(),r=Qp.documentElement;return n.bottom>=0&&n.right>=0&&n.left<=(window.innerWidth||r.clientWidth||0)&&n.top<=(window.innerHeight||r.clientHeight||0)}renderSnapshot(e,t){t||=Vh(Hm(),new Map),this.prosemirrorView.dispatch(this._tr.setMeta(Vv,{snapshot:e,prevSnapshot:t}))}unrenderSnapshot(){this.mapping.clear(),this.mux(()=>{let e=this.type.toArray().map(e=>ny(e,this.prosemirrorView.state.schema,this)).filter(e=>e!==null),t=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new Bt(Ut.from(e),0,0));t.setMeta(Vv,{snapshot:null,prevSnapshot:null}),this.prosemirrorView.dispatch(t)})}_forceRerender(){this.mapping.clear(),this.mux(()=>{let e=this.beforeTransactionSelection===null?this.prosemirrorView.state.selection:null,t=this.type.toArray().map(e=>ny(e,this.prosemirrorView.state.schema,this)).filter(e=>e!==null),n=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new Bt(Ut.from(t),0,0));if(e){let t=Cu(wu(e.anchor,0),n.doc.content.size),r=Cu(wu(e.head,0),n.doc.content.size);n.setSelection(qe.create(n.doc,t,r))}this.prosemirrorView.dispatch(n.setMeta(Vv,{isChangeOrigin:!0,binding:this}))})}_renderSnapshot(e,t,n){let r=this.doc,i=this.type;if(e||=Hh(this.doc),e instanceof Uint8Array||t instanceof Uint8Array)if((!(e instanceof Uint8Array)||!(t instanceof Uint8Array))&&kd(),r=new Jm({gc:!1}),lh(r,t),t=Hh(r),lh(r,e),e=Hh(r),i._item===null){let e=Array.from(this.doc.share.keys()).find(e=>this.doc.share.get(e)===this.type);i=r.getXmlFragment(e)}else{let e=r.store.clients.get(i._item.id.client)??[];i=e[Yh(e,i._item.id.clock)].content.type}this.mapping.clear(),this.mux(()=>{r.transact(r=>{let a=n.permanentUserData;a&&a.dss.forEach(e=>{Im(r,e,e=>{})});let o=(e,t)=>{let r=e===`added`?a.getUserByClientId(t.client):a.getUserByDeletedId(t);return{user:r,type:e,color:Yv(n.colorMapping,n.colors,r)}},s=Hg(i,new Bh(t.ds,e.sv)).map(n=>!n._item.deleted||qv(n._item,e)||qv(n._item,t)?ny(n,this.prosemirrorView.state.schema,{mapping:new Map,isOMark:new Map},e,t,o):null).filter(e=>e!==null),c=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new Bt(Ut.from(s),0,0));this.prosemirrorView.dispatch(c.setMeta(Vv,{isChangeOrigin:!0}))},Vv)})}_typeChanged(e,t){if(this.prosemirrorView==null)return;let n=Vv.getState(this.prosemirrorView.state);if(e.length===0||n.snapshot!=null||n.prevSnapshot!=null){this.renderSnapshot(n.snapshot,n.prevSnapshot);return}this.mux(()=>{let e=(e,t)=>this.mapping.delete(t);Im(t,t.deleteSet,e=>{if(e.constructor===xv){let t=e.content.type;t&&this.mapping.delete(t)}}),t.changed.forEach(e),t.changedParentTypes.forEach(e);let n=this.type.toArray().map(e=>ty(e,this.prosemirrorView.state.schema,this)).filter(e=>e!==null),r=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new Bt(Ut.from(n),0,0));Zv(r,this.beforeTransactionSelection,this),r=r.setMeta(Vv,{isChangeOrigin:!0,isUndoRedoOperation:t.origin instanceof pg}),this.beforeTransactionSelection!==null&&this._isLocalCursorInView()&&r.scrollIntoView(),this.prosemirrorView.dispatch(r)})}_prosemirrorChanged(e){this.doc.transact(()=>{by(this.doc,this.type,e,this),this.beforeTransactionSelection=$v(this,this.prosemirrorView.state)},Vv)}initView(e){this.prosemirrorView!=null&&this.destroy(),this.prosemirrorView=e,this.doc.on(`beforeAllTransactions`,this.beforeAllTransactions),this.doc.on(`afterAllTransactions`,this.afterAllTransactions),this.type.observeDeep(this._observeFunction)}destroy(){this.prosemirrorView!=null&&(this.prosemirrorView=null,this.type.unobserveDeep(this._observeFunction),this.doc.off(`beforeAllTransactions`,this.beforeAllTransactions),this.doc.off(`afterAllTransactions`,this.afterAllTransactions))}},ty=(e,t,n,r,i,a)=>{let o=n.mapping.get(e);if(o===void 0){if(e instanceof M_)return ny(e,t,n,r,i,a);throw Od()}return o},ny=(e,t,n,r,i,a)=>{let o=[],s=e=>{if(e instanceof M_){let s=ty(e,t,n,r,i,a);s!==null&&o.push(s)}else{let s=e._item.right?.content?.type;s instanceof D_&&!s._item.deleted&&s._item.id.client===s.doc.clientID&&(e.applyDelta([{retain:e.length},...s.toDelta()]),s.doc.transact(e=>{s._item.delete(e)}));let c=ry(e,t,n,r,i,a);c!==null&&c.forEach(e=>{e!==null&&o.push(e)})}};r===void 0||i===void 0?e.toArray().forEach(s):Hg(e,new Bh(i.ds,r.sv)).forEach(s);try{let s=e.getAttributes(r);r!==void 0&&(qv(e._item,r)?qv(e._item,i)||(s.ychange=a?a(`added`,e._item.id):{type:`added`}):s.ychange=a?a(`removed`,e._item.id):{type:`removed`});let c=t.node(e.nodeName,s,o);return n.mapping.set(e,c),c}catch(r){console.warn(`[y-prosemirror] schema.node(`+e.nodeName+`) threw:`,String(r&&r.message||r));let i=globalThis.__okYpsCounters=globalThis.__okYpsCounters||{block:0,inline:0};if(t.nodes[e.nodeName]&&t.nodes[e.nodeName].spec&&t.nodes[e.nodeName].spec.inline)i.inline++;else if(i.block++,t.nodes.rawMdxFallback)try{let i=t.node(`rawMdxFallback`,{reason:String(r&&r.message||r)},[t.text(e.nodeName)]);return n.mapping.set(e,i),i}catch(e){console.warn(`[y-prosemirror] rawMdxFallback substitution also failed:`,String(e&&e.message||e))}return n.mapping.delete(e),null}},ry=(e,t,n,r,i,a)=>{let o=[],s=e.toDelta(r,i,a);try{for(let e=0;e<s.length;e++){let n=s[e];o.push(t.text(n.insert,vy(n.attributes,t)))}}catch(e){console.warn(`[y-prosemirror] schema.text() threw:`,String(e&&e.message||e));let t=globalThis.__okYpsCounters=globalThis.__okYpsCounters||{block:0,inline:0};return t.inline++,null}return o},iy=(e,t)=>{let n=new L_,r=e.map(e=>({insert:e.text,attributes:yy(e.marks,t)}));return n.applyDelta(r),t.mapping.set(n,e),n},ay=(e,t)=>{let n=new M_(e.type.name);for(let t in e.attrs){let r=e.attrs[t];r!==null&&t!==`ychange`&&n.setAttribute(t,r)}return n.insert(0,ly(e).map(e=>oy(e,t))),t.mapping.set(n,e),n},oy=(e,t)=>e instanceof Array?iy(e,t):ay(e,t),sy=e=>typeof e==`object`&&!!e,cy=(e,t)=>{let n=Object.keys(e).filter(t=>e[t]!==null),r=n.length===Object.keys(t).filter(e=>t[e]!==null).length;for(let i=0;i<n.length&&r;i++){let a=n[i],o=e[a],s=t[a];r=a===`ychange`||o===s||sy(o)&&sy(s)&&cy(o,s)}return r},ly=e=>{let t=e.content.content,n=[];for(let e=0;e<t.length;e++){let r=t[e];if(r.isText){let r=[];for(let n=t[e];e<t.length&&n.isText;n=t[++e])r.push(n);e--,n.push(r)}else n.push(r)}return n},uy=(e,t)=>{let n=e.toDelta();return n.length===t.length&&n.every((e,n)=>e.insert===t[n].text&&uf(e.attributes||{}).length===t[n].marks.length&&mf(e.attributes,(e,r)=>{let i=_y(r),a=t[n].marks;return a.find(e=>e.type.name===i)?cy(e,a.find(e=>e.type.name===i)?.attrs):!1}))},dy=(e,t)=>{if(e instanceof M_&&!(t instanceof Array)&&xy(e,t)){let n=ly(t);return e._length===n.length&&cy(e.getAttributes(),t.attrs)&&e.toArray().every((e,t)=>dy(e,n[t]))}return e instanceof L_&&t instanceof Array&&uy(e,t)},fy=(e,t)=>e===t||e instanceof Array&&t instanceof Array&&e.length===t.length&&e.every((e,n)=>t[n]===e),py=(e,t,n)=>{let r=e.toArray(),i=ly(t),a=i.length,o=r.length,s=Cu(o,a),c=0,l=0,u=!1;for(;c<s;c++){let e=r[c],t=i[c];if(fy(n.mapping.get(e),t))u=!0;else if(!dy(e,t))break}for(;c+l<s;l++){let e=r[o-l-1],t=i[a-l-1];if(fy(n.mapping.get(e),t))u=!0;else if(!dy(e,t))break}return{equalityFactor:c+l,foundMappedChild:u}},my=e=>{let t=``,n=e._start,r={};for(;n!==null;)n.deleted||(n.countable&&n.content instanceof iv?t+=n.content.str:n.content instanceof Z_&&(r[n.content.key]=null)),n=n.right;return{str:t,nAttrs:r}},hy=(e,t,n)=>{n.mapping.set(e,t);let{nAttrs:r,str:i}=my(e),a=t.map(e=>({insert:e.text,attributes:Object.assign({},r,yy(e.marks,n))})),{insert:o,remove:s,index:c}=jv(i,a.map(e=>e.insert).join(``));e.delete(c,s),e.insert(c,o),e.applyDelta(a.map(e=>({retain:e.insert.length,attributes:e.attributes})))},gy=/(.*)(--[a-zA-Z0-9+/=]{8})$/,_y=e=>gy.exec(e)?.[1]??e,vy=(e,t)=>{let n=[];for(let r in e)n.push(t.mark(_y(r),e[r]));return n},yy=(e,t)=>{let n={};return e.forEach(e=>{if(e.type.name!==`ychange`){let r=cu(t.isOMark,e.type,()=>!e.type.excludes(e.type));n[r?`${e.type.name}--${Gv(e.toJSON())}`:e.type.name]=e.attrs}}),n},by=(e,t,n,r)=>{if(t instanceof M_&&t.nodeName!==n.type.name)throw Error(`node name mismatch!`);if(r.mapping.set(t,n),t instanceof M_){let e=t.getAttributes(),r=n.attrs;for(let n in r)r[n]===null?t.removeAttribute(n):e[n]!==r[n]&&n!==`ychange`&&t.setAttribute(n,r[n]);for(let n in e)r[n]===void 0&&t.removeAttribute(n)}let i=ly(n),a=i.length,o=t.toArray(),s=o.length,c=Cu(a,s),l=0,u=0;for(;l<c;l++){let e=o[l],t=i[l];if(!fy(r.mapping.get(e),t))if(dy(e,t))r.mapping.set(e,t);else break}for(;u+l+1<c;u++){let e=o[s-u-1],t=i[a-u-1];if(!fy(r.mapping.get(e),t))if(dy(e,t))r.mapping.set(e,t);else break}e.transact(()=>{for(;s-l-u>0&&a-l-u>0;){let n=o[l],c=i[l],d=o[s-u-1],f=i[a-u-1];if(n instanceof L_&&c instanceof Array)uy(n,c)||hy(n,c,r),l+=1;else{let i=n instanceof M_&&xy(n,c),a=d instanceof M_&&xy(d,f);if(i&&a){let e=py(n,c,r),t=py(d,f,r);e.foundMappedChild&&!t.foundMappedChild?a=!1:!e.foundMappedChild&&t.foundMappedChild||e.equalityFactor<t.equalityFactor?i=!1:a=!1}i?(by(e,n,c,r),l+=1):a?(by(e,d,f,r),u+=1):(r.mapping.delete(t.get(l)),t.delete(l,1),t.insert(l,[oy(c,r)]),l+=1)}}let n=s-l-u;if(s===1&&a===0&&o[0]instanceof L_?(r.mapping.delete(o[0]),o[0].delete(0,o[0].length)):n>0&&(t.slice(l,l+n).forEach(e=>r.mapping.delete(e)),t.delete(l,n)),l+u<a){let e=[];for(let t=l;t<a-u;t++)e.push(oy(i[t],r));t.insert(l,e)}},Vv)},xy=(e,t)=>!(t instanceof Array)&&e.nodeName===t.type.name,Sy=null,Cy=class{constructor(e,t,n){this.view=e,this.key=t,this.value=n}apply(){let e=Vv.getState(this.view.state);if(e&&e.binding&&!e.binding.isDestroyed){let e=this.view.state.tr;e.setMeta(this.key,this.value),this.view.dispatch(e)}}},wy=class e{constructor(e=[]){this.entries=e}getFirst(){return this.entries[0]}dequeueFirst(){return this.entries.shift()}isEmpty(){return this.entries.length===0}static fromViewsToUpdate(){let t=Sy;Sy=null;let n=[];return t.forEach((e,t)=>{e.forEach((e,r)=>{n.push(new Cy(t,r,e))})}),new e(n)}},Ty=(e=wy.fromViewsToUpdate(),t=!1)=>{let n=!0;for(;!e.isEmpty();){let r=e.getFirst();try{r.apply()}catch(r){if(r instanceof RangeError){t&&n&&e.dequeueFirst(),e.isEmpty()||mm(0,()=>Ty(e,!0));return}throw r}n=!1,e.dequeueFirst()}},Ey=(e,t,n)=>{Sy||(Sy=new Map,mm(0,Ty)),cu(Sy,e,ou).set(t,n)},Dy=(e,t,n)=>{if(e===0)return Ih(t,0,-1);let r=t._first===null?null:t._first.content.type;for(;r!==null&&t!==r;){if(r instanceof L_){if(r._length>=e)return Ih(r,e,-1);if(e-=r._length,r._item!==null&&r._item.next!==null)r=r._item.next.content.type;else{do r=r._item===null?null:r._item.parent,e--;while(r!==t&&r!==null&&r._item!==null&&r._item.next===null);r!==null&&r!==t&&(r=r._item===null?null:r._item.next.content.type)}}else{let i=(n.get(r)||{nodeSize:0}).nodeSize;if(r._first!==null&&e<i)r=r._first.content.type,e--;else{if(e===1&&r._length===0&&i>1)return new Ah(r._item===null?null:r._item.id,r._item===null?Oh(r):null,null);if(e-=i,r._item!==null&&r._item.next!==null)r=r._item.next.content.type;else{if(e===0)return r=r._item===null?r:r._item.parent,new Ah(r._item===null?null:r._item.id,r._item===null?Oh(r):null,null);do r=r._item.parent,e--;while(r!==t&&r._item.next===null);r!==t&&(r=r._item.next.content.type)}}}if(r===null)throw kd();if(e===0&&r.constructor!==L_&&r!==t)return Oy(r._item.parent,r._item)}return Ih(t,t._length,-1)},Oy=(e,t)=>{let n=null,r=null;return e._item===null?r=Oh(e):n=Dh(e._item.id.client,e._item.id.clock),new Ah(n,r,t.id)},ky=(e,t,n,r)=>{let i=Rh(n,e);if(i===null||i.type!==t&&!kh(t,i.type._item))return null;let a=i.type,o=0;if(a.constructor===L_)o=i.index;else if(a._item===null||!a._item.deleted){let e=a._first,t=0;for(;t<a._length&&t<i.index&&e!==null;){if(!e.deleted){let n=e.content.type;t++,n instanceof L_?o+=n._length:o+=r.get(n).nodeSize}e=e.right}o+=1}for(;a!==t&&a._item!==null;){let e=a._item.parent;if(e._item===null||!e._item.deleted){o+=1;let t=e._first;for(;t!==null;){let e=t.content.type;if(e===a)break;t.deleted||(e instanceof L_?o+=e._length:o+=r.get(e).nodeSize),t=t.right}}a=e}return o-1},Ay=(e,t)=>{let n=Kv(),r=e.toArray().map(e=>ny(e,t,n)).filter(e=>e!==null);return{doc:t.topNodeType.create(null,Ut.fromArray(r)),meta:n,mapping:n.mapping}},jy=(e,t,n)=>e!==t,My=e=>{let t=document.createElement(`span`);t.classList.add(`ProseMirror-yjs-cursor`),t.setAttribute(`style`,`border-color: ${e.color}`);let n=document.createElement(`div`);n.setAttribute(`style`,`background-color: ${e.color}`),n.insertBefore(document.createTextNode(e.name),null);let r=document.createTextNode(``),i=document.createTextNode(``);return t.insertBefore(r,null),t.insertBefore(n,null),t.insertBefore(i,null),t},Ny=e=>({style:`background-color: ${e.color}70`,class:`ProseMirror-yjs-selection`}),Py=/^#[0-9a-fA-F]{6}$/,Fy=(e,t,n,r,i)=>{let a=Vv.getState(e);if(a==null||a.doc==null||a.binding==null)return Ie.create(e.doc,[]);let o=a.doc,s=[];return a.snapshot!=null||a.prevSnapshot!=null||a.binding.mapping.size===0?Ie.create(e.doc,[]):(t.getStates().forEach((t,c)=>{if(n(o.clientID,c,t)&&t.cursor!=null){let n=t.user||{};n.color==null?n.color=`#ffa500`:Py.test(n.color)||console.warn(`A user uses an unsupported color format`,n),n.name??=`User: ${c}`;let l=ky(o,a.type,Mh(t.cursor.anchor),a.binding.mapping),u=ky(o,a.type,Mh(t.cursor.head),a.binding.mapping);if(l!==null&&u!==null){let t=wu(e.doc.content.size-1,0);l=Cu(l,t),u=Cu(u,t),s.push(Et.widget(u,()=>r(n,c),{key:c+``,side:10}));let a=Cu(l,u),o=wu(l,u);s.push(Et.inline(a,o,i(n,c),{inclusiveEnd:!0,inclusiveStart:!1}))}}}),Ie.create(e.doc,s))},Iy=(e,{awarenessStateFilter:t=jy,cursorBuilder:n=My,selectionBuilder:r=Ny,getSelection:i=e=>e.selection}={},a=`cursor`)=>new We({key:Uv,state:{init(i,a){return Fy(a,e,t,n,r)},apply(i,a,o,s){let c=Vv.getState(s),l=i.getMeta(Uv);return c&&c.isChangeOrigin||l&&l.awarenessUpdated?Fy(s,e,t,n,r):a.map(i.mapping,i.doc)}},props:{decorations:e=>Uv.getState(e)},view:t=>{let n=()=>{t.docView&&Ey(t,Uv,{awarenessUpdated:!0})},r=()=>{let n=Vv.getState(t.state),r=e.getLocalState()||{};if(t.hasFocus()){let o=i(t.state),s=Dy(o.anchor,n.type,n.binding.mapping),c=Dy(o.head,n.type,n.binding.mapping);(r.cursor==null||!zh(Mh(r.cursor.anchor),s)||!zh(Mh(r.cursor.head),c))&&e.setLocalStateField(a,{anchor:s,head:c})}else r.cursor!=null&&ky(n.doc,n.type,Mh(r.cursor.anchor),n.binding.mapping)!==null&&e.setLocalStateField(a,null)};return e.on(`change`,n),t.dom.addEventListener(`focusin`,r),t.dom.addEventListener(`focusout`,r),{update:r,destroy:()=>{t.dom.removeEventListener(`focusin`,r),t.dom.removeEventListener(`focusout`,r),e.off(`change`,n),e.setLocalStateField(a,null)}}}}),Ly=e=>{let t=Hv.getState(e).undoManager;if(t!=null)return t.undo(),!0},Ry=e=>{let t=Hv.getState(e).undoManager;if(t!=null)return t.redo(),!0},zy=new Set([`paragraph`]),By=(e,t)=>!(e instanceof xv)||!(e.content instanceof mv)||!(e.content.type instanceof D_||e.content.type instanceof M_&&t.has(e.content.type.nodeName))||e.content.type._length===0,Vy=({protectedNodes:e=zy,trackedOrigins:t=[],undoManager:n=null}={})=>new We({key:Hv,state:{init:(r,i)=>{let a=Vv.getState(i),o=n||new pg(a.type,{trackedOrigins:new Set([Vv].concat(t)),deleteFilter:t=>By(t,e),captureTransaction:e=>e.meta.get(`addToHistory`)!==!1});return{undoManager:o,prevSel:null,hasUndoOps:o.undoStack.length>0,hasRedoOps:o.redoStack.length>0}},apply:(e,t,n,r)=>{let i=Vv.getState(r).binding,a=t.undoManager,o=a.undoStack.length>0,s=a.redoStack.length>0;return i?{undoManager:a,prevSel:$v(i,n),hasUndoOps:o,hasRedoOps:s}:o!==t.hasUndoOps||s!==t.hasRedoOps?Object.assign({},t,{hasUndoOps:a.undoStack.length>0,hasRedoOps:a.redoStack.length>0}):t}},view:e=>{let t=Vv.getState(e.state),n=Hv.getState(e.state).undoManager;return n.on(`stack-item-added`,({stackItem:n})=>{let r=t.binding;r&&n.meta.set(r,Hv.getState(e.state).prevSel)}),n.on(`stack-item-popped`,({stackItem:e})=>{let n=t.binding;n&&(n.beforeTransactionSelection=e.meta.get(n)||n.beforeTransactionSelection)}),{destroy:()=>{n.destroy()}}}});function Hy(e){let{char:t,allowSpaces:n,allowToIncludeChar:r,allowedPrefixes:i,startOfLine:a,$position:o}=e,s=n&&!r,c=z(t),l=RegExp(`\\s${c}$`),u=a?`^`:``,d=r?``:c,f=RegExp(s?`${u}${c}.*?(?=\\s${d}|$)`:`${u}(?:^)?${c}[^\\s${d}]*`,`gm`),p=o.nodeBefore?.isText&&o.nodeBefore.text;if(!p)return null;let m=o.pos-p.length,h=Array.from(p.matchAll(f)).pop();if(!h||h.input===void 0||h.index===void 0)return null;let g=h.input.slice(Math.max(0,h.index-1),h.index),_=RegExp(`^[${i?.join(``)}\0]?$`).test(g);if(i!==null&&!_)return null;let v=m+h.index,y=v+h[0].length;return s&&l.test(p.slice(y-1,y+1))&&(h[0]+=` `,y+=1),v<o.pos&&y>=o.pos?{range:{from:v,to:y},query:h[0].slice(t.length),text:h[0]}:null}function Uy(e){return e.docChanged?e.steps.some(e=>{let t=e.slice;if(!t?.content)return!1;let n=t.content.textBetween(0,t.content.size,`
|