@harperfast/harper 5.3.2 → 5.3.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/bin/cliOperations.ts +3 -3
- package/bin/copyDb.ts +4 -3
- package/components/DESIGN.md +12 -0
- package/components/packageComponent.ts +42 -17
- package/config/DESIGN.md +4 -0
- package/config/configUtils.ts +8 -8
- package/config/parseConfigFile.ts +11 -7
- package/dist/bin/cliOperations.js +3 -3
- package/dist/bin/cliOperations.js.map +1 -1
- package/dist/bin/copyDb.js +3 -3
- package/dist/bin/copyDb.js.map +1 -1
- package/dist/components/packageComponent.d.ts +9 -7
- package/dist/components/packageComponent.js +41 -16
- package/dist/components/packageComponent.js.map +1 -1
- package/dist/config/configUtils.js +4 -3
- package/dist/config/configUtils.js.map +1 -1
- package/dist/config/parseConfigFile.d.ts +1 -0
- package/dist/config/parseConfigFile.js +7 -3
- package/dist/config/parseConfigFile.js.map +1 -1
- package/dist/resources/DatabaseTransaction.d.ts +75 -10
- package/dist/resources/DatabaseTransaction.js +1080 -277
- package/dist/resources/DatabaseTransaction.js.map +1 -1
- package/dist/resources/Resource.js +40 -14
- package/dist/resources/Resource.js.map +1 -1
- package/dist/resources/RocksTransactionLogStore.js +1 -0
- package/dist/resources/RocksTransactionLogStore.js.map +1 -1
- package/dist/resources/Table.js +16 -2
- package/dist/resources/Table.js.map +1 -1
- package/dist/resources/analytics/write.js +34 -16
- package/dist/resources/analytics/write.js.map +1 -1
- package/dist/resources/databases.d.ts +5 -0
- package/dist/resources/databases.js +38 -4
- package/dist/resources/databases.js.map +1 -1
- package/dist/resources/recordLock.d.ts +9 -4
- package/dist/resources/recordLock.js +79 -19
- package/dist/resources/recordLock.js.map +1 -1
- package/dist/server/DurableSubscriptionsSession.d.ts +2 -0
- package/dist/server/DurableSubscriptionsSession.js +20 -17
- package/dist/server/DurableSubscriptionsSession.js.map +1 -1
- package/dist/server/mqtt.js +41 -23
- package/dist/server/mqtt.js.map +1 -1
- package/dist/server/serverHelpers/NodeAdapterResponse.js +18 -0
- package/dist/server/serverHelpers/NodeAdapterResponse.js.map +1 -1
- package/dist/utility/npmUtilities.js +18 -7
- package/dist/utility/npmUtilities.js.map +1 -1
- package/package.json +1 -1
- package/resources/DESIGN.md +42 -10
- package/resources/DatabaseTransaction.ts +1244 -275
- package/resources/Resource.ts +39 -14
- package/resources/RocksTransactionLogStore.ts +1 -0
- package/resources/Table.ts +24 -2
- package/resources/analytics/DESIGN.md +17 -0
- package/resources/analytics/write.ts +28 -15
- package/resources/databases.ts +40 -4
- package/resources/record-locks.md +34 -17
- package/resources/recordLock.ts +89 -22
- package/server/DESIGN.md +2 -0
- package/server/DurableSubscriptionsSession.ts +18 -16
- package/server/mqtt.ts +39 -22
- package/server/serverHelpers/NodeAdapterResponse.ts +19 -1
- package/studio/web/assets/Chat-B-Rd-ft9.js +2100 -0
- package/studio/web/assets/FloatingChat-CFypO7kh.js +23 -0
- package/studio/web/assets/SearchDialog-BRIyPiBl.js +1 -0
- package/studio/web/assets/{abnfDiagram-O67JEVCF-raXE027J.js → abnfDiagram-YUKMZFIV-DPR2lFRk.js} +1 -1
- package/studio/web/assets/{apiToken-DNrfij0E.js → apiToken-BraYnzvC.js} +1 -1
- package/studio/web/assets/applications-XCds8-ZP.js +296 -0
- package/studio/web/assets/architecture-WOLXFQ4H-DtJHIK0_.js +1 -0
- package/studio/web/assets/{architectureDiagram-NJMV4G6O-C8_Eet7w.js → architectureDiagram-47P4ROYG-MDymp2dh.js} +3 -3
- package/studio/web/assets/authStore-DE1HFvVP.js +3 -0
- package/studio/web/assets/{blockDiagram-BEXU5L5S-DR6S5-1D.js → blockDiagram-E7TT5TSB-O5qRgZmd.js} +3 -3
- package/studio/web/assets/button-C37w80Uk.js +21 -0
- package/studio/web/assets/{c4Diagram-YGBWAQC7-BAfZ1G01.js → c4Diagram-CRA5TL53-BdPORGHo.js} +2 -2
- package/studio/web/assets/channel-yCStoq0_.js +1 -0
- package/studio/web/assets/{chevron-up-CFxbMGv2.js → chevron-up-DozwrIz-.js} +1 -1
- package/studio/web/assets/chunk-2BW5OAIV-DJ-iXJAw.js +10 -0
- package/studio/web/assets/{chunk-ZIGJFQKS-Cs8fUn7y.js → chunk-3YJQHVM4-BOgacqS1.js} +2 -2
- package/studio/web/assets/{chunk-7PRAP22T-KyqX6x3f.js → chunk-4EA7E6EY-C-7xqUBl.js} +1 -1
- package/studio/web/assets/{chunk-GWA4HPMP-DsejB6gA.js → chunk-7TKQ45FW-C3XA1bIN.js} +1 -1
- package/studio/web/assets/{chunk-GTNCS2PH-DGHLXyow.js → chunk-AW2ZBBNX-BdvgD1UW.js} +3 -3
- package/studio/web/assets/{chunk-5DYCD2WN-BceBfIHT.js → chunk-DBDB3WZW-CKKxIc6F.js} +1 -1
- package/studio/web/assets/{chunk-MBY4JIJT-BwSGweQP.js → chunk-E2ZNV5FY-bVefNHvz.js} +3 -3
- package/studio/web/assets/chunk-EU5HNXII-BHv2kWp4.js +213 -0
- package/studio/web/assets/chunk-FVRAUYC3-BoL_NO6b.js +2 -0
- package/studio/web/assets/{chunk-742MDFTN-CIkt8ijt.js → chunk-HJ2JQQFS-N_98oMRS.js} +1 -1
- package/studio/web/assets/{chunk-NETBCI7D-C8UnOw_f.js → chunk-HTAEGDNF-BQ1fSjPs.js} +1 -1
- package/studio/web/assets/{chunk-WEXAMYUT-BAIhTwyh.js → chunk-KQW6MTUR-qP0QiQAg.js} +1 -1
- package/studio/web/assets/chunk-NGNAAXSQ-DqoPQk1a.js +136 -0
- package/studio/web/assets/{chunk-UA2S7LBM-BHpEdH8D.js → chunk-NTY3LDVX-CSBFjlJg.js} +1 -1
- package/studio/web/assets/chunk-VPRB5NB3-BVHOe9Q-.js +129 -0
- package/studio/web/assets/{chunk-7INBJB4K-BpeAXyOi.js → chunk-XC4XBNZT-46uQwtF4.js} +10 -10
- package/studio/web/assets/{classDiagram-v2-NBCMYWYE-DmDPkt2u.js → classDiagram-v2-K4WV4PDN-Da0ps1Ui.js} +3 -3
- package/studio/web/assets/cn-DpF1PxBT.js +1 -0
- package/studio/web/assets/{createLucideIcon-fO5dL7D5.js → createLucideIcon-DLWRoWN-.js} +1 -1
- package/studio/web/assets/{cssMode-DBucrQdT.js → cssMode-BY1w91l8.js} +1 -1
- package/studio/web/assets/cynefin-EF2NZ3EQ-jQ2eCUaU.js +1 -0
- package/studio/web/assets/cynefinDiagram-3GCD6N5R-TNi5iS0E.js +62 -0
- package/studio/web/assets/dagre-W4DXFKR2-BnLHmA44.js +4 -0
- package/studio/web/assets/{diagram-22UHCM2B-DJCvcaWP.js → diagram-2UJZ2QOL-r_jehhZR.js} +7 -7
- package/studio/web/assets/{diagram-3UASUU5V-Du6VKWln.js → diagram-OVF4WLC6-BSUXGVh8.js} +11 -11
- package/studio/web/assets/{diagram-CDSNMT55-l5Ga0u-W.js → diagram-PFPMY2P6-BrVedycw.js} +3 -3
- package/studio/web/assets/{diagram-MLGK6HIB-CNQY47LA.js → diagram-UMYRVEAY-CBIaakBB.js} +1 -1
- package/studio/web/assets/diagram-YEKJPTXX-DFmmDXCl.js +41 -0
- package/studio/web/assets/diagram-ZIFT7M5P-CQfOWxOi.js +3 -0
- package/studio/web/assets/dist-9lpzt2Hn.js +11 -0
- package/studio/web/assets/{ebnfDiagram-ZINNZB2B-5OnkTpfi.js → ebnfDiagram-VR2GEFS7-FXA3Xe6e.js} +1 -1
- package/studio/web/assets/{editor-CHpQCuBq.js → editor-D5mpVs1b.js} +1 -1
- package/studio/web/assets/elk-IJKZMXRS-CC4gfVRU.js +27 -0
- package/studio/web/assets/{erDiagram-OPXOYQCR-CQlCX84D.js → erDiagram-O2IAPWRE-C-BkDTPl.js} +2 -2
- package/studio/web/assets/errorText-8xV8WZBt.js +1 -0
- package/studio/web/assets/eventmodeling-K75KTNOO-D0dJ_PbR.js +1 -0
- package/studio/web/assets/flowDiagram-OXPTDLAJ-C1LEc_Hf.js +1 -0
- package/studio/web/assets/{ganttDiagram-FUAMR5RP-bloX3Voy.js → ganttDiagram-R7TSEDQI-85F44BIo.js} +4 -4
- package/studio/web/assets/{getAnalytics-C0FHjtdQ.js → getAnalytics-B1xpd4kG.js} +1 -1
- package/studio/web/assets/gitGraph-VSP46ZUC-BBmqrmjK.js +1 -0
- package/studio/web/assets/gitGraphDiagram-XJZIOB7I-CFY6iMwg.js +106 -0
- package/studio/web/assets/graphlib-DS17s2tU.js +1 -0
- package/studio/web/assets/{html-B1iA8q38.js → html-DiXKiahz.js} +1 -1
- package/studio/web/assets/{htmlMode-CrL3YO5Y.js → htmlMode-DitVJ707.js} +1 -1
- package/studio/web/assets/index-CDnn0-PN.css +1 -0
- package/studio/web/assets/index-D8kyF6dt.js +833 -0
- package/studio/web/assets/index.lazy-DgbjUxLo.js +1 -0
- package/studio/web/assets/info-OHQRW6UA-Bs2aEco7.js +1 -0
- package/studio/web/assets/{infoDiagram-VRGFBTTK-B0J1132p.js → infoDiagram-5W2HQ5XZ-d6yG1yfZ.js} +1 -1
- package/studio/web/assets/invalidateEntityQueries-BkWXiqjz.js +1 -0
- package/studio/web/assets/{ishikawaDiagram-OU5B5YK6-BNk0tuQx.js → ishikawaDiagram-K3B6WC7H-CSYz-WRA.js} +2 -2
- package/studio/web/assets/{javascript-CXgQMkoa.js → javascript-BBVXeMDm.js} +1 -1
- package/studio/web/assets/{journeyDiagram-ZHPQQLJL-Be79RMQM.js → journeyDiagram-COXZFDF6-BDj6Wqcj.js} +3 -3
- package/studio/web/assets/{jsonMode-DycqRKOv.js → jsonMode-D85_j2oD.js} +1 -1
- package/studio/web/assets/{kanban-definition-PNTS6WVX-4uuoQP9W.js → kanban-definition-P3RFRI5V-C2Bjfbp-.js} +6 -6
- package/studio/web/assets/{languageServices-HYHV1wDJ.js → languageServices-U3mWhpRL.js} +1 -1
- package/studio/web/assets/{lspLanguageFeatures-CH_6SYiA.js → lspLanguageFeatures-CoymyM3c.js} +1 -1
- package/studio/web/assets/{mermaid-parser.core-V1UYMeXV.js → mermaid-parser.core-Ch_T61iL.js} +6 -6
- package/studio/web/assets/mermaid.core-BOAgKzo5.js +44 -0
- package/studio/web/assets/{mindmap-definition-NLK3R4M7-C70Ctm0J.js → mindmap-definition-LZFPQGKD-DzOapzMM.js} +3 -3
- package/studio/web/assets/notifications-CPgEC6ZP.js +1 -0
- package/studio/web/assets/notifications-D_VqhHnx.js +1 -0
- package/studio/web/assets/operations-D8aaKYty.js +4 -0
- package/studio/web/assets/packet-JDAUHWVQ-CGHB_EIE.js +1 -0
- package/studio/web/assets/{pegDiagram-GJSIUBJH-d6z1cc7W.js → pegDiagram-BGZESJAR-ADzOIKrz.js} +1 -1
- package/studio/web/assets/pie-XZMESJXO-Bijz5Y2o.js +1 -0
- package/studio/web/assets/pieDiagram-CAPJLFHJ-VM7fvbwO.js +39 -0
- package/studio/web/assets/profile-DM5E6Xls.js +1 -0
- package/studio/web/assets/{quadrantDiagram-O4NWA36T-CIF5Qkou.js → quadrantDiagram-GDMTTRAM-Bmza84_j.js} +3 -3
- package/studio/web/assets/radar-ABXABTNO-IaC8pB63.js +1 -0
- package/studio/web/assets/railroad-I3PHUGI6-CCrSUqeq.js +1 -0
- package/studio/web/assets/railroad-abnf-LNEFI6M7-BhobVp-t.js +1 -0
- package/studio/web/assets/railroad-ebnf-DWYD2UWJ-OHhGUTEh.js +1 -0
- package/studio/web/assets/railroad-peg-JR7BVNR7-FupC3Jcn.js +1 -0
- package/studio/web/assets/{railroadDiagram-XR7U4H2S-y3Jv2U6N.js → railroadDiagram-SM67HX2B-CgFGOVI5.js} +1 -1
- package/studio/web/assets/regions-WFvXqryO.js +1 -0
- package/studio/web/assets/{register-DCN4QUii.js → register-B7DvfAGj.js} +3 -3
- package/studio/web/assets/request-ChoMERRk.js +2 -0
- package/studio/web/assets/{requirementDiagram-PLB6GJNP-ChINZEmu.js → requirementDiagram-X7JNWC4A-BHoQgkoT.js} +4 -4
- package/studio/web/assets/restartGate-D_e93lFE.js +1 -0
- package/studio/web/assets/restartUnconfirmed-BqcDZ__Y.js +1 -0
- package/studio/web/assets/sankeyDiagram-UM26HJRW-8tFu_oUe.js +40 -0
- package/studio/web/assets/sequenceDiagram-ZO4K6R2Y-jryb1rwT.js +169 -0
- package/studio/web/assets/setComponentFile-BHk22Rh6.js +1 -0
- package/studio/web/assets/setup-wNdpTrVH.js +2 -0
- package/studio/web/assets/{stateDiagram-v2-GCMORJYK-Bs8RIb9K.js → stateDiagram-v2-TBUQTH76-CnWE5yFn.js} +2 -2
- package/studio/web/assets/status-CYoonm9V.js +61 -0
- package/studio/web/assets/{swimlanes-2SLR337P-B52xrf6t.js → swimlanes-N4OXWK64-CBlFzDJn.js} +1 -1
- package/studio/web/assets/swimlanesDiagram-K3J5GTZL-DvFLtUPi.js +8 -0
- package/studio/web/assets/{timeline-definition-EJHVYXUP-DJSITpQX.js → timeline-definition-YOQAKGHF-CFWqHrqI.js} +4 -4
- package/studio/web/assets/{toggleHighContrast-CfAp6Sxb.js → toggleHighContrast-CKEm-P4K.js} +1 -1
- package/studio/web/assets/treeView-D4JQ5SDB-CpV9zuVb.js +1 -0
- package/studio/web/assets/treemap-SAJKECNS-Bc94Tqiq.js +1 -0
- package/studio/web/assets/{tsMode-HZR0bfq4.js → tsMode-Dv35qHmn.js} +1 -1
- package/studio/web/assets/{typescript-UMJSfZyF.js → typescript-Bly1EW8o.js} +1 -1
- package/studio/web/assets/{useEntityRestURL-B379CS-h.js → useEntityRestURL-Cg3P0MOb.js} +1 -1
- package/studio/web/assets/usecaseDiagram-VIAY4XPW-Brf2xP3S.js +328 -0
- package/studio/web/assets/{vendor-core-6LhfJlRC.js → vendor-core-PejxhUWQ.js} +1 -1
- package/studio/web/assets/vendor-datadog-GjET_Cbn.js +6 -0
- package/studio/web/assets/{vendor-react-BOliS0BL.js → vendor-react-DSIx92Ld.js} +1 -1
- package/studio/web/assets/vendor-tanstack-C5Y-nrd2.js +2 -0
- package/studio/web/assets/vendor-ui-BBWHOEoQ.js +41 -0
- package/studio/web/assets/{vennDiagram-UO4OBE2U-DZTsDA4k.js → vennDiagram-BLWOH2XV-XxOyJPq_.js} +3 -3
- package/studio/web/assets/wardley-7MLQ67FV-DRW0zuE4.js +1 -0
- package/studio/web/assets/{wardleyDiagram-VNRHLVJA-qu_f7Tvl.js → wardleyDiagram-YMQ3BMBF-B3WskJ9W.js} +3 -3
- package/studio/web/assets/wasAReleasedBeforeB-D5grAaGM.js +1 -0
- package/studio/web/assets/{workers-Bn_0_L1R.js → workers-DVtjrvUa.js} +1 -1
- package/studio/web/assets/{xml-CG2N-1r1.js → xml-DjAPbgLN.js} +1 -1
- package/studio/web/assets/xychartDiagram-TAQBALBS-D5NV4Env.js +7 -0
- package/studio/web/assets/{yaml-68pda6Av.js → yaml-oTUyoJy1.js} +1 -1
- package/studio/web/index.html +17 -15
- package/utility/npmUtilities.ts +17 -7
- package/studio/web/assets/Chat-CrxPD4ph.js +0 -2294
- package/studio/web/assets/FloatingChat-EXzoUQ-9.js +0 -23
- package/studio/web/assets/SearchDialog-7qRL8Yqx.js +0 -1
- package/studio/web/assets/_basePickBy-QJXUw_pr.js +0 -1
- package/studio/web/assets/_baseUniq-DR4vVjyC.js +0 -1
- package/studio/web/assets/alertDialog-BbWD9Xxa.js +0 -1
- package/studio/web/assets/applications-CdqjiSQe.js +0 -296
- package/studio/web/assets/architecture-7GRP2DOG-DDmz3hpI.js +0 -1
- package/studio/web/assets/arrow-up-D2g_57vT.js +0 -1
- package/studio/web/assets/authStore-CJCaADw9.js +0 -3
- package/studio/web/assets/button-DWwfgGWI.js +0 -21
- package/studio/web/assets/channel-D0AkPjJ8.js +0 -1
- package/studio/web/assets/chunk-3FUC2YCW-DuRp-j19.js +0 -2
- package/studio/web/assets/chunk-7M6MHVWA-h6WlaTzO.js +0 -213
- package/studio/web/assets/chunk-FOHPRMQF-DzxwRta7.js +0 -161
- package/studio/web/assets/chunk-O7XYJQB3-CBS3nZYV.js +0 -128
- package/studio/web/assets/chunk-Z7XXMR3K-DSHbImdf.js +0 -10
- package/studio/web/assets/cn-6T8VranJ.js +0 -1
- package/studio/web/assets/cynefin-OW5HDTMX-DIvbXLSj.js +0 -1
- package/studio/web/assets/cynefinDiagram-VND7K2PF-BdtaXiCE.js +0 -62
- package/studio/web/assets/dagre-6A5THRUB-C7RUWHyz.js +0 -4
- package/studio/web/assets/diagram-ATOU4E4O-dxRfeG4B.js +0 -3
- package/studio/web/assets/diagram-MPIPVDR6-7prveD1B.js +0 -41
- package/studio/web/assets/dist-BrRuMUzt.js +0 -11
- package/studio/web/assets/download-Cn6tPG4L.js +0 -1
- package/studio/web/assets/elk-276RUBZZ-DxDQPjQT.js +0 -27
- package/studio/web/assets/errorText-NpBmvk9I.js +0 -1
- package/studio/web/assets/eventmodeling-NTZA5JFV-DONQf5aG.js +0 -1
- package/studio/web/assets/flowDiagram-KWPJA3E3-BoZ8_QR1.js +0 -1
- package/studio/web/assets/gitGraph-4MIJSDKK-BrXWmJt2.js +0 -1
- package/studio/web/assets/gitGraphDiagram-X574FWY7-C2KnnZeY.js +0 -106
- package/studio/web/assets/graphlib-C9Tl7QrK.js +0 -1
- package/studio/web/assets/index-QLZw6xrU.css +0 -1
- package/studio/web/assets/index-qCLyhyah.js +0 -828
- package/studio/web/assets/index.lazy-DCx-DxIV.js +0 -2
- package/studio/web/assets/info-A6RAGUB7-BhzBHe4U.js +0 -1
- package/studio/web/assets/mermaid.core-1PX6R49U.js +0 -44
- package/studio/web/assets/notifications-BSObVIY1.js +0 -1
- package/studio/web/assets/notifications-DFLXk68b.js +0 -1
- package/studio/web/assets/packet-AYTQ26CC-DWbXHx5g.js +0 -1
- package/studio/web/assets/pie-WAS4IAKB-DjoTm3yr.js +0 -1
- package/studio/web/assets/pieDiagram-5QR66LMP-Dz3RHpDA.js +0 -39
- package/studio/web/assets/profile-TBjzOMIy.js +0 -1
- package/studio/web/assets/radar-RG4KPBEZ-CVBgjCOj.js +0 -1
- package/studio/web/assets/railroad-74A4TZTK-BdhXw10Q.js +0 -1
- package/studio/web/assets/railroad-abnf-HS5TGJTU-BcoQPN39.js +0 -1
- package/studio/web/assets/railroad-ebnf-LZEXJU2U-B1Lke2JN.js +0 -1
- package/studio/web/assets/railroad-peg-WCYAUIDC-D-oJFkiV.js +0 -1
- package/studio/web/assets/regions-C4an4H7e.js +0 -1
- package/studio/web/assets/restartGate-nHAFLDh-.js +0 -1
- package/studio/web/assets/sankeyDiagram-IPEJSGJF-D9AyLce2.js +0 -40
- package/studio/web/assets/sequenceDiagram-PO4LG4MO-hfk4aIEm.js +0 -169
- package/studio/web/assets/setComponentFile-BrqOM1Zm.js +0 -1
- package/studio/web/assets/setup-0v2MCm-E.js +0 -2
- package/studio/web/assets/status-DdezofUu.js +0 -61
- package/studio/web/assets/swimlanesDiagram-TC7HE7FX-DfN7BAP5.js +0 -8
- package/studio/web/assets/tabs-BCTQzoQK.js +0 -1
- package/studio/web/assets/treeView-Q6P3EWNA-C-epdxRo.js +0 -1
- package/studio/web/assets/treemap-WGGIJYW6-DOVyp_zw.js +0 -1
- package/studio/web/assets/usecaseDiagram-POWQR4AR-B6252cbq.js +0 -328
- package/studio/web/assets/vendor-datadog-ozKf-pts.js +0 -6
- package/studio/web/assets/vendor-tanstack-Bntfka-M.js +0 -2
- package/studio/web/assets/vendor-ui-9EYYDgoN.js +0 -41
- package/studio/web/assets/wardley-WFR3VGLG-Cfqoe6z4.js +0 -1
- package/studio/web/assets/xychartDiagram-PMCCYNJV-UrOKRsmR.js +0 -7
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-BOAgKzo5.js","assets/vendor-datadog-GjET_Cbn.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-D0vMJQRr.js","assets/step-vX8bovaY.js","assets/chunk-VPRB5NB3-BVHOe9Q-.js","assets/chunk-3YJQHVM4-BOgacqS1.js","assets/dist-BRuBKNNy.js","assets/chunk-HJ2JQQFS-N_98oMRS.js","assets/chunk-E2ZNV5FY-bVefNHvz.js","assets/chunk-DUW6YSOI-Dgx8z5s3.js","assets/chunk-4EA7E6EY-C-7xqUBl.js","assets/chunk-XC4XBNZT-46uQwtF4.js","assets/chunk-J5ZVWO5B-oDCd-gWO.js","assets/rough.esm-Dy-Kn_BL.js","assets/chunk-DBDB3WZW-CKKxIc6F.js","assets/chunk-2BW5OAIV-DJ-iXJAw.js","assets/chunk-NTY3LDVX-CSBFjlJg.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as e,n as t,t as n}from"./rolldown-runtime-Dd_uD5pT.js";import{C as r,S as i,n as a,v as o}from"./authStore-DE1HFvVP.js";import{D as s,_ as c,b as l,l as u,p as d,s as f,t as p}from"./vendor-core-PejxhUWQ.js";import{t as m}from"./cn-DpF1PxBT.js";import{h}from"./restartGate-D_e93lFE.js";import{a as g,o as _}from"./vendor-datadog-GjET_Cbn.js";import{r as v}from"./vendor-react-DSIx92Ld.js";import{A as y,H as b,K as x,M as S,N as C,P as w,j as T,k as E,nt as D}from"./vendor-tanstack-C5Y-nrd2.js";import{n as O,t as k}from"./button-C37w80Uk.js";import{$ as ee,at as A,zt as j}from"./vendor-ui-BBWHOEoQ.js";import{t as M}from"./createLucideIcon-DLWRoWN-.js";import{n as N,r as te}from"./chevron-up-DozwrIz-.js";import{S as P,T as F,_ as ne,c as re,d as ie,f as ae,g as I,h as oe,i as se,l as ce,m as le,n as ue,o as L,p as de,r as fe,t as pe,u as me,v as he,w as ge,x as _e,y as ve}from"./setComponentFile-BHk22Rh6.js";import{l as ye}from"./restartUnconfirmed-BqcDZ__Y.js";import{n as be}from"./errorText-8xV8WZBt.js";import{t as xe}from"./invalidateEntityQueries-BkWXiqjz.js";import{t as Se}from"./localStorageKeys-etzFY_xV.js";import{$ as Ce,$i as we,$t as Te,A as Ee,Ai as De,An as Oe,At as ke,Bn as Ae,Bt as je,Ci as Me,Cn as Ne,Cr as Pe,Ct as Fe,D as Ie,Di as Le,Ei as Re,Fn as ze,Fr as Be,Ft as Ve,G as He,Gi as Ue,Gn as We,Gt as Ge,Hi as Ke,Hn as qe,Ht as Je,Ii as Ye,In as Xe,Ir as Ze,It as Qe,J as $e,Ji as et,Jn as tt,Jt as nt,K as rt,Kn as it,Kt as at,Ln as ot,Lt as st,M as ct,Mi as lt,Mn as ut,Mr as dt,N as ft,Ni as pt,Nn as mt,Nr as ht,O as R,Oi as gt,P as _t,Pi as vt,Pn as yt,Pr as bt,Pt as xt,Q as St,Qi as Ct,Qt as wt,Ri as Tt,Rn as Et,Rt as Dt,Si as Ot,Sn as kt,Sr as At,St as jt,Ti as Mt,U as Nt,Ui as Pt,Un as Ft,Ut as It,Vi as Lt,Vn as Rt,W as zt,Wi as Bt,Wn as Vt,Wt as Ht,X as Ut,Xt as Wt,Y as Gt,Yi as Kt,Yn as qt,Yr as Jt,Yt,Z as Xt,Zt,_ as Qt,_n as $t,_r as en,_t as tn,ai as nn,an as rn,ar as an,at as on,b as sn,bi as cn,bn as ln,br as un,bt as z,ci as dn,cr as fn,ct as pn,di as mn,dr as hn,dt as gn,ea as _n,en as vn,et as yn,f as bn,fi as xn,fr as Sn,ft as Cn,gi as wn,gn as Tn,gt as En,ht as Dn,ii as On,in as kn,ir as An,it as jn,j as Mn,jn as Nn,k as Pn,ki as Fn,li as In,lr as Ln,lt as Rn,m as zn,mn as Bn,mr as Vn,mt as Hn,na as Un,ni as Wn,nn as Gn,nr as Kn,nt as qn,oi as Jn,on as Yn,or as Xn,ot as Zn,p as Qn,pi as $n,pr as er,pt as tr,q as nr,qt as rr,rn as ir,rr as ar,rt as or,si as sr,sn as cr,sr as lr,st as ur,ta as dr,tn as fr,tt as pr,ui as mr,ur as hr,ut as gr,v as _r,vi as vr,vn as yr,vr as br,vt as xr,w as Sr,wr as Cr,x as wr,xn as Tr,xr as Er,y as Dr,yi as Or,yn as kr,yr as Ar,yt as jr,zi as Mr,zn as Nr,zt as Pr}from"./index-D8kyF6dt.js";import{g as Fr,h as Ir,n as Lr,o as Rr,s as zr}from"./register-B7DvfAGj.js";import{t as Br}from"./useEntityRestURL-Cg3P0MOb.js";import"./languageServices-U3mWhpRL.js";import"./editor-D5mpVs1b.js";var Vr={name:`arrow-down-a-z`,size:24,node:[[`path`,{d:`m3 16 4 4 4-4`,key:`1co6wj`}],[`path`,{d:`M7 20V4`,key:`1yoxec`}],[`path`,{d:`M20 8h-5`,key:`1vsyxs`}],[`path`,{d:`M15 10V6.5a2.5 2.5 0 0 1 5 0V10`,key:`ag13bf`}],[`path`,{d:`M15 14h5l-5 6h5`,key:`ur5jdg`}]],aliases:[`arrow-down-az`]};Vr.node;var Hr=M(Vr),Ur={name:`arrow-up-a-z`,size:24,node:[[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}],[`path`,{d:`M20 8h-5`,key:`1vsyxs`}],[`path`,{d:`M15 10V6.5a2.5 2.5 0 0 1 5 0V10`,key:`ag13bf`}],[`path`,{d:`M15 14h5l-5 6h5`,key:`ur5jdg`}]],aliases:[`arrow-up-az`]};Ur.node;var Wr=M(Ur),Gr={name:`boxes`,size:24,node:[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]};Gr.node;var Kr=M(Gr),qr={name:`case-lower`,size:24,node:[[`path`,{d:`M10 9v7`,key:`ylp826`}],[`path`,{d:`M14 6v10`,key:`1jy4vg`}],[`circle`,{cx:`17.5`,cy:`12.5`,r:`3.5`,key:`1a9481`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`3.5`,key:`2jlv1r`}]]};qr.node;var Jr=M(qr),Yr={name:`case-sensitive`,size:24,node:[[`path`,{d:`m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16`,key:`d5nyq2`}],[`path`,{d:`M22 9v7`,key:`pvm9v3`}],[`path`,{d:`M3.304 13h6.392`,key:`1q3zxz`}],[`circle`,{cx:`18.5`,cy:`12.5`,r:`3.5`,key:`z97x68`}]]};Yr.node;var Xr=M(Yr),Zr={name:`case-upper`,size:24,node:[[`path`,{d:`M15 11h4.5a1 1 0 0 1 0 5h-4a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h3a1 1 0 0 1 0 5`,key:`nxs35`}],[`path`,{d:`m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16`,key:`d5nyq2`}],[`path`,{d:`M3.304 13h6.392`,key:`1q3zxz`}]]};Zr.node;var Qr=M(Zr),$r={name:`command`,size:24,node:[[`path`,{d:`M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3`,key:`11bfej`}]]};$r.node;var ei=M($r),ti={name:`eraser`,size:24,node:[[`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`}]]};ti.node;var ni=M(ti),ri={name:`file-archive`,size:24,node:[[`path`,{d:`M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5`,key:`4pqfef`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 12v-1`,key:`1ej8lb`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M8 7V6`,key:`1nbb54`}],[`circle`,{cx:`8`,cy:`20`,r:`2`,key:`ckkr5m`}]]};ri.node;var ii=M(ri),ai={name:`file-braces`,size:24,node:[[`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 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`1oajmo`}],[`path`,{d:`M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`mpwhp6`}]],aliases:[`file-json`]};ai.node;var oi=M(ai),si={name:`file-code-corner`,size:24,node:[[`path`,{d:`M4 12.15V4a2 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 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]],aliases:[`file-code-2`]};si.node;var ci=M(si),li={name:`file-image`,size:24,node:[[`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`}]]};li.node;var ui=M(li),di={name:`file-key`,size:24,node:[[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M4 12v6`,key:`bg1pfk`}],[`path`,{d:`M4 14h2`,key:`1sf9f8`}],[`path`,{d:`M9.65 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v4`,key:`d56i0q`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`file-key-2`]};di.node;var fi=M(di),pi={name:`file-plus`,size:24,node:[[`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:`M9 15h6`,key:`cctwl0`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}]]};pi.node;var mi=M(pi),hi={name:`file-type`,size:24,node:[[`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:`M11 18h2`,key:`12mj7e`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`M9 13v-.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v.5`,key:`qbrxap`}]]};hi.node;var gi=M(hi),_i={name:`fold-vertical`,size:24,node:[[`path`,{d:`M12 22v-6`,key:`6o8u61`}],[`path`,{d:`M12 8V2`,key:`1wkif3`}],[`path`,{d:`M4 12H2`,key:`rhcxmi`}],[`path`,{d:`M10 12H8`,key:`s88cx1`}],[`path`,{d:`M16 12h-2`,key:`10asgb`}],[`path`,{d:`M22 12h-2`,key:`14jgyd`}],[`path`,{d:`m15 19-3-3-3 3`,key:`e37ymu`}],[`path`,{d:`m15 5-3 3-3-3`,key:`19d6lf`}]]};_i.node;var vi=M(_i),yi={name:`folder-input`,size:24,node:[[`path`,{d:`M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1`,key:`fm4g5t`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m9 16 3-3-3-3`,key:`6m91ic`}]]};yi.node;var bi=M(yi),xi={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};xi.node;var Si=M(xi),Ci={name:`folder-plus`,size:24,node:[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};Ci.node;var wi=M(Ci),Ti={name:`git-branch`,size:24,node:[[`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`}]]};Ti.node;var Ei=M(Ti),Di={name:`git-merge`,size:24,node:[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M6 21V9a9 9 0 0 0 9 9`,key:`7kw0sc`}]]};Di.node;var Oi=M(Di),ki={name:`image`,size:24,node:[[`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`}]]};ki.node;var Ai=M(ki),ji={name:`lightbulb`,size:24,node:[[`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`}]]};ji.node;var Mi=M(ji),Ni={name:`list-ordered`,size:24,node:[[`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`}]]};Ni.node;var Pi=M(Ni),Fi={name:`list-tree`,size:24,node:[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]};Fi.node;var Ii=M(Fi),Li={name:`message-square-text`,size:24,node:[[`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:`M7 11h10`,key:`1twpyw`}],[`path`,{d:`M7 15h6`,key:`d9of3u`}],[`path`,{d:`M7 7h8`,key:`af5zfr`}]]};Li.node;var Ri=M(Li),zi={name:`message-square`,size:24,node:[[`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`}]]};zi.node;var Bi=M(zi),Vi={name:`mouse-pointer-click`,size:24,node:[[`path`,{d:`M14 4.1 12 6`,key:`ita8i4`}],[`path`,{d:`m5.1 8-2.9-.8`,key:`1go3kf`}],[`path`,{d:`m6 12-1.9 2`,key:`mnht97`}],[`path`,{d:`M7.2 2.2 8 5.1`,key:`1cfko1`}],[`path`,{d:`M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z`,key:`s0h3yz`}]]};Vi.node;var Hi=M(Vi),Ui={name:`package-open`,size:24,node:[[`path`,{d:`M12 22v-9`,key:`x3hkom`}],[`path`,{d:`M15.17 2.21a1.67 1.67 0 0 1 1.63 0L21 4.57a1.93 1.93 0 0 1 0 3.36L8.82 14.79a1.655 1.655 0 0 1-1.64 0L3 12.43a1.93 1.93 0 0 1 0-3.36z`,key:`2ntwy6`}],[`path`,{d:`M20 13v3.87a2.06 2.06 0 0 1-1.11 1.83l-6 3.08a1.93 1.93 0 0 1-1.78 0l-6-3.08A2.06 2.06 0 0 1 4 16.87V13`,key:`1pmm1c`}],[`path`,{d:`M21 12.43a1.93 1.93 0 0 0 0-3.36L8.83 2.2a1.64 1.64 0 0 0-1.63 0L3 4.57a1.93 1.93 0 0 0 0 3.36l12.18 6.86a1.636 1.636 0 0 0 1.63 0z`,key:`12ttoo`}]]};Ui.node;var Wi=M(Ui),Gi={name:`panel-right-close`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]};Gi.node;var Ki=M(Gi),qi={name:`panel-right-open`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m10 15-3-3 3-3`,key:`1pgupc`}]]};qi.node;var Ji=M(qi),Yi={name:`panel-top`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]};Yi.node;var Xi=M(Yi),Zi={name:`replace`,size:24,node:[[`path`,{d:`M14 4a1 1 0 0 1 1-1`,key:`dhj8ez`}],[`path`,{d:`M15 10a1 1 0 0 1-1-1`,key:`1mnyi5`}],[`path`,{d:`M21 4a1 1 0 0 0-1-1`,key:`sfs9ap`}],[`path`,{d:`M21 9a1 1 0 0 1-1 1`,key:`mp6qeo`}],[`path`,{d:`m3 7 3 3 3-3`,key:`x25e72`}],[`path`,{d:`M6 10V5a2 2 0 0 1 2-2h2`,key:`15xut4`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}]]};Zi.node;var Qi=M(Zi),$i={name:`rotate-ccw-clock`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]],aliases:[`history`]};$i.node;var ea=M($i),ta={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};ta.node;var na=M(ta),ra={name:`text-cursor-input`,size:24,node:[[`path`,{d:`M12 20h-1a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6`,key:`1528k5`}],[`path`,{d:`M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7`,key:`13ksps`}],[`path`,{d:`M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1`,key:`1n9rhb`}],[`path`,{d:`M6 4h1a2 2 0 0 1 2 2 2 2 0 0 1 2-2h1`,key:`1mj8rg`}],[`path`,{d:`M9 6v12`,key:`velyjx`}]]};ra.node;var ia=M(ra),aa={name:`undo-2`,size:24,node:[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]};aa.node;var oa=M(aa),sa={name:`unfold-vertical`,size:24,node:[[`path`,{d:`M12 22v-6`,key:`6o8u61`}],[`path`,{d:`M12 8V2`,key:`1wkif3`}],[`path`,{d:`M4 12H2`,key:`rhcxmi`}],[`path`,{d:`M10 12H8`,key:`s88cx1`}],[`path`,{d:`M16 12h-2`,key:`10asgb`}],[`path`,{d:`M22 12h-2`,key:`14jgyd`}],[`path`,{d:`m15 19-3 3-3-3`,key:`11eu04`}],[`path`,{d:`m15 5-3-3-3 3`,key:`itvq4r`}]]};sa.node;var ca=M(sa),B=e(_(),1);function la(e,t=!1){let[n,r]=Bn(e,t),i=(0,B.useCallback)(e=>{e?.preventDefault?.(),r(e=>!e)},[r]),a=(0,B.useCallback)(e=>{e?.preventDefault?.(),r(!0)},[r]),o=(0,B.useCallback)(e=>{e?.preventDefault?.(),r(!1)},[r]);return(0,B.useMemo)(()=>({toggled:n,setToggled:r,toggle:i,toggleOn:a,toggleOff:o}),[i,r,o,a,n])}var ua=[`status-check-fabric`,`akamai-status`].map(e=>RegExp(`(?:^|[/@])${e}(?:\\.git)?(?:[#?@]|/?$)`,`i`));function da(e){return e?ua.some(t=>t.test(e)):!1}function fa(e){return e?da(e.package)||e.path===`importedApplications`||e.path===`newApplication`:!1}function pa(e,t){let n=t.split(`/`)[0],r=e.find(e=>e.name===n);return!r||fa(r)}var ma=(0,B.createContext)(null);function V(){return(0,B.useContext)(ma)}var H=v();function ha(){let{reloadRootEntries:e,setFocusedItem:t,setSelectedItems:n}=V(),r=dt(),i=D();return(0,B.useCallback)(async a=>{let o=!1,s=a.filter(e=>e.from!==e.to);if(s.length===0)return!0;let c=`Renaming ${h(s.length,`File`,`Files`)}`,l={duration:6e4,action:{label:`Cancel`,onClick:()=>{o=!0}}};l.id=j.loading(c,{...l,description:(0,H.jsx)(Ae,{animated:!0,width:`0%`})});let u=s.length*3,d=0;function f(){d+=1,j.loading(c,{...l,description:(0,H.jsx)(Ae,{animated:!0,width:(d===0?0:d/u*100)+`%`})})}try{for(let e of s){let t=e.from.split(`/`),n=t.shift(),a=t.join(`/`),s=e.to.split(`/`),c=s.shift(),l=s.join(`/`),u=await Nt({...r,file:a,project:n,encoding:`base64`});if(o||(f(),await pe({...r,file:l,project:c,encoding:`base64`,payload:u.message}),me(i,r.entityId,e.to),o))break;f(),ae(r.entityId,e.from,e.to);let d=oe(r.entityId,e.to),p=I(d);try{await re({...r,file:a,project:n})}catch(t){throw!ye(t)&&I(d)===p&&de(r.entityId,e.to),t}if(I(d)===p?ie(i,r.entityId,e.from,e.to):ce(i,r.entityId,e.from),o)break;f()}}catch(t){let{title:n,description:r}=ye(t)?xn(t):{title:`Rename Failed`,description:t instanceof Error?t.message:`An unexpected error occurred while renaming.`};return j.error(n,{id:l.id,description:r,duration:1e4,action:{label:`OK`,onClick:()=>void 0}}),e(),!1}return d>=u?j.success(`Renamed ${h(s.length,`File`,`Files`)}`,{id:l.id,description:`All done!`,duration:3e3,action:{label:`OK`,onClick:()=>{}}}):j.warning(`Rename Cancelled`,{id:l.id,description:`${d} of ${u} steps completed.`,duration:1e4,action:{label:`OK`,onClick:()=>{}}}),e(),n(e=>{let t=e.slice();for(let e of s){let n=t.indexOf(e.from);n>=0?t.splice(n,1,e.to):t.push(e.to)}return t}),t(e=>{for(let t of s)if(e===t.from)return t.to;return e}),d>=u},[r,i,e,t,n])}var ga;function _a(e){ga=e}function va(e){return e.files.length>0||e.directories.length>0?ga?new Promise(t=>ga(e,t)):Promise.resolve(!1):Promise.resolve(!0)}function ya(e,t){return e[t]!==void 0}function ba(e){return t=>ya(t,e)}var xa={handleGlobal(e,t){if((t.cmd||t.ctrl)&&e===`Delete`)return R(`ShowDeleteDirectoryOrFileModal`,!0),!0},addEditorAction(e){return{id:`delete-file`,label:`Delete File`,keybindings:[e.KeyMod.CtrlCmd|e.KeyCode.Delete],run:Ie(`ShowDeleteDirectoryOrFileModal`,!0)}}},Sa={handleGlobal(e,t){if(t.ctrl&&t.alt&&t.shift&&e===`˜`)return R(`ShowAddDirectoryOrFileModalType`,`directory`),!0},addEditorAction(e){return{id:`new-directory`,label:`New Directory`,keybindings:[e.KeyMod.WinCtrl|e.KeyMod.Alt|e.KeyMod.Shift|e.KeyCode.KeyN],run:Ie(`ShowAddDirectoryOrFileModalType`,`directory`)}}},Ca={handleGlobal(e,t){if(t.ctrl&&e===`n`)return R(`ShowAddDirectoryOrFileModalType`,`file`),!0},addEditorAction(e){return{id:`new-file`,label:`New File`,keybindings:[e.KeyMod.WinCtrl|e.KeyCode.KeyN],run:Ie(`ShowAddDirectoryOrFileModalType`,`file`)}}},wa;function Ta(e){wa=e}function Ea(){wa?.()}var Da=[xa,Sa,Ca,{handleGlobal(e){if(e===`F2`)return R(`ShowRenameFileModal`,`file`),!0},addEditorAction(e){return{id:`rename-file`,label:`Rename File`,keybindings:[e.KeyMod.WinCtrl|e.KeyMod.Alt|e.KeyCode.KeyR,e.KeyCode.F2],run:Ie(`ShowRenameFileModal`,!0)}}},{addEditorAction(){return{id:`revert-file`,label:`Revert File`,run:Mn(`RevertChanges`,!0)}}},{handleGlobal(e,t){if(t.cmd&&e===`s`)return ct(`SaveFile`,!0),!0},addEditorAction(e){return{id:`save-file`,label:`Save Changes`,keybindings:[e.KeyMod.CtrlCmd|e.KeyCode.KeyS],run:Mn(`SaveFile`,!0)}}}],Oa=Da.filter(ba(`addEditorAction`)),ka=Da.filter(ba(`handleGlobal`));function Aa(e){let[t,n]=e,r=Oa.map(e=>t.addAction(e.addEditorAction(n)));return()=>{for(let e of r)e?.dispose()}}function ja(){(0,B.useEffect)(()=>(document.addEventListener(`keydown`,Ma),()=>{document.removeEventListener(`keydown`,Ma)}),[])}function Ma(e){let t={cmd:e.getModifierState(`Meta`),alt:e.getModifierState(`Alt`),shift:e.getModifierState(`Shift`),ctrl:e.getModifierState(`Control`)};for(let n of ka)if(n.handleGlobal(e.key,t)){Ea(),e.preventDefault();return}}function Na(e){return e.split(`/`).pop()}function Pa(){let[e,t]=(0,B.useState)(!1),[n,r]=(0,B.useState)(void 0),i=(0,B.useCallback)(e=>{if(!e.dataTransfer?.types?.includes(`Files`))return;let n=e.target instanceof Element?e.target:null,i=n?.closest(`.rct-tree-item-button-isFolder`)??n?.closest(`.rct-tree-item-title-container`)?.querySelector(`:scope > .rct-tree-item-button-isFolder`)??null;if(i){let e=i.getAttribute(`data-rct-item-id`);!i.querySelector(`.packageIsLocked`)&&e&&e!==`importedApplications`&&e!==`newApplication`&&r(e=>e===i?e:(e?.classList?.remove?.(`rct-tree-item-title-container-dragging-over`),i.classList.add(`rct-tree-item-title-container-dragging-over`),i))}t(!0)},[]),a=(0,B.useCallback)(()=>{t(!1),r(e=>{e&&e.classList.remove(`rct-tree-item-title-container-dragging-over`)})},[]),o=(0,B.useCallback)(e=>{if(!e.dataTransfer?.types?.includes(`Files`)||e.detail===1337)return;t(!1),n&&(n.classList.remove(`rct-tree-item-title-container-dragging-over`),r(void 0));let i=document.getElementById(`dropTarget`);return i?i.dispatchEvent(new DragEvent(`drop`,{bubbles:!0,detail:1337,cancelable:!0,dataTransfer:e.dataTransfer})):!1},[n]);return(0,B.useEffect)(()=>(document.addEventListener(`dragenter`,i),document.addEventListener(`dragover`,i),document.addEventListener(`dragleave`,a),document.addEventListener(`drop`,o),()=>{document.removeEventListener(`dragenter`,i),document.removeEventListener(`dragover`,i),document.removeEventListener(`dragleave`,a),document.removeEventListener(`drop`,o)}),[i,o,a]),(0,B.useMemo)(()=>({dragging:e,dragTarget:n}),[e,n])}function Fa(e){return new Promise((t,n)=>{let r=new FileReader;r.onabort=n,r.onerror=n,r.onload=t,r.readAsDataURL(e)})}var Ia=new Map([[`avif`,`image/avif`],[`bmp`,`image/bmp`],[`css`,`text/css`],[`csv`,`text/csv`],[`doc`,`application/msword`],[`docx`,`application/vnd.openxmlformats-officedocument.wordprocessingml.document`],[`gif`,`image/gif`],[`gz`,`application/gzip`],[`htm`,`text/html`],[`html`,`text/html`],[`ico`,`image/x-icon`],[`jpeg`,`image/jpeg`],[`jpg`,`image/jpeg`],[`js`,`application/javascript`],[`json`,`application/json`],[`md`,`text/markdown`],[`mjs`,`application/javascript`],[`mp3`,`audio/mpeg`],[`mp4`,`video/mp4`],[`ogg`,`audio/ogg`],[`pdf`,`application/pdf`],[`png`,`image/png`],[`ppt`,`application/powerpoint`],[`pptx`,`application/vnd.openxmlformats-officedocument.presentationml.presentation`],[`svg`,`image/svg+xml`],[`tif`,`image/tiff`],[`tiff`,`image/tiff`],[`txt`,`text/plain`],[`wasm`,`application/wasm`],[`wav`,`audio/x-wav`],[`weba`,`audio/webm`],[`webm`,`video/webm`],[`webp`,`image/webp`],[`xls`,`application/vnd.ms-excel`],[`xlsx`,`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`],[`xml`,`application/xml`],[`zip`,`application/zip`]]),La=class extends Error{constructor(e){super(`DataTransferItem is not a file`),this.item=e,this.name=`UnexpectedObjectError`}};function Ra(e,t,n){let r=e,{webkitRelativePath:i}=e,a=typeof t==`string`?t:typeof i==`string`&&i.length>0?i:`./${e.name}`;return typeof r.path!=`string`&&Ba(r,`path`,a),n!==void 0&&Object.defineProperty(r,"handle",{value:n,writable:!1,configurable:!1,enumerable:!0}),Ba(r,`relativePath`,a),r}function za(e,t=Ia){let{name:n}=e;if(n&&n.lastIndexOf(`.`)!==-1&&!e.type){let r=n.split(`.`).pop().toLowerCase(),i=t.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function Ba(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}var Va=[`.DS_Store`,`Thumbs.db`];async function Ha(e,{mimeTypes:t=Ia}={}){return(await Ua(e)).map(e=>e instanceof File?za(e,t):e)}async function Ua(e){return qa(e)&&Wa(e.dataTransfer)?Xa(e.dataTransfer,e.type):Ga(e)?Za(e.clipboardData):Ka(e)?Ja(e):Array.isArray(e)&&e.every(e=>`getFile`in e&&typeof e.getFile==`function`)?Ya(e):[]}function Wa(e){return qa(e)}function Ga(e){return qa(e)&&Wa(e.clipboardData)}function Ka(e){return qa(e)&&qa(e.target)}function qa(e){return typeof e==`object`&&!!e}function Ja(e){return $a(e.target.files).map(e=>Ra(e))}async function Ya(e){return(await Promise.all(e.map(e=>e.getFile()))).map(e=>Ra(e))}async function Xa(e,t){let n=$a(e.items).filter(e=>e.kind===`file`);return t===`drop`?Qa(to(await Promise.all(n.map(eo)))):n}function Za(e){let t=$a(e.items).filter(e=>e.kind===`file`).map(e=>e.getAsFile()).filter(e=>e!==null);return Qa((t.length>0?t:$a(e.files)).map(e=>Ra(e)))}function Qa(e){return e.filter(e=>Va.indexOf(e.name)===-1)}function $a(e){return e===null?[]:Array.from(e)}async function eo(e){if(typeof e.webkitGetAsEntry!=`function`)return no(e);let t=e.webkitGetAsEntry();if(t?.isDirectory){let n=await ro(e);return n?.kind===`directory`?io(n,`/${n.name}`):oo(t)}return no(e,t)}function to(e){let t=[];for(let n of e)Array.isArray(n)?t.push(...to(n)):t.push(n);return t}async function no(e,t){let n=e.getAsFile(),r=await ro(e);if(r!=null){let e=n??await r.getFile();return e.handle=r,Ra(e)}if(!n)throw new La(e);return Ra(n,t?.fullPath??void 0)}async function ro(e){if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle==`function`)return e.getAsFileSystemHandle()}async function io(e,t){let n=[];for await(let r of e.values()){let e=`${t}/${r.name}`;if(r.kind===`directory`)n.push(...await io(r,e));else{let t=await r.getFile();n.push(Ra(t,e,r))}}return n}async function ao(e){return e.isDirectory?oo(e):so(e)}function oo(e){let t=e.createReader();return new Promise((e,n)=>{let r=[];function i(){t.readEntries(async t=>{if(t.length){let e=Promise.all(t.map(ao));r.push(e),i()}else try{e(await Promise.all(r))}catch(e){n(e)}},e=>{n(e)})}i()})}async function so(e){return new Promise((t,n)=>{e.file(n=>{t(Ra(n,e.fullPath))},e=>{n(e)})})}function co(e,t){if(e&&t){let n=Array.isArray(t)?t:t.split(`,`);if(n.length===0)return!0;let r=e.name||``,i=(e.type||``).toLowerCase(),a=i.replace(/\/.*$/,``);return n.some(e=>{let t=e.trim().toLowerCase();return t.charAt(0)===`.`?r.toLowerCase().endsWith(t):t.endsWith(`/*`)?a===t.replace(/\/.*$/,``):i===t})}return!0}var lo=typeof co==`function`?co:co.default,uo=`file-invalid-type`,fo=`file-too-large`,po=`file-too-small`,mo=`too-many-files`;function ho(e=``){let t=e.split(`,`);return{code:uo,message:`File type must be ${t.length>1?`one of ${t.join(`, `)}`:t[0]}`}}var go=[`KB`,`MB`,`GB`,`TB`,`PB`];function _o(e){if(e<1024)return`${e} ${e===1?`byte`:`bytes`}`;let t=e/1024,n=0;for(;t>=1024&&n<go.length-1;)t/=1024,n++;return`${Number(t.toFixed(2))} ${go[n]}`}function vo(e){return{code:fo,message:`File is larger than ${_o(e)}`}}function yo(e){return{code:po,message:`File is smaller than ${_o(e)}`}}var bo={code:mo,message:`Too many files`};function xo(e){return e.type===``&&typeof e.getAsFile==`function`}function So(e,t){let n=e.type===`application/x-moz-file`||lo(e,t??``)||xo(e);return[n,n?null:ho(t)]}function Co(e,t,n){if(wo(e.size)){if(wo(t)&&wo(n)){if(e.size>n)return[!1,vo(n)];if(e.size<t)return[!1,yo(t)]}else if(wo(t)&&e.size<t)return[!1,yo(t)];else if(wo(n)&&e.size>n)return[!1,vo(n)]}return[!0,null]}function wo(e){return e!=null}function To(e){return e!=null&&typeof e.then==`function`}function Eo({files:e,accept:t,minSize:n,maxSize:r,multiple:i,maxFiles:a=0,validator:o,getErrorMessage:s}){let c=[],l=[],u=(e,t)=>s&&typeof File<`u`&&t instanceof File?{...e,message:s(e,t)}:e;e.forEach(e=>{let[i,a]=So(e,t),[o,s]=Co(e,n,r);i&&o?c.push(e):l.push({file:e,errors:[a,s].filter(e=>e!=null).map(t=>u(t,e))})});let d=i?a>=1?a:1/0:1;return c.length>d&&c.slice(d).forEach(e=>{l.push({file:e,errors:[u(bo,e)]})}),l.length>0?{verdict:`reject`,rejections:l}:{verdict:o?`unknown`:`accept`,rejections:l}}function Do(e){return typeof e.isPropagationStopped==`function`?e.isPropagationStopped():e.cancelBubble!==void 0&&e.cancelBubble}function Oo(e){let t=e.dataTransfer??e.clipboardData;return t?Array.prototype.some.call(t.types,e=>e===`Files`||e===`application/x-moz-file`)||Array.prototype.some.call(t.items??[],ko):!!e.target&&!!e.target.files}function ko(e){return typeof e==`object`&&!!e&&e.kind===`file`}function Ao(e){e.preventDefault()}function jo(e){return e.indexOf(`MSIE`)!==-1||e.indexOf(`Trident/`)!==-1}function Mo(e){return e.indexOf(`Edge/`)!==-1}function No(e=window.navigator.userAgent){return jo(e)||Mo(e)}function Po(...e){return(t,...n)=>e.some(e=>(!Do(t)&&e&&e(t,...n),Do(t)))}function Fo(){return`showOpenFilePicker`in window}function Io(e){return Array.isArray(e)?e:typeof e==`string`?[e]:[]}function Lo(e){if(wo(e))return Array.isArray(e)?e.filter(e=>wo(e)&&wo(e.accept)):[{accept:e}]}function Ro(e){let t=[],n=Object.keys(e);for(let n of Object.values(e))for(let e of Io(n))t.includes(e)||t.push(e);return t.length>0?t.join(`, `):n.length>0?n.join(`, `):`Files`}function zo(e){let t=Lo(e);if(!wo(t))return;let n={};for(let e of t)for(let[t,r]of Object.entries(e.accept)){let e=n[t]??(n[t]=[]);for(let t of Io(r))e.includes(t)||e.push(t)}return n}function Bo(e){let t=Lo(e);if(!wo(t))return;let n=t.map(e=>{let t=Object.entries(e.accept).filter(([e,t])=>{let n=!0;return Go(e)||(console.warn(`Skipped "${e}" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.`),n=!1),(!(Array.isArray(t)||typeof t==`string`)||!Io(t).every(qo))&&(console.warn(`Skipped "${e}" because an invalid file extension was provided.`),n=!1),n}).reduce((e,[t,n])=>(e[t]=Io(n),e),{});return{description:wo(e.description)&&e.description!==``?e.description:Ro(t),accept:t}}).filter(e=>Object.keys(e.accept).length>0);return n.length>0?n:void 0}function Vo(e,{omitWildcardMimeTypesWithExtensions:t=!1}={}){if(wo(e))return Object.entries(e).reduce((e,[n,r])=>{let i=Io(r);return t&&Ko(n)&&i.some(qo)?e.push(...i):e.push(n,...i),e},[]).filter(e=>Go(e)||qo(e)).join(`,`)}function Ho(e){return e instanceof DOMException&&(e.name===`AbortError`||e.code===e.ABORT_ERR)}function Uo(e){return e instanceof DOMException&&(e.name===`SecurityError`||e.code===e.SECURITY_ERR)}function Wo(e){return e instanceof DOMException&&e.name===`NotAllowedError`}function Go(e){return e===`audio/*`||e===`video/*`||e===`image/*`||e===`text/*`||e===`application/*`||/\w+\/[-+.\w]+/g.test(e)}function Ko(e){return e.endsWith(`/*`)}function qo(e){return/^.*\.[\w]+$/.test(e)}var Jo=(0,B.forwardRef)(({children:e,...t},n)=>{let{open:r,...i}=Xo(t);return(0,B.useImperativeHandle)(n,()=>({open:r}),[r]),(0,H.jsx)(H.Fragment,{children:e?.({...i,open:r})})});Jo.displayName=`Dropzone`;var Yo={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragUnknown:!1,isDragGlobal:!1,isProcessing:!1,acceptedFiles:[],fileRejections:[],dragFileRejections:[]};function Xo(e={}){let{accept:t,disabled:n=!1,getFilesFromEvent:r=Ha,maxSize:i=1/0,minSize:a=0,multiple:o=!0,maxFiles:s=0,onDragEnter:c,onDragLeave:l,onDragOver:u,onDrop:d,onDropAccepted:f,onDropRejected:p,onFileDialogCancel:m,onFileDialogOpen:h,useFsAccessApi:g=!1,autoFocus:_=!1,preventDropOnDocument:v=!0,noClick:y=!1,noKeyboard:b=!1,noDrag:x=!1,noDragEventsBubbling:S=!1,noPaste:C=!1,onError:w,validator:T,getErrorMessage:E}=e,D=(0,B.useMemo)(()=>zo(t),[t]),O=(0,B.useMemo)(()=>Vo(D),[D]),k=(0,B.useMemo)(()=>Vo(D,{omitWildcardMimeTypesWithExtensions:!0}),[D]),ee=(0,B.useMemo)(()=>Bo(t),[t]),A=(0,B.useMemo)(()=>typeof h==`function`?h:Qo,[h]),j=(0,B.useMemo)(()=>typeof m==`function`?m:Qo,[m]),M=(0,B.useRef)(null),N=(0,B.useRef)(null),[te,P]=(0,B.useReducer)(Zo,Yo),{isFocused:F,isFileDialogActive:ne}=te,re=(0,B.useRef)(ne);re.current=ne;let ie=(0,B.useRef)(null),ae=(0,B.useCallback)(()=>{ie.current?.abort();let e=new AbortController;return ie.current=e,P({type:`setProcessing`,isProcessing:!0}),e.signal},[]),I=(0,B.useCallback)(e=>{e.aborted||P({type:`setProcessing`,isProcessing:!1})},[]),oe=(0,B.useRef)(typeof window<`u`&&window.isSecureContext&&g&&Fo()),se=()=>{!oe.current&&ne&&setTimeout(()=>{if(N.current){let{files:e}=N.current;e?.length||(P({type:`closeDialog`}),j())}},300)};(0,B.useEffect)(()=>(window.addEventListener(`focus`,se,!1),()=>{window.removeEventListener(`focus`,se,!1)}),[N,ne,j,oe]);let ce=(0,B.useRef)([]),le=(0,B.useRef)([]),ue=e=>{M.current&&e.target&&M.current.contains(e.target)&&e.defaultPrevented||(e.preventDefault(),ce.current=[])};(0,B.useEffect)(()=>(v&&(document.addEventListener(`dragover`,Ao,!1),document.addEventListener(`drop`,ue,!1)),()=>{v&&(document.removeEventListener(`dragover`,Ao),document.removeEventListener(`drop`,ue))}),[M,v]),(0,B.useEffect)(()=>{let e=e=>{e.target&&(le.current=[...le.current,e.target]),Oo(e)&&P({isDragGlobal:!0,type:`setDragGlobal`})},t=e=>{le.current=le.current.filter(t=>t!==e.target&&t!==null),!(le.current.length>0)&&P({isDragGlobal:!1,type:`setDragGlobal`})},n=()=>{le.current=[],P({isDragGlobal:!1,type:`setDragGlobal`})},r=()=>{le.current=[],P({isDragGlobal:!1,type:`setDragGlobal`})};return document.addEventListener(`dragenter`,e,!1),document.addEventListener(`dragleave`,t,!1),document.addEventListener(`dragend`,n,!1),document.addEventListener(`drop`,r,!1),()=>{document.removeEventListener(`dragenter`,e),document.removeEventListener(`dragleave`,t),document.removeEventListener(`dragend`,n),document.removeEventListener(`drop`,r)}},[M]),(0,B.useEffect)(()=>(!n&&_&&M.current&&M.current.focus(),()=>{}),[M,_,n]);let L=(0,B.useCallback)(e=>{w?w(e):console.error(e)},[w]),de=(0,B.useCallback)(e=>{e.preventDefault(),e.persist?.(),Ee(e),!re.current&&(ce.current=[...ce.current,e.target],Oo(e)&&Promise.resolve(r(e)).then(t=>{if(Do(e)&&!S)return;let n=t.length>0?Eo({files:t,accept:O,minSize:a,maxSize:i,multiple:o,maxFiles:s,validator:T,getErrorMessage:E}):null;P({isDragAccept:n?.verdict===`accept`,isDragReject:n?.verdict===`reject`,isDragUnknown:n?.verdict===`unknown`,isDragActive:!0,dragFileRejections:n?.rejections??[],type:`setDraggedFiles`}),c&&c(e)}).catch(e=>L(e)))},[r,c,L,S,O,a,i,o,s,T,E]),fe=(0,B.useCallback)(e=>{if(e.preventDefault(),e.persist?.(),Ee(e),re.current)return!1;let t=Oo(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect=`copy`}catch{}return t&&u&&u(e),!1},[u,S]),pe=(0,B.useCallback)(e=>{e.preventDefault(),e.persist?.(),Ee(e);let t=ce.current.filter(e=>M.current?.contains(e)),n=t.indexOf(e.target);n!==-1&&t.splice(n,1),ce.current=t,!(t.length>0)&&(P({type:`setDraggedFiles`,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragUnknown:!1,dragFileRejections:[]}),Oo(e)&&l&&l(e))},[M,l,S]),me=(0,B.useCallback)(async(e,t,n)=>{let r=(e,t)=>E?{...e,message:E(e,t)}:e,c=e=>{let n=[],i=[];e.forEach(({file:e,accepted:t,acceptError:a,sizeMatch:o,sizeError:s,customErrors:c})=>{let l=!c||Array.isArray(c)&&c.length===0;if(t&&o&&l)n.push(e);else{let t=[a,s];c&&(t=t.concat(c)),i.push({file:e,errors:t.filter(e=>e!=null).map(t=>r(t,e))})}});let a=o?s>=1?s:1/0:1;n.length>a&&n.splice(a).forEach(e=>{i.push({file:e,errors:[r(bo,e)]})}),P({acceptedFiles:n,fileRejections:i,type:`setFiles`}),d&&d(n,i,t),i.length>0&&p&&p(i,t),n.length>0&&f&&f(n,t)},l=e.map(e=>{let[t,n]=So(e,k),[r,o]=Co(e,a,i);return{file:e,accepted:t,acceptError:n,sizeMatch:r,sizeError:o,customErrors:T?T(e):null}});if(!l.some(({customErrors:e})=>To(e))){c(l);return}let u;try{u=await Promise.all(l.map(async({customErrors:e,...t})=>({...t,customErrors:await e})))}catch(e){n.aborted||(I(n),L(e));return}n.aborted||c(u)},[P,o,k,a,i,s,d,f,p,T,E,L,I]),he=(0,B.useCallback)(e=>{if(e.preventDefault(),e.persist?.(),Ee(e),ce.current=[],!(re.current&&e.dataTransfer)&&(P({type:`reset`}),Oo(e))){let t=ae();Promise.resolve(r(e)).then(n=>{if(!t.aborted){if(Do(e)&&!S){I(t);return}return me(n,e,t)}}).catch(e=>{t.aborted||(I(t),L(e))})}},[r,me,L,S,ae,I]),ge=(0,B.useCallback)(e=>{if(!Oo(e))return;e.preventDefault(),e.persist?.(),Ee(e);let t=ae();Promise.resolve(r(e)).then(n=>{if(!t.aborted){if(Do(e)&&!S){I(t);return}return me(n,e,t)}}).catch(e=>{t.aborted||(I(t),L(e))})},[r,me,L,S,ae,I]),_e=(0,B.useCallback)(()=>{if(oe.current){P({type:`openDialog`}),A();let e={multiple:o,types:ee},t;window.showOpenFilePicker(e).then(e=>(t=ae(),r(e))).then(e=>{if(P({type:`closeDialog`}),!t.aborted)return me(e,null,t)}).catch(e=>{t&&I(t),Ho(e)?(j(e),P({type:`closeDialog`})):Uo(e)||Wo(e)?(oe.current=!1,N.current?(N.current.value=``,N.current.click()):L(Error(`Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided.`))):L(e)});return}N.current&&(P({type:`openDialog`}),A(),N.current.value=``,N.current.click())},[P,A,j,g,me,L,ee,o,ae,I]),ve=(0,B.useCallback)(e=>{M.current?.isEqualNode(e.target)&&(e.key===` `||e.key===`Enter`||e.keyCode===32||e.keyCode===13)&&(e.preventDefault(),_e())},[M,_e]),ye=(0,B.useCallback)(()=>{P({type:`focus`})},[]),be=(0,B.useCallback)(()=>{P({type:`blur`})},[]),xe=(0,B.useCallback)(()=>{y||(No()?setTimeout(_e,0):_e())},[y,_e]),Se=e=>n?null:e,Ce=e=>b?null:Se(e),we=e=>x?null:Se(e),Te=e=>C?null:Se(e),Ee=e=>{S&&e.stopPropagation()},De=(0,B.useMemo)(()=>({refKey:e=`ref`,role:t,onKeyDown:r,onFocus:i,onBlur:a,onClick:o,onDragEnter:s,onDragOver:c,onDragLeave:l,onDrop:u,onPaste:d,...f}={})=>({onKeyDown:Ce(Po(r,ve)),onFocus:Ce(Po(i,ye)),onBlur:Ce(Po(a,be)),onClick:Se(Po(o,xe)),onDragEnter:we(Po(s,de)),onDragOver:we(Po(c,fe)),onDragLeave:we(Po(l,pe)),onDrop:we(Po(u,he)),onPaste:Te(Po(d,ge)),role:typeof t==`string`&&t!==``?t:`presentation`,[e]:M,...!n&&!b?{tabIndex:0}:{},...n?{"aria-disabled":!0}:{},...f}),[M,ve,ye,be,xe,de,fe,pe,he,ge,b,x,C,n]),Oe=(0,B.useCallback)(e=>{e.stopPropagation()},[]),ke=(0,B.useMemo)(()=>({refKey:e=`ref`,onChange:t,onClick:n,...r}={})=>({accept:k,multiple:o,type:`file`,"aria-label":`file upload`,style:{border:0,display:`block`,height:0,margin:0,opacity:0,overflow:`hidden`,padding:0,width:0},onChange:Se(Po(t,he)),onClick:Se(Po(n,Oe)),tabIndex:-1,[e]:N,...r}),[N,t,o,he,n]);return{...te,isFocused:F&&!n,getRootProps:De,getInputProps:ke,rootRef:M,inputRef:N,open:Se(_e)}}function Zo(e,t){switch(t.type){case`focus`:return{...e,isFocused:!0};case`blur`:return{...e,isFocused:!1};case`openDialog`:return{...Yo,isFileDialogActive:!0};case`closeDialog`:return{...e,isFileDialogActive:!1};case`setDraggedFiles`:return{...e,isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject,isDragUnknown:t.isDragUnknown,dragFileRejections:t.dragFileRejections};case`setProcessing`:return{...e,isProcessing:t.isProcessing};case`setFiles`:return{...e,acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,dragFileRejections:[],isProcessing:!1,isDragReject:!1,isDragUnknown:!1};case`setDragGlobal`:return{...e,isDragGlobal:t.isDragGlobal};case`reset`:return{...Yo};default:return e}}function Qo(){}function $o(){let[e,t]=(0,B.useState)(``),{clusterId:n}=w({strict:!1}),{openedEntry:o,restrictPackageModification:c,reloadRootEntries:l,entryExists:u}=V(),d=!!o&&!o.package&&!c,f=dt(),p=D(),{dragging:m,dragTarget:g}=Pa(),_=(g?.getAttribute?.(`data-rct-item-id`))?.split?.(`/`)?.pop?.(),v=o?.project,y=!1,b;if(o?.path){let e=o.path.split(`/`),t=z(o);y=d&&(t?e.slice(1):e.slice(1,-1)).join(`/`),b=e[e.length-(t?1:2)]}let x=(0,B.useCallback)(async(e,n)=>{let r=e,i=g?.getAttribute?.(`data-rct-item-id`)?.split?.(`/`),a=i?.length?i[0]:d?v:!1,o=i?.length?i.slice(1).join(`/`):d?y:!1;if(a===!1||a===void 0||o===!1||o===void 0)return;let s=[],c=n.slice(),m=[];for(let e of r){let t=es(o,e);e.name.startsWith(`.`)||e.relativePath?.includes(`/.`)?c.push({file:e,errors:[{message:`Sensitive files and folders starting with . are skipped.`,code:`dot-ignored`}]}):u(`${a}/${t}`)?m.push({file:e,path:`${a}/${t}`}):s.push(e)}if(m.length>0){let e=await va({files:m.map(e=>e.path),directories:[]});for(let t of m)e?s.push(t.file):c.push({file:t.file,errors:[{message:`${es(o,t.file)} already exists`,code:`duplicate`}]})}let _=!1,b=`uploading-files`,x={label:`Cancel`,onClick:()=>{_=!0}},S={label:`OK`,onClick:()=>void 0};t(`Uploading ${h(s.length,`file`,`files`)}...`);try{let e=s.reduce((e,t)=>e+t.size,0),t=0,n=0;for(let r of s){n+=1,j.loading(`Upload in progress...`,{id:b,descriptionClassName:`whitespace-pre-line`,description:`${n} of ${h(s.length,`file`,`files`)}
|
|
3
|
+
${r.name}
|
|
4
|
+
${Nn(t)} of ${Nn(e)}`,action:x});let i=es(o,r),l=(await Fa(r)).target?.result;if(!l)throw Error(`Failed to read file: ${r.name}`);let u=l.indexOf(`base64,`);if(u===-1)throw Error(`Invalid data URL format for file: ${r.name}`);_?c.push({file:r,errors:[{message:`${i} cancelled`,code:`cancelled`}]}):(await pe({...f,file:i,project:a,encoding:`base64`,payload:l.slice(u+7)}),me(p,f.entityId,`${a}/${i}`),t+=r.size)}j.loading(`Reloading sidebar...`,{id:b,action:S,description:``}),await l(),c.length===0?r.length>0?j.success(`Uploaded ${h(s.length,`file`,`files`)}!`,{id:b,action:S,description:``}):j.dismiss(b):(console.log(c),j.error(_?`Cancelled uploads`:`Rejected uploads`,{id:b,action:S,descriptionClassName:`whitespace-pre-line overflow-y-auto`,description:c.slice(0,5).map(e=>e.errors.map(e=>e.message).join(`
|
|
5
|
+
`)).join(`
|
|
6
|
+
`)+(c?.length>5?`
|
|
7
|
+
Check the console for the full list.`:``)}))}catch(e){j.dismiss(b),$n(e)}finally{t(``)}},[g,d,v,y,u,f,p,l]),{getRootProps:S,getInputProps:C}=Xo({multiple:!0,maxSize:n&&a.checkForFabricConnect(n)?i:r,onDrop:x});return!d&&!g?m?(0,H.jsxs)(`div`,{className:s(`border-3 border-dashed`,`pointer-events-auto`,`cursor-copy text-sm text-center`,`p-2 w-full fixed bottom-0 h-16`,`flex flex-col items-center justify-center`,`bg-red-100 border-red-600 dark:bg-red-950 dark:border-red-600`),children:[`You cannot upload into`,(0,H.jsx)(`br`,{}),(0,H.jsx)(`strong`,{children:b})]}):null:(0,H.jsxs)(`div`,{...S(),className:m?`fixed top-0 bottom-0 w-full pointer-events-none`:``,children:[(0,H.jsx)(`input`,{id:`dropTarget`,...C()}),(0,H.jsx)(`div`,{className:s(`border-3 border-dashed`,`pointer-events-auto`,`cursor-copy text-sm text-center`,`p-2 w-full fixed bottom-0 h-16`,`flex flex-col items-center justify-center`,m?`animate-glow-pulse bg-green-100 border-green-600 dark:bg-green-950 dark:border-green-600`:`border-purple-600 backdrop-blur-sm bg-purple-600/10 dark:bg-purple-600/30`),children:e||(g?(0,H.jsxs)(H.Fragment,{children:[`Drop to upload into`,(0,H.jsx)(`br`,{}),(0,H.jsx)(`strong`,{children:_})]}):m?(0,H.jsxs)(H.Fragment,{children:[`Drop to upload into`,(0,H.jsx)(`br`,{}),(0,H.jsx)(`strong`,{children:b})]}):(0,H.jsxs)(H.Fragment,{children:[`Drag and drop to upload`,(0,H.jsx)(`br`,{}),`or click to select files.`]}))})]})}function es(e,t){let n=t.relativePath??t.name,r=n.indexOf(`/`),i=r===0||r===1?n.slice(r+1):n;return e?`${e}/${i}`:i}function ts(e){let t=tt(),n=!!e?.package,r=fa(e),i=!!e&&z(e)&&e.path===e.project;return{canEditFile:!!e&&!z(e)&&!n&&t,canRename:!!e&&!n&&t&&!i,canAddEntries:!!e&&!n&&t,canAddTable:!!e&&e.path.endsWith(`.graphql`)&&t,canDeleteEntry:!!e&&!r&&t,canDownload:i,canRedeploy:n&&t&&!r}}var ns=typeof navigator<`u`&&/Mac|iPhone|iPad/.test(navigator.platform||navigator.userAgent),rs={rename:`F2`,newFile:ns?`⌃N`:`Ctrl+N`,newDirectory:ns?`⌃⌥⇧N`:`Ctrl+Alt+Shift+N`,delete:ns?`⌘⌦`:`Ctrl+Del`};function is({items:e,children:t}){let{setOpenedEntry:n,setFocusedItem:r,setSelectedItems:i,selectedItems:a}=V(),[o,s]=(0,B.useState)(void 0),[c,l]=(0,B.useState)(``),{canRename:u,canAddEntries:d,canDeleteEntry:f,canDownload:p,canRedeploy:m}=ts(o?.entry),h=(0,B.useCallback)(e=>{n(e.entry),r(e.id),i(e.selection)},[n,r,i]),g=(0,B.useRef)(o);g.current=o;let[_,v]=(0,B.useState)(!1);(0,B.useEffect)(()=>{if(_)return Ta(()=>{let e=g.current;e&&h(e)}),()=>Ta(void 0)},[_,h]);let y=(0,B.useCallback)(t=>{let n=t.target.closest(`[data-rct-item-id]`)?.getAttribute(`data-rct-item-id`),r=n?e[n]?.data:void 0;if(!n||!r||!r.project||n===`__root__`||n===`newApplication`||n===`importedApplications`){t.preventDefault();return}let i={entry:r,id:n,selection:a.includes(n)?a:[n]};s(i),l(`${t.clientX},${t.clientY}`)},[e,a]),b=(0,B.useCallback)(e=>{o&&h(o),e()},[o,h]),x=We();return(0,H.jsxs)(Kn,{modal:!1,onOpenChange:v,children:[(0,H.jsx)(lr,{asChild:!0,children:(0,H.jsx)(`div`,{onContextMenu:y,className:`min-h-full`,children:t})}),o&&(0,H.jsxs)(ar,{className:`min-w-44`,onCloseAutoFocus:e=>e.preventDefault(),children:[(0,H.jsxs)(An,{onSelect:()=>x(o.entry.name),children:[(0,H.jsx)(Lt,{}),`Copy Name`]}),(0,H.jsxs)(An,{onSelect:()=>x(o.entry.path),children:[(0,H.jsx)(Ye,{}),`Copy Path`]}),(d||u||p||m||f)&&(0,H.jsx)(an,{}),d&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(An,{onSelect:()=>b(()=>R(`ShowAddDirectoryOrFileModalType`,`file`)),children:[(0,H.jsx)(mi,{}),`New File`,(0,H.jsx)(Xn,{children:rs.newFile})]}),(0,H.jsxs)(An,{onSelect:()=>b(()=>R(`ShowAddDirectoryOrFileModalType`,`directory`)),children:[(0,H.jsx)(wi,{}),`Add Directory`,(0,H.jsx)(Xn,{children:rs.newDirectory})]})]}),u&&(0,H.jsxs)(An,{onSelect:()=>b(()=>R(`ShowRenameFileModal`,!0)),children:[(0,H.jsx)(lt,{}),`Rename`,(0,H.jsx)(Xn,{children:rs.rename})]}),p&&(0,H.jsxs)(An,{onSelect:()=>b(()=>R(`ShowDownloadApplicationModal`,!0)),children:[(0,H.jsx)(Mr,{}),`Download Application`]}),m&&(0,H.jsxs)(An,{onSelect:()=>b(()=>R(`ShowRedeployApplicationModal`,!0)),children:[(0,H.jsx)(pt,{}),`Redeploy Package`]}),(d||u||p||m)&&f&&(0,H.jsx)(an,{}),f&&(0,H.jsxs)(An,{variant:`destructive`,onSelect:()=>b(()=>R(`ShowDeleteDirectoryOrFileModal`,!0)),children:[(0,H.jsx)(Or,{}),`Delete`,(0,H.jsx)(Xn,{children:rs.delete})]})]},c)]})}function as(e){let t=e.data;return t&&`name`in t?t.name:`root`}var os=`w-6 pointer-events-none `;function ss({opened:e,pkg:t}){let n=os+`w-4 h-4 shrink-0`;return t?e?(0,H.jsx)(Wi,{className:`${n} text-orange-600`}):(0,H.jsx)(pt,{className:`${n} text-orange-600`}):e?(0,H.jsx)(Si,{className:`${n} text-orange-400`}):(0,H.jsx)(ge,{className:`${n} text-orange-400`})}function cs({extension:e,filename:t}){let n=`w-4 h-4 mr-2 shrink-0`;if(Hn(t))return(0,H.jsx)(fi,{className:`${n} text-amber-500`});switch(e){case`js`:case`jsx`:case`cjs`:return(0,H.jsx)(ci,{className:`${n} text-yellow-500`});case`ts`:case`tsx`:return(0,H.jsx)(ci,{className:`${n} text-blue-500`});case`yaml`:case`yml`:return(0,H.jsx)(F,{className:n});case`css`:return(0,H.jsx)(F,{className:`${n} text-blue-500`});case`html`:return(0,H.jsx)(Ke,{className:n});case`json`:return(0,H.jsx)(oi,{className:n});case`png`:case`jpg`:case`jpeg`:case`gif`:return(0,H.jsx)(ui,{className:n});case`svg`:return(0,H.jsx)(gi,{className:n});case`vue`:return(0,H.jsx)(ci,{className:`${n} text-green-500`});default:return(0,H.jsx)(F,{className:n})}}function ls(){return(0,H.jsx)(vt,{className:os+`w-4 h-4 shrink-0 text-gray-400 ml-2 packageIsLocked`})}function us(){return(0,H.jsx)(De,{className:os+`w-4 h-4 shrink-0 text-green-500`})}function ds({title:e,item:t,context:n}){let{content:r}=ne(t.data?.path);return(0,H.jsxs)(H.Fragment,{children:[t.data?.path===`newApplication`?(0,H.jsx)(us,{}):z(t.data)?(0,H.jsx)(ss,{opened:n.isExpanded,pkg:!!t.data?.package||t.data.path===`importedApplications`}):(0,H.jsx)(cs,{extension:nr(e),filename:e}),(0,H.jsxs)(`span`,{className:`text-nowrap pointer-events-none`,children:[e,r?`*`:``]}),t.data?.package&&(0,H.jsx)(ls,{})]})}function fs(){let{rootEntries:e,openedEntry:t,setOpenedEntry:n,focusedItem:r,setFocusedItem:i,expandedItems:a,setExpandedItems:o,selectedItems:s,setSelectedItems:c,entryExists:l}=V(),{items:u,rootId:d}=(0,B.useMemo)(()=>se(e),[e]);ja();let f=(0,B.useRef)(null);_t(`FocusFileTree`,()=>{requestAnimationFrame(()=>{let e=f.current;if(!e)return;let t=r?e.querySelector(`[data-rct-item-id="${CSS.escape(String(r))}"]`):null;(t??e.querySelector(`[role="tree"]`))?.focus(),t?.scrollIntoView({block:`nearest`})})},[r]),(0,B.useEffect)(function(){if(t?.path!==r&&r){let e=u[r]?.data;e&&n(e)}},[r,u,t?.path,n]);let p=ha(),m=(0,B.useCallback)(async(t,n)=>{if(t.some(t=>pa(e,String(t.index)))){j.error(`Move refused`,{description:`That component is managed by Harper and keeps this instance in the load balancer.`});return}switch(n.targetType){case`item`:{if(u[n.targetItem]?.data?.package){j.error(`Read-Only Imported Application`,{description:`To make changes to an application, please click the "Redeploy" button and update the reference.`});return}let e=t.map(e=>({from:e.index,to:Vn(n.targetItem,Na(e.index))})),r=[],i=[];for(let t of e)if(t.from!==t.to&&l(t.to)){let e=u[t.to]?.data;(e&&z(e)?i:r).push(t.to)}return(r.length||i.length)&&!await va({files:r,directories:i})?void 0:p(e)}default:j.error(`${n.targetType} drop not yet supported`)}},[l,u,p,e]);return(0,H.jsxs)(`div`,{ref:f,className:`app-tree-scroll h-full overflow-auto pr-1.5 pb-18`,children:[(0,H.jsx)(is,{items:u,children:(0,H.jsx)(Dr,{canDragAndDrop:!0,canDropOnFolder:!0,canDropOnNonFolder:!1,canReorderItems:!1,canSearch:!0,canRename:!1,defaultInteractionMode:sn.DoubleClickItemToExpand,getItemTitle:as,items:u,onDrop:m,renderItemArrow:wr,renderItemTitle:ds,viewState:{applicationsTree:{focusedItem:r,expandedItems:a,selectedItems:s}},onFocusItem:e=>i(e.index),onExpandItem:e=>o([...a,e.index]),onCollapseItem:e=>o(a.filter(t=>t!==e.index)),onSelectItems:e=>c(e),children:(0,H.jsx)(_r,{treeId:`applicationsTree`,rootItem:d,treeLabel:`Applications file tree`})})}),(0,H.jsx)($o,{})]})}function ps({width:e,minWidth:t,maxWidth:n,isResizing:r,onPointerDown:i,onKeyDown:a}){return(0,H.jsx)(`div`,{role:`separator`,tabIndex:0,"aria-orientation":`vertical`,"aria-label":`Resize sidebar`,"aria-valuenow":e,"aria-valuemin":t,"aria-valuemax":n,onPointerDown:i,onKeyDown:a,className:s(`absolute top-0 right-0 bottom-0 w-1 z-40 cursor-col-resize touch-none outline-none`,`hover:bg-violet-400/60 dark:hover:bg-violet-500/60 focus-visible:bg-violet-500/80 transition-colors`,r&&`bg-violet-400/60 dark:bg-violet-500/60`)})}var ms=[[{id:`editor.action.formatDocument`,label:`Format Document`,icon:na},{id:`editor.action.commentLine`,label:`Toggle Line Comment`,icon:Bi},{id:`editor.action.blockComment`,label:`Toggle Block Comment`,icon:Ri}],[{id:`editor.action.startFindReplaceAction`,label:`Replace`,icon:Qi},{id:`editor.action.quickFix`,label:`Quick Fix…`,icon:Mi},{id:`editor.action.rename`,label:`Rename Symbol`,icon:ia}],[{id:`editor.action.sortLinesAscending`,label:`Sort Lines Ascending`,icon:Hr},{id:`editor.action.sortLinesDescending`,label:`Sort Lines Descending`,icon:Wr},{id:`editor.action.trimTrailingWhitespace`,label:`Trim Trailing Whitespace`,icon:ni}],[{id:`editor.foldAll`,label:`Fold All`,icon:vi},{id:`editor.unfoldAll`,label:`Unfold All`,icon:ca}]],hs=[{id:`editor.action.transformToUppercase`,label:`UPPERCASE`,icon:Qr},{id:`editor.action.transformToLowercase`,label:`lowercase`,icon:Jr},{id:`editor.action.transformToTitlecase`,label:`Title Case`,icon:Xr},{id:`editor.action.transformToCamelcase`,label:`camelCase`,icon:Xr},{id:`editor.action.transformToPascalcase`,label:`PascalCase`,icon:Xr},{id:`editor.action.transformToSnakecase`,label:`snake_case`,icon:Xr},{id:`editor.action.transformToKebabcase`,label:`kebab-case`,icon:Xr}],gs=[[{id:`actions.find`,label:`Find`,icon:Mt}],[{id:`editor.action.quickCommand`,label:`Command Palette`,icon:ei},{id:`editor.action.quickOutline`,label:`Go to Symbol…`,icon:Ii},{id:`editor.action.gotoLine`,label:`Go to Line/Column…`,icon:Pi}],[{id:`editor.action.marker.next`,label:`Next Problem`,icon:Bt},{id:`editor.action.marker.prev`,label:`Previous Problem`,icon:Bt}]],_s=[...ms.flat(),...hs,...gs.flat()].map(e=>e.id),vs={},ys=new Set;function bs(e){vs=e;for(let e of ys)e()}function xs(e){return ys.add(e),()=>{ys.delete(e)}}function Ss(){return(0,B.useSyncExternalStore)(xs,()=>vs)}var Cs=typeof navigator<`u`&&/Mac|iPhone|iPad/.test(navigator.platform||navigator.userAgent),ws={save:Cs?`⌘S`:`Ctrl+S`,rename:`F2`,newFile:Cs?`⌃N`:`Ctrl+N`,newDirectory:Cs?`⌃⌥⇧N`:`Ctrl+Alt+Shift+N`,delete:Cs?`⌘⌦`:`Ctrl+Del`};function Ts({toggledSidebar:e,toggleSidebar:t}){let n=dt(),{openedEntryContents:r,openedEntry:i,isSavingFile:a,restrictPackageModification:o}=V(),{content:s}=ne(i?.path),c=tt(),l=qt(),u=rn(),d=Yn(),f=l&&u,p=S(),m=w({strict:!1}),{onRestartClick:h,isRestartPending:g}=ke({operation:`restart_service`,instanceClient:n.instanceClient}),_=Pn(`ShowAddDirectoryOrFileModalType`,`file`),v=Pn(`ShowAddDirectoryOrFileModalType`,`directory`),y=Pn(`ShowDownloadApplicationModal`,!0),b=Pn(`ShowRenameFileModal`,!0),x=Pn(`ShowDeleteDirectoryOrFileModal`,!0),C=Pn(`ShowRedeployApplicationModal`,!0),T=ft(`SaveFile`,!0),E=ft(`RevertChanges`,!0),D=ft(`AddSchemaTable`,!0),O=ft(`NavigateBack`,!0),ee=ft(`NavigateForward`,!0),A=Ee(`CanNavigateBack`,!1).value,j=Ee(`CanNavigateForward`,!1).value,M=Ee(`EditorSaveBlocked`,!1).value,te=Ss(),P=s===void 0||s===r,[F,re]=(0,B.useState)(null),ie=e=>re(t=>t===null?null:e),ae=e=>{let t=e.icon,n=te[e.id];return(0,H.jsxs)(nn,{onSelect:()=>ct(`RunEditorAction`,e.id),children:[(0,H.jsx)(t,{}),e.label,n&&(0,H.jsx)(sr,{children:n})]},e.id)},I=e=>e.map((e,t)=>(0,H.jsxs)(B.Fragment,{children:[t>0&&(0,H.jsx)(Jn,{}),e.map(ae)]},t)),{canEditFile:oe,canRename:se,canAddEntries:ce,canAddTable:le,canDeleteEntry:ue,canDownload:L,canRedeploy:de}=ts(i),fe=oe||se||ce||le||ue,pe=f&&i?.project?i.project:void 0,me=L||c||de||!!pe,he=i&&z(i)?`Directory`:`File`;return(0,H.jsxs)(`div`,{className:`absolute top-0 right-0 left-0 backdrop-blur-sm bg-black-10 shadow-xl flex pr-4 md:pr-12`,children:[(0,H.jsxs)(k,{type:`button`,variant:`ghost`,className:(e?`toggled-sidebar-toggler`:`hidden-sidebar-toggler`)+` inline-flex text-sm md:hidden focus:outline-none focus:ring-2 text-foreground hover:text-muted-foreground focus:ring-gray-600 rounded-none`,onClick:t,children:[(0,H.jsxs)(`span`,{className:`sr-only`,children:[e?`Close`:`Open`,` sidebar`]}),e?(0,H.jsx)(Ji,{}):(0,H.jsx)(Ki,{})]}),i&&i?.path!==`newApplication`&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(k,{type:`button`,variant:`ghost`,className:`rounded-none px-2`,onClick:O,disabled:!A,title:`Go Back`,children:[(0,H.jsx)(Kt,{className:`pointer-events-none`}),(0,H.jsx)(`span`,{className:`sr-only`,children:`Go Back`})]}),(0,H.jsxs)(k,{type:`button`,variant:`ghost`,className:`rounded-none px-2`,onClick:ee,disabled:!j,title:`Go Forward`,children:[(0,H.jsx)(et,{className:`pointer-events-none`}),(0,H.jsx)(`span`,{className:`sr-only`,children:`Go Forward`})]}),i.package&&(0,H.jsxs)(bt,{children:[(0,H.jsx)(Ze,{asChild:!0,children:(0,H.jsxs)(k,{variant:`ghost`,type:`button`,className:`cursor-help`,children:[(0,H.jsx)(vt,{width:16,height:16}),(0,H.jsx)(`span`,{className:`hidden md:inline-block`,children:`Imported applications are read-only`})]})}),(0,H.jsx)(Be,{children:o?(0,H.jsxs)(H.Fragment,{children:[`This application is read-only, and cannot be modified.`,(0,H.jsx)(`br`,{}),`It helps govern clustering amongst your instances.`]}):(0,H.jsx)(H.Fragment,{children:`This application is read-only, and cannot be directly modified. But you can re-deploy or remove it.`})})]}),fe&&(0,H.jsxs)(Wn,{open:F===`file`,onOpenChange:e=>re(e?`file`:null),modal:!1,children:[(0,H.jsx)(mn,{asChild:!0,children:(0,H.jsxs)(k,{type:`button`,variant:`ghost`,className:`rounded-none`,title:he,onPointerEnter:()=>ie(`file`),children:[he,!P&&oe&&(0,H.jsx)(`span`,{className:`ml-1 size-1.5 rounded-full bg-primary`,"aria-label":`Unsaved changes`}),(0,H.jsx)(N,{className:`pointer-events-none opacity-60`})]})}),(0,H.jsxs)(On,{align:`start`,children:[oe&&(0,H.jsxs)(nn,{onSelect:T,disabled:P||a||M,title:M?`Fix the schema errors before saving`:void 0,children:[(0,H.jsx)(Re,{}),`Save`,(0,H.jsx)(sr,{children:ws.save})]}),se&&(0,H.jsxs)(nn,{onSelect:b,disabled:!P||a,children:[(0,H.jsx)(lt,{}),`Rename`,(0,H.jsx)(sr,{children:ws.rename})]}),oe&&(0,H.jsxs)(nn,{onSelect:E,disabled:P||a,children:[(0,H.jsx)(oa,{}),`Revert`]}),(oe||se)&&(ce||le)&&(0,H.jsx)(Jn,{}),ce&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(nn,{onSelect:_,children:[(0,H.jsx)(mi,{}),`New File`,(0,H.jsx)(sr,{children:ws.newFile})]}),(0,H.jsxs)(nn,{onSelect:v,children:[(0,H.jsx)(wi,{}),`Add Directory`,(0,H.jsx)(sr,{children:ws.newDirectory})]})]}),le&&(0,H.jsxs)(nn,{onSelect:D,children:[(0,H.jsx)(De,{}),`New Table`]}),(oe||se||ce||le)&&ue&&(0,H.jsx)(Jn,{}),ue&&(0,H.jsxs)(nn,{variant:`destructive`,onSelect:x,children:[(0,H.jsx)(Or,{}),`Delete`,(0,H.jsx)(sr,{children:ws.delete})]})]})]}),oe&&(0,H.jsxs)(Wn,{open:F===`edit`,onOpenChange:e=>re(e?`edit`:null),modal:!1,children:[(0,H.jsx)(mn,{asChild:!0,children:(0,H.jsxs)(k,{type:`button`,variant:`ghost`,className:`rounded-none`,title:`Edit`,onPointerEnter:()=>ie(`edit`),children:[`Edit`,(0,H.jsx)(N,{className:`pointer-events-none opacity-60`})]})}),(0,H.jsxs)(On,{align:`start`,children:[I(ms),(0,H.jsx)(Jn,{}),(0,H.jsxs)(dn,{children:[(0,H.jsxs)(mr,{children:[(0,H.jsx)(Xr,{}),`Transform Case`]}),(0,H.jsx)(In,{children:hs.map(ae)})]})]})]}),(0,H.jsxs)(Wn,{open:F===`go`,onOpenChange:e=>re(e?`go`:null),modal:!1,children:[(0,H.jsx)(mn,{asChild:!0,children:(0,H.jsxs)(k,{type:`button`,variant:`ghost`,className:`rounded-none`,title:`Go`,onPointerEnter:()=>ie(`go`),children:[`Go`,(0,H.jsx)(N,{className:`pointer-events-none opacity-60`})]})}),(0,H.jsx)(On,{align:`start`,children:I(gs)})]}),me&&(0,H.jsxs)(Wn,{open:F===`application`,onOpenChange:e=>re(e?`application`:null),modal:!1,children:[(0,H.jsx)(mn,{asChild:!0,children:(0,H.jsxs)(k,{type:`button`,variant:`ghost`,className:`rounded-none`,title:`Application`,onPointerEnter:()=>ie(`application`),children:[`Application`,(0,H.jsx)(N,{className:`pointer-events-none opacity-60`})]})}),(0,H.jsxs)(On,{align:`start`,children:[L&&(0,H.jsxs)(nn,{onSelect:y,children:[(0,H.jsx)(Mr,{}),`Download Application`]}),c&&(0,H.jsxs)(nn,{onSelect:h,disabled:!P||a||g,title:`Restarts all service threads to apply changes. No downtime expected.`,children:[(0,H.jsx)(Le,{}),`Restart`]}),(L||c)&&de&&(0,H.jsx)(Jn,{}),de&&(0,H.jsxs)(nn,{onSelect:C,children:[(0,H.jsx)(pt,{}),`Redeploy Package`]}),pe&&(0,H.jsxs)(nn,{onSelect:()=>void p({to:Vt(m,`config/deployments`),search:{project:pe}}),children:[(0,H.jsx)(ea,{}),`View Deployments`]}),pe&&d&&(0,H.jsxs)(nn,{onSelect:()=>void p({to:Vt(m,`config/deployments`),search:{project:pe,status:`staged`}}),children:[(0,H.jsx)(gt,{}),`Staged Releases`]})]})]})]})]})}function Es(e){return(0,B.useCallback)((t,n,r)=>{if(n!==`href`)return t;if(t.startsWith(`http`))return r.properties.target=`_blank`,t;{let n=Oe().split(`?`)[0];switch(t){case`./apis`:case`./config`:case`./config/roles`:case`./config/users`:case`./databases`:case`./logs`:case`./status`:return`${n}/${t.slice(2)}`}return`${n}?open=${e}/${t.slice(t.startsWith(`../`)?3:2)}`}},[e])}var Ds=new Set(`7z.br.bz2.bzip2.cab.gz.gzip.lz.lz4.lzma.rar.tar.tbz.tbz2.tgz.txz.xz.z.zip.zst.zstd.a.bin.class.dll.dylib.exe.jar.node.o.so.wasm.eot.otf.ttf.woff.woff2.aac.flac.m4a.mp3.oga.ogg.opus.wav.wma.heic.heif.psd.tif.tiff.db.pdf.sqlite.sqlite3`.split(`.`));function Os(e){return Ds.has(nr(e).toLowerCase())}var ks={svg:{mime:`image/svg+xml`}};function As(e){return ks[nr(e).toLowerCase()]}function js(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Ms=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ns=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ps={};function Fs(e,t){return((t||Ps).jsx?Ns:Ms).test(e)}var Is=/[ \t\n\f\r]/g;function Ls(e){return typeof e==`object`?e.type===`text`&&Rs(e.value):Rs(e)}function Rs(e){return e.replace(Is,``)===``}var zs=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};zs.prototype.normal={},zs.prototype.property={},zs.prototype.space=void 0;function Bs(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new zs(n,r,t)}function Vs(e){return e.toLowerCase()}var Hs=class{constructor(e,t){this.attribute=t,this.property=e}};Hs.prototype.attribute=``,Hs.prototype.booleanish=!1,Hs.prototype.boolean=!1,Hs.prototype.commaOrSpaceSeparated=!1,Hs.prototype.commaSeparated=!1,Hs.prototype.defined=!1,Hs.prototype.mustUseProperty=!1,Hs.prototype.number=!1,Hs.prototype.overloadedBoolean=!1,Hs.prototype.property=``,Hs.prototype.spaceSeparated=!1,Hs.prototype.space=void 0;var Us=t({boolean:()=>U,booleanish:()=>W,commaOrSpaceSeparated:()=>qs,commaSeparated:()=>Ks,number:()=>G,overloadedBoolean:()=>Gs,spaceSeparated:()=>K}),Ws=0,U=Js(),W=Js(),Gs=Js(),G=Js(),K=Js(),Ks=Js(),qs=Js();function Js(){return 2**++Ws}var Ys=Object.keys(Us),Xs=class extends Hs{constructor(e,t,n,r){let i=-1;if(super(e,t),Zs(this,`space`,r),typeof n==`number`)for(;++i<Ys.length;){let e=Ys[i];Zs(this,Ys[i],(n&Us[e])===Us[e])}}};Xs.prototype.defined=!0;function Zs(e,t,n){n&&(e[t]=n)}function Qs(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Xs(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Vs(r)]=r,n[Vs(a.attribute)]=r}return new zs(t,n,e.space)}var $s=Qs({properties:{ariaActiveDescendant:null,ariaAtomic:W,ariaAutoComplete:null,ariaBusy:W,ariaChecked:W,ariaColCount:G,ariaColIndex:G,ariaColSpan:G,ariaControls:K,ariaCurrent:null,ariaDescribedBy:K,ariaDetails:null,ariaDisabled:W,ariaDropEffect:K,ariaErrorMessage:null,ariaExpanded:W,ariaFlowTo:K,ariaGrabbed:W,ariaHasPopup:null,ariaHidden:W,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:K,ariaLevel:G,ariaLive:null,ariaModal:W,ariaMultiLine:W,ariaMultiSelectable:W,ariaOrientation:null,ariaOwns:K,ariaPlaceholder:null,ariaPosInSet:G,ariaPressed:W,ariaReadOnly:W,ariaRelevant:null,ariaRequired:W,ariaRoleDescription:K,ariaRowCount:G,ariaRowIndex:G,ariaRowSpan:G,ariaSelected:W,ariaSetSize:G,ariaSort:null,ariaValueMax:G,ariaValueMin:G,ariaValueNow:G,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function ec(e,t){return t in e?e[t]:t}function tc(e,t){return ec(e,t.toLowerCase())}var nc=Qs({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Ks,acceptCharset:K,accessKey:K,action:null,allow:null,allowFullScreen:U,allowPaymentRequest:U,allowUserMedia:U,alt:null,as:null,async:U,autoCapitalize:null,autoComplete:K,autoFocus:U,autoPlay:U,blocking:K,capture:null,charSet:null,checked:U,cite:null,className:K,cols:G,colSpan:null,content:null,contentEditable:W,controls:U,controlsList:K,coords:G|Ks,crossOrigin:null,data:null,dateTime:null,decoding:null,default:U,defer:U,dir:null,dirName:null,disabled:U,download:Gs,draggable:W,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:U,formTarget:null,headers:K,height:G,hidden:Gs,high:G,href:null,hrefLang:null,htmlFor:K,httpEquiv:K,id:null,imageSizes:null,imageSrcSet:null,inert:U,inputMode:null,integrity:null,is:null,isMap:U,itemId:null,itemProp:K,itemRef:K,itemScope:U,itemType:K,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:U,low:G,manifest:null,max:null,maxLength:G,media:null,method:null,min:null,minLength:G,multiple:U,muted:U,name:null,nonce:null,noModule:U,noValidate:U,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:U,optimum:G,pattern:null,ping:K,placeholder:null,playsInline:U,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:U,referrerPolicy:null,rel:K,required:U,reversed:U,rows:G,rowSpan:G,sandbox:K,scope:null,scoped:U,seamless:U,selected:U,shadowRootClonable:U,shadowRootDelegatesFocus:U,shadowRootMode:null,shape:null,size:G,sizes:null,slot:null,span:G,spellCheck:W,src:null,srcDoc:null,srcLang:null,srcSet:null,start:G,step:null,style:null,tabIndex:G,target:null,title:null,translate:null,type:null,typeMustMatch:U,useMap:null,value:W,width:G,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:K,axis:null,background:null,bgColor:null,border:G,borderColor:null,bottomMargin:G,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:U,declare:U,event:null,face:null,frame:null,frameBorder:null,hSpace:G,leftMargin:G,link:null,longDesc:null,lowSrc:null,marginHeight:G,marginWidth:G,noResize:U,noHref:U,noShade:U,noWrap:U,object:null,profile:null,prompt:null,rev:null,rightMargin:G,rules:null,scheme:null,scrolling:W,standby:null,summary:null,text:null,topMargin:G,valueType:null,version:null,vAlign:null,vLink:null,vSpace:G,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:U,disableRemotePlayback:U,prefix:null,property:null,results:G,security:null,unselectable:null},space:`html`,transform:tc}),rc=Qs({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:qs,accentHeight:G,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:G,amplitude:G,arabicForm:null,ascent:G,attributeName:null,attributeType:null,azimuth:G,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:G,by:null,calcMode:null,capHeight:G,className:K,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:G,diffuseConstant:G,direction:null,display:null,dur:null,divisor:G,dominantBaseline:null,download:U,dx:null,dy:null,edgeMode:null,editable:null,elevation:G,enableBackground:null,end:null,event:null,exponent:G,externalResourcesRequired:null,fill:null,fillOpacity:G,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ks,g2:Ks,glyphName:Ks,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:G,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:G,horizOriginX:G,horizOriginY:G,id:null,ideographic:G,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:G,k:G,k1:G,k2:G,k3:G,k4:G,kernelMatrix:qs,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:G,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:G,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:G,overlineThickness:G,paintOrder:null,panose1:null,path:null,pathLength:G,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:K,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:G,pointsAtY:G,pointsAtZ:G,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qs,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qs,rev:qs,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qs,requiredFeatures:qs,requiredFonts:qs,requiredFormats:qs,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:G,specularExponent:G,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:G,strikethroughThickness:G,string:null,stroke:null,strokeDashArray:qs,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:G,strokeOpacity:G,strokeWidth:null,style:null,surfaceScale:G,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qs,tabIndex:G,tableValues:null,target:null,targetX:G,targetY:G,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qs,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:G,underlineThickness:G,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:G,values:null,vAlphabetic:G,vMathematical:G,vectorEffect:null,vHanging:G,vIdeographic:G,version:null,vertAdvY:G,vertOriginX:G,vertOriginY:G,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:G,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:ec}),ic=Qs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),ac=Qs({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:tc}),oc=Qs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),sc={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},cc=/[A-Z]/g,lc=/-[a-z]/g,uc=/^data[-\w.:]+$/i;function dc(e,t){let n=Vs(t),r=t,i=Hs;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&uc.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(lc,pc);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!lc.test(e)){let n=e.replace(cc,fc);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Xs}return new i(r,t)}function fc(e){return`-`+e.toLowerCase()}function pc(e){return e.charAt(1).toUpperCase()}var mc=Bs([$s,nc,ic,ac,oc],`html`),hc=Bs([$s,rc,ic,ac,oc],`svg`);function gc(e){return e.join(` `).trim()}var _c=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;t.exports=function(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,d=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
8
|
+
`);d=~n?e.length-n:d+e.length}function p(){var e={line:l,column:d};return function(t){return t.position=new m(e),v(),t}}function m(e){this.start=e,this.end={line:l,column:d},this.source=t.source}m.prototype.content=e;var h=[];function g(n){var r=Error(t.source+`:`+l+`:`+d+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=d,r.source=e,t.silent)h.push(r);else throw r}function _(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function v(){_(i)}function y(e){var t;for(e||=[];t=b();)t!==!1&&e.push(t);return e}function b(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return g(`End of comment missing`);var r=e.slice(2,n-2);return d+=2,f(r),e=e.slice(n),d+=2,t({type:`comment`,comment:r})}}function x(){var e=p(),t=_(a);if(t){if(b(),!_(o))return g(`property missing ':'`);var r=_(s),i=e({type:`declaration`,property:u(t[0].replace(n,``)),value:r?u(r[0].replace(n,``)):``});return _(c),i}}function S(){var e=[];y(e);for(var t;t=x();)t!==!1&&(e.push(t),y(e));return e}return v(),S()};function u(e){return e?e.replace(l,``):``}})),vc=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(_c());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),yc=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),bc=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(vc()),r=yc();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),xc=Cc(`end`),Sc=Cc(`start`);function Cc(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function wc(e){let t=Sc(e),n=xc(e);if(t&&n)return{start:t,end:n}}function Tc(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Dc(e.position):`start`in e||`end`in e?Dc(e):`line`in e||`column`in e?Ec(e):``}function Ec(e){return Oc(e&&e.line)+`:`+Oc(e&&e.column)}function Dc(e){return Ec(e&&e.start)+`-`+Ec(e&&e.end)}function Oc(e){return e&&typeof e==`number`?e:1}var q=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Tc(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};q.prototype.file=``,q.prototype.name=``,q.prototype.reason=``,q.prototype.message=``,q.prototype.stack=``,q.prototype.column=void 0,q.prototype.line=void 0,q.prototype.ancestors=void 0,q.prototype.cause=void 0,q.prototype.fatal=void 0,q.prototype.place=void 0,q.prototype.ruleId=void 0,q.prototype.source=void 0;var kc=e(bc(),1),Ac={}.hasOwnProperty,jc=new Map,Mc=/[A-Z]/g,Nc=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Pc=new Set([`td`,`th`]),Fc=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Ic(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=qc(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Kc(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?hc:mc,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Lc(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Lc(e,t,n){if(t.type===`element`)return Rc(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return zc(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Vc(e,t,n);if(t.type===`mdxjsEsm`)return Bc(e,t);if(t.type===`root`)return Hc(e,t,n);if(t.type===`text`)return Uc(e,t)}function Rc(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=hc,e.schema=i),e.ancestors.push(t);let a=$c(e,t.tagName,!1),o=Jc(e,t),s=Xc(e,t);return Nc.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Ls(e)})),Wc(e,o,a,t),Gc(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function zc(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}el(e,t.position)}function Bc(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);el(e,t.position)}function Vc(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=hc,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:$c(e,t.name,!0),o=Yc(e,t),s=Xc(e,t);return Wc(e,o,a,t),Gc(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Hc(e,t,n){let r={};return Gc(r,Xc(e,t)),e.create(t,e.Fragment,r,n)}function Uc(e,t){return t.value}function Wc(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Gc(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Kc(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function qc(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Sc(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Jc(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Ac.call(t.properties,i)){let a=Zc(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Pc.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Yc(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else el(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else el(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Xc(e,t){let n=[],r=-1,i=e.passKeys?new Map:jc;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Lc(e,a,o);s!==void 0&&n.push(s)}return n}function Zc(e,t,n){let r=dc(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?js(n):gc(n)),r.property===`style`){let t=typeof n==`object`?n:Qc(e,String(n));return e.stylePropertyNameCase===`css`&&(t=tl(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?sc[r.property]||r.property:r.attribute,n]}}function Qc(e,t){try{return(0,kc.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new q("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Fc+`#cannot-parse-style-attribute`,r}}function $c(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Fs(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Fs(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Ac.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);el(e)}function el(e,t){let n=new q("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Fc+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function tl(e){let t={},n;for(n in e)Ac.call(e,n)&&(t[nl(n)]=e[n]);return t}function nl(e){let t=e.replace(Mc,rl);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function rl(e){return`-`+e.toLowerCase()}var il={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},al={};function ol(e,t){let n=t||al;return sl(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function sl(e,t,n){if(ll(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return cl(e.children,t,n)}return Array.isArray(e)?cl(e,t,n):``}function cl(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=sl(e[i],t,n);return r.join(``)}function ll(e){return!!(e&&typeof e==`object`)}var ul=document.createElement(`i`);function dl(e){let t=`&`+e+`;`;ul.innerHTML=t;let n=ul.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function fl(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function pl(e,t){return e.length>0?(fl(e,e.length,0,t),e):t}var ml={}.hasOwnProperty;function hl(e){let t={},n=-1;for(;++n<e.length;)gl(t,e[n]);return t}function gl(e,t){let n;for(n in t){let r=(ml.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){ml.call(r,a)||(r[a]=[]);let e=i[a];_l(r[a],Array.isArray(e)?e:e?[e]:[])}}}function _l(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);fl(e,0,0,r)}function vl(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function yl(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var bl=Ol(/[A-Za-z]/),J=Ol(/[\dA-Za-z]/),xl=Ol(/[#-'*+\--9=?A-Z^-~]/);function Sl(e){return e!==null&&(e<32||e===127)}var Cl=Ol(/\d/),wl=Ol(/[\dA-Fa-f]/),Tl=Ol(/[!-/:-@[-`{-~]/);function Y(e){return e!==null&&e<-2}function X(e){return e!==null&&(e<0||e===32)}function Z(e){return e===-2||e===-1||e===32}var El=Ol(/\p{P}|\p{S}/u),Dl=Ol(/\s/);function Ol(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function kl(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&J(e.charCodeAt(n+1))&&J(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Q(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Z(r)?(e.enter(n),s(r)):t(r)}function s(r){return Z(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Al={tokenize:jl};function jl(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Q(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return Y(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Ml={tokenize:Pl},Nl={tokenize:Fl};function Pl(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return fl(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Nl,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Nl,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return Y(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;fl(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Fl(e,t,n){return Q(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Il(e){if(e===null||X(e)||Dl(e))return 1;if(El(e))return 2}function Ll(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Rl={name:`attention`,resolveAll:zl,tokenize:Bl};function zl(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Vl(d,-c),Vl(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=pl(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=pl(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=pl(l,Ll(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=pl(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=pl(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,fl(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Bl(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Il(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Il(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Vl(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Hl={name:`autolink`,tokenize:Ul};function Ul(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return bl(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||J(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||J(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Sl(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):xl(t)?(e.consume(t),l):n(t)}function u(e){return J(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||J(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Wl={partial:!0,tokenize:Gl};function Gl(e,t,n){return r;function r(t){return Z(t)?Q(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Y(e)?t(e):n(e)}}var Kl={continuation:{tokenize:Jl},exit:Yl,name:`blockQuote`,tokenize:ql};function ql(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Z(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Jl(e,t,n){let r=this;return i;function i(t){return Z(t)?Q(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Kl,t,n)(r)}}function Yl(e){e.exit(`blockQuote`)}var Xl={name:`characterEscape`,tokenize:Zl};function Zl(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Tl(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Ql={name:`characterReference`,tokenize:$l};function $l(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=J,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=wl,u):(e.enter(`characterReferenceValue`),a=7,o=Cl,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===J&&!dl(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var eu={partial:!0,tokenize:ru},tu={concrete:!0,name:`codeFenced`,tokenize:nu};function nu(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Z(t)?Q(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Y(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(eu,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Y(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Z(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Q(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Y(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Y(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Z(t)?Q(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Y(t)?e.check(eu,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Y(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Z(t)?Q(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Z(t)?Q(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Y(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function ru(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var iu={name:`codeIndented`,tokenize:ou},au={partial:!0,tokenize:su};function ou(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),Q(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):Y(t)?e.attempt(au,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||Y(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function su(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Y(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):Q(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Y(e)?i(e):n(e)}}var cu={name:`codeText`,previous:uu,resolve:lu,tokenize:du};function lu(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function uu(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function du(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):Y(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||Y(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var fu=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&pu(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),pu(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),pu(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);pu(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);pu(this.left,t.reverse())}}}};function pu(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function mu(e){let t={},n=-1,r,i,a,o,s,c,l,u=new fu(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,hu(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return fl(e,0,1/0,u.slice(0)),!l}function hu(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var gu={resolve:vu,tokenize:yu},_u={partial:!0,tokenize:bu};function vu(e){return mu(e),e}function yu(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):Y(t)?e.check(_u,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function bu(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Q(e,a,`linePrefix`)}function a(i){if(i===null||Y(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function xu(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Sl(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Y(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||X(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Sl(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Su(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Y(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Y(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Z(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Cu(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Y(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Q(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Y(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function wu(e,t){let n;return r;function r(i){return Y(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Z(i)?Q(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Tu={name:`definition`,tokenize:Du},Eu={partial:!0,tokenize:Ou};function Du(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Su.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=yl(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return X(t)?wu(e,l)(t):l(t)}function l(t){return xu(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Eu,d,d)(t)}function d(t){return Z(t)?Q(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Y(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Ou(e,t,n){return r;function r(t){return X(t)?wu(e,i)(t):n(t)}function i(t){return Cu(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Z(t)?Q(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Y(e)?t(e):n(e)}}var ku={name:`hardBreakEscape`,tokenize:Au};function Au(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Y(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var ju={name:`headingAtx`,resolve:Mu,tokenize:Nu};function Mu(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},fl(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Nu(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||X(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Y(n)?(e.exit(`atxHeading`),t(n)):Z(n)?Q(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||X(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Pu=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Fu=[`pre`,`script`,`style`,`textarea`],Iu={concrete:!0,name:`htmlFlow`,resolveTo:zu,tokenize:Bu},Lu={partial:!0,tokenize:Hu},Ru={partial:!0,tokenize:Vu};function zu(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Bu(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:P):bl(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):bl(a)?(e.consume(a),i=4,r.interrupt?t:P):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:P):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return bl(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||X(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Fu.includes(l)?(i=1,r.interrupt?t(s):O(s)):Pu.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||J(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return Z(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||bl(t)?(e.consume(t),b):Z(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||J(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Z(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Z(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Y(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||X(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Z(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||Y(t)?O(t):Z(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),j):t===60&&i===1?(e.consume(t),M):t===62&&i===4?(e.consume(t),F):t===63&&i===3?(e.consume(t),P):t===93&&i===5?(e.consume(t),te):Y(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Lu,ne,k)(t)):t===null||Y(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Ru,ee,ne)(t)}function ee(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),A}function A(t){return t===null||Y(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function j(t){return t===45?(e.consume(t),P):O(t)}function M(t){return t===47?(e.consume(t),o=``,N):O(t)}function N(t){if(t===62){let n=o.toLowerCase();return Fu.includes(n)?(e.consume(t),F):O(t)}return bl(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),N):O(t)}function te(t){return t===93?(e.consume(t),P):O(t)}function P(t){return t===62?(e.consume(t),F):t===45&&i===2?(e.consume(t),P):O(t)}function F(t){return t===null||Y(t)?(e.exit(`htmlFlowData`),ne(t)):(e.consume(t),F)}function ne(n){return e.exit(`htmlFlow`),t(n)}}function Vu(e,t,n){let r=this;return i;function i(t){return Y(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Hu(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Wl,t,n)}}var Uu={name:`htmlText`,tokenize:Wu};function Wu(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):bl(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):bl(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Y(t)?(o=d,M(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?j(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Y(t)?(o=h,M(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?j(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?j(t):Y(t)?(o=v,M(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Y(t)?(o=y,M(t)):(e.consume(t),y)}function b(e){return e===62?j(e):y(e)}function x(t){return bl(t)?(e.consume(t),S):n(t)}function S(t){return t===45||J(t)?(e.consume(t),S):C(t)}function C(t){return Y(t)?(o=C,M(t)):Z(t)?(e.consume(t),C):j(t)}function w(t){return t===45||J(t)?(e.consume(t),w):t===47||t===62||X(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),j):t===58||t===95||bl(t)?(e.consume(t),E):Y(t)?(o=T,M(t)):Z(t)?(e.consume(t),T):j(t)}function E(t){return t===45||t===46||t===58||t===95||J(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Y(t)?(o=D,M(t)):Z(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):Y(t)?(o=O,M(t)):Z(t)?(e.consume(t),O):(e.consume(t),ee)}function k(t){return t===i?(e.consume(t),i=void 0,A):t===null?n(t):Y(t)?(o=k,M(t)):(e.consume(t),k)}function ee(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||X(t)?T(t):(e.consume(t),ee)}function A(e){return e===47||e===62||X(e)?T(e):n(e)}function j(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function M(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),N}function N(t){return Z(t)?Q(e,te,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):te(t)}function te(t){return e.enter(`htmlTextData`),o(t)}}var Gu={name:`labelEnd`,resolveAll:Yu,resolveTo:Xu,tokenize:Zu},Ku={tokenize:Qu},qu={tokenize:$u},Ju={tokenize:ed};function Yu(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&fl(e,0,e.length,n),e}function Xu(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=pl(s,e.slice(a+1,a+r+3)),s=pl(s,[[`enter`,u,t]]),s=pl(s,Ll(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=pl(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=pl(s,e.slice(o+1)),s=pl(s,[[`exit`,c,t]]),fl(e,a,e.length,s),e}function Zu(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(yl(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Ku,u,o?u:d)(t):t===91?e.attempt(qu,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Ju,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Qu(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return X(t)?wu(e,a)(t):a(t)}function a(t){return t===41?u(t):xu(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return X(t)?wu(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Cu(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return X(t)?wu(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function $u(e,t,n){let r=this;return i;function i(t){return Su.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(yl(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function ed(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var td={name:`labelStartImage`,resolveAll:Gu.resolveAll,tokenize:nd};function nd(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var rd={name:`labelStartLink`,resolveAll:Gu.resolveAll,tokenize:id};function id(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var ad={name:`lineEnding`,tokenize:od};function od(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Q(e,t,`linePrefix`)}}var sd={name:`thematicBreak`,tokenize:cd};function cd(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||Y(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Z(t)?Q(e,s,`whitespace`)(t):s(t))}}var ld={continuation:{tokenize:pd},exit:hd,name:`list`,tokenize:fd},ud={partial:!0,tokenize:gd},dd={partial:!0,tokenize:md};function fd(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Cl(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(sd,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Cl(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Wl,r.interrupt?n:u,e.attempt(ud,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Z(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function pd(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Wl,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Q(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Z(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(dd,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Q(e,e.attempt(ld,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function md(e,t,n){let r=this;return Q(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function hd(e){e.exit(this.containerState.type)}function gd(e,t,n){let r=this;return Q(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Z(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var _d={name:`setextUnderline`,resolveTo:vd,tokenize:yd};function vd(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function yd(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Z(t)?Q(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Y(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var bd={tokenize:xd};function xd(e){let t=this,n=e.attempt(Wl,r,e.attempt(this.parser.constructs.flowInitial,i,Q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(gu,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Sd={resolveAll:Ed()},Cd=Td(`string`),wd=Td(`text`);function Td(e){return{resolveAll:Ed(e===`text`?Dd:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Ed(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Dd(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Od=t({attentionMarkers:()=>Id,contentInitial:()=>Ad,disable:()=>Ld,document:()=>kd,flow:()=>Md,flowInitial:()=>jd,insideSpan:()=>Fd,string:()=>Nd,text:()=>Pd}),kd={42:ld,43:ld,45:ld,48:ld,49:ld,50:ld,51:ld,52:ld,53:ld,54:ld,55:ld,56:ld,57:ld,62:Kl},Ad={91:Tu},jd={[-2]:iu,[-1]:iu,32:iu},Md={35:ju,42:sd,45:[_d,sd],60:Iu,61:_d,95:sd,96:tu,126:tu},Nd={38:Ql,92:Xl},Pd={[-5]:ad,[-4]:ad,[-3]:ad,33:td,38:Ql,42:Rl,60:[Hl,Uu],91:rd,92:[ku,Xl],93:Gu,95:Rl,96:cu},Fd={null:[Rl,Sd]},Id={null:[42,95]},Ld={null:[]};function Rd(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=pl(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Ll(a,l.events,l),l.events):[]}function f(e,t){return Bd(p(e),t)}function p(e){return zd(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){Y(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&fl(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function zd(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Bd(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
9
|
+
`;break;case-3:o=`\r
|
|
10
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Vd(e){let t={constructs:hl([Od,...(e||{}).extensions||[]]),content:n(Al),defined:[],document:n(Ml),flow:n(bd),lazy:{},string:n(Cd),text:n(wd)};return t;function n(e){return n;function n(n){return Rd(t,e,n)}}}function Hd(e){for(;!mu(e););return e}var Ud=/[\0\t\n\r]/g;function Wd(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(Ud.lastIndex=u,c=Ud.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Gd=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Kd(e){return e.replace(Gd,qd)}function qd(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return vl(n.slice(t?2:1),t?16:10)}return dl(n)||e}var Jd={}.hasOwnProperty;function Yd(e,t,n){return typeof t!=`string`&&(n=t,t=void 0),Xd(n)(Hd(Vd(n).document().write(Wd()(e,t,!0))))}function Xd(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(_e),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(pe),blockQuote:a(le),characterEscape:T,characterReference:T,codeFenced:a(ue),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ue,o),codeText:a(L,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(de),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(fe),hardBreakEscape:a(me),hardBreakTrailing:a(me),htmlFlow:a(he,o),htmlFlowData:T,htmlText:a(he,o),htmlTextData:T,image:a(ge),label:o,link:a(_e),listItem:a(ye),listItemValue:f,listOrdered:a(ve,d),listUnordered:a(ve),paragraph:a(be),reference:re,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(pe),strong:a(xe),thematicBreak:a(Ce)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ce,autolinkProtocol:se,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:I,characterReference:oe,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(A),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(ee),htmlTextData:E,image:c(M),label:te,labelText:N,lineEnding:D,link:c(j),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ie,resourceDestinationString:P,resourceTitleString:F,resource:ne,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Qd(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Jd.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||ef).call(a,void 0,e[0])}for(r.position={start:Zd(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Zd(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Zd(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||ef).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Tc({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Zd(e.end)}function u(){return ol(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=yl(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Se(),n.position={start:Zd(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Zd(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Zd(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Kd(t),n.identifier=yl(t).toLowerCase()}function te(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function P(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ne(){this.data.inReference=void 0}function re(){this.data.referenceType=`collapsed`}function ie(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=yl(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ae(e){this.data.characterReferenceType=e.type}function I(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=vl(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=dl(t);let i=this.stack[this.stack.length-1];i.value+=r}function oe(e){let t=this.stack.pop();t.position.end=Zd(e.end)}function se(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ce(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function le(){return{type:`blockquote`,children:[]}}function ue(){return{type:`code`,lang:null,meta:null,value:``}}function L(){return{type:`inlineCode`,value:``}}function de(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function fe(){return{type:`emphasis`,children:[]}}function pe(){return{type:`heading`,depth:0,children:[]}}function me(){return{type:`break`}}function he(){return{type:`html`,value:``}}function ge(){return{type:`image`,title:null,url:``,alt:null}}function _e(){return{type:`link`,title:null,url:``,children:[]}}function ve(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ye(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function be(){return{type:`paragraph`,children:[]}}function xe(){return{type:`strong`,children:[]}}function Se(){return{type:`text`,value:``}}function Ce(){return{type:`thematicBreak`}}}function Zd(e){return{line:e.line,column:e.column,offset:e.offset}}function Qd(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Qd(e,r):$d(e,r)}}function $d(e,t){let n;for(n in t)if(Jd.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function ef(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Tc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Tc({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Tc({start:t.start,end:t.end})+`) is still open`)}function tf(e){let t=this;t.parser=n;function n(n){return Yd(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function nf(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function rf(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
11
|
+
`}]}function af(e,t){let n=t.value?t.value+`
|
|
12
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function of(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sf(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cf(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=kl(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function lf(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uf(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function df(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function ff(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return df(e,t);let i={src:kl(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function pf(e,t){let n={src:kl(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function mf(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function hf(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return df(e,t);let i={href:kl(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function gf(e,t){let n={href:kl(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function _f(e,t,n){let r=e.all(t),i=n?vf(n):yf(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
13
|
+
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
14
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function vf(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=yf(n[r])}return t}function yf(e){return e.spread??e.children.length>1}function bf(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function xf(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Sf(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Cf(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wf(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Sc(t.children[1]),o=xc(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Tf(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Ef(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Df=9,Of=32;function kf(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Af(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Af(t.slice(i),i>0,!1)),a.join(``)}function Af(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Df||t===Of;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Df||t===Of;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function jf(e,t){let n={type:`text`,value:kf(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Mf(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Nf={blockquote:nf,break:rf,code:af,delete:of,emphasis:sf,footnoteReference:cf,heading:lf,html:uf,imageReference:ff,image:pf,inlineCode:mf,linkReference:hf,link:gf,listItem:_f,list:bf,paragraph:xf,root:Sf,strong:Cf,table:wf,tableCell:Ef,tableRow:Tf,text:jf,thematicBreak:Mf,toml:Pf,yaml:Pf,definition:Pf,footnoteDefinition:Pf};function Pf(){}var Ff=typeof self==`object`?self:globalThis,If=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new Ff[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new Ff[a](o),i)};return r},Lf=e=>If(new Map,e)(0),Rf=``,{toString:zf}={},{keys:Bf}=Object,Vf=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=zf.call(e).slice(8,-1);switch(n){case`Array`:return[1,Rf];case`Object`:return[2,Rf];case`Date`:return[3,Rf];case`RegExp`:return[4,Rf];case`Map`:return[5,Rf];case`Set`:return[6,Rf];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},Hf=([e,t])=>e===0&&(t===`function`||t===`symbol`),Uf=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=Vf(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of Bf(r))(e||!Hf(Vf(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(Hf(Vf(n))||Hf(Vf(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Hf(Vf(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},Wf=(e,{json:t,lossy:n}={})=>{let r=[];return Uf(!(t||n),!!t,new Map,r)(e),r},Gf=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Lf(Wf(e,t)):structuredClone(e):(e,t)=>Lf(Wf(e,t));function Kf(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function qf(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Jf(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Kf,r=e.options.footnoteBackLabel||qf,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=kl(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Gf(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
15
|
+
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
16
|
+
`}]}}var Yf=(function(e){if(e==null)return ep;if(typeof e==`function`)return $f(e);if(typeof e==`object`)return Array.isArray(e)?Xf(e):Zf(e);if(typeof e==`string`)return Qf(e);throw Error(`Expected function, string, or object as test`)});function Xf(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Yf(e[n]);return $f(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Zf(e){let t=e;return $f(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Qf(e){return $f(t);function t(t){return t&&t.type===e}}function $f(e){return t;function t(t,n,r){return!!(tp(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function ep(){return!0}function tp(e){return typeof e==`object`&&!!e&&`type`in e}function np(e){return e}var rp=[];function ip(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=Yf(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+np(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=rp,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=ap(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function ap(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?rp:[e]}function op(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),ip(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var sp={}.hasOwnProperty,cp={};function lp(e,t){let n=t||cp,r=new Map,i=new Map,a={all:s,applyData:dp,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Nf,...n.handlers},one:o,options:n,patch:up,wrap:pp};return op(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(sp.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=Gf(n);return r.children=a.all(e),r}return Gf(e)}return(a.options.unknownHandler||fp)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=mp(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=mp(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function up(e,t){e.position&&(t.position=wc(e))}function dp(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,Gf(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function fp(e,t){let n=t.data||{},r=`value`in t&&!(sp.call(n,`hProperties`)||sp.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function pp(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
17
|
+
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
18
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
19
|
+
`}),n}function mp(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function hp(e,t){let n=lp(e,t),r=n.one(e,void 0),i=Jf(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
20
|
+
`},i)),a}function gp(e,t){return e&&`run`in e?async function(n,r){let i=hp(n,{file:r,...t});await e.run(i,r)}:function(n,r){return hp(n,{file:r,...e||t})}}function _p(e){if(e)throw e}var vp=n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function yp(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function bp(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?xp(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function xp(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Sp={basename:Cp,dirname:wp,extname:Tp,join:Ep,sep:`/`};function Cp(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);kp(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function wp(e){if(kp(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Tp(e){kp(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Ep(...e){let t=-1,n;for(;++t<e.length;)kp(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Dp(n)}function Dp(e){kp(e);let t=e.codePointAt(0)===47,n=Op(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Op(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function kp(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Ap={cwd:jp};function jp(){return`/`}function Mp(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Np(e){if(typeof e==`string`)e=new URL(e);else if(!Mp(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return Pp(e)}function Pp(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Fp=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Ip=class{constructor(e){let t;t=e?Mp(e)?{path:e}:typeof e==`string`||Bp(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Ap.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Fp.length;){let e=Fp[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Fp.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Sp.basename(this.path):void 0}set basename(e){Rp(e,`basename`),Lp(e,`basename`),this.path=Sp.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Sp.dirname(this.path):void 0}set dirname(e){zp(this.basename,`dirname`),this.path=Sp.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Sp.extname(this.path):void 0}set extname(e){if(Lp(e,`extname`),zp(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Sp.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Mp(e)&&(e=Np(e)),Rp(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Sp.basename(this.path,this.extname):void 0}set stem(e){Rp(e,`stem`),Lp(e,`stem`),this.path=Sp.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new q(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Lp(e,t){if(e&&e.includes(Sp.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Sp.sep+"`")}function Rp(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function zp(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Bp(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Vp=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Hp=e(vp(),1),Up={}.hasOwnProperty,Wp=new class e extends Vp{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=bp()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Hp.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(qp(`data`,this.frozen),this.namespace[e]=t,this):Up.call(this.namespace,e)&&this.namespace[e]||void 0:e?(qp(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Xp(e),n=this.parser||this.Parser;return Gp(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Gp(`process`,this.parser||this.Parser),Kp(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Xp(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Qp(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Gp(`processSync`,this.parser||this.Parser),Kp(`processSync`,this.compiler||this.Compiler),this.process(e,r),Yp(`processSync`,`process`,t),n;function r(e,r){t=!0,_p(e),n=r}}run(e,t,n){Jp(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Xp(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Yp(`runSync`,`run`,n),r;function i(e,t){_p(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Xp(t),r=this.compiler||this.Compiler;return Kp(`stringify`,r),Jp(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(qp(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Hp.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];yp(o)&&yp(r)&&(r=(0,Hp.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Gp(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Kp(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function qp(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Jp(e){if(!yp(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Yp(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Xp(e){return Zp(e)?e:new Ip(e)}function Zp(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Qp(e){return typeof e==`string`||$p(e)}function $p(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var em=[],tm={allowDangerousHtml:!0},nm=/^(https?|ircs?|mailto|xmpp)$/i,rm=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function im(e){let t=am(e),n=om(e);return sm(t.runSync(t.parse(n),n),e)}function am(e){let t=e.rehypePlugins||em,n=e.remarkPlugins||em,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...tm}:tm;return Wp().use(tf).use(n).use(gp,r).use(t)}function om(e){let t=e.children||``,n=new Ip;return typeof t==`string`?n.value=t:``+t,n}function sm(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||cm;for(let e of rm)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return op(e,l),Ic(e,{Fragment:H.Fragment,components:i,ignoreInvalidStyle:!0,jsx:H.jsx,jsxs:H.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in il)if(Object.hasOwn(il,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=il[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function cm(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||nm.test(e.slice(0,t))?e:``}function lm(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function um(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function dm(e,t,n){let r=Yf((n||{}).ignore||[]),i=fm(t),a=-1;for(;++a<i.length;)ip(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function fm(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([pm(e[0]),mm(e[1])])}return t}function pm(e){return typeof e==`string`?new RegExp(um(e),`g`):e}function mm(e){return typeof e==`function`?e:function(){return e}}var hm=`phrasing`,gm=[`autolink`,`link`,`image`,`label`];function _m(){return{transforms:[Tm],enter:{literalAutolink:ym,literalAutolinkEmail:bm,literalAutolinkHttp:bm,literalAutolinkWww:bm},exit:{literalAutolink:wm,literalAutolinkEmail:Cm,literalAutolinkHttp:xm,literalAutolinkWww:Sm}}}function vm(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:hm,notInConstruct:gm},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:hm,notInConstruct:gm},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:hm,notInConstruct:gm}]}}function ym(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function bm(e){this.config.enter.autolinkProtocol.call(this,e)}function xm(e){this.config.exit.autolinkProtocol.call(this,e)}function Sm(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Cm(e){this.config.exit.autolinkEmail.call(this,e)}function wm(e){this.exit(e)}function Tm(e){dm(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Em],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Dm]],{ignore:[`link`,`linkReference`]})}function Em(e,t,n,r,i){let a=``;if(!Am(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Om(n)))return!1;let o=km(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function Dm(e,t,n,r){return!Am(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Om(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function km(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=lm(e,`(`),a=lm(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Am(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Dl(n)||El(n))&&(!t||n!==47)}Bm.peek=zm;function jm(){this.buffer()}function Mm(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Nm(){this.buffer()}function Pm(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Fm(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yl(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Im(e){this.exit(e)}function Lm(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yl(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Rm(e){this.exit(e)}function zm(){return`[`}function Bm(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Vm(){return{enter:{gfmFootnoteCallString:jm,gfmFootnoteCall:Mm,gfmFootnoteDefinitionLabelString:Nm,gfmFootnoteDefinition:Pm},exit:{gfmFootnoteCallString:Fm,gfmFootnoteCall:Im,gfmFootnoteDefinitionLabelString:Lm,gfmFootnoteDefinition:Rm}}}function Hm(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Bm},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
21
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Wm:Um))),s(),o}}function Um(e,t,n){return t===0?e:Wm(e,t,n)}function Wm(e,t,n){return(n?``:` `)+e}var Gm=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Xm.peek=Zm;function Km(){return{canContainEols:[`delete`],enter:{strikethrough:Jm},exit:{strikethrough:Ym}}}function qm(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Gm}],handlers:{delete:Xm}}}function Jm(e){this.enter({type:`delete`,children:[]},e)}function Ym(e){this.exit(e)}function Xm(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Zm(){return`~`}function Qm(e){return e.length}function $m(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Qm,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=eh(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=th(r[d]);else{let e=th(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&(n.alignDelimiters!==!1||i!==``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
22
|
+
`)}function eh(e){return e==null?``:String(e)}function th(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function nh(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),rh);return i(),o}function rh(e,t,n){return`>`+(n?``:` `)+e}function ih(e,t){return ah(e,t.inConstruct,!0)&&!ah(e,t.notInConstruct,!1)}function ah(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function oh(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
23
|
+
`&&ih(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
24
|
+
`}function sh(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function ch(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^ \r\n]/.test(e.value)||/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function lh(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function uh(e,t,n,r){let i=lh(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(ch(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,dh);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(sh(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
25
|
+
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
26
|
+
`),a&&(u+=s.move(a+`
|
|
27
|
+
`)),u+=s.move(c),l(),u}function dh(e,t,n){return(n?``:` `)+e}function fh(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function ph(e,t,n,r){let i=fh(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
28
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function mh(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function hh(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function gh(e,t,n){let r=Il(e),i=Il(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}_h.peek=vh;function _h(e,t,n,r){let i=mh(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=gh(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=hh(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=gh(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+hh(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function vh(e,t,n){return n.options.emphasis||`*`}function yh(e,t){let n=!1;return op(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&ol(e)&&(t.options.setext||n))}function bh(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(yh(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
29
|
+
`,after:`
|
|
30
|
+
`});return r(),t(),o+`
|
|
31
|
+
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
32
|
+
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
33
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=hh(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}xh.peek=Sh;function xh(e){return e.value||``}function Sh(){return`<`}Ch.peek=wh;function Ch(e,t,n,r){let i=fh(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function wh(){return`!`}Th.peek=Eh;function Th(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Eh(){return`!`}Dh.peek=Oh;function Dh(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Oh(){return"`"}function kh(e,t){let n=ol(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][a-z+.-]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}Ah.peek=jh;function Ah(e,t,n,r){let i=fh(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(kh(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function jh(e,t,n){return kh(e,n)?`<`:`[`}Mh.peek=Nh;function Mh(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Nh(){return`[`}function Ph(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Fh(e){let t=Ph(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Ih(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Lh(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Rh(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Ih(n):Ph(n),s=e.ordered?o===`.`?`)`:`.`:Fh(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),Lh(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function zh(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Bh(e,t,n,r){let i=zh(n),a=n.bulletCurrent||Ph(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Vh(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var Hh=Yf([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Uh(e,t,n,r){return(e.children.some(function(e){return Hh(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Wh(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Gh.peek=Kh;function Gh(e,t,n,r){let i=Wh(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=gh(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=hh(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=gh(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+hh(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Kh(e,t,n){return n.options.strong||`*`}function qh(e,t,n,r){return n.safe(e.value,r)}function Jh(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Yh(e,t,n){let r=(Lh(n)+(n.options.ruleSpaces?` `:``)).repeat(Jh(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Xh={blockquote:nh,break:oh,code:uh,definition:ph,emphasis:_h,hardBreak:oh,heading:bh,html:xh,image:Ch,imageReference:Th,inlineCode:Dh,link:Ah,linkReference:Mh,list:Rh,listItem:Bh,paragraph:Vh,root:Uh,strong:Gh,text:qh,thematicBreak:Yh};function Zh(){return{enter:{table:Qh,tableData:ng,tableHeader:ng,tableRow:eg},exit:{codeText:rg,table:$h,tableData:tg,tableHeader:tg,tableRow:tg}}}function Qh(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function $h(e){this.exit(e),this.data.inTable=void 0}function eg(e){this.enter({type:`tableRow`,children:[]},e)}function tg(e){this.exit(e)}function ng(e){this.enter({type:`tableCell`,children:[]},e)}function rg(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,ig));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function ig(e,t){return t===`|`?t:e}function ag(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
34
|
+
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
35
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return $m(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Xh.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function og(){return{exit:{taskListCheckValueChecked:cg,taskListCheckValueUnchecked:cg,paragraph:lg}}}function sg(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:ug}}}function cg(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function lg(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function ug(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Xh.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function dg(){return[_m(),Vm(),Km(),Zh(),og()]}function fg(e){return{extensions:[vm(),Hm(e),qm(),ag(e),sg()]}}var pg={tokenize:Dg,partial:!0},mg={tokenize:Og,partial:!0},hg={tokenize:kg,partial:!0},gg={tokenize:Ag,partial:!0},_g={tokenize:jg,partial:!0},vg={name:`wwwAutolink`,tokenize:Tg,previous:Mg},yg={name:`protocolAutolink`,tokenize:Eg,previous:Ng},bg={name:`emailAutolink`,tokenize:wg,previous:Pg},xg={};function Sg(){return{text:xg}}for(var Cg=48;Cg<123;)xg[Cg]=bg,Cg++,Cg===58?Cg=65:Cg===91&&(Cg=97);xg[43]=bg,xg[45]=bg,xg[46]=bg,xg[95]=bg,xg[72]=[bg,yg],xg[104]=[bg,yg],xg[87]=[bg,vg],xg[119]=[bg,vg];function wg(e,t,n){let r=this,i,a;return o;function o(t){return!Fg(t)||!Pg.call(r,r.previous)||Ig(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Fg(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(_g,u,l)(t):t===45||t===95||J(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&bl(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Tg(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Mg.call(r,r.previous)||Ig(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(pg,e.attempt(mg,e.attempt(hg,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Eg(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Ng.call(r,r.previous)&&!Ig(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(bl(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Sl(t)||X(t)||Dl(t)||El(t)?n(t):e.attempt(mg,e.attempt(hg,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Dg(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Og(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(gg,c,s)(t):t===null||X(t)||Dl(t)||t!==45&&El(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function kg(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(gg,t,a)(o):o===null||X(o)||Dl(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Ag(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||X(o)||Dl(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||X(e)||Dl(e)?t(e):r(e)}function a(e){return bl(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):bl(t)?(e.consume(t),o):n(t)}}function jg(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return J(e)?n(e):t(e)}}function Mg(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||X(e)}function Ng(e){return!bl(e)}function Pg(e){return!(e===47||Fg(e))}function Fg(e){return e===43||e===45||e===46||e===95||J(e)}function Ig(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Lg={tokenize:Gg,partial:!0};function Rg(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Hg,continuation:{tokenize:Ug},exit:Wg}},text:{91:{name:`gfmFootnoteCall`,tokenize:Vg},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:zg,resolveTo:Bg}}}}function zg(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=yl(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Bg(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Vg(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||X(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(yl(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return X(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Hg(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||X(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=yl(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return X(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Q(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Ug(e,t,n){return e.check(Wl,t,e.attempt(Lg,t,n))}function Wg(e){e.exit(`gfmFootnoteDefinition`)}function Gg(e,t,n){let r=this;return Q(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Kg(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&fl(o,o.length,0,Ll(s,e.slice(r+1,n),t)),fl(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),fl(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Il(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Il(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var qg=class{constructor(){this.map=[]}add(e,t,n){Jg(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Jg(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Yg(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Xg(){return{flow:{null:{name:`table`,tokenize:Zg,resolveAll:Qg}}}}function Zg(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):Y(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Z(t)?Q(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||X(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Z(t)?Q(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Z(t)?Q(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Y(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Z(t)?Q(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Y(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Y(n)?(e.exit(`tableRow`),t(n)):Z(n)?Q(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||X(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Qg(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new qg;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(e_(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=$g(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=$g(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=$g(f,t,o,i,n,d)):(o[0]=o[1],d=$g(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&e_(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Yg(t.events,n))}return e}function $g(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},t_(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=t_(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=t_(t.events,n[2]),a=t_(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},t_(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function e_(e,t,n,r,i){let a=[],o=t_(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function t_(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var n_={name:`tasklistCheck`,tokenize:i_};function r_(){return{text:{91:n_}}}function i_(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return X(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Y(r)?t(r):Z(r)?e.check({tokenize:a_},t,n)(r):n(r)}}function a_(e,t,n){return Q(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function o_(e){return hl([Sg(),Rg(),Kg(e),Xg(),r_()])}var s_={};function c_(e){let t=this,n=e||s_,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(o_(n)),a.push(dg()),o.push(fg(n))}function l_({name:e}){return(0,H.jsxs)(`div`,{className:`max-w-3xl px-6 pt-10 text-muted-foreground select-none`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2 text-lg font-medium`,children:[(0,H.jsx)(Si,{className:`size-5 shrink-0`}),(0,H.jsx)(`span`,{className:`truncate`,children:e})]}),(0,H.jsx)(`p`,{className:`mt-2 text-sm`,children:`This folder doesn't have a README. A few things you can do with it:`}),(0,H.jsxs)(`ul`,{className:`mt-4 space-y-2 text-sm`,children:[(0,H.jsx)(u_,{icon:(0,H.jsx)(bi,{className:`size-4 shrink-0`}),children:`Drag and drop files or folders onto it to move them in.`}),(0,H.jsx)(u_,{icon:(0,H.jsx)(Xi,{className:`size-4 shrink-0`}),children:`Use the toolbar above to add a file or directory, rename, or download.`}),(0,H.jsx)(u_,{icon:(0,H.jsx)(Hi,{className:`size-4 shrink-0`}),children:`Right-click the folder for more actions.`})]})]})}function u_({icon:e,children:t}){return(0,H.jsxs)(`li`,{className:`flex items-center gap-2`,children:[e,(0,H.jsx)(`span`,{children:t})]})}async function d_({instanceClient:e,entityType:t,project:n,file:r,key:i,value:a}){let{data:o}=await e.post(`/`,{operation:`set_env_value`,project:n,file:r,key:i,value:a,replicated:t===`cluster`});return o}function f_(){return b({mutationFn:d_})}async function p_({instanceClient:e,entityType:t,project:n,file:r,key:i}){let{data:a}=await e.post(`/`,{operation:`delete_env_value`,project:n,file:r,key:i,replicated:t===`cluster`});return a}function m_(){return b({mutationFn:p_})}var h_=new Set(`assert.async_hooks.buffer.child_process.cluster.console.constants.crypto.dgram.diagnostics_channel.dns.domain.events.fs.http.http2.https.inspector.module.net.os.path.perf_hooks.process.punycode.querystring.readline.repl.stream.string_decoder.sys.timers.tls.trace_events.tty.url.util.v8.vm.wasi.worker_threads.zlib`.split(`.`)),g_=/\.(svg|png|jpe?g|gif|webp|avif|ico|bmp|css|scss|sass|less|json|wasm|txt|md|html)$/i,__=/^(?:@[a-z0-9\-~][a-z0-9\-._~]*\/)?[a-z0-9\-~][a-z0-9\-._~]*(?:\/[a-z0-9\-._~/]+)?$/i,v_=214,y_=1024;function b_(e){let t=e.indexOf(`/`);if(t<0)return e;if(!e.startsWith(`@`))return e.slice(0,t);let n=e.indexOf(`/`,t+1);return n<0?e:e.slice(0,n)}function x_(e){if(!e||e.startsWith(`.`)||e.startsWith(`/`)||e.startsWith(`@/`)||e.startsWith(`node:`)||g_.test(e))return!1;let t=b_(e);return t===`harper`||t===`harperdb`||h_.has(t)?!1:e.length<=y_&&t.length<=v_&&__.test(e)}var S_=4096,C_=47,w_=42,T_=10,E_=39,D_=34,O_=40,k_=41,A_=123,j_=125,M_=44,N_=96,P_=92,F_=36,I_=46,L_=91,R_=93,z_=60,B_=62;function V_(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95||e===36}function H_(e){return e===32||e>=9&&e<=13||e===160||e===65279||e>=8192&&e<=8202||e===8232||e===8233||e===12288}function U_(e,t,n){let r=t;for(;r<n&&H_(e.charCodeAt(r));)r++;return r}function W_(e,t,n,r){for(let i=n;i<r;i++)if(e.charCodeAt(i)===t)return i;return-1}function G_(e,t,n,r,i){for(let a=r;a+1<i;a++)if(e.charCodeAt(a)===t&&e.charCodeAt(a+1)===n)return a;return-1}function K_(e,t,n){let r=U_(e,t,n),i=e.charCodeAt(r);if(r>=n||i!==E_&&i!==D_)return;let a=Math.min(n,r+y_+2);for(let t=r+1;t<a;t++){let n=e.charCodeAt(t);if(n===i)return t===r+1?void 0:{specifier:e.slice(r+1,t),end:t+1};if(n===E_||n===D_)return}}function q_(e,t){let n=Math.min(e.length,t+S_),r=t;for(;r<n;){let t=e.charCodeAt(r);if(t===C_){let t=e.charCodeAt(r+1);if(t===C_){let t=W_(e,T_,r+2,n);if(t<0)return;r=t+1}else if(t===w_){let t=G_(e,w_,C_,r+2,n);if(t<0)return;r=t+2}else return;continue}if(V_(t)){let t=r+1;for(;t<n&&V_(e.charCodeAt(t));)t++;if(t-r===4&&e.startsWith(`from`,r)){let r=K_(e,t,n);if(r)return r}r=t;continue}if(t===A_||t===j_||t===M_||t===w_||H_(t)){r++;continue}return}}var J_=/\/\/\/\s*<reference\s+path\s*=\s*['"]([^'"]+)['"]/g;function Y_(e,t,n){let r=Math.min(e.length,n+S_);if(t!==`export`){let t=U_(e,n,r);if(e.charCodeAt(t)===O_){let n=K_(e,t+1,r);if(!n)return;let i=U_(e,n.end,r);return e.charCodeAt(i)===k_?{specifier:n.specifier,end:i+1}:void 0}}if(t!==`require`)return(t===`import`?K_(e,n,r):void 0)??q_(e,n)}function X_(e,t,n){let r=e.charCodeAt(t);for(let i=t+1;i<n;i++){let n=e.charCodeAt(i);if(n===P_)i++;else if(n===r)return i+1;else if(n===T_)return t+1}return n}function Z_(e,t,n){let r=!1;for(let i=t+1;i<n;i++){let n=e.charCodeAt(i);if(n===P_)i++;else if(n===T_)return t+1;else if(n===L_)r=!0;else if(n===R_)r=!1;else if(n===C_&&!r)return i+1}return t+1}var Q_=new Set([`return`,`typeof`,`instanceof`,`case`,`in`,`of`,`delete`,`void`,`new`,`do`,`else`,`yield`,`await`]),$_=new Set([`if`,`while`,`for`,`switch`,`catch`,`with`]);function ev(e,t,n){return V_(e)?Q_.has(t):e===k_?n:e!==R_&&e!==E_&&e!==D_&&e!==N_}var tv=0,nv=1,rv=2,iv=3;function av(e){let t=[],n=[],r=[],i=!1,a=0,o=``,s=0;for(;s<e.length;){let c=e.charCodeAt(s),l=n[n.length-1],u=l?.kind;if(u===tv){c===P_?s+=2:c===N_?(n.pop(),a=N_,s++):c===F_&&e.charCodeAt(s+1)===A_?(n.push({kind:nv,braces:0}),a=A_,o=``,s+=2):s++;continue}if(u===iv){if(c===A_)n.push({kind:nv,braces:0}),a=A_,o=``,s++;else if(c===z_){if(e.charCodeAt(s+1)===C_){let t=e.indexOf(`>`,s+2);n.pop(),a=B_,o=``,s=t<0?e.length:t+1}else n.push({kind:rv,braces:0}),s++}else s++;continue}if(u===rv){c===E_||c===D_?s=X_(e,s,e.length):c===A_?(n.push({kind:nv,braces:0}),a=A_,o=``,s++):c===C_&&e.charCodeAt(s+1)===B_?(n.pop(),a=B_,o=``,s+=2):(c===B_&&(n[n.length-1]={kind:iv,braces:0}),s++);continue}if(c===C_){let t=e.charCodeAt(s+1);if(t===C_){let t=e.indexOf(`
|
|
36
|
+
`,s+2);s=t<0?e.length:t+1;continue}if(t===w_){let t=e.indexOf(`*/`,s+2);s=t<0?e.length:t+2;continue}s=ev(a,o,i)?Z_(e,s,e.length):s+1,a=C_,o=``;continue}if(c===E_||c===D_){s=X_(e,s,e.length),a=c,o=``;continue}if(c===N_){n.push({kind:tv,braces:0}),s++;continue}if(c===z_&&ev(a,o,i)){let t=e.charCodeAt(s+1);if(t===B_||V_(t)){n.push({kind:t===B_?iv:rv,braces:0}),s+=t===B_?2:1;continue}}if(u===nv){if(c===A_)l.braces++;else if(c===j_){if(l.braces===0){n.pop(),a=j_,o=``,s++;continue}l.braces--}}if(c===O_?r.push($_.has(o)):c===k_&&(i=r.pop()??!1),V_(c)){let n=s+1;for(;n<e.length&&V_(e.charCodeAt(n));)n++;let r=e.slice(s,n),i=a!==I_&&(r===`import`||r===`export`||r===`require`)?Y_(e,r,n):void 0;if(i){t.push({specifier:i.specifier,pos:s,end:i.end}),a=e.charCodeAt(i.end-1),o=``,s=i.end;continue}a=e.charCodeAt(n-1),o=r,s=n;continue}H_(c)||(a=c,o=``),s++}return t}function ov(){return{libMap:new Map,preProcessFile(e){let t=av(e).filter(({specifier:e})=>x_(e)).map(({specifier:e,pos:t,end:n})=>({fileName:e,pos:t,end:n})),n=[];for(let t of e.matchAll(J_)){let e=t.index??0;n.push({fileName:t[1],pos:e,end:e+t[0].length})}return{referencedFiles:n,importedFiles:t,libReferenceDirectives:[],typeReferenceDirectives:[],ambientExternalModules:[],isLibFile:!1}}}}var sv,cv=new Set,lv=new bn;function uv(){return sv||=g(async()=>{let{setupTypeAcquisition:e}=await import(`./dist-D5VV8yNp.js`);return{setupTypeAcquisition:e}},[]).then(({setupTypeAcquisition:e})=>{let{typescriptDefaults:t,javascriptDefaults:n}=Lr;return e({projectName:`Harper Application`,typescript:ov(),delegate:{receivedFile(e,r){if(cv.has(r))return;cv.add(r);let{admitted:i,justExhausted:a,oversize:o}=lv.admit(e.length);if(!i){a?console.warn(`[harper] type acquisition: extra-lib budget exhausted; further packages will report "cannot find module" in this tab`):o&&console.debug(`[harper] type acquisition: skipped oversized declaration ${r} (${e.length} chars)`);return}let s=`file://${r}`;t.addExtraLib(e,s),n.addExtraLib(e,s)}}})}),sv}function dv(){return lv.isSpent}async function fv(e){if(e.length!==0&&!lv.isSpent)try{await(await uv())(e.join(`
|
|
37
|
+
;
|
|
38
|
+
`))}catch(e){console.warn(`[harper] type acquisition unavailable`,e)}}function pv(e,t,n){let r=[],i=0,a=t,o=n;for(let t of e){if(a>=150||o+t.content.length>4194304){i++;continue}r.push(t),a++,o+=t.content.length}return{selected:r,dropped:i}}function mv(e,t){let n=0;for(let r of e){let e=r.uri.toString();e.startsWith(`file:///`)&&(t&&e.startsWith(t)||r.isAttachedToEditor()||(r.dispose(),n++))}return n}function hv(e,t,n){let r=e.filter(e=>e.uri.toString().startsWith(`file:///`)),i=r.length-n;if(i<=0)return 0;let a=0;for(let e of r){if(i<=0)break;e.uri.toString()===t||e.isAttachedToEditor()||(e.dispose(),i--,a++)}return a}var gv=/\.(tsx?|jsx?|mjs|cjs|mts|cts|json)$/i,_v=/(^|\/)(tsconfig.*|jsconfig)\.json$/i,vv=/^(node_modules|dist|build|out|coverage|\.git|\.next|\.turbo|\.cache)$/i,yv=/^(package-lock\.json|pnpm-lock\.yaml|yarn\.lock)$/i,bv=5;function xv(e){return/\.json$/i.test(e)?`json`:/\.(jsx?|mjs|cjs)$/i.test(e)?`javascript`:`typescript`}function Sv(e,t){let n=e.find(e=>e.name===t);if(!n||!z(n))return[];let r=[],i=e=>{for(let t of e)z(t)?vv.test(t.name)||i(t.entries):gv.test(t.path)&&!yv.test(t.name)&&r.push(t.path)};return i(n.entries),r}function Cv(e){return e.replace(/"(?:\\.|[^"\\])*"|\/\/[^\n\r]*|\/\*[\s\S]*?\*\//g,e=>e.startsWith(`"`)?e:``)}function wv(e,t){return!t||t===`.`||t===`./`?e:`${e}/${t.replace(/^\.\//,``).replace(/^\/+/,``).replace(/\/+$/,``)}`}function Tv(e,t){let n=`file:///${e}`,r=n,i={"@/*":[`src/*`]};if(t)try{let e=JSON.parse(Cv(t)).compilerOptions??{};e.baseUrl&&(r=wv(n,e.baseUrl)),e.paths&&typeof e.paths==`object`&&(i=e.paths)}catch{}return{baseUrl:r,paths:i}}function Ev(e,t){let{baseUrl:n,paths:r}=Tv(e,t),{typescriptDefaults:i,javascriptDefaults:a}=Lr;for(let e of[i,a])e.setCompilerOptions({...e.getCompilerOptions(),baseUrl:n,paths:r})}var Dv;function Ov(e){return e===void 0?void 0:Ir.parse(`file:///${e}/`).toString()}function kv(e,t){let n=dt(),r=D(),[i,a]=(0,B.useState)(dv),o=e&&!e.package?e.project:void 0,s=e?.project,c=(0,B.useMemo)(()=>o?Sv(t,o):[],[t,o]),l=(0,B.useMemo)(()=>c.join(`|`),[c]),u=(0,B.useRef)(void 0);u.current=e?.path;let d=(0,B.useRef)(void 0);return(0,B.useEffect)(()=>{let e=o??d.current;o&&(d.current=o),Dv=e,mv(Fr.getModels(),Ov(e));let t=Fr.onDidCreateModel(e=>{hv(Fr.getModels(),e.uri.toString(),150)}),i=!1;return o&&c.length>0&&(async()=>{let e=[],t=[...c];if(await Promise.all(Array.from({length:Math.min(bv,c.length)},async()=>{for(;!i;){let i=t.shift();if(!i)return;let a=i.split(`/`).slice(1).join(`/`);try{let t=await r.fetchQuery(He({...n,project:o,file:a}));e.push({appPath:i,fileWithinProject:a,content:t.message??``})}catch{}}})),i)return;let s=0,l=0;for(let e of Fr.getModels())e.uri.toString().startsWith(`file:///`)&&(s++,l+=e.getValueLength());let d=[];for(let t of e){if(t.appPath===u.current||t.content.length>524288)continue;let e=Fr.getModel(Ir.parse(`file:///${t.appPath}`));if(e){!e.isAttachedToEditor()&&e.getValue()!==t.content&&e.setValue(t.content);continue}d.push(t)}let{selected:f,dropped:p}=pv(d,s,l);for(let e of f){let t=Ir.parse(`file:///${e.appPath}`);Fr.createModel(e.content,xv(e.appPath),t)}p>0&&console.info(`[harper] type intelligence: skipped ${p} of ${d.length} project files (model budget)`);let m=e.find(e=>_v.test(e.fileWithinProject));Ev(o,m?.content),await fv(e.filter(e=>/\.(tsx?|jsx?|mjs|cjs|mts|cts)$/i.test(e.appPath)&&!/\.d\.ts$/i.test(e.appPath)&&e.content.length<=524288).map(e=>e.content)),i||a(dv())})(),()=>{i=!0,t.dispose(),Dv=void 0,setTimeout(()=>{mv(Fr.getModels(),Ov(Dv))},0)}},[o,s,l]),{typeAcquisitionBudgetExhausted:i}}var Av=10,jv=typeof navigator<`u`&&/Mac|iPhone|iPad/.test(navigator.platform||navigator.userAgent);function Mv(e){if(!e)return;if(`startLineNumber`in e)return e;let{lineNumber:t,column:n}=e;return{startLineNumber:t,startColumn:n,endLineNumber:t,endColumn:n}}function Nv(e){let{setExpandedItems:t,setSelectedItems:n,setFocusedItem:r,entryExists:i}=V(),a=(0,B.useRef)(()=>{});a.current=e=>{t(t=>{let n=new Set(t),r=e.split(`/`);for(let e=1;e<r.length;e++)n.add(r.slice(0,e).join(`/`));return[...n]}),n([e]),r(e)};let o=(0,B.useRef)(i);o.current=i;let s=(0,B.useRef)([]),c=(0,B.useRef)([]),l=(0,B.useRef)(void 0),u=(0,B.useRef)(!1),d=(0,B.useRef)(()=>{}),f=(0,B.useRef)(()=>{});_t(`NavigateBack`,()=>d.current(),[]),_t(`NavigateForward`,()=>f.current(),[]),(0,B.useEffect)(()=>{if(!e)return;let t=()=>{R(`CanNavigateBack`,s.current.length>0),R(`CanNavigateForward`,c.current.length>0)},n=(t,n,r)=>{let i=!1,a=()=>{i||(i=!0,r())},o=()=>e.getModel()?.uri.toString()===t&&(setTimeout(()=>{n&&e.getModel()?.uri.toString()===t&&(e.setSelection(n),e.revealRangeInCenterIfOutsideViewport(n,Fr.ScrollType.Smooth)),e.focus(),a()},0),!0);if(o())return;let s=e.onDidChangeModel(()=>{o()&&s.dispose()});setTimeout(()=>{s.dispose(),a()},8e3)},r=t=>{u.current=!0;let r={lineNumber:t.lineNumber,column:t.column};if(e.getModel()?.uri.toString()===t.uri){e.setPosition(r),e.revealPositionInCenterIfOutsideViewport(r,Fr.ScrollType.Smooth),e.focus(),l.current=t,u.current=!1;return}let i=Ir.parse(t.uri).path.replace(/^\/+/,``);if(!o.current(i)){u.current=!1;return}a.current(i),n(t.uri,Mv(r),()=>{l.current=t,u.current=!1})},i=()=>{let e=s.current.pop();e&&(l.current&&c.current.push(l.current),t(),r(e))},p=()=>{let e=c.current.pop();e&&(l.current&&s.current.push(l.current),t(),r(e))};d.current=i,f.current=p;let m=e.onDidChangeCursorPosition(n=>{let r=e.getModel();if(!r)return;let i={uri:r.uri.toString(),lineNumber:n.position.lineNumber,column:n.position.column};if(u.current){l.current=i;return}let a=l.current;a&&(a.uri!==i.uri||Math.abs(a.lineNumber-i.lineNumber)>=Av)&&a&&(s.current.push(a),c.current=[],t()),l.current=i}),h=Fr.registerEditorOpener({openCodeEditor(r,i,d){if(r.getModel()?.uri.toString()===i.toString())return!1;let f=i.path.replace(/^\/+/,``);return o.current(f)?(l.current&&(s.current.push(l.current),c.current=[],t()),u.current=!0,a.current(f),n(i.toString(),Mv(d),()=>{let t=e.getModel(),n=e.getPosition();t&&n&&(l.current={uri:t.uri.toString(),lineNumber:n.lineNumber,column:n.column}),u.current=!1}),!0):!1}}),g=e.addAction({id:`harper.navigateBack`,label:`Go Back`,keybindings:[jv?zr.WinCtrl|Rr.Minus:zr.Alt|Rr.LeftArrow],contextMenuGroupId:`navigation`,contextMenuOrder:1.5,run:()=>i()}),_=e.addAction({id:`harper.navigateForward`,label:`Go Forward`,keybindings:[jv?zr.WinCtrl|zr.Shift|Rr.Minus:zr.Alt|Rr.RightArrow],contextMenuGroupId:`navigation`,contextMenuOrder:1.6,run:()=>p()}),v=e.getDomNode(),y=e=>{(e.button===3||e.button===4)&&e.preventDefault()},b=e=>{e.button===3?(e.preventDefault(),i()):e.button===4&&(e.preventDefault(),p())};return v?.addEventListener(`mousedown`,y),v?.addEventListener(`mouseup`,b),t(),()=>{m.dispose(),h.dispose(),g.dispose(),_.dispose(),v?.removeEventListener(`mousedown`,y),v?.removeEventListener(`mouseup`,b)}},[e])}var Pv={budget:`Type information is limited to keep the editor responsive — this application references more packages than the editor can load, so some imports may show “cannot find module.”`,oversized:`This file is large, so it’s shown as plain text without language features.`};function Fv({variant:e,onDismiss:t}){return(0,H.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:`mt-9 flex items-start gap-2 border-b border-amber-500/40 bg-amber-500/10 px-4 py-2 text-sm text-foreground`,children:[(0,H.jsx)(e===`oversized`?Tt:vr,{className:`mt-0.5 size-4 shrink-0 text-amber-500`,"aria-hidden":!0}),(0,H.jsx)(`span`,{className:`flex-1`,children:Pv[e]}),(0,H.jsx)(`button`,{type:`button`,onClick:t,"aria-label":`Dismiss notice`,className:`shrink-0 rounded p-0.5 text-muted-foreground hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-amber-500`,children:(0,H.jsx)(wn,{className:`size-4`,"aria-hidden":!0})})]})}var Iv=[{name:`table`,locations:[`OBJECT`],description:`Attach to an object type to persist it as a table.`,args:[{name:`table`,type:`String`,description:`Explicit table name. If omitted, a sensible default derived from the type name is used.`},{name:`database`,type:`String`,description:`Logical database/namespace to place this table in.`},{name:`expiration`,type:`Int`,description:`Default time-to-live (TTL) for records in seconds. Use a positive value to enable automatic expiration; omit or set to 0 to disable.`},{name:`audit`,type:`Boolean`,description:`Enable auditing for create/update/delete operations.`},{name:`eviction`,type:`Int`,description:`The amount of time after expiration before a record can be evicted (defaults to zero).`},{name:`scanInterval`,type:`Int`,description:`The interval for scanning for expired records (defaults to one quarter of the total of expiration and eviction).`},{name:`replicate`,type:`Boolean`,description:`Configure replication for this individual table. Set to false to disable and exclude this table from a replicated database.`},{name:`randomAccessFields`,type:`Boolean`,description:`Encode records as typed random-access structures for fast field access and smaller records. Best for stable, homogeneous field types; pins this table's encoding, overriding the global storage.randomAccessFields config.`}]},{name:`export`,locations:[`OBJECT`],description:`Expose the table via the REST API. When applied to a @table type, routes are generated using the type name or the provided alias.`,args:[{name:`name`,type:`String`,description:`Optional alias to use for REST endpoints. If omitted, the type/table name is used.`},{name:`rest`,type:`Boolean`,description:`REST support is on by default for any exported resource. Specify false to disable it.`},{name:`mqtt`,type:`Boolean`,description:`MQTT support is on by default for any exported resource. Specify false to disable it.`}]},{name:`sealed`,locations:[`OBJECT`],description:`Restrict records to only the defined properties. By default Harper supports heterogeneous records, so you can freely add properties; add @sealed to forbid undefined properties.`,args:[]},{name:`primaryKey`,locations:[`FIELD_DEFINITION`],description:`Marks the primary key field for the table. The value must be unique per record and is used for lookups, updates, and relationships.`,args:[]},{name:`enumerable`,locations:[`FIELD_DEFINITION`],description:`Allows enumeration over a computed field, causing it to be included in serialized responses. (Non-computed fields are always enumerable.)`,args:[]},{name:`expiresAt`,locations:[`FIELD_DEFINITION`],description:`Flags the field as containing the expiration time of the entry.`,args:[]},{name:`allow`,locations:[`FIELD_DEFINITION`],description:`Permit access to the field based on the named roles, only.`,args:[{name:`role`,type:`String`,description:`Role permitted to access the field.`}]},{name:`indexed`,locations:[`FIELD_DEFINITION`],description:`Create an index for the annotated field. Supports traditional and vector/ANN index types.`,args:[{name:`type`,type:`String`,description:`Optional index type, e.g. "HNSW".`},{name:`distance`,type:`String`,description:`Distance metric for vector indexes (e.g., "euclidean", "cosine"). Ignored for non-vector index types.`},{name:`efConstruction`,type:`Int`,description:`Construction effort/recall parameter (HNSW). Higher values improve recall at the cost of build time and memory.`},{name:`M`,type:`Int`,description:`Maximum number of bi-directional connections per node (HNSW). Typical range: 4–64.`},{name:`optimizeRouting`,type:`Int`,description:`Routing optimization level for search graphs (implementation-specific).`},{name:`mL`,type:`Int`,description:`Additional multiplier for graph links (implementation-specific).`},{name:`efConstructionSearch`,type:`Int`,description:`Search-time effort/recall parameter used during construction (implementation-specific). Larger values typically yield better accuracy.`}]},{name:`computed`,locations:[`FIELD_DEFINITION`],description:`Define a derived field whose value is computed from other fields. Useful for denormalized or presentation-friendly data.`,args:[{name:`from`,type:`String`,description:`Computation expression or reference describing how to derive this field from other fields (engine-specific syntax).`},{name:`version`,type:`Int`,description:`Increment when the computation changes to trigger recomputation.`}]},{name:`createdTime`,locations:[`FIELD_DEFINITION`],description:`Automatically sets this field to the record's creation timestamp. The server assigns the value on insert.`,args:[]},{name:`updatedTime`,locations:[`FIELD_DEFINITION`],description:`Automatically updates this field to the current timestamp whenever the record is updated.`,args:[]},{name:`relationship`,locations:[`FIELD_DEFINITION`],description:`Declares a relationship to another record or records. Use on fields that should resolve to related entities by ID.`,args:[{name:`from`,type:`String`,description:`Name of field in THIS table containing foreign key(s) (for one-to-many or many-to-many).`},{name:`to`,type:`String`,description:`Name of field in OTHER table containing foreign key (for one-to-one or many-to-one).`}]}],Lv=[{name:`Any`,harperSpecific:!0,description:`A flexible JSON-like value. Accepts objects, arrays, strings, numbers, booleans, or null. Useful for schemaless or mixed content.`},{name:`BigInt`,harperSpecific:!0,description:"Arbitrary-precision integer for values larger than 32-bit/64-bit ranges. Use `Long` for 64-bit integers when possible."},{name:`Blob`,harperSpecific:!0,description:`Binary large object. Represents binary data such as images or files. Typically encoded as Base64 in JSON.`},{name:`Bytes`,harperSpecific:!0,description:`Raw bytes. Typically encoded/transported as Base64 in JSON. Use when you need deterministic binary data that is not a large file.`},{name:`Date`,harperSpecific:!0,description:`Date/time scalar. Recommended format: RFC 3339/ISO-8601 (e.g., "2025-12-02T19:44:00Z"). Represents an absolute timestamp.`},{name:`Long`,harperSpecific:!0,description:`64-bit signed integer. Some clients may serialize values as strings to preserve precision across environments.`},{name:`Boolean`,harperSpecific:!1,description:`true or false`},{name:`Float`,harperSpecific:!1,description:`A signed double-precision floating-point value.`},{name:`ID`,harperSpecific:!1,description:`A unique identifier, serialized as a String, often used to refetch an object or as a cache key. Not intended to be human-readable.`},{name:`Int`,harperSpecific:!1,description:`A signed 32-bit integer.`},{name:`String`,harperSpecific:!1,description:`A UTF-8 character sequence.`}];function Rv(e){return Iv.find(t=>t.name===e)}function zv(e){return Lv.find(t=>t.name===e)}var Bv=/@(\w+)\s*\([^)]*$/,Vv=/@\w*$/,Hv=/:\s*\[?\s*\w*$/;function Uv(e){let t=e.match(Bv);return t?{kind:`directiveArg`,directive:t[1]}:Vv.test(e)?{kind:`directive`}:Hv.test(e)?{kind:`fieldType`}:{kind:`none`}}function Wv(e){let t=new Set,n=/\b(?:type|input|interface|enum|scalar|union)\s+([A-Za-z_]\w*)/g,r;for(;r=n.exec(e);)t.add(r[1]);return[...t]}function Gv({word:e,charBeforeWord:t,lineBeforeWord:n}){if(t===`@`){let t=Rv(e);return t?{kind:`directive`,directive:t}:void 0}let r=zv(e);if(r)return{kind:`scalar`,scalar:r};let i=n.match(Bv);if(i){let t=Rv(i[1]),n=t?.args.find(t=>t.name===e);if(t&&n)return{kind:`directiveArg`,directive:t,arg:n}}}function Kv(e){let t=e.args.length>0?`(${e.args.map(e=>`${e.name}: ${e.type}`).join(`, `)})`:``;return`@${e.name}${t} on ${e.locations.join(` | `)}`}function qv(e){switch(e.kind){case`directive`:return`\`\`\`graphql\n${Kv(e.directive)}\n\`\`\`\n\n${e.directive.description}`;case`scalar`:{let t=e.scalar.harperSpecific?`Harper scalar`:`GraphQL scalar`;return`\`\`\`graphql\nscalar ${e.scalar.name}\n\`\`\`\n\n_${t}_\n\n${e.scalar.description}`}case`directiveArg`:return`\`\`\`graphql\n${e.arg.name}: ${e.arg.type}\n\`\`\`\n\n_argument of \`@${e.directive.name}\`_\n\n${e.arg.description}`}}function Jv(e,t){return Iv.map(n=>{let r=n.args.length>0;return{label:`@${n.name}`,kind:e.languages.CompletionItemKind.Function,detail:`directive · ${n.locations.join(` | `)}`,documentation:{value:n.description},filterText:n.name,insertText:r?`${n.name}($1)`:n.name,insertTextRules:r?e.languages.CompletionItemInsertTextRule.InsertAsSnippet:void 0,range:t}})}function Yv(e,t,n){let r=Lv.map(n=>({label:n.name,kind:e.languages.CompletionItemKind.Struct,detail:n.harperSpecific?`Harper scalar`:`GraphQL scalar`,documentation:{value:n.description},insertText:n.name,range:t})),i=n.map(n=>({label:n,kind:e.languages.CompletionItemKind.Class,detail:`type`,insertText:n,range:t}));return[...r,...i]}function Xv(e,t,n){let r=Rv(n);return r?r.args.map(n=>({label:n.name,kind:e.languages.CompletionItemKind.Field,detail:n.type,documentation:{value:n.description},insertText:`${n.name}: $1`,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:t})):[]}function Zv(e){e.languages.registerCompletionItemProvider(`graphql`,{triggerCharacters:[`@`,`:`,`(`],provideCompletionItems(t,n){let r=t.getValueInRange({startLineNumber:n.lineNumber,startColumn:1,endLineNumber:n.lineNumber,endColumn:n.column}),i=t.getWordUntilPosition(n),a={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:i.startColumn,endColumn:i.endColumn},o=Uv(r);switch(o.kind){case`directive`:return{suggestions:Jv(e,a)};case`directiveArg`:return{suggestions:Xv(e,a,o.directive)};case`fieldType`:return{suggestions:Yv(e,a,Wv(t.getValue()))};default:return{suggestions:[]}}}}),e.languages.registerHoverProvider(`graphql`,{provideHover(t,n){let r=t.getWordAtPosition(n);if(!r)return null;let i=r.startColumn>1?t.getValueInRange({startLineNumber:n.lineNumber,startColumn:r.startColumn-1,endLineNumber:n.lineNumber,endColumn:r.startColumn}):``,a=t.getValueInRange({startLineNumber:n.lineNumber,startColumn:1,endLineNumber:n.lineNumber,endColumn:r.startColumn}),o=Gv({word:r.word,charBeforeWord:i,lineBeforeWord:a});return o?{range:new e.Range(n.lineNumber,r.startColumn,n.lineNumber,r.endColumn),contents:[{value:qv(o)}]}:null}})}var Qv=`
|
|
39
|
+
/** Harper structured logger. Each level accepts any number of arguments. */
|
|
40
|
+
interface HarperLogger {
|
|
41
|
+
notify(...args: any[]): void;
|
|
42
|
+
fatal(...args: any[]): void;
|
|
43
|
+
error(...args: any[]): void;
|
|
44
|
+
warn(...args: any[]): void;
|
|
45
|
+
info(...args: any[]): void;
|
|
46
|
+
debug(...args: any[]): void;
|
|
47
|
+
trace(...args: any[]): void;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Base class for any Harper resource. Database tables extend it, and you can
|
|
52
|
+
* extend it to define custom data sources, caching sources, messaging
|
|
53
|
+
* endpoints, and RESTful endpoints. Override the instance methods (get, put,
|
|
54
|
+
* post, patch, delete, subscribe, …) to provide behavior; the static methods
|
|
55
|
+
* are the entry points that wrap calls in a transaction.
|
|
56
|
+
*/
|
|
57
|
+
declare class Resource<RecordType extends object = any> {
|
|
58
|
+
constructor(identifier?: any, source?: any);
|
|
59
|
+
|
|
60
|
+
/** Directly get a resource. Called for HTTP GET requests. */
|
|
61
|
+
static get(idOrQuery?: any, dataOrContext?: any, context?: any): any;
|
|
62
|
+
/** Store the provided record by id. If no id is provided, one is generated. */
|
|
63
|
+
static put(idOrQuery?: any, dataOrContext?: any, context?: any): any;
|
|
64
|
+
static patch(idOrQuery?: any, dataOrContext?: any, context?: any): any;
|
|
65
|
+
static delete(idOrQuery?: any, dataOrContext?: any, context?: any): any;
|
|
66
|
+
static post(idOrQuery?: any, dataOrContext?: any, context?: any): any;
|
|
67
|
+
static update(idOrQuery?: any, dataOrContext?: any, context?: any): any;
|
|
68
|
+
static invalidate(idOrQuery?: any, dataOrContext?: any, context?: any): any;
|
|
69
|
+
static connect(idOrQuery?: any, dataOrContext?: any, context?: any): any;
|
|
70
|
+
static subscribe(idOrQuery?: any, dataOrContext?: any, context?: any): any;
|
|
71
|
+
static publish(idOrQuery?: any, dataOrContext?: any, context?: any): any;
|
|
72
|
+
static search(idOrQuery?: any, dataOrContext?: any, context?: any): any;
|
|
73
|
+
static query(idOrQuery?: any, dataOrContext?: any, context?: any): any;
|
|
74
|
+
static copy(idOrQuery?: any, dataOrContext?: any, context?: any): any;
|
|
75
|
+
static move(idOrQuery?: any, dataOrContext?: any, context?: any): any;
|
|
76
|
+
/** Create a new resource. If no id is provided, one is generated. */
|
|
77
|
+
static create(record: any, context?: any): Promise<any>;
|
|
78
|
+
static create(idPrefix: any, record: any, context: any): Promise<any>;
|
|
79
|
+
/** Generate a new primary key (a UUID by default). */
|
|
80
|
+
static getNewId(): string;
|
|
81
|
+
static getResource(target: any, request: any, options?: any): Resource | Promise<Resource>;
|
|
82
|
+
|
|
83
|
+
/** Get the primary key value for this resource. */
|
|
84
|
+
getId(): any;
|
|
85
|
+
/** Get the context (transaction, user, and more) for this resource. */
|
|
86
|
+
getContext(): any;
|
|
87
|
+
/** Get the current user for the request, or undefined if not logged in. */
|
|
88
|
+
getCurrentUser(): any;
|
|
89
|
+
|
|
90
|
+
get?(target?: any): any;
|
|
91
|
+
search?(target?: any): AsyncIterable<RecordType>;
|
|
92
|
+
create?(newRecord?: Partial<RecordType>, target?: any): Promise<any>;
|
|
93
|
+
put?(record?: RecordType, target?: any): any;
|
|
94
|
+
patch?(record?: Partial<RecordType>, target?: any): any;
|
|
95
|
+
post?(target?: any, newRecord?: Partial<RecordType>): any;
|
|
96
|
+
delete?(target?: any): boolean | Promise<boolean>;
|
|
97
|
+
invalidate?(target?: any): void | Promise<void>;
|
|
98
|
+
publish?(target?: any, record?: RecordType, options?: any): void;
|
|
99
|
+
subscribe?(request?: any): AsyncIterable<RecordType>;
|
|
100
|
+
connect?(target?: any, incomingMessages?: any): AsyncIterable<RecordType>;
|
|
101
|
+
|
|
102
|
+
allowRead?(user?: any, target?: any, context?: any): boolean | Promise<boolean>;
|
|
103
|
+
allowUpdate?(user?: any, record?: any, context?: any): boolean | Promise<boolean>;
|
|
104
|
+
allowCreate?(user?: any, record?: any, context?: any): boolean | Promise<boolean>;
|
|
105
|
+
allowDelete?(user?: any, target?: any, context?: any): boolean | Promise<boolean>;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/** The set of tables in a database, keyed by table name. */
|
|
109
|
+
interface HarperTables {
|
|
110
|
+
[tableName: string]: typeof Resource;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** All Harper databases, keyed by database name; each holds its tables. */
|
|
114
|
+
interface HarperDatabases {
|
|
115
|
+
[databaseName: string]: HarperTables;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** Central interface for registering server protocol handlers. */
|
|
119
|
+
interface HarperServer {
|
|
120
|
+
/** Register an HTTP request handler. */
|
|
121
|
+
http(listener: (request: any, nextLayer: (request: any) => any) => void, options?: any): void;
|
|
122
|
+
/** Register a request handler (alias surface of http). */
|
|
123
|
+
request(listener: (request: any, nextLayer: (request: any) => any) => void, options?: any): void;
|
|
124
|
+
/** Register a WebSocket handler. */
|
|
125
|
+
ws(listener: (ws: any, request: any, requestCompletion: Promise<any>) => any, options?: any): void;
|
|
126
|
+
/** Register a connection upgrade handler. */
|
|
127
|
+
upgrade(listener: (request: any, socket: any, head: any, nextLayer: (...args: any[]) => Promise<void>) => Promise<void>, options?: any): void;
|
|
128
|
+
/** Register a raw socket handler. */
|
|
129
|
+
socket(listener: (socket: any) => void, options: any): void;
|
|
130
|
+
/** Register a custom operation. */
|
|
131
|
+
registerOperation(operationDefinition: any): void;
|
|
132
|
+
/** Run a Harper operation. */
|
|
133
|
+
operation(operation: any, context?: any, authorize?: boolean): Promise<any>;
|
|
134
|
+
/** Record an analytics metric. */
|
|
135
|
+
recordAnalytics(value: any, metric: string, path?: string, method?: string, type?: string): void;
|
|
136
|
+
getUser(username: string, password: string | null, request: any): any;
|
|
137
|
+
authenticateUser(username: string, password: string, request: any): any;
|
|
138
|
+
contentTypes: Map<string, any>;
|
|
139
|
+
hostname: string;
|
|
140
|
+
resources: any;
|
|
141
|
+
nodes: any[];
|
|
142
|
+
replication: any;
|
|
143
|
+
[key: string]: any;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/** The default database's tables, keyed by table name. */
|
|
147
|
+
declare const tables: HarperTables;
|
|
148
|
+
/** All Harper databases, keyed by database name. */
|
|
149
|
+
declare const databases: HarperDatabases;
|
|
150
|
+
/** The Harper server: register HTTP/WS/socket handlers and operations. */
|
|
151
|
+
declare const server: HarperServer;
|
|
152
|
+
/** Harper structured logger. */
|
|
153
|
+
declare const logger: HarperLogger;
|
|
154
|
+
/** Registry of content-type (de)serializers, keyed by media type. */
|
|
155
|
+
declare const contentTypes: Record<string, any>;
|
|
156
|
+
/** Run a callback inside a Harper transaction. */
|
|
157
|
+
declare const transaction: <T = any>(callback: (transaction: any) => T | Promise<T>) => Promise<T>;
|
|
158
|
+
/** Create a Blob from binary data or a stream. */
|
|
159
|
+
declare const createBlob: (source?: any) => any;
|
|
160
|
+
/** Invoke a Harper operation directly. */
|
|
161
|
+
declare const operation: (operation: any, context?: any) => Promise<any>;
|
|
162
|
+
/** Worker threads available to this resource. */
|
|
163
|
+
declare const threads: unknown[];
|
|
164
|
+
|
|
165
|
+
declare module 'harper' {
|
|
166
|
+
export { Resource, tables, databases, server, logger, contentTypes, transaction, createBlob, operation, threads };
|
|
167
|
+
|
|
168
|
+
// Additional value exports from harper's entry point.
|
|
169
|
+
export class RequestTarget {
|
|
170
|
+
constructor(path?: any, query?: any);
|
|
171
|
+
[key: string]: any;
|
|
172
|
+
}
|
|
173
|
+
export function getContext(): any;
|
|
174
|
+
export function getResponse(): any;
|
|
175
|
+
export function getUser(): any;
|
|
176
|
+
|
|
177
|
+
// Commonly imported types (modeled loosely; see harper/dist/index.d.ts).
|
|
178
|
+
export type Logger = HarperLogger;
|
|
179
|
+
export type Table = typeof Resource;
|
|
180
|
+
export type Attribute = any;
|
|
181
|
+
export type Context = any;
|
|
182
|
+
export type SourceContext = any;
|
|
183
|
+
export type Query = any;
|
|
184
|
+
export type Session = any;
|
|
185
|
+
export type SubscriptionRequest = any;
|
|
186
|
+
export type RequestTargetOrId = any;
|
|
187
|
+
export type ResourceInterface<RecordType = any> = any;
|
|
188
|
+
export type RecordObject = any;
|
|
189
|
+
export type IterableEventQueue<T = any> = any;
|
|
190
|
+
export type User = any;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// Harper components historically import from 'harperdb'; alias it to 'harper'.
|
|
194
|
+
declare module 'harperdb' {
|
|
195
|
+
export * from 'harper';
|
|
196
|
+
}
|
|
197
|
+
`,$v=`file:///node_modules/@types/harper-globals/index.d.ts`,ey=`file:///node_modules/@types/harper-assets/index.d.ts`,ty=`
|
|
198
|
+
declare module '*.svg' { const url: string; export default url; }
|
|
199
|
+
declare module '*.png' { const url: string; export default url; }
|
|
200
|
+
declare module '*.jpg' { const url: string; export default url; }
|
|
201
|
+
declare module '*.jpeg' { const url: string; export default url; }
|
|
202
|
+
declare module '*.gif' { const url: string; export default url; }
|
|
203
|
+
declare module '*.webp' { const url: string; export default url; }
|
|
204
|
+
declare module '*.avif' { const url: string; export default url; }
|
|
205
|
+
declare module '*.ico' { const url: string; export default url; }
|
|
206
|
+
declare module '*.bmp' { const url: string; export default url; }
|
|
207
|
+
declare module '*.css' { const classes: { readonly [name: string]: string }; export default classes; }
|
|
208
|
+
declare module '*.scss' { const classes: { readonly [name: string]: string }; export default classes; }
|
|
209
|
+
declare module '*.sass' { const classes: { readonly [name: string]: string }; export default classes; }
|
|
210
|
+
declare module '*.less' { const classes: { readonly [name: string]: string }; export default classes; }
|
|
211
|
+
declare module '*?raw' { const content: string; export default content; }
|
|
212
|
+
declare module '*?url' { const url: string; export default url; }
|
|
213
|
+
`;function ny(){let{typescriptDefaults:e,javascriptDefaults:t,ScriptTarget:n,ModuleKind:r,ModuleResolutionKind:i,JsxEmit:a}=Lr;for(let o of[e,t])o.addExtraLib(Qv,$v),o.addExtraLib(ty,ey),o.setEagerModelSync(!0),o.setCompilerOptions({...o.getCompilerOptions(),target:n.ESNext,module:r.ESNext,moduleResolution:i.NodeJs,allowJs:!0,allowNonTsExtensions:!0,esModuleInterop:!0,skipLibCheck:!0,noEmit:!0,jsx:a.Preserve,allowImportingTsExtensions:!0,resolveJsonModule:!0})}var ry;(()=>{var e={975:e=>{function t(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}function n(e,t){for(var n,r=``,i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(n===47)break;n=47}if(n===47){if(a!==s-1&&o!==1){if(a!==s-1&&o===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var c=r.lastIndexOf(`/`);if(c!==r.length-1){c===-1?(r=``,i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf(`/`),a=s,o=0;continue}}else if(r.length===2||r.length===1){r=``,i=0,a=s,o=0;continue}}t&&(r.length>0?r+=`/..`:r=`..`,i=2)}else r.length>0?r+=`/`+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1}a=s,o=0}else n===46&&o!==-1?++o:o=-1}return r}var r={resolve:function(){for(var e,r=``,i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(e===void 0&&(e=process.cwd()),o=e),t(o),o.length!==0&&(r=o+`/`+r,i=o.charCodeAt(0)===47)}return r=n(r,!i),i?r.length>0?`/`+r:`/`:r.length>0?r:`.`},normalize:function(e){if(t(e),e.length===0)return`.`;var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return(e=n(e,!r)).length!==0||r||(e=`.`),e.length>0&&i&&(e+=`/`),r?`/`+e:e},isAbsolute:function(e){return t(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return`.`;for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(e===void 0?e=i:e+=`/`+i)}return e===void 0?`.`:r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n||(e=r.resolve(e))===(n=r.resolve(n)))return``;for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var a=e.length,o=a-i,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var c=n.length-s,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(n.charCodeAt(s+d)===47)return n.slice(s+d+1);if(d===0)return n.slice(s+d)}else o>l&&(e.charCodeAt(i+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(i+d);if(f!==n.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=i+u+1;d<=a;++d)d!==a&&e.charCodeAt(d)!==47||(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+n.slice(s+u):(s+=u,n.charCodeAt(s)===47&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),e.length===0)return`.`;for(var n=e.charCodeAt(0),r=n===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if((n=e.charCodeAt(o))===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},basename:function(e,n){if(n!==void 0&&typeof n!=`string`)throw TypeError(`"ext" argument must be a string`);t(e);var r,i=0,a=-1,o=!0;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return``;var s=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(l===47){if(!o){i=r+1;break}}else c===-1&&(o=!1,c=r+1),s>=0&&(l===n.charCodeAt(s)?--s==-1&&(a=r):(s=-1,a=c))}return i===a?a=c:a===-1&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===47){if(!o){i=r+1;break}}else a===-1&&(o=!1,a=r+1);return a===-1?``:e.slice(i,a)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c!==47)i===-1&&(a=!1,i=s+1),c===46?n===-1?n=s:o!==1&&(o=1):n!==-1&&(o=-1);else if(!a){r=s+1;break}}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?``:e.slice(n,i)},format:function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+`/`+r:r}(0,e)},parse:function(e){t(e);var n={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return n;var r,i=e.charCodeAt(0),a=i===47;a?(n.root=`/`,r=1):r=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if((i=e.charCodeAt(u))!==47)c===-1&&(l=!1,c=u+1),i===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1);else if(!l){s=u+1;break}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(n.base=n.name=s===0&&a?e.slice(1,c):e.slice(s,c)):(s===0&&a?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(s,o),n.base=e.slice(s,c)),n.ext=e.slice(o,c)),s>0?n.dir=e.slice(0,s-1):a&&(n.dir=`/`),n},sep:`/`,delimiter:`:`,win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};let i;n.r(r),n.d(r,{URI:()=>u,Utils:()=>C}),typeof process==`object`?i=process.platform===`win32`:typeof navigator==`object`&&(i=navigator.userAgent.indexOf(`Windows`)>=0);let a=/^\w[\w\d+.-]*$/,o=/^\//,s=/^\/\//;function c(e,t){if(!e.scheme&&t)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!a.test(e.scheme))throw Error(`[UriError]: Scheme contains illegal characters.`);if(e.path){if(e.authority){if(!o.test(e.path))throw Error(`[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character`)}else if(s.test(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}let l=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{static isUri(e){return e instanceof u||!!e&&typeof e.authority==`string`&&typeof e.fragment==`string`&&typeof e.path==`string`&&typeof e.query==`string`&&typeof e.scheme==`string`&&typeof e.fsPath==`string`&&typeof e.with==`function`&&typeof e.toString==`function`}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,a=!1){typeof e==`object`?(this.scheme=e.scheme||``,this.authority=e.authority||``,this.path=e.path||``,this.query=e.query||``,this.fragment=e.fragment||``):(this.scheme=function(e,t){return e||t?e:`file`}(e,a),this.authority=t||``,this.path=function(e,t){switch(e){case`https`:case`http`:case`file`:t?t[0]!==`/`&&(t=`/`+t):t=`/`}return t}(this.scheme,n||``),this.query=r||``,this.fragment=i||``,c(this,a))}get fsPath(){return g(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=``),n===void 0?n=this.authority:n===null&&(n=``),r===void 0?r=this.path:r===null&&(r=``),i===void 0?i=this.query:i===null&&(i=``),a===void 0?a=this.fragment:a===null&&(a=``),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new f(t,n,r,i,a)}static parse(e,t=!1){let n=l.exec(e);return n?new f(n[2]||``,b(n[4]||``),b(n[5]||``),b(n[7]||``),b(n[9]||``),t):new f(``,``,``,``,``)}static file(e){let t=``;if(i&&(e=e.replace(/\\/g,`/`)),e[0]===`/`&&e[1]===`/`){let n=e.indexOf(`/`,2);n===-1?(t=e.substring(2),e=`/`):(t=e.substring(2,n),e=e.substring(n)||`/`)}return new f(`file`,t,e,``,``)}static from(e){let t=new f(e.scheme,e.authority,e.path,e.query,e.fragment);return c(t,!0),t}toString(e=!1){return _(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof u)return e;{let t=new f(e);return t._formatted=e.external,t._fsPath=e._sep===d?e.fsPath:null,t}}return e}}let d=i?1:void 0;class f extends u{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=g(this,!1),this._fsPath}toString(e=!1){return e?_(this,!0):(this._formatted||=_(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=d),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}let p={58:`%3A`,47:`%2F`,63:`%3F`,35:`%23`,91:`%5B`,93:`%5D`,64:`%40`,33:`%21`,36:`%24`,38:`%26`,39:`%27`,40:`%28`,41:`%29`,42:`%2A`,43:`%2B`,44:`%2C`,59:`%3B`,61:`%3D`,32:`%20`};function m(e,t,n){let r,i=-1;for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r!==void 0&&(r+=e.charAt(a));else{r===void 0&&(r=e.substr(0,a));let t=p[o];t===void 0?i===-1&&(i=a):(i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r+=t)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r===void 0?e:r}function h(e){let t;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r===35||r===63?(t===void 0&&(t=e.substr(0,n)),t+=p[r]):t!==void 0&&(t+=e[n])}return t===void 0?e:t}function g(e,t){let n;return n=e.authority&&e.path.length>1&&e.scheme===`file`?`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,i&&(n=n.replace(/\//g,`\\`)),n}function _(e,t){let n=t?h:m,r=``,{scheme:i,authority:a,path:o,query:s,fragment:c}=e;if(i&&(r+=i,r+=`:`),(a||i===`file`)&&(r+=`/`,r+=`/`),a){let e=a.indexOf(`@`);if(e!==-1){let t=a.substr(0,e);a=a.substr(e+1),e=t.lastIndexOf(`:`),e===-1?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=`:`,r+=n(t.substr(e+1),!1,!0)),r+=`@`}a=a.toLowerCase(),e=a.lastIndexOf(`:`),e===-1?r+=n(a,!1,!0):(r+=n(a.substr(0,e),!1,!0),r+=a.substr(e))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return s&&(r+=`?`,r+=n(s,!1,!1)),c&&(r+=`#`,r+=t?c:m(c,!1,!1)),r}function v(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+v(e.substr(3)):e}}let y=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function b(e){return e.match(y)?e.replace(y,(e=>v(e))):e}var x=n(975);let S=x.posix||x;var C;(function(e){e.joinPath=function(e,...t){return e.with({path:S.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==`/`&&(n=`/`+n,r=!0);let i=S.resolve(n,...t);return r&&i[0]===`/`&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(e.path.length===0||e.path===`/`)return e;let t=S.dirname(e.path);return t.length===1&&t.charCodeAt(0)===46&&(t=``),e.with({path:t})},e.basename=function(e){return S.basename(e.path)},e.extname=function(e){return S.extname(e.path)}})(C||={}),ry=r})();var{URI:iy,Utils:ay}=ry;function oy(e){return e===4?1:e===3?2:e===2?4:8}function sy(e){return e}function cy(e){return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function $(e){return{startLineNumber:e.start.line+1,startColumn:e.start.character+1,endLineNumber:e.end.line+1,endColumn:e.end.character+1}}function ly(e){return{...$(e.location.range),message:e.message,resource:iy.parse(e.location.uri)}}function uy(e){let t={...$(e.range),message:e.message,severity:e.severity?oy(e.severity):8};return e.code!=null&&(t.code=e.codeDescription==null?String(e.code):{value:String(e.code),target:iy.parse(e.codeDescription.href)}),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(ly)),e.tags&&(t.tags=e.tags.map(sy)),e.source!=null&&(t.source=e.source),t}function dy(e){return{range:$(e.range),text:e.newText}}function fy(e){let t={label:e.label,needsConfirmation:e.needsConfirmation??!1};return e.description!=null&&(t.description=e.description),t}function py(e){let t={};return e.ignoreIfExists!=null&&(t.ignoreIfExists=e.ignoreIfExists),e.ignoreIfNotExists!=null&&(t.ignoreIfNotExists=e.ignoreIfNotExists),e.overwrite!=null&&(t.overwrite=e.overwrite),e.recursive!=null&&(t.recursive=e.recursive),t}function my(e){let t=e.kind===`create`?{newResource:iy.parse(e.uri)}:e.kind===`delete`?{oldResource:iy.parse(e.uri)}:{oldResource:iy.parse(e.oldUri),newResource:iy.parse(e.newUri)};return e.options&&(t.options=py(e.options)),t}function hy(e,t,n,r){let i={resource:iy.parse(t),versionId:r,textEdit:dy(e)};if(`annotationId`in e){let t=n?.[e.annotationId];t&&(i.metadata=fy(t))}return i}function gy(e){let t=[];if(e.changes)for(let[n,r]of Object.entries(e.changes))for(let i of r)t.push(hy(i,n,e.changeAnnotations));if(e.documentChanges)for(let n of e.documentChanges){if(!(`textDocument`in n)){t.push(my(n));continue}for(let r of n.edits)t.push(hy(r,n.textDocument.uri,e.changeAnnotations,n.textDocument.version??void 0))}return{edits:t}}function _y(e){let t={title:e.title,isPreferred:e.isPreferred};return e.diagnostics&&(t.diagnostics=e.diagnostics.map(uy)),e.disabled&&(t.disabled=e.disabled.reason),e.edit&&(t.edit=gy(e.edit)),e.isPreferred!=null&&(t.isPreferred=e.isPreferred),e.kind&&(t.kind=e.kind),t}function vy(e){return e}function yy(e){let t={title:e.title,id:e.command};return e.arguments&&(t.arguments=e.arguments),t}function by(e){let t={range:$(e.range)};return e.command&&(t.command=yy(e.command)),t}function xy(e){return e===1?18:e===2?0:e===3?1:e===4?2:e===5?3:e===6?4:e===7?5:e===8?7:e===9?8:e===10?9:e===11?12:e===12?13:e===13?15:e===14?17:e===15?27:e===16?19:e===17?20:e===18?21:e===19?23:e===20?16:e===21?14:e===22?6:e===23?10:e===24?11:24}function Sy(e){return e}function Cy(e){return{value:e.value}}function wy(e){return{range:$(e.range),text:e.newText}}function Ty(e){return`range`in e?$(e.range):`insert`in e&&`replace`in e?{insert:$(e.insert),replace:$(e.replace)}:$(e)}function Ey(e,t){let n=t.itemDefaults??{},r=e.textEdit??n.editRange,i=e.commitCharacters??n.commitCharacters,a=e.insertTextFormat??n.insertTextFormat,o=e.insertTextMode??n.insertTextMode,s=e.insertText,c;r?(c=Ty(r),`newText`in r&&(s=r.newText)):c={...t.range};let l={insertText:s??e.label,kind:e.kind==null?18:xy(e.kind),label:e.label,range:c};return e.additionalTextEdits&&(l.additionalTextEdits=e.additionalTextEdits.map(wy)),e.command&&(l.command=yy(e.command)),i&&(l.commitCharacters=i),e.detail!=null&&(l.detail=e.detail),typeof e.documentation==`string`?l.documentation=e.documentation:e.documentation&&(l.documentation=Cy(e.documentation)),e.filterText!=null&&(l.filterText=e.filterText),a===2?l.insertTextRules=4:o===2&&(l.insertTextRules=1),e.preselect!=null&&(l.preselect=e.preselect),e.sortText!=null&&(l.sortText=e.sortText),e.tags&&(l.tags=e.tags.map(Sy)),l}function Dy(e,t){return{incomplete:!!e.isIncomplete,suggestions:e.items.map(n=>Ey(n,{range:t.range,itemDefaults:e.itemDefaults}))}}function Oy(e){return e===1?0:e===2?1:e===3?2:e===4?3:e===5?4:e===6?5:e===7?6:e===8?7:e===9?8:e===10?9:e===11?10:e===12?11:e===13?12:e===14?13:e===15?14:e===16?15:e===17?16:e===18?17:e===19?18:e===20?19:e===21?20:e===22?21:e===23?22:e===24?23:e===25?24:25}function ky(e){return e}function Ay(e){let t={detail:e.detail??``,kind:Oy(e.kind),name:e.name,range:$(e.range),selectionRange:$(e.selectionRange),tags:e.tags?.map(ky)??[]};return e.children&&(t.children=e.children.map(Ay)),t}function jy(e){let t={start:e.startLine+1,end:e.endLine+1};return e.kind!=null&&(t.kind={value:e.kind}),t}function My(e){return{insertSpaces:e.insertSpaces,tabSize:e.tabSize}}function Ny(e){return typeof e==`string`?{value:e}:{value:`\`\`\`${e.language}\n${e.value}\n\`\`\``}}function Py(e){return typeof e==`string`||`language`in e?[Ny(e)]:Array.isArray(e)?e.map(Ny):[Cy(e)]}function Fy(e){let t={contents:Py(e.contents)};return e.range&&(t.range=$(e.range)),t}function Iy(e){return{character:e.column-1,line:e.lineNumber-1}}function Ly(e){let t={range:$(e.range)};return e.tooltip!=null&&(t.tooltip=e.tooltip),e.target!=null&&(t.url=iy.parse(e.target)),t}function Ry(e){let t={range:$(e.targetRange),targetSelectionRange:$(e.targetSelectionRange),uri:iy.parse(e.targetUri)};return e.originSelectionRange&&(t.originSelectionRange=$(e.originSelectionRange)),t}function zy(e){let t=[],n=e;for(;n;)t.push({range:$(n.range)}),n=n.parent;return t}function By(e,t,n){let r=new Map,i=e=>t===`*`?!0:Array.isArray(t)?t.includes(e):t===e,a=async t=>{let r=t.getVersionId(),a=await n.provideMarkerData(t);!t.isDisposed()&&r===t.getVersionId()&&i(t.getLanguageId())&&e.editor.setModelMarkers(t,n.owner,a??[])},o=e=>{if(!i(e.getLanguageId()))return;let t,n=e.onDidChangeContent(()=>{clearTimeout(t),t=setTimeout(()=>{a(e)},500)});r.set(e,{dispose(){clearTimeout(t),n.dispose()}}),a(e)},s=t=>{e.editor.setModelMarkers(t,n.owner,[]);let i=r.get(t);i&&(i.dispose(),r.delete(t))};function c(e,t=e.getLanguageId()){n.doReset&&i(t)&&n.doReset(e)}let l=e.editor.onDidCreateModel(o),u=e.editor.onWillDisposeModel(e=>{s(e),c(e)}),d=e.editor.onDidChangeModelLanguage(({model:e,oldLanguage:t})=>{s(e),o(e),c(e,t)});for(let t of e.editor.getModels())o(t);return{dispose(){for(let e of r.keys())s(e);l.dispose(),u.dispose(),d.dispose()},async revalidate(){await Promise.all(e.editor.getModels().map(a))}}}function Vy(e,t){let{createData:n,interval:r=3e4,label:i,moduleId:a,stopWhenIdleFor:o=12e4}=t,s,c=0,l=!1,u=()=>{s&&=(s.dispose(),void 0)},d=setInterval(()=>{s&&Date.now()-c>o&&u()},r);return{dispose(){l=!0,clearInterval(d),u()},getWorker(...t){if(l)throw Error(`Worker manager has been disposed`);return c=Date.now(),s||=e.editor.createWebWorker({createData:n,label:i,moduleId:a}),s.withSyncedResources(t)},updateCreateData(e){n=e,u()}}}function Hy(e,t){return{...t,...e,format:{...t.format,...e.format}}}function Uy(e){let t;return{get(){return t},toggle(n){n?t??=e():(t?.dispose(),t=void 0)}}}function Wy(e,t={}){let n=Hy(t,{codeLens:!1,completion:!0,customTags:[],disableAdditionalProperties:!1,disableDefaultProperties:!1,enableSchemaRequest:!1,flowMapping:`allow`,flowSequence:`allow`,format:{bracketSpacing:!0,enable:!0,printWidth:80,proseWrap:`preserve`,singleQuote:!1,trailingComma:!0},hover:!0,hoverAnchor:!0,indentation:` `,isKubernetes:!1,keyOrdering:!1,parentSkeletonSelectedFirst:!1,schemas:[],validate:!0,yamlVersion:`1.2`});e.languages.register({id:`yaml`,extensions:[`.yaml`,`.yml`],aliases:[`YAML`,`yaml`,`YML`,`yml`],mimetypes:[`application/x-yaml`]});let r=Vy(e,{label:`yaml`,moduleId:`monaco-yaml/yaml.worker`,createData:n}),i=new WeakMap,a=Uy(()=>e.languages.registerCodeLensProvider(`yaml`,{async provideCodeLenses(e){let t=await(await r.getWorker(e.uri)).getCodeLens(String(e.uri));if(t)return{lenses:t.map(by),dispose(){}}}})),o=Uy(()=>e.languages.registerCompletionItemProvider(`yaml`,{triggerCharacters:[` `,`:`],async provideCompletionItems(e,t){let n=e.getWordUntilPosition(t),i=await(await r.getWorker(e.uri)).doComplete(String(e.uri),Iy(t));if(i)return Dy(i,{range:{startLineNumber:t.lineNumber,startColumn:n.startColumn,endLineNumber:t.lineNumber,endColumn:n.endColumn}})}})),s=Uy(()=>e.languages.registerDocumentFormattingEditProvider(`yaml`,{displayName:`yaml`,async provideDocumentFormattingEdits(e){return(await(await r.getWorker(e.uri)).format(String(e.uri)))?.map(dy)}})),c=Uy(()=>e.languages.registerHoverProvider(`yaml`,{async provideHover(e,t){let n=await(await r.getWorker(e.uri)).doHover(String(e.uri),Iy(t));if(n)return Fy(n)}})),l=Uy(()=>By(e,`yaml`,{owner:`yaml`,async provideMarkerData(e){let t=await(await r.getWorker(e.uri)).doValidation(String(e.uri));return i.set(e,t),t?.map(uy)},async doReset(e){await(await r.getWorker(e.uri)).resetSchema(String(e.uri))}}));function u(){a.toggle(n.codeLens),o.toggle(n.completion),s.toggle(n.format?.enable),c.toggle(n.hover),l.toggle(n.validate)}u();let d=[r,e.languages.registerDefinitionProvider(`yaml`,{async provideDefinition(e,t){return(await(await r.getWorker(e.uri)).doDefinition(String(e.uri),Iy(t)))?.map(Ry)}}),e.languages.registerDocumentSymbolProvider(`yaml`,{displayName:`yaml`,async provideDocumentSymbols(e){return(await(await r.getWorker(e.uri)).findDocumentSymbols(String(e.uri)))?.map(Ay)}}),e.languages.registerLinkProvider(`yaml`,{async provideLinks(e){let t=await(await r.getWorker(e.uri)).findLinks(String(e.uri));if(t)return{links:t.map(Ly)}}}),e.languages.registerCodeActionProvider(`yaml`,{async provideCodeActions(e,t,n){let a=await(await r.getWorker(e.uri)).getCodeAction(String(e.uri),cy(t),{diagnostics:i.get(e)?.filter(e=>t.intersectRanges($(e.range)))||[],only:n.only?[n.only]:void 0,triggerKind:vy(n.trigger)});if(a)return{actions:a.map(_y),dispose(){}}}}),e.languages.registerFoldingRangeProvider(`yaml`,{async provideFoldingRanges(e){return(await(await r.getWorker(e.uri)).getFoldingRanges(String(e.uri)))?.map(jy)}}),e.languages.setLanguageConfiguration(`yaml`,{comments:{lineComment:`#`},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}]}),e.languages.registerOnTypeFormattingEditProvider(`yaml`,{autoFormatTriggerCharacters:[`
|
|
214
|
+
`],async provideOnTypeFormattingEdits(e,t,n,i){return(await(await r.getWorker(e.uri)).doDocumentOnTypeFormatting(String(e.uri),Iy(t),n,My(i)))?.map(dy)}}),e.languages.registerRenameProvider(`yaml`,{async provideRenameEdits(e,t,n){let i=await(await r.getWorker(e.uri)).doRename(String(e.uri),Iy(t),n);if(i)return gy(i)},async resolveRenameLocation(e,t){let n=await(await r.getWorker(e.uri)).prepareRename(String(e.uri),Iy(t));if(n)return{range:$(n),text:``}}}),e.languages.registerSelectionRangeProvider(`yaml`,{async provideSelectionRanges(e,t){return(await(await r.getWorker(e.uri)).getSelectionRanges(String(e.uri),t.map(Iy)))?.map(zy)}})];return{dispose(){a.get()?.dispose(),o.get()?.dispose(),s.get()?.dispose(),c.get()?.dispose(),l.get()?.dispose();for(let e of d)e.dispose()},async update(e){n=Hy(e,n),r.updateCreateData(n),u(),await l.get()?.revalidate()},getOptions(){return n}}}var Gy=JSON.parse(`{
|
|
215
|
+
"$schema": "https://json-schema.org/draft-06/schema",
|
|
216
|
+
"$id": "https://harper.fast/schema/config.schema.json",
|
|
217
|
+
"type": "object",
|
|
218
|
+
"properties": {
|
|
219
|
+
"rest": {
|
|
220
|
+
"type": "boolean",
|
|
221
|
+
"description": "Enable REST API endpoints."
|
|
222
|
+
},
|
|
223
|
+
"graphqlSchema": {
|
|
224
|
+
"type": "object",
|
|
225
|
+
"description": "GraphQL schema configuration.",
|
|
226
|
+
"additionalProperties": false,
|
|
227
|
+
"properties": {
|
|
228
|
+
"files": {
|
|
229
|
+
"description": "Glob(s) or path(s) to GraphQL schema files.",
|
|
230
|
+
"oneOf": [
|
|
231
|
+
{
|
|
232
|
+
"type": "string"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"type": "array",
|
|
236
|
+
"items": {
|
|
237
|
+
"type": "string"
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"required": ["files"]
|
|
244
|
+
},
|
|
245
|
+
"jsResource": {
|
|
246
|
+
"type": "object",
|
|
247
|
+
"description": "JavaScript resource(s) configuration.",
|
|
248
|
+
"additionalProperties": false,
|
|
249
|
+
"properties": {
|
|
250
|
+
"files": {
|
|
251
|
+
"description": "Path(s) to JS resource file(s).",
|
|
252
|
+
"oneOf": [
|
|
253
|
+
{
|
|
254
|
+
"type": "string"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"type": "array",
|
|
258
|
+
"items": {
|
|
259
|
+
"type": "string"
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
]
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"required": ["files"]
|
|
266
|
+
},
|
|
267
|
+
"package": {
|
|
268
|
+
"type": "string",
|
|
269
|
+
"description": "Package identifier for the application (npm-compatible or git URL)."
|
|
270
|
+
},
|
|
271
|
+
"loadComponent": {
|
|
272
|
+
"type": "string",
|
|
273
|
+
"description": "Conditional package loading option.",
|
|
274
|
+
"enum": ["always", "if-installed", "dev-only"],
|
|
275
|
+
"default": "always"
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
"additionalProperties": true,
|
|
279
|
+
"examples": [
|
|
280
|
+
{
|
|
281
|
+
"rest": true,
|
|
282
|
+
"graphqlSchema": {
|
|
283
|
+
"files": "*.graphql"
|
|
284
|
+
},
|
|
285
|
+
"jsResource": {
|
|
286
|
+
"files": "resources.js"
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
]
|
|
290
|
+
}
|
|
291
|
+
`),Ky=`harper://schemas/config-app.json`;function qy(e){Wy(e,{enableSchemaRequest:!1,validate:!0,hover:!0,completion:!0,schemas:[{uri:Ky,fileMatch:[`**/config.yaml`,`*config.yaml`,`config.yaml`],schema:Gy}]})}var Jy=`__harperLanguageSupportConfigured`;function Yy(e){let t=globalThis;t[Jy]||(t[Jy]=!0,Zv(e),ny(),qy(e))}var Xy={js:`javascript`,cjs:`javascript`,jsx:`javascript`,yaml:`yaml`,yml:`yaml`,ts:`typescript`,tsx:`typescript`,json:`json`,md:`markdown`,html:`html`,css:`css`,graphql:`graphql`,mjs:`javascript`,svg:`xml`,xml:`xml`};function Zy(e,t){let n=Object.values(e).find(e=>!!e&&typeof e.lookupKeybinding==`function`),r={};if(!n)return r;for(let e of t){let t=n.lookupKeybinding(e)?.getLabel();t&&(r[e]=t)}return r}function Qy(){let e=dt(),t=D(),{openedEntryContents:n,openedEntry:r,restrictPackageModification:i,isSavingFile:a,saveFile:o,rootEntries:s}=V(),{typeAcquisitionBudgetExhausted:c}=kv(r,s),{content:l,setContent:u}=ne(!!r&&!r.package&&r.path),d=(0,B.useRef)(void 0),f=(0,B.useCallback)(e=>{d.current=e,u(e===n?void 0:e)},[n,u]),p=(0,B.useRef)(!0),m=(0,B.useRef)(f),h=(0,B.useCallback)(e=>{p.current||m.current(e)},[]),g=yr(),_=tt(),[v,y]=(0,B.useState)(null);Nv(v?.[0]);let[b,x]=(0,B.useState)(null),S=nr(r?.path),C=l??n,w=(C?.length??0)>Qn,T=w?`plaintext`:Xy[S]||`plaintext`,E=(0,B.useCallback)(e=>{Yy(e)},[]),O=(0,B.useCallback)((e,t)=>{y([e,t])},[]),k=(0,B.useRef)(void 0);(0,B.useEffect)(()=>{let e=v?.[0].getModel();if(!e)return;if(d.current!==void 0&&d.current===C){d.current=void 0,k.current={model:e,text:C};return}d.current=void 0;let t=k.current?.model===e?k.current:void 0,n=e.getValue();t&&C!==void 0&&n===C&&t.text!==C&&(e.setValue(C),d.current=void 0),k.current={model:e,text:n}},[v,C]),(0,B.useEffect)(()=>{if(v&&_&&!r?.package&&!i)return Aa(v)},[v,_,r,i]),_t(`SaveFile`,()=>{r&&!a&&l!==void 0&&o({...e,file:r.path.split(`/`).slice(1).join(`/`),payload:l,project:r.project},r.path)},[r,e,l]),_t(`RevertChanges`,()=>{if(n!==void 0&&v){let[e]=v;f(void 0),e.setValue(n)}},[n,v]),_t(`RunEditorAction`,e=>{v?.[0]?.getAction(e)?.run()},[v]),_t(`FocusEditor`,()=>{requestAnimationFrame(()=>v?.[0]?.focus())},[v]),(0,B.useEffect)(()=>{v&&bs(Zy(v[0],_s))},[v]);let ee=r&&t.getQueryData(zt({...e,project:r.project,file:r.path.slice(r.project.length+1)})),A=l===void 0&&ee?.message!==n,j=!r||a||!!r.package||!_||C===void 0||A;if((0,B.useInsertionEffect)(()=>{p.current=j,m.current=f}),!r)return null;let M=w?`oversized`:c&&(T===`javascript`||T===`typescript`)&&!r.package?`budget`:null,N=M?`${r.path}:${M}`:null,te=N!==null&&b!==N;return(0,H.jsxs)(`div`,{className:`flex h-full w-full flex-col`,children:[te&&M&&(0,H.jsx)(Fv,{variant:M,onDismiss:()=>x(N)}),(0,H.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,H.jsx)($t,{className:`h-full w-full`,path:r.path,language:T,theme:g,value:C,keepCurrentModel:!0,beforeMount:E,onMount:O,onChange:h,options:{automaticLayout:!0,minimap:{enabled:!1},readOnly:j,padding:{top:te?8:48}}})})]})}function $y(){let e=dt(),t=D(),{openedEntry:n}=V(),r=tt(),i=n?.path??``,a=n?.project??``,o=i.split(`/`).slice(1).join(`/`),s=zt({file:o,project:a,...e}),{data:c,isFetching:l,refetch:u}=x(He({file:o,project:a,...e})),{content:d,setContent:f}=ne(!!n&&!n.package&&i),p=c?.protected===!0,m=d??c?.message,h=(0,B.useMemo)(()=>c?p?(c.keys??[]).map(e=>({name:e})):Object.entries(En(m??``)).map(([e,t])=>({name:e,value:t})):[],[c,p,m]),g=!!n&&!n.package&&r,{mutateAsync:_}=ue(),{mutateAsync:v}=f_(),{mutateAsync:y}=m_(),b=(0,B.useCallback)(async n=>{await _({...e,project:a,file:o,payload:n}),t.setQueryData(s,e=>e&&{...e,message:n}),f(void 0)},[_,e,a,o,t,s,f]),S=(0,B.useCallback)(e=>{t.setQueryData(s,t=>t&&{...t,keys:e,message:xr(e)})},[t,s]),C=(0,B.useCallback)(async(t,n)=>{if(p){let r=await v({...e,project:a,file:o,key:t,value:n});S(r.keys)}else await b(jr(m??``,{[t]:n}))},[p,v,e,a,o,S,b,m]),w=(0,B.useCallback)(async t=>{if(p){let n=await y({...e,project:a,file:o,key:t});S(n.keys)}else await b(tn(m??``,t))},[p,y,e,a,o,S,b,m]),[T,E]=(0,B.useState)(void 0),O=(0,B.useCallback)(()=>u(),[u]),[ee,A]=(0,B.useState)(!1);return ee&&!p?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Qy,{}),(0,H.jsxs)(k,{type:`button`,variant:`defaultOutline`,size:`sm`,className:`absolute top-11 right-4 z-10`,onClick:()=>A(!1),children:[(0,H.jsx)(Ot,{}),` Secrets view`]})]}):(0,H.jsxs)(`div`,{className:`pt-12 px-4 pb-8 max-w-4xl`,children:[(0,H.jsxs)(`div`,{className:`mb-4`,children:[(0,H.jsx)(`h2`,{className:`text-lg font-semibold text-foreground`,children:n?.name}),(0,H.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:p?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Me,{className:`inline-block size-4 me-1 align-text-bottom`}),`This Harper version protects environment secrets: values stay on the instance and are edited by key — they can be replaced or removed, but never read back.`]}):`Values are masked to prevent accidental disclosure. Revealing one is a deliberate action.`}),!p&&d!==void 0&&(0,H.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`Showing unsaved changes from the text editor — saving a secret writes those too.`})]}),(0,H.jsx)(tr,{rows:h,isFetching:l,onRefresh:O,canManage:g,selectedName:T,onSelectName:E,addDescription:p?`The value is written to this application’s env file on the instance. It can be replaced or removed later, but never read back.`:`The value is written to ${n?.name??`this env file`} in this application.`,editDescription:p?`The current value can’t be shown — this Harper version never returns secret values. Enter a new value to replace it, or delete the secret.`:`Reveal the current value, or enter a replacement.`,onSet:C,onDelete:g?w:void 0,children:!p&&(0,H.jsxs)(k,{variant:`defaultOutline`,onClick:()=>A(!0),children:[(0,H.jsx)(Ke,{}),(0,H.jsx)(`span`,{className:`hidden lg:inline-block`,children:`Edit as text`})]})})]})}function eb({media:e}){let{openedEntry:t,openedEntryContents:n}=V(),{content:r}=ne(!!t&&!t.package&&t.path),[i,a]=(0,B.useState)(!1),[o,s]=(0,B.useState)(void 0);if(i)return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Qy,{}),(0,H.jsxs)(k,{type:`button`,variant:`defaultOutline`,size:`sm`,className:`absolute top-11 right-4 z-10`,onClick:()=>a(!1),children:[(0,H.jsx)(Ai,{}),` Preview`]})]});let c=r??n;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`mt-9 absolute top-0 right-0 bottom-0 left-0`,children:c&&(c===void 0||c!==o)?(0,H.jsx)(`img`,{className:`w-full h-full object-contain p-20`,alt:t?.name,src:`data:${e.mime};charset=utf-8,${encodeURIComponent(c)}`,onError:()=>s(c)}):c?(0,H.jsx)(`div`,{className:`w-full h-full flex items-center justify-center p-8 text-center text-muted-foreground`,children:(0,H.jsxs)(`p`,{className:`max-w-md text-sm`,children:[`This `,t?.name??`image`,` `,`couldn’t be rendered. Edit it as text to inspect or fix the markup.`]})}):null}),(0,H.jsxs)(k,{type:`button`,variant:`defaultOutline`,size:`sm`,className:`absolute top-11 right-4 z-10`,onClick:()=>a(!0),children:[(0,H.jsx)(Ke,{}),` Edit as text`]})]})}function tb(e,t){return[{title:`Install or update the Harper CLI`,code:`npm install -g harper`},{title:`Create your awesome app`,code:`npm create harper ${Nr(e)}${t?` -- --deploymentURL="${t}"`:``}`,note:`You will be asked some easy questions to get you started. When it offers to log in to this cluster, say yes: harper login saves a token in your home directory, so no password goes into your project.`},{title:`Start local Harper instance`,code:`npm run dev`,note:`You will be prompted to configure Harper.`},{title:`Learn, make changes, grow!`,code:`cat AGENTS.md`},{title:`Deploy!`,code:`npm run deploy`,note:`It signs in with the login from step 2. Your project's README explains what a deploy needs in its Deployment section.`}]}function nb(e){let t=ht(),{instance:n,cluster:r}=y({strict:!1}),i=t.instanceClient.defaults.baseURL;return(0,B.useMemo)(()=>tb(e,i),[e,i])}function rb({defaultApplicationName:e,formState:t,watch:n}){let r=n(`applicationName`)||e,i=nb(r),a=it(...i.map(e=>e.code));return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(dr,{children:[(0,H.jsx)(Un,{children:`Deploy with Harper CLI`}),(0,H.jsx)(_n,{children:`Follow these steps to deploy your application using the Harper CLI`})]}),(0,H.jsxs)(we,{className:`space-y-6`,children:[i.map((e,t)=>(0,H.jsxs)(`div`,{className:`space-y-3`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`div`,{className:`w-6 h-6 rounded-full bg-primary text-primary-foreground flex items-center justify-center shrink-0`,children:t+1}),(0,H.jsx)(`h3`,{children:e.title})]}),(0,H.jsxs)(`div`,{className:`ml-8`,children:[(0,H.jsxs)(`div`,{className:`bg-muted dark:bg-black rounded-lg p-4 flex items-center justify-between group`,children:[(0,H.jsx)(`code`,{className:`text-sm overflow-auto pl-8 -indent-8 wrap-anywhere`,children:e.code}),(0,H.jsx)(k,{type:`button`,variant:`default`,size:`sm`,onClick:a[t],children:(0,H.jsx)(Lt,{className:`w-4 h-4`})})]}),e.note&&(0,H.jsx)(`p`,{className:`text-muted-foreground text-sm mt-2`,children:e.note})]}),(0,H.jsx)(ir,{className:`bg-border`})]},e.title)),r&&(0,H.jsxs)(`div`,{className:`bg-accent rounded-lg p-4`,children:[(0,H.jsxs)(`p`,{className:`text-sm`,children:[(0,H.jsx)(`strong`,{children:`Application Name:`}),` `,r]}),(0,H.jsx)(`p`,{className:`text-muted-foreground text-sm mt-2`,children:`Your application will be deployed with this name`})]}),(0,H.jsxs)(k,{className:`w-full`,variant:`secondary`,disabled:!t.isValid,children:[(0,H.jsx)(te,{className:`w-4 h-4 mr-2`}),`I Have Completed These Steps`]})]})]})}var ib=c({type:d(`template`),id:l(`Please select a template.`)}),ab={type:`template`,id:P[0].id},ob=c({type:d(`import`),source:p([`git`,`npm`,`tarball`]),ref:l().nonempty(`Please enter a URL or package reference.`),installCommand:l(),requiresAuth:f(),sshKeyName:l(),stageOnly:f()}),sb={type:`import`,source:`git`,ref:``,requiresAuth:!1,installCommand:``,sshKeyName:``,stageOnly:!1},cb=c({type:d(`cli`)}),lb={type:`cli`},ub=c({applicationName:l().trim().max(75,{error:`Application name cannot be longer than 75 characters.`}).regex(/^[a-zA-Z0-9-_]*$/,{error:`Can only contain letters, numbers, dashes and underscores.`}),contents:u(`type`,[ib,ob,cb])});function db({control:e,defaultApplicationName:t}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(dr,{children:[(0,H.jsx)(Un,{children:`Application Name`}),(0,H.jsx)(_n,{children:`Choose a name for your new API application`})]}),(0,H.jsx)(we,{children:(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(At,{control:e,name:`applicationName`,render:({field:e})=>(0,H.jsxs)(Er,{children:[(0,H.jsx)(Ar,{className:`pb-1`,children:`Name`}),(0,H.jsx)(Et,{type:`text`,autoCapitalize:`words`,autoComplete:`off`,autoFocus:!0,placeholder:t,maxLength:ub.shape.applicationName.maxLength,...e}),(0,H.jsx)(br,{})]})}),(0,H.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Use lowercase letters, numbers, underscores, and hyphens`})]})})]})}var fb=/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//,pb=/^(?:[^@/]+@)?([^/:]+):/,mb=new Set([`http:`,`https:`,`git+http:`,`git+https:`,`git:`]),hb=new Set([`github.com`,`gitlab.com`,`bitbucket.org`]);function gb(e){let t=e.trim();if(!t)return null;if(fb.test(t))try{return new URL(t).hostname||null}catch{return null}let n=pb.exec(t);return n?n[1]:null}function _b(e,t){let n=e.trim(),r=gb(n);if(!r)return e;let i=r.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),a=RegExp(`(^|@|//)${i}(?=[:/]|$)`);return n.replace(a,(e,n)=>`${n}${t}`)}function vb(e){let t=e.trim();if(!fb.test(t))return null;try{let e=new URL(t);return mb.has(e.protocol)&&e.hostname?e:null}catch{return null}}function yb(e){return vb(e)!==null}function bb(e,t){let n=vb(e);if(!n)return null;let r=n.pathname.replace(/^\/+|\/+$/g,``);return!r||!hb.has(n.hostname.toLowerCase())?null:`git@${t}:${r}${n.hash}`}function xb({control:e,setValue:t,watch:n}){let r=w({strict:!1}),i=dt(),a=n(`contents.requiresAuth`),o=n(`contents.ref`),s=n(`contents.sshKeyName`),{data:c}=x({...Cn(i),enabled:a}),{data:l}=x({...gn({...i,name:s}),refetchInterval:!1,enabled:a&&!!s}),u=gb(o),d=c?.find(e=>e.name===s),f=l?.host??d?.host,p=l?.hostname??d?.hostname,m=yb(o),h=!m&&!!u&&!!f&&u.toLowerCase()===f.toLowerCase(),g=!m&&!!u&&!!f&&!h,_=!!f&&!!p&&p.toLowerCase()===u?.toLowerCase(),v=m&&f&&_?bb(o,f):null,y=v??(g?_b(o,f):``),b=(0,B.useCallback)(()=>{t(`contents.ref`,y,{shouldValidate:!0,shouldDirty:!0})},[t,y]),S;return S=c&&c.length>0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(At,{control:e,name:`contents.sshKeyName`,render:({field:e})=>(0,H.jsxs)(Er,{children:[(0,H.jsx)(Ar,{className:`pb-1`,children:`SSH Key`}),(0,H.jsx)(Pe,{children:(0,H.jsxs)(mt,{value:e.value||``,onValueChange:e.onChange,children:[(0,H.jsx)(Xe,{className:`w-full`,children:(0,H.jsx)(ot,{placeholder:`Choose an SSH key`})}),(0,H.jsx)(yt,{children:c.map(e=>(0,H.jsx)(ze,{value:e.name,children:e.name},e.name))})]})})]})}),!s&&(0,H.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Select the SSH key this repository uses so we can verify the URL.`}),h&&(0,H.jsxs)(Rt,{children:[(0,H.jsx)(Pt,{className:`h-4 w-4`}),(0,H.jsx)(qe,{children:(0,H.jsxs)(`span`,{children:[`This URL targets `,(0,H.jsx)(`code`,{children:f}),`, matching the selected key.`]})})]}),g&&(0,H.jsxs)(Rt,{variant:`warning`,children:[(0,H.jsx)(vr,{className:`h-4 w-4`}),(0,H.jsxs)(qe,{children:[(0,H.jsxs)(`span`,{children:[`The URL targets `,(0,H.jsx)(`code`,{children:u}),`, but the selected key `,(0,H.jsx)(`strong`,{children:s}),` uses the host`,` `,(0,H.jsx)(`code`,{children:f}),`. SSH auth resolves the key from the host in the URL, so this import will likely fail to authenticate. Did you mean:`]}),(0,H.jsx)(`code`,{className:`block break-all`,children:y}),(0,H.jsx)(k,{type:`button`,variant:`defaultOutline`,size:`sm`,onClick:b,children:`Use suggested URL`})]})]})]}):(0,H.jsx)(Rt,{children:(0,H.jsx)(qe,{children:(0,H.jsxs)(`span`,{children:[`Manage your SSH keys in`,` `,(0,H.jsx)(E,{to:Vt(r,`config`),className:`underline`,children:`Config`}),` >`,` `,(0,H.jsx)(E,{to:Vt(r,`config/ssh-keys`),className:`underline`,children:`SSH Keys`}),`. This enables SSH based auth for private repos, i.e. following the pattern of`,` `,(0,H.jsx)(`a`,{href:`https://github.com/HarperFast/Studio`,target:`_blank`,rel:`noreferrer`,className:`underline`,children:`git@github.com:HarperFast/studio.git`}),`. If you have more than one key, make sure to utilize unique hostnames!`]})})}),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Ar,{children:`Authorization`}),(0,H.jsx)(At,{control:e,name:`contents.requiresAuth`,render:({field:e})=>(0,H.jsxs)(kr,{className:`w-full pt-2 pb-0 mb-0`,value:String(e.value),onValueChange:t=>e.onChange(t===`true`),children:[(0,H.jsxs)(Tr,{className:`grid w-full grid-cols-2`,children:[(0,H.jsx)(kt,{value:`false`,children:`Public Access`}),(0,H.jsx)(kt,{value:`true`,children:`Requires Auth`})]}),(0,H.jsx)(ln,{value:`false`,className:`space-y-4 mt-4`}),(0,H.jsxs)(ln,{value:`true`,className:`space-y-4 mt-4`,children:[S,m&&(0,H.jsxs)(Rt,{variant:`warning`,children:[(0,H.jsx)(vr,{className:`h-4 w-4`}),(0,H.jsxs)(qe,{children:[(0,H.jsx)(`span`,{children:`Git only uses an SSH key for an SSH URL, so this import won't use one and a private repository will likely fail to authenticate.`}),v?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{children:`Use the SSH URL for the selected key instead:`}),(0,H.jsx)(`code`,{className:`block break-all`,children:v}),(0,H.jsx)(k,{type:`button`,variant:`defaultOutline`,size:`sm`,onClick:b,children:`Use SSH URL`})]}):(0,H.jsxs)(`span`,{children:[`Use the repository's SSH clone URL from your git host instead, with its host replaced by`,` `,_?(0,H.jsx)(`code`,{children:f}):`the host alias of the SSH key for this repository`,`.`]})]})]})]})]})})]})}function Sb({control:e,formState:t,importFailure:n,isImportingApplication:r,setValue:i,watch:a}){let o=a(`contents.source`),s=Yn(),c=(0,B.useCallback)(e=>{i(`contents.source`,e)},[i]);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(dr,{children:[(0,H.jsx)(Un,{children:`Import Existing Application`}),(0,H.jsx)(_n,{children:`Import from Git, NPM, or a tarball URL`})]}),(0,H.jsxs)(we,{className:`space-y-6`,children:[(0,H.jsxs)(kr,{value:o,onValueChange:c,children:[(0,H.jsxs)(Tr,{className:`grid w-full grid-cols-3`,children:[(0,H.jsxs)(kt,{value:`git`,children:[(0,H.jsx)(Oi,{className:`w-4 h-4 mr-2`}),`Git`]}),(0,H.jsxs)(kt,{value:`npm`,children:[(0,H.jsx)(pt,{className:`w-4 h-4 mr-2`}),`NPM`]}),(0,H.jsxs)(kt,{value:`tarball`,children:[(0,H.jsx)(Ye,{className:`w-4 h-4 mr-2`}),`Tarball`]})]}),(0,H.jsx)(ln,{value:`git`,className:`space-y-4 mt-4`,children:(0,H.jsx)(`div`,{className:`space-y-2`,children:(0,H.jsx)(At,{control:e,name:`contents.ref`,render:({field:e})=>(0,H.jsxs)(Er,{children:[(0,H.jsx)(Ar,{className:`pb-1`,children:`Git Repository URL`}),(0,H.jsx)(Pe,{children:(0,H.jsx)(en,{type:`text`,autoCapitalize:`none`,autoComplete:`off`,autoFocus:!0,...e})}),(0,H.jsx)(br,{})]})})})}),(0,H.jsx)(ln,{value:`npm`,className:`space-y-4 mt-4`,children:(0,H.jsx)(`div`,{className:`space-y-2`,children:(0,H.jsx)(At,{control:e,name:`contents.ref`,render:({field:e})=>(0,H.jsxs)(Er,{children:[(0,H.jsx)(Ar,{className:`pb-1`,children:`NPM Package Reference`}),(0,H.jsx)(Pe,{children:(0,H.jsx)(en,{type:`text`,autoCapitalize:`none`,autoComplete:`off`,autoFocus:!0,...e})}),(0,H.jsx)(br,{})]})})})}),(0,H.jsx)(ln,{value:`tarball`,className:`space-y-4 mt-4`,children:(0,H.jsx)(`div`,{className:`space-y-2`,children:(0,H.jsx)(At,{control:e,name:`contents.ref`,render:({field:e})=>(0,H.jsxs)(Er,{children:[(0,H.jsx)(Ar,{className:`pb-1`,children:`Tarball URL`}),(0,H.jsx)(Pe,{children:(0,H.jsx)(en,{type:`url`,autoCapitalize:`none`,autoComplete:`off`,autoFocus:!0,...e})}),(0,H.jsx)(br,{})]})})})})]}),(0,H.jsx)(At,{control:e,name:`contents.installCommand`,render:({field:e})=>(0,H.jsxs)(Er,{children:[(0,H.jsx)(Ar,{className:`pb-1`,children:`Install Command`}),(0,H.jsx)(Pe,{children:(0,H.jsx)(en,{type:`text`,autoCapitalize:`none`,autoComplete:`off`,placeholder:`Leave blank to install dependencies automatically`,...e})}),(0,H.jsx)(br,{})]})}),o===`git`&&(0,H.jsx)(xb,{control:e,setValue:i,watch:a}),s&&(0,H.jsx)(At,{control:e,name:`contents.stageOnly`,render:({field:e})=>(0,H.jsxs)(Er,{className:`flex flex-row items-start gap-3`,children:[(0,H.jsx)(Pe,{children:(0,H.jsx)(Tn,{checked:!!e.value,onCheckedChange:e.onChange})}),(0,H.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,H.jsx)(Ar,{children:`Stage only`}),(0,H.jsx)(ut,{children:`Install it on every node without making it live. Activate it later from Deployments.`})]})]})}),(0,H.jsx)(ir,{className:`bg-border`}),n&&(0,H.jsx)(fr,{title:n.title,message:n.message,deploymentId:n.deploymentId}),(0,H.jsxs)(k,{className:`w-full`,disabled:!t.isValid||r,children:[(0,H.jsx)(gt,{className:`w-4 h-4 mr-2`}),s&&a(`contents.stageOnly`)?`Stage Application`:`Import Application`]})]})]})}function Cb({control:e,formState:t,isCreatingFromTemplate:n}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(dr,{children:[(0,H.jsx)(Un,{children:`Choose a Template`}),(0,H.jsx)(_n,{children:`Start with a pre-configured template for common use cases`})]}),(0,H.jsxs)(we,{children:[(0,H.jsx)(At,{control:e,name:`contents.id`,render:({field:e})=>(0,H.jsx)(jt,{value:e.value,onValueChange:e.onChange,children:(0,H.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4`,children:P.map(e=>(0,H.jsxs)(`div`,{className:`relative`,children:[(0,H.jsx)(Fe,{value:e.id,id:e.id,className:`peer sr-only`}),(0,H.jsxs)(un,{htmlFor:e.id,className:`flex flex-col gap-3 p-4 border-2 rounded-lg cursor-pointer hover:bg-accent peer-data-[state=checked]:border-green peer-data-[state=checked]:bg-primary/5`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`div`,{className:`mb-1 flex items-center gap-2 justify-between`,children:[(0,H.jsx)(`div`,{children:e.name}),(0,H.jsx)(`a`,{href:e.githubUrl,target:`_blank`,rel:`noopener noreferrer`,onClick:Sr,className:`opacity-70 hover:opacity-100 transition-colors -m-4 p-4`,children:(0,H.jsx)(`img`,{src:`/github/GitHub_Lockup_White.svg`,alt:`GitHub`,className:`h-4 invert dark:invert-0`})})]}),(0,H.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:e.description})]}),(0,H.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:e.tags.map(e=>(0,H.jsx)(Jt,{variant:`outline`,children:e},e))})]})]},e.id))})})}),(0,H.jsx)(ir,{className:`my-6 bg-border`}),(0,H.jsxs)(k,{className:`w-full`,disabled:!t.isValid||n,children:[(0,H.jsx)(gt,{className:`w-4 h-4 mr-2`}),`Create from Template`]})]})]})}function wb(e){let t=ht(),{reloadRootEntries:n,setFocusedItem:r,setExpandedItems:i,setSelectedItems:a}=V(),o=(0,B.useCallback)(({project:o})=>{let s=j.loading(`Looking for application...`,{description:`This may take a bit.`,duration:3e5});e(!0),n().then(n=>{let c=n?.entries||[];for(let n of c)if(n.name.toLowerCase()===o.toLowerCase()){r(n.name),a([n.name]),i([n.name]),e(!1),j.success(`Imported successfully`,{description:`${o} is now available in your ${t.entityType}!`,id:s,duration:5e3});return}j.warning(`Deployment Not Detected`,{description:`I searched for ${o} but did not find it in the ${t.entityType} yet. Do you see it on the left? Did you use a different name, perhaps?`,id:s,duration:1e4}),e(!1)})},[t,e,n,r,i,a]);return(0,B.useMemo)(()=>({checkCLI:o}),[o])}function Tb(e){let{mutate:t,isPending:n}=_e(),r=ht(),{reloadRootEntries:i,setFocusedItem:a,setExpandedItems:o,setSelectedItems:s}=V(),c=(0,B.useCallback)(({contents:n,project:c})=>{let l=j.loading(`Creating from template...`,{description:`This may take a bit.`,duration:3e5}),u=ve(P,`id`,n.id);if(!u)return j.error(`Template Not Found`,{description:`Please select a template`,duration:1e4,id:l});t({project:c,template:u.npm||u.githubUrl,...r},{onSuccess:()=>{j.success(`Created successfully!`,{description:`${c} will be available once you restart your ${r.entityType}!`,id:l,duration:5e3}),e(!0),i(),a(c),s([c]),o([c])}})},[t,r,e,i,a,o,s]);return(0,B.useMemo)(()=>({isCreatingFromTemplate:n,createFromTemplate:c}),[n,c])}var Eb={prepare:`Preparing…`,load:`Loading component…`,replicate:`Replicating to nodes…`,restart:`Restarting…`,success:`Finishing…`};function Db(e){let{mutateAsync:t,isPending:n}=xt(),r=D(),i=dt(),[a,o]=(0,B.useState)(),s=(0,B.useRef)(void 0);(0,B.useEffect)(()=>(s.current=i.entityId,()=>{s.current=void 0}),[i.entityId]);let c=cr(),l=Yn(),u=je(i),d=kn(),{reloadRootEntries:f,setFocusedItem:p,setExpandedItems:m,setSelectedItems:h}=V(),g=(0,B.useCallback)((t,n)=>{xe(r,n),f(),s.current===n&&(e(!0),p(t),h([t]),m([t]))},[r,f,p,h,m,e]),_=(0,B.useCallback)(async({contents:e,project:n})=>{let{entityId:a}=i;o(void 0);let p=l&&e.stageOnly,m=`${p?`Staging`:`Importing`} ${n}…`,h=j.loading(p?`Staging application...`:`Importing application...`,{description:`This may take a bit.`,duration:3e5}),_;try{_=await t({request:{kind:p?`stage`:`deploy`,project:n,package:e.ref,installCommand:e.installCommand},useSSE:c,onEvent:e=>{e.type===`phase`&&e.data.status===`start`?j.loading(m,{id:h,description:Eb[e.data.phase]??e.data.phase,duration:3e5}):e.type===`install`&&e.data.line?.trim()?j.loading(m,{id:h,description:e.data.line.trim().slice(0,140),duration:3e5}):e.type===`rollout`&&e.data.state===`following`&&j.loading(m,{id:h,description:`Rolling out to the other nodes…`,duration:1/0})},...i})}catch(e){if(j.dismiss(h),e instanceof Gn&&p){j.warning(`${n} may not be staged`,{description:`Live updates ended before the stage finished. Check Deployments for its record.`});return}if(e instanceof Gn){g(n,a),await st(n,void 0,u);return}let{deploymentId:t}=wt(e);if(e instanceof Te){g(n,a),j.error(`${n} did not reach every node`,{description:e.message,action:d(t)});return}let i=Ve(e,n,p?`stage`:`import`);ye(e)&&(xe(r,a),f());let{message:c}=xn(e);s.current===a?o({entityId:a,failure:{title:i,message:c,deploymentId:t}}):j.error(i,{description:c,action:d(t)});return}if(j.dismiss(h),p){Pr(n,_,{action:d(_?.deployment_id)});return}g(n,a),c||_?.rollout?await st(n,_,u,{action:d(_?.deployment_id)}):j.success(`Imported successfully`,{description:`${n} will be available once you restart your ${i.entityType}!`,duration:5e3})},[t,c,l,i,u,g,d,r,f]),v=(0,B.useCallback)(e=>void _(e),[_]),y=a?.entityId===i.entityId?a.failure:void 0;return(0,B.useMemo)(()=>({isImportingApplication:n,importApplication:v,importFailure:y}),[n,v,y])}function Ob(){let{rootEntries:e}=V(),{organization:t,instance:n,cluster:r}=y({strict:!1}),i=(0,B.useMemo)(()=>{let i=Nr(r?.name||n?.name||t?.name||``);if(i===``)return i;let a=i,o=1;for(;ve(e,`name`,a);)o+=1,a=`${i}-${o}`;return a},[e,r,n,t]),a=(0,B.useCallback)((t,n)=>{!t.applicationName&&!i?n.addIssue({code:`custom`,path:[`applicationName`],message:`Please name your application!`}):e.find(e=>e.name===t.applicationName)&&n.addIssue({code:`custom`,path:[`applicationName`],message:`That application name is already in use!`})},[i,e]),o=A({resolver:ee(ub.superRefine(a)),mode:`onTouched`,defaultValues:{applicationName:``,contents:{...sb,...lb,...ab}}}),{watch:s,handleSubmit:c,control:l,setValue:u,formState:d}=o,[f,p]=(0,B.useState)(!1),{isCreatingFromTemplate:m,createFromTemplate:h}=Tb(p),{isImportingApplication:g,importApplication:_,importFailure:v}=Db(p),{checkCLI:b}=wb(p),x=(0,B.useCallback)(e=>{let t=e.applicationName||i;switch(e.contents.type){case`template`:h({contents:e.contents,project:t});break;case`import`:_({contents:e.contents,project:t});break;case`cli`:b({contents:e.contents,project:t})}},[b,h,i,_]),S=s(`contents.type`),C=(0,B.useCallback)(e=>{u(`contents.type`,e,{shouldValidate:!0})},[u]);return(0,H.jsxs)(`div`,{className:`mx-auto max-w-4xl mt-6`,children:[(0,H.jsxs)(`div`,{className:`text-center`,children:[(0,H.jsx)(`h1`,{className:`text-4xl pt-4 pb-2`,children:`Bootstrap New API Application`}),(0,H.jsx)(`p`,{className:`text-muted-foreground`,children:`Create a new application from templates, import existing code, or deploy with Harper CLI`})]}),(0,H.jsx)(Cr,{...o,children:(0,H.jsx)(`form`,{id:`instance-add-application-form`,name:`instance-add-application-form`,onSubmit:c(x),onKeyDown:Ne(o),className:`flex flex-col gap-4 p-4`,children:(0,H.jsxs)(`fieldset`,{disabled:g||m||f,children:[(0,H.jsx)(Ct,{className:`dark:bg-black-dark`,children:(0,H.jsx)(db,{control:l,defaultApplicationName:i})}),(0,H.jsx)(Ct,{className:`dark:bg-black-dark mt-4 pt-0`,children:(0,H.jsxs)(kr,{defaultValue:S,onValueChange:C,children:[(0,H.jsxs)(Tr,{className:`w-full grid grid-cols-3 mt-0`,children:[(0,H.jsxs)(kt,{value:`template`,children:[(0,H.jsx)(Kr,{}),(0,H.jsx)(`span`,{className:`hidden sm:inline-block`,children:`Templates`})]}),(0,H.jsxs)(kt,{value:`import`,children:[(0,H.jsx)(Ei,{}),`Import`]}),(0,H.jsxs)(kt,{value:`cli`,children:[(0,H.jsx)(cn,{}),(0,H.jsx)(`span`,{className:`hidden md:inline-block`,children:`Harper`}),` CLI`]})]}),(0,H.jsx)(`div`,{className:`mx-6 mt-1`,children:(0,H.jsx)(ir,{className:`bg-border`})}),(0,H.jsx)(ln,{value:`template`,className:`space-y-4`,children:(0,H.jsx)(Cb,{control:l,formState:d,isCreatingFromTemplate:m})}),(0,H.jsx)(ln,{value:`import`,className:`space-y-4`,children:(0,H.jsx)(Sb,{control:l,formState:d,importFailure:v,isImportingApplication:g,setValue:u,watch:s})}),(0,H.jsx)(ln,{value:`cli`,className:`space-y-4`,children:(0,H.jsx)(rb,{defaultApplicationName:i,formState:d,watch:s})})]})})]})})})]})}var kb=[`table`,`export`,`sealed`],Ab=[`primaryKey`,`indexed`,`computed`,`relationship`,`createdTime`,`updatedTime`,`expiresAt`,`enumerable`,`allow`],jb={table:[`table`,`database`,`expiration`,`audit`,`eviction`,`scanInterval`,`replicate`,`randomAccessFields`],export:[`name`,`rest`,`mqtt`],indexed:[`type`,`distance`,`efConstruction`,`M`,`optimizeRouting`,`mL`,`efConstructionSearch`],computed:[`from`,`version`],relationship:[`from`,`to`],allow:[`role`]};function Mb(e,t,n){let r=e=>{let t=n.indexOf(e);return t<0?n.length:t};return e.map((e,t)=>({item:e,index:t})).sort((e,n)=>r(t(e.item))-r(t(n.item))||e.index-n.index).map(e=>e.item)}function Nb(e){if(e.args.length===0)return`@${e.name}`;let t=Mb(e.args,e=>e.name,jb[e.name]??[]);return`@${e.name}(${t.map(e=>`${e.name}: ${e.value}`).join(`, `)})`}function Pb(e,t){return Mb(e,e=>e.name,t).map(Nb).join(` `)}var Fb=/^[ \t]*$/,Ib=/^[ \t]+/,Lb=/^[ \t]*"""$/;function Rb(e,t){let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];)n++;return e.slice(0,n)}function zb(e,t,n){let r=t.split(`
|
|
292
|
+
`).map(e=>e.replace(/\r$/,``)),i=(e,t)=>t===0||t===r.length-1&&Lb.test(e),a;for(let[e,t]of r.entries())if(!Fb.test(t)&&!i(t,e)){let e=t.match(Ib)?.[0]??``;a=a===void 0?e:Rb(a,e)}for(let[t,o]of r.entries())Fb.test(o)?e.push(``):i(o,t)?e.push(`${n}${o.replace(Ib,``)}`):e.push(`${n}${o.slice(a?.length??0)}`)}function Bb(e,t){let{indent:n,newline:r}=t,i=Pb(e.directives,kb),a=`type ${e.typeName}${i?` ${i}`:``} {`,o=[e.headerComment?`${a} ${e.headerComment}`:a];for(let t of e.fields){if(!t.name.trim())continue;for(let e of t.leadingComments)zb(o,e,n);let e=[Pb(t.directives,Ab),t.lineComment].filter(Boolean).join(` `);o.push(`${n}${t.name}: ${pn(t.type)}${e?` ${e}`:``}`)}for(let t of e.trailingComments)zb(o,t,n);return`${o.join(r)}${r}}`}function Vb(e,t){if(e.kind===`raw`)return e.text;let{table:n}=e;return n.edited?n.leading+Bb(n,t):n.leading+n.raw}function Hb(e){let t=new Set;e.segments.forEach((n,r)=>{if(n.kind===`table`&&n.table.typeName.trim()===``){t.add(r);let n=e.segments[r-1];n?.kind===`raw`&&n.text.trim()===``&&t.add(r-1);let i=e.segments[r+1];i?.kind===`raw`&&i.text.trim()===``&&t.add(r+1)}});let n=e.segments.filter((e,n)=>!t.has(n));if(n.some(e=>e.kind===`table`&&e.table.edited)){let e=[];n.forEach((t,n)=>{t.kind===`table`&&e.push(n)});let t=e.map(e=>n[e].table).sort((e,t)=>e.typeName.localeCompare(t.typeName));e.forEach((e,r)=>{n[e]={kind:`table`,table:t[r]}})}return n.map(t=>Vb(t,e)).join(``)}var Ub=/^[_A-Za-z][_0-9A-Za-z]*$/;function Wb(e){return Ub.test(e)}var Gb=`Use letters, numbers, and underscores, and don’t start with a number.`;function Kb(e){return e.segments.flatMap(e=>e.kind===`table`?[e.table]:[])}function qb(e){let t=new Set,n=new Set;for(let r of e)t.has(r)&&n.add(r),t.add(r);return n}function Jb(e,t){let n=[],r={tableId:e.id,tableName:e.typeName};Wb(e.typeName)?t.has(e.typeName)&&n.push({...r,code:`DUPLICATE_TABLE_NAME`,message:`Another table is already named “${e.typeName}”.`}):n.push({...r,code:`INVALID_TABLE_NAME`,message:Gb});let i=e.fields.filter(e=>e.name.trim()!==``);i.length===0&&n.push({...r,code:`NO_FIELDS`,message:`A table needs at least one field.`});let a=qb(i.map(e=>e.name));for(let t of e.fields){if(t.name.trim()===``)continue;let e={...r,fieldKey:t.key,fieldName:t.name};Wb(t.name)?a.has(t.name)&&n.push({...e,code:`DUPLICATE_FIELD_NAME`,message:`Another field is already named “${t.name}”.`}):n.push({...e,code:`INVALID_FIELD_NAME`,message:Gb})}return n}function Yb(e){let t=Kb(e).filter(e=>e.typeName.trim()!==``),n=qb(t.map(e=>e.typeName));return t.flatMap(e=>Jb(e,n))}var Xb=0;function Zb(e){return $e(e).document}function Qb(e){let t=Xt(`new-${Xb++}`),n=Hb(e),r=[{kind:`raw`,text:n.length===0?``:n.endsWith(`
|
|
293
|
+
`)?e.newline:e.newline+e.newline},{kind:`table`,table:t},{kind:`raw`,text:e.newline}];return{...e,segments:[...e.segments,...r]}}function $b(e,t){switch(t.type){case`reset`:return Zb(t.source);case`addTable`:return Qb(e);case`removeTable`:return{...e,segments:e.segments.filter(e=>e.kind!==`table`||e.table.id!==t.id)};case`updateTable`:return{...e,segments:e.segments.map(e=>e.kind===`table`&&e.table.id===t.id?{kind:`table`,table:{...t.table,edited:!0}}:e)}}}function ex(e){return e.segments.flatMap(e=>e.kind===`table`?[e.table]:[])}function tx(e){return e.segments.some(e=>e.kind===`raw`&&e.text.replace(/#[^\n]*/g,``).trim().length>0)}var nx=`dark:bg-grey-600 dark:border-grey-500`;function rx({label:e,children:t}){let{toggled:n,toggle:r}=Qt(!1);return(0,H.jsxs)(`div`,{className:`mt-3`,children:[(0,H.jsxs)(`button`,{type:`button`,onClick:r,className:`flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground`,children:[n?(0,H.jsx)(N,{className:`size-4`}):(0,H.jsx)(Ue,{className:`size-4`}),e]}),n&&(0,H.jsx)(`div`,{className:`mt-2 pl-1`,children:t})]})}function ix({label:e,checked:t,onChange:n,disabled:r,description:i}){let a=(0,B.useId)();return(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(Tn,{id:a,checked:t,onCheckedChange:n,disabled:r}),(0,H.jsxs)(un,{htmlFor:a,className:m(`font-normal`,r&&`opacity-50`),children:[e,i&&(0,H.jsx)(`span`,{className:`ml-1 text-xs text-muted-foreground italic`,children:i})]})]})}function ax({label:e,value:t,onChange:n,placeholder:r,disabled:i,invalid:a,error:o}){let s=(0,B.useId)();return(0,H.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,H.jsx)(un,{htmlFor:s,className:`text-xs text-muted-foreground`,children:e}),(0,H.jsx)(en,{id:s,type:`text`,className:nx,value:t,placeholder:r,disabled:i,"aria-invalid":a||void 0,onChange:e=>n(e.target.value)}),o&&(0,H.jsx)(`span`,{className:`text-xs text-destructive`,children:o})]})}function ox({label:e,value:t,onChange:n,disabled:r,min:i}){let a=(0,B.useId)();return(0,H.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,H.jsx)(un,{htmlFor:a,className:`text-xs text-muted-foreground`,children:e}),(0,H.jsx)(en,{id:a,type:`number`,className:nx,min:i,step:1,value:t??``,disabled:r,onChange:e=>n(e.target.value===``?void 0:Number(e.target.value))})]})}var sx=new Set([`primaryKey`,`indexed`,`computed`,`relationship`,`allow`,`createdTime`,`updatedTime`,`expiresAt`,`enumerable`]);function cx({field:e,typeNames:t,readOnly:n,disableRemove:r,error:i,onChange:a,onRemove:o}){let s=t=>a({...e,directives:t}),c=(t,n)=>s(jn(e.directives,t,n)),l=(t,n,r)=>s(Zn(e.directives,t,n,r)),u=(t,n,r)=>s(on(e.directives,t,n,r)),d=(t,n)=>gr(pr(e.directives,t,n))??``,f=(t,n)=>Rn(pr(e.directives,t,n)),p=St(e),m=Ce(e),h=yn(e),g=qn(e.directives,`indexed`),_=e.directives.filter(e=>!sx.has(e.name));return(0,H.jsxs)(`div`,{className:`rounded-lg border p-3`,children:[(0,H.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-[1fr_1fr_auto]`,children:[(0,H.jsx)(ax,{label:`Field name`,value:e.name,disabled:n,invalid:!!i,error:i,onChange:t=>a({...e,name:t})}),(0,H.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,H.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Type`}),(0,H.jsxs)(mt,{value:p,disabled:n,onValueChange:t=>a({...e,type:Gt(t,m,h)}),children:[(0,H.jsx)(Xe,{className:`w-full ${nx}`,children:(0,H.jsx)(ot,{})}),(0,H.jsxs)(yt,{children:[Lv.map(e=>(0,H.jsx)(ze,{value:e.name,children:e.name},e.name)),t.filter(e=>!Lv.some(t=>t.name===e)).map(e=>(0,H.jsx)(ze,{value:e,children:e},e)),p&&!Lv.some(e=>e.name===p)&&!t.includes(p)&&(0,H.jsx)(ze,{value:p,children:p})]})]})]}),(0,H.jsx)(k,{type:`button`,variant:`destructiveGhost`,size:`icon`,className:`self-end`,disabled:n||r,onClick:o,title:r?`A table needs at least one field`:`Remove field`,children:(0,H.jsx)(Or,{})})]}),(0,H.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-x-6 gap-y-2`,children:[(0,H.jsx)(ix,{label:`Array`,checked:m,disabled:n,onChange:t=>a({...e,type:Gt(p,t,h)})}),(0,H.jsx)(ix,{label:`Required`,checked:h,disabled:n,onChange:t=>a({...e,type:Gt(p,m,t)})}),(0,H.jsx)(ix,{label:`Primary key`,checked:qn(e.directives,`primaryKey`),disabled:n,onChange:e=>c(`primaryKey`,e)}),(0,H.jsx)(ix,{label:`Indexed`,checked:g,disabled:n,onChange:e=>c(`indexed`,e)})]}),(0,H.jsx)(rx,{label:`Advanced`,children:(0,H.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[(0,H.jsx)(ix,{label:`Created time`,description:`set on insert`,checked:qn(e.directives,`createdTime`),disabled:n,onChange:e=>c(`createdTime`,e)}),(0,H.jsx)(ix,{label:`Updated time`,description:`set on update`,checked:qn(e.directives,`updatedTime`),disabled:n,onChange:e=>c(`updatedTime`,e)}),(0,H.jsx)(ix,{label:`Expires at`,checked:qn(e.directives,`expiresAt`),disabled:n,onChange:e=>c(`expiresAt`,e)}),(0,H.jsx)(ix,{label:`Enumerable`,checked:qn(e.directives,`enumerable`),disabled:n,onChange:e=>c(`enumerable`,e)})]}),(0,H.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-2`,children:[(0,H.jsx)(ax,{label:`Relationship — from (this table's key field)`,value:d(`relationship`,`from`),disabled:n,onChange:e=>l(`relationship`,`from`,e)}),(0,H.jsx)(ax,{label:`Relationship — to (other table's key field)`,value:d(`relationship`,`to`),disabled:n,onChange:e=>l(`relationship`,`to`,e)}),(0,H.jsx)(ax,{label:`Computed — from (expression)`,value:d(`computed`,`from`),disabled:n,onChange:e=>l(`computed`,`from`,e)}),(0,H.jsx)(ox,{label:`Computed — version`,value:f(`computed`,`version`),disabled:n,onChange:e=>u(`computed`,`version`,e)}),(0,H.jsx)(ax,{label:`Allow — role`,value:d(`allow`,`role`),disabled:n,onChange:e=>l(`allow`,`role`,e)})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:[`Index options `,(0,H.jsx)(`span`,{className:`italic`,children:`(vector / HNSW — requires Indexed)`})]}),(0,H.jsxs)(`div`,{className:`mt-2 grid grid-cols-1 gap-3 md:grid-cols-3`,children:[(0,H.jsx)(ax,{label:`Index type`,placeholder:`e.g. HNSW`,value:d(`indexed`,`type`),disabled:n,onChange:e=>l(`indexed`,`type`,e)}),(0,H.jsx)(ax,{label:`Distance`,placeholder:`cosine`,value:d(`indexed`,`distance`),disabled:n,onChange:e=>l(`indexed`,`distance`,e)}),(0,H.jsx)(ox,{label:`efConstruction`,value:f(`indexed`,`efConstruction`),disabled:n,onChange:e=>u(`indexed`,`efConstruction`,e)}),(0,H.jsx)(ox,{label:`M`,value:f(`indexed`,`M`),disabled:n,onChange:e=>u(`indexed`,`M`,e)}),(0,H.jsx)(ox,{label:`optimizeRouting`,value:f(`indexed`,`optimizeRouting`),disabled:n,onChange:e=>u(`indexed`,`optimizeRouting`,e)}),(0,H.jsx)(ox,{label:`mL`,value:f(`indexed`,`mL`),disabled:n,onChange:e=>u(`indexed`,`mL`,e)}),(0,H.jsx)(ox,{label:`efConstructionSearch`,value:f(`indexed`,`efConstructionSearch`),disabled:n,onChange:e=>u(`indexed`,`efConstructionSearch`,e)})]})]}),_.length>0&&(0,H.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[`Preserved directives:`,` `,_.map(e=>(0,H.jsxs)(`code`,{className:`mr-1`,children:[`@`,e.name]},e.name))]})]})})]})}var lx=new Set([`table`,`export`,`sealed`]);function ux({table:e,typeNames:t,readOnly:n,errors:r,defaultCollapsed:i,onChange:a,onRemove:o}){let[s,c]=(0,B.useState)(i),l=t=>a({...e,directives:t}),u=(t,n)=>l(jn(e.directives,t,n)),d=(t,n,r)=>l(Zn(e.directives,t,n,r)),f=(t,n,r)=>l(on(e.directives,t,n,r)),p=(t,n,r,i)=>l(or(e.directives,t,n,r,i)),m=(t,n)=>gr(pr(e.directives,t,n))??``,h=(t,n)=>Rn(pr(e.directives,t,n)),g=(t,n,r)=>ur(pr(e.directives,t,n))??r,_=qn(e.directives,`export`),v=r.find(e=>e.code===`INVALID_TABLE_NAME`||e.code===`DUPLICATE_TABLE_NAME`)?.message,y=r.some(e=>e.code===`NO_FIELDS`),b=new Map(r.filter(e=>e.fieldKey).map(e=>[e.fieldKey,e.message])),x=e.directives.filter(e=>!lx.has(e.name)),S=e.fields.length;return(0,H.jsx)(Ct,{children:(0,H.jsxs)(we,{className:`flex flex-col gap-4`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,H.jsxs)(`button`,{type:`button`,onClick:()=>c(e=>!e),"aria-expanded":!s,className:`flex flex-1 items-center gap-2 text-left`,children:[s?(0,H.jsx)(Ue,{className:`size-4 shrink-0`}):(0,H.jsx)(N,{className:`size-4 shrink-0`}),(0,H.jsx)(`span`,{className:`font-medium`,children:e.typeName||(0,H.jsx)(`span`,{className:`text-muted-foreground italic`,children:`Untitled table`})}),(0,H.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[S,` field`,S===1?``:`s`,_?` · REST`:``]}),r.length>0&&(0,H.jsxs)(`span`,{className:`text-xs font-medium text-destructive`,children:[`⚠ `,r.length,` issue`,r.length===1?``:`s`]})]}),(0,H.jsxs)(k,{type:`button`,variant:`destructiveGhost`,size:`sm`,disabled:n,onClick:o,children:[(0,H.jsx)(Or,{}),` Remove table`]})]}),!s&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(ax,{label:`Table (type) name`,value:e.typeName,disabled:n,invalid:!!v,error:v,onChange:t=>a({...e,typeName:t})}),(0,H.jsxs)(`div`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[(0,H.jsx)(ix,{label:`REST endpoint`,description:`@export`,checked:_,disabled:n,onChange:e=>u(`export`,e)}),(0,H.jsx)(ix,{label:`Sealed`,description:`reject undefined properties`,checked:qn(e.directives,`sealed`),disabled:n,onChange:e=>u(`sealed`,e)})]}),(0,H.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-2`,children:[(0,H.jsx)(ax,{label:`Database`,placeholder:`data`,value:m(`table`,`database`),disabled:n,onChange:e=>d(`table`,`database`,e)}),(0,H.jsx)(ox,{label:`Expiration (seconds, 0 = never)`,value:h(`table`,`expiration`),min:0,disabled:n,onChange:e=>f(`table`,`expiration`,e)})]}),(0,H.jsx)(rx,{label:`Advanced table options`,children:(0,H.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,H.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-2`,children:[(0,H.jsx)(ax,{label:`Table name override (@table table:)`,placeholder:e.typeName||`defaults to type name`,value:m(`table`,`table`),disabled:n,onChange:e=>d(`table`,`table`,e)}),(0,H.jsx)(ox,{label:`Eviction (seconds after expiration)`,value:h(`table`,`eviction`),min:0,disabled:n,onChange:e=>f(`table`,`eviction`,e)}),(0,H.jsx)(ox,{label:`Scan interval (seconds)`,value:h(`table`,`scanInterval`),min:0,disabled:n,onChange:e=>f(`table`,`scanInterval`,e)})]}),(0,H.jsxs)(`div`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[(0,H.jsx)(ix,{label:`Audit`,checked:g(`table`,`audit`,!1),disabled:n,onChange:e=>p(`table`,`audit`,e,!1)}),(0,H.jsx)(ix,{label:`Replicate`,checked:g(`table`,`replicate`,!0),disabled:n,onChange:e=>p(`table`,`replicate`,e,!0)}),(0,H.jsx)(ix,{label:`Random-access fields`,checked:g(`table`,`randomAccessFields`,!1),disabled:n,onChange:e=>p(`table`,`randomAccessFields`,e,!1)})]}),_&&(0,H.jsxs)(`div`,{className:`flex flex-col gap-3 border-l-2 pl-3`,children:[(0,H.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:`REST endpoint (@export) options`}),(0,H.jsx)(ax,{label:`Endpoint name override`,placeholder:e.typeName||`defaults to type name`,value:m(`export`,`name`),disabled:n,onChange:e=>d(`export`,`name`,e)}),(0,H.jsxs)(`div`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[(0,H.jsx)(ix,{label:`REST`,checked:g(`export`,`rest`,!0),disabled:n,onChange:e=>p(`export`,`rest`,e,!0)}),(0,H.jsx)(ix,{label:`MQTT`,checked:g(`export`,`mqtt`,!0),disabled:n,onChange:e=>p(`export`,`mqtt`,e,!0)})]})]}),x.length>0&&(0,H.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[`Preserved directives:`,` `,x.map(e=>(0,H.jsxs)(`code`,{className:`mr-1`,children:[`@`,e.name]},e.name))]})]})}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h4`,{className:`mb-2 text-sm font-medium`,children:`Fields`}),y&&(0,H.jsx)(`p`,{className:`mb-2 text-xs text-destructive`,children:`A table needs at least one field to be valid. Add one below.`}),(0,H.jsx)(`div`,{className:`flex flex-col gap-2`,children:e.fields.map((r,i)=>(0,H.jsx)(cx,{field:r,typeNames:t,readOnly:n,disableRemove:S===1,error:r.key?b.get(r.key):void 0,onChange:t=>a({...e,fields:e.fields.map((e,n)=>n===i?t:e)}),onRemove:()=>a({...e,fields:e.fields.filter((e,t)=>t!==i)})},r.key??i))}),(0,H.jsxs)(k,{type:`button`,variant:`ghost`,className:`mt-2 w-full`,disabled:n,onClick:()=>a({...e,fields:[...e.fields,Ut()]}),children:[(0,H.jsx)(De,{}),` Add field`]})]})]})]})})}function dx(){let{openedEntry:e,openedEntryContents:t,openedEntryReadFailed:n}=V(),r=!!e&&!e.package&&e.path,{content:i,setContent:a}=ne(r);return e?t===void 0?n&&i!==void 0?(0,H.jsx)(Qy,{}):null:(0,H.jsx)(fx,{savedContents:t,updatedFileContent:i,setContent:a}):null}function fx({savedContents:e,updatedFileContent:t,setContent:n}){let{openedEntry:r,isSavingFile:i,saveFile:a}=V(),o=dt(),s=tt(),c=t??e,l=!!r?.package||!s,u=(0,B.useMemo)(()=>c.length<=524288&&$e(c).ok,[c]),[d,f]=(0,B.useReducer)($b,c,Zb),[p,m]=(0,B.useState)(()=>!u),[h,g]=(0,B.useState)(!1),[_,v]=(0,B.useState)({savedContents:e,showSource:p});if(_.savedContents!==e||_.showSource!==p){v({savedContents:e,showSource:p});let t=!_.showSource&&Hb(d)!==_.savedContents;!p&&!t&&(f({type:`reset`,source:c}),h&&(g(!1),f({type:`addTable`})))}let y=(0,B.useMemo)(()=>Hb(d),[d]);(0,B.useEffect)(()=>{p||l||n(y===e?void 0:y)},[y,p,l,e,n]),_t(`SaveFile`,()=>{p||l||!r||i||y===e||Yb(d).length>0||a({...o,file:r.path.split(`/`).slice(1).join(`/`),payload:y,project:r.project},r.path)},[p,l,r,e,o,i,d,y]),_t(`RevertChanges`,()=>{p||(n(void 0),f({type:`reset`,source:e}))},[p,e,n]),_t(`AddSchemaTable`,()=>{p?(g(!0),m(!1)):f({type:`addTable`})},[p]);let b=(0,B.useMemo)(()=>ex(d),[d]),x=(0,B.useMemo)(()=>b.map(e=>e.typeName).filter(Boolean),[b]),S=(0,B.useMemo)(()=>tx(d),[d]),C=(0,B.useMemo)(()=>Yb(d),[d]),w=(0,B.useMemo)(()=>{let e=new Map;for(let t of C){let n=e.get(t.tableId);n?n.push(t):e.set(t.tableId,[t])}return e},[C]),T=!p&&!l&&C.length>0;return(0,B.useEffect)(()=>(R(`EditorSaveBlocked`,T),()=>R(`EditorSaveBlocked`,!1)),[T]),r?p?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Qy,{}),u&&(0,H.jsxs)(k,{type:`button`,variant:`defaultOutline`,size:`sm`,className:`absolute top-11 right-4 z-10 bg-background shadow-md`,onClick:()=>m(!1),children:[(0,H.jsx)(Ot,{}),` Visual editor`]})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`mt-9 absolute inset-0 overflow-y-auto p-4 md:p-8`,children:(0,H.jsxs)(`div`,{className:`mx-auto flex max-w-4xl flex-col gap-4`,children:[(0,H.jsxs)(`div`,{className:`pr-4`,children:[(0,H.jsx)(`h2`,{className:`text-xl`,children:`Schema`}),(0,H.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Tables in `,(0,H.jsx)(`code`,{children:r.name}),`. Changes save back to the file.`]})]}),C.length>0&&(0,H.jsxs)(Rt,{variant:`destructive`,children:[(0,H.jsx)(vr,{}),(0,H.jsxs)(Ft,{children:[`Fix `,C.length===1?`this issue`:`these issues`,` before saving`]}),(0,H.jsx)(qe,{children:(0,H.jsx)(`ul`,{className:`list-disc pl-4`,children:C.map((e,t)=>(0,H.jsxs)(`li`,{children:[(0,H.jsxs)(`span`,{className:`font-medium`,children:[e.tableName||`Untitled table`,e.fieldName?` → ${e.fieldName}`:``]}),`: `,e.message]},`${e.tableId}-${e.code}-${e.fieldKey??``}-${t}`))})})]}),b.length===0&&(0,H.jsxs)(`div`,{className:`rounded-lg border border-dashed p-8 text-center text-muted-foreground`,children:[(0,H.jsx)(`p`,{children:`No tables yet.`}),!l&&(0,H.jsx)(`p`,{className:`mt-1 text-sm`,children:`Use “Add table” to define your first one.`})]}),b.map(e=>(0,H.jsx)(ux,{table:e,typeNames:x,readOnly:l,errors:w.get(e.id)??[],defaultCollapsed:!e.id.startsWith(`new-`),onChange:t=>f({type:`updateTable`,id:e.id,table:t}),onRemove:()=>f({type:`removeTable`,id:e.id})},e.id)),S&&(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground italic`,children:`This file has other content (e.g. non-table definitions) that isn’t shown here. It’s preserved as-is — switch to “Edit as text” to see it.`})]})}),(0,H.jsxs)(`div`,{className:`absolute top-11 right-4 z-10 flex gap-2`,children:[!l&&(0,H.jsxs)(k,{type:`button`,variant:`positive`,size:`sm`,className:`shadow-md`,onClick:()=>f({type:`addTable`}),children:[(0,H.jsx)(De,{}),` Add table`]}),(0,H.jsxs)(k,{type:`button`,variant:`defaultOutline`,size:`sm`,className:`bg-background shadow-md`,onClick:()=>m(!0),children:[(0,H.jsx)(Ke,{}),` Edit as text`]})]})]}):null}function px(){let{openedEntry:e,openedEntryContents:t}=V(),n=Es(e?.project);if(e?.path===`newApplication`)return(0,H.jsx)(Ob,{});if(z(e))return e.overviewEntry?(0,H.jsx)(`div`,{className:`directoryReadMe max-w-3xl`,children:(0,H.jsx)(im,{urlTransform:n,remarkPlugins:[c_],components:{code:_x},children:t})}):(0,H.jsx)(l_,{name:e.name});let r=rt(e?.name);if(r)return(0,H.jsx)(hx,{name:e?.name,base64:t,media:r});let i=As(e?.name);return i?(0,H.jsx)(eb,{media:i},e?.path):Os(e?.name)?(0,H.jsx)(mx,{name:e?.name}):Dn(e?.name)?(0,H.jsx)($y,{},e?.path):e?.name?.endsWith(`.graphql`)?(0,H.jsx)(dx,{},e.path):(0,H.jsx)(Qy,{})}function mx({name:e}){return(0,H.jsx)(`div`,{className:`absolute inset-0 mt-9 flex items-center justify-center p-8 text-center text-muted-foreground`,children:(0,H.jsxs)(`div`,{className:`max-w-md`,children:[(0,H.jsx)(ii,{className:`mx-auto mb-4 h-10 w-10 opacity-60`}),(0,H.jsxs)(`p`,{className:`font-medium text-foreground`,children:[e??`This file`,` can’t be previewed`]}),(0,H.jsx)(`p`,{className:`mt-1 text-sm`,children:`It’s a binary file. You can still rename or delete it from the file tree.`})]})})}function hx({name:e,base64:t,media:n}){if(!t)return null;let r=`data:${n.mime};base64,${t}`;return(0,H.jsx)(`div`,{className:`mt-9 absolute top-0 right-0 bottom-0 left-0`,children:n.kind===`video`?(0,H.jsx)(`video`,{className:`w-full h-full object-contain p-20`,src:r,controls:!0}):(0,H.jsx)(`img`,{className:`w-full h-full object-contain p-20`,alt:e,src:r})})}function gx({chart:e}){let t=(0,B.useRef)(null),[n,r]=(0,B.useState)(``),[i,a]=(0,B.useState)(null);return(0,B.useEffect)(()=>{let t=`mermaid-${Math.random().toString(36).slice(2,9)}`,n=!1;return g(async()=>{let{default:e}=await import(`./mermaid.core-BOAgKzo5.js`);return{default:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])).then(({default:i})=>{n||(i.initialize({startOnLoad:!1,theme:`default`}),i.render(t,e).then(({svg:e})=>{n||(r(e),a(null))}).catch(e=>{n||(console.error(`Mermaid render error:`,e),a(String(e)))}))}),()=>{n=!0}},[e]),i?(0,H.jsx)(`pre`,{className:`text-red-500 bg-red-50 p-3 rounded text-sm overflow-auto`,children:(0,H.jsx)(`code`,{children:e})}):(0,H.jsx)(`div`,{ref:t,className:`my-4 flex justify-center overflow-auto`,dangerouslySetInnerHTML:{__html:n}})}function _x({inline:e,className:t,children:n}){let r=String(n??``).replace(/\n$/,``),[i]=it(r),a=t?.replace(`language-`,``);return e||!r.includes(`
|
|
294
|
+
`)?(0,H.jsx)(`code`,{className:t,children:n}):a===`mermaid`?(0,H.jsx)(gx,{chart:r}):(0,H.jsxs)(`code`,{className:`relative`,children:[(0,H.jsx)(k,{className:`absolute top-2 right-2`,type:`button`,variant:`default`,size:`sm`,onClick:i,children:(0,H.jsx)(Lt,{className:`w-4 h-4`})}),r]})}function vx(e,t,n){let r=t,i=t.replace(/:9925/,``).replace(/\/?$/,``);return r&&(e=e.replaceAll(/https?:\/\/localhost:9926/g,i)),n.project&&(e=e.replaceAll(`Your New Harper Fabric App`,n.project).replaceAll(`your-project-name-here`,n.project)),e}function yx(e,t){return t===void 0?void 0:`${e}:${t}`}function bx({children:e}){let t=S(),n=dt(),[r,i]=(0,B.useState)(void 0),a=yx(n.entityId,r?.path),o=(0,B.useRef)(a);(0,B.useLayoutEffect)(()=>{o.current=a},[a]);let[s,c]=(0,B.useState)({entryKey:void 0,contents:void 0}),l=s.entryKey===a?s.contents:void 0,u=(0,B.useCallback)(e=>{o.current===a&&c(t=>({entryKey:a,contents:typeof e==`function`?e(t.entryKey===a?t.contents:void 0):e}))},[a]),d=he(),f=Br(),p=D(),{open:m}=C({strict:!1}),{data:h}=x(Je(n)),g=(0,B.useMemo)(()=>h?fe(h.entries):{rootEntries:[],pathsRegistry:new Map,allEntries:new Map},[h]),_=(0,B.useCallback)(async()=>p.fetchQuery({queryKey:[n.entityId,`get_components`],networkMode:`online`}),[p,n]);_t(`ReloadApplicationRootEntries`,_,[_]);let v=(0,B.useCallback)(e=>g.pathsRegistry.has(e),[g.pathsRegistry]),y=g.rootEntries.filter(e=>!e.package&&e.path!==`newApplication`).map(e=>e.name),b=y[0],w=y.slice(0,1);!b&&h&&(b=L,w=[L]);let[T,E]=Bn(`FileFocused/${n.entityId}`,b),[O,k]=Bn(`FolderOpened/${n.entityId}`,y),[ee,A]=Bn(`FileSelected/${n.entityId}`,w);(0,B.useEffect)(()=>{if(m?.length){let e=m.split(`?`),n=e[0],r=e[1],i=n.split(`/`);if(r){let e=r.split(`=`);R(e[0],e[1]===`true`||e[1]!==`false`&&e[1])}k(e=>{let t=new Set(e);for(let e=1;e<i.length;e++)t.add(i.slice(0,e).join(`/`));return[...t]}),A([n]),E(n),t({search:void 0})}},[t,m,k,E,A]);let j=r&&(z(r)?r.overviewEntry?.path:r.path)||``,M=r&&(z(r)?r.overviewEntry?.project:r.project)||``,N=r&&(z(r)?!!r.overviewEntry?.path:!1)||!1,te=r&&!z(r)&&Os(r.name)?void 0:j?.split(`/`).slice(1).join(`/`),P=zt({file:te,project:M,...n}),{data:F,isError:ne}=x(He({file:te,project:M,...n}));(0,B.useEffect)(function(){let e=F?.project+`/`+F?.file,t=F?.message;e===j?t!==void 0&&N&&f&&F&&(t=vx(t,f,F)):t=void 0,c(e=>e.entryKey===a&&e.contents===t?e:{entryKey:a,contents:t})},[F,j,N,n,a]);let{mutate:re,isPending:ie}=ue(),ae=(0,B.useCallback)((e,t)=>{let r=yx(n.entityId,t),i=oe(d,t);re(e,{onSuccess:()=>{let{payload:t}=e;t!==void 0&&(p.setQueryData(P,n=>({...n,project:e.project,file:e.file,message:t})),le(i,t),o.current===r&&c({entryKey:r,contents:t}))},onError:e=>{console.error(`Error saving file:`,e)}})},[d,P,n.entityId,p,re]),I=(0,B.useMemo)(()=>fa(r),[r]),se=(0,B.useMemo)(()=>({rootEntries:g.rootEntries,reloadRootEntries:_,entryExists:v,focusedItem:T,setFocusedItem:E,expandedItems:O,setExpandedItems:k,selectedItems:ee,setSelectedItems:A,restrictPackageModification:I,openedEntry:r,setOpenedEntry:i,openedEntryContents:l,setOpenedEntryContents:u,openedEntryReadFailed:ne,saveFile:ae,isSavingFile:ie}),[g.rootEntries,_,v,T,E,O,k,ee,A,I,r,i,l,u,ne,ae,ie]);return(0,H.jsx)(ma.Provider,{value:se,children:e})}var xx={storageKey:Se.ApplicationsSidebarWidth,defaultWidth:224,minWidth:180,cssVariable:`--app-sidebar-width`};function Sx(){return zn(xx)}function Cx(e){let t=e;if(t?.focus)wx(t);else{let t=e;t?.target?.focus&&wx(t.target)}}function wx(e){o(1).then(()=>{e.focus?.()})}function Tx(){let{value:e,trigger:t}=Ee(`ShowAddDirectoryOrFileModalType`,!1),n=(0,B.useCallback)(()=>{R(`ShowAddDirectoryOrFileModalType`,!1),Cx(t)},[t]),{openedEntry:r,entryExists:i,reloadRootEntries:a,setFocusedItem:o,setSelectedItems:s,setExpandedItems:u}=V(),d=dt(),f=D(),{mutate:p,isPending:m}=ue({onSuccess:(e,{entityId:t,project:n,file:r,payload:i})=>{i!==void 0&&me(f,t,`${n}/${r}`)}}),h=c({name:l().nonempty({error:`Please enter a valid name.`}).regex(/^[a-zA-Z0-9_\- .]*$/,{error:`Names can only contain letters, numbers, underscores, hyphens, periods, and spaces.`}).max(50,{error:`Names cannot be longer than 50 characters.`}).trim()}),g=A({resolver:ee(h),defaultValues:{name:``}}),_=(0,B.useCallback)(async t=>{if(!r||!e)return;let c=r.path.split(`/`),l=(z(r)?c.slice(1):c.slice(1,-1)).join(`/`),f=l?`${l}/${t.name}`:t.name,m=`${r.project}/${f}`;(!i(m)||await va({files:e===`file`?[m]:[],directories:e===`directory`?[m]:[]}))&&p({file:f,project:r.project,payload:e===`directory`?void 0:``,...d},{onSuccess:()=>{a(),n(),g.reset();let i=[r.project,l,t.name].filter(be).join(`/`);o(i),s([i]),e===`directory`?(u(e=>[...e,i]),R(`FocusFileTree`,!0)):R(`FocusEditor`,!0)}})},[p,g,n,d,r,i,a,u,o,s,e]),v=(0,B.useCallback)(()=>{n(),g.reset()},[n,g]);return(0,H.jsx)(fn,{onOpenChange:n,open:!!e,children:(0,H.jsx)(Ln,{"aria-describedby":void 0,className:`text-popover-foreground`,onOpenAutoFocus:e=>{e.preventDefault(),requestAnimationFrame(()=>g.setFocus(`name`))},children:(0,H.jsx)(Cr,{...g,children:(0,H.jsxs)(`form`,{id:`instance-add-app-${e}-form`,name:`instance-add-app-${e}-form`,onSubmit:g.handleSubmit(_),children:[(0,H.jsxs)(Sn,{children:[(0,H.jsxs)(er,{children:[`Add `,e]}),(0,H.jsxs)(hr,{children:[`Enter the name of the `,e,` you want to add`,e===`file`?`, don't forget the extension`:``,`!`]})]}),(0,H.jsx)(At,{control:g.control,name:`name`,render:({field:e})=>(0,H.jsxs)(Er,{className:`my-2`,children:[(0,H.jsx)(Ar,{children:`Name`}),(0,H.jsx)(Et,{disabled:m,type:`text`,autoComplete:`off`,autoCapitalize:`off`,maxLength:h.shape.name.maxLength,...e}),(0,H.jsx)(br,{})]})}),(0,H.jsx)(hn,{children:(0,H.jsxs)(`div`,{className:`flex justify-between w-full`,children:[(0,H.jsx)(k,{type:`button`,variant:`ghostOutline`,onClick:v,children:`Cancel`}),(0,H.jsxs)(k,{variant:`positiveOutline`,type:`submit`,disabled:m,children:[(0,H.jsx)(De,{}),` Add `,e]})]})})]})})})})}async function Ex(e,{dropItem:t,onProgress:n,isCanceled:r}){let i=0,a=[];for(let o of e){let e=o.split(`/`);a=e;let s=e[0],c=e.length>1?e.slice(1).join(`/`):void 0;n?.(i);try{await t(s,c),i+=1}catch(e){return{deleted:i,canceled:!1,error:e,lastSplit:a}}if(r?.())return{deleted:i,canceled:!0,lastSplit:a}}return{deleted:i,canceled:!1,lastSplit:a}}function Dx(){let{value:e,trigger:t}=Ee(`ShowDeleteDirectoryOrFileModal`,!1),n=dt(),r=D(),{openedEntry:i,reloadRootEntries:a,rootEntries:o,setFocusedItem:s,setSelectedItems:c,selectedItems:l}=V(),u=l.length>1,d=z(i),f=d&&i.path===i.project,p=!!i?.package,m=p?`Remove`:`Delete`,g=p?`Imported Application`:f?`Application`:d?`Directory`:`File`,_=(0,B.useCallback)(()=>{R(`ShowDeleteDirectoryOrFileModal`,!1),Cx(t)},[t]),v=(0,B.useCallback)(async()=>{_();let e=l.filter(e=>pa(o,String(e)));if(e.length){j.error(`${m} refused`,{description:`${e.join(`, `)} is managed by Harper and keeps this instance in the load balancer. Remove it from the selection to continue.`});return}let t=!1,i=`deleting-files`,u=h(l.length,`item`,`items`),d={label:`OK`,onClick:()=>void 0},f=await Ex(l.map(String).reverse(),{dropItem:async(e,t)=>{let i=await re({file:t,project:e,...n});return ce(r,n.entityId,t?`${e}/${t}`:e),i},onProgress:e=>{j.loading(`${m} in progress...`,{id:i,description:`${e} of ${u}`,action:{label:`Cancel`,onClick:()=>{t=!0}}})},isCanceled:()=>t});if(f.error?(j.dismiss(i),$n(f.error)):f.canceled?j.warning(`${m} canceled!`,{id:i,description:``,action:d}):j.success(`${m} completed!`,{id:i,description:``,action:d}),f.lastSplit.length){let e=f.lastSplit.slice(0,-1).join(`/`);s(e||void 0),c(e?[e]:[]),a(),R(`FocusFileTree`,!0)}},[m,_,n,r,a,o,l,s,c]),y=(0,B.useCallback)(e=>{e.preventDefault(),v()},[v]);return(0,H.jsx)(fn,{onOpenChange:_,open:e,children:(0,H.jsxs)(Ln,{"aria-describedby":void 0,className:`text-popover-foreground`,children:[(0,H.jsxs)(Sn,{children:[(0,H.jsxs)(er,{children:[m,` `,g]}),(0,H.jsxs)(hr,{children:[`Are you sure you want to `,m.toLowerCase(),` `,u?`these ${l.length} items`:`this ${g.toLowerCase()}`,`?`]}),!p&&(0,H.jsx)(hr,{className:`whitespace-pre`,children:u?l.join(`
|
|
295
|
+
`):i?.path})]}),(0,H.jsxs)(`div`,{className:`flex w-full gap-4`,children:[(0,H.jsx)(k,{type:`button`,variant:`ghostOutline`,className:`w-full`,onClick:_,children:`Cancel`}),(0,H.jsxs)(k,{variant:`destructiveOutline`,type:`button`,className:`w-full`,autoFocus:!0,onClick:y,children:[(0,H.jsx)(Or,{}),` `,m,` `,u?`items`:g]})]})]})})}function Ox(e,t){if(!e||!e.exact)return`unmeasured`;if(t||e.bytes>1e8)return`large`}function kx(e,t){if(!t)return;let n=e.find(e=>e.name===t);if(!n||!z(n))return;let r=0,i=0,a=!0,o=e=>{for(let t of e){if(z(t)){o(t.entries);continue}i++,typeof t.size==`number`?r+=t.size:a=!1}};return o(n.entries),{bytes:r,fileCount:i,exact:a}}async function Ax({packageName:e,project:t,skipNodeModules:n,skipSymlinks:r,instanceClient:i}){let{data:a}=await i.post(`/`,{operation:`package_component`,package:e,project:t,skip_node_modules:n,skip_symlinks:r},{timeout:3e5,skipGatewayRetry:!0});return a}function jx(){return b({mutationFn:Ax})}function Mx(e){let t=atob(e),n=new Uint8Array(new ArrayBuffer(t.length));for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function Nx(){let{value:e,trigger:t}=Ee(`ShowDownloadApplicationModal`,!1),n=dt(),{openedEntry:r,rootEntries:i}=V(),{mutate:a,isPending:o,isSuccess:s}=jx(),c=s?`Downloaded`:o?`Downloading`:`Download`,[l,u]=(0,B.useState)(!1),d=(0,B.useMemo)(()=>kx(i,r?.project),[i,r?.project]),f=Ox(d,l),p=(0,B.useCallback)(e=>{u(e.target.checked)},[]),m=(0,B.useCallback)(()=>{R(`ShowDownloadApplicationModal`,!1),Cx(t)},[t]),h=(0,B.useCallback)(e=>{if(e.preventDefault(),!r)return;m();let t=j.loading(`Packaging...`);a({packageName:r.package,project:r.project,skipNodeModules:!l,...n},{onSuccess:e=>{let n;try{n=new Blob([Mx(e.payload)],{type:`application/gzip`})}catch(e){j.error(`${r.project} was packaged, but is too large for the browser to save. Copy it off the host directly instead.`,{id:t}),console.error(`[harper] failed to decode downloaded application archive`,e);return}j.success(`Download ready!`,{id:t});let i=document.createElement(`a`);i.setAttribute(`class`,`invisible absolute top-0`),i.href=URL.createObjectURL(n),i.download=`${r.project}.gz`,document.body.appendChild(i),i.click(),document.body.removeChild(i)},onError:e=>{j.error(`Could not package ${r.project}: ${e.message}`,{id:t})}})},[r,a,l,n,m]);return(0,H.jsx)(fn,{onOpenChange:m,open:e,children:(0,H.jsxs)(Ln,{"aria-describedby":void 0,className:`text-popover-foreground`,children:[(0,H.jsxs)(Sn,{children:[(0,H.jsx)(er,{children:`Download Application`}),(0,H.jsxs)(hr,{children:[`This will package up the contents of `,(0,H.jsx)(`strong`,{children:r?.project}),` into a gzipped file.`,d&&(0,H.jsxs)(H.Fragment,{children:[` `,d.bytes>0&&`${d.exact?`About`:`At least`} ${Nn(d.bytes)} across `,new Intl.NumberFormat().format(d.fileCount),` `,d.fileCount===1?`file`:`files`,d.bytes>0?``:` of unreported size`,l?`, plus node modules`:``,`.`]})]})]}),f&&(0,H.jsxs)(Rt,{variant:`warning`,children:[(0,H.jsx)(vr,{}),(0,H.jsx)(Ft,{children:f===`large`?`This is a large download`:`This download’s size is unknown`}),(0,H.jsxs)(qe,{children:[f===`unmeasured`&&(0,H.jsx)(`p`,{children:`This instance didn’t report file sizes, so there’s no way to tell up front whether this application is small enough to download.`}),(0,H.jsx)(`p`,{children:`Studio has to hold the whole archive in browser memory before it can be saved, so the tab may run out of memory and crash partway through.`}),(0,H.jsxs)(`p`,{children:[`Copying the application off the host directly — `,(0,H.jsx)(`code`,{children:`scp`}),`, or the Harper CLI — is more reliable`,f===`large`?` at this size`:` when the size is unknown`,`.`]})]})]}),(0,H.jsxs)(un,{className:`flex`,children:[(0,H.jsx)(en,{type:`checkbox`,className:`w-6`,disabled:o,checked:l,onChange:p}),(0,H.jsx)(`span`,{className:`pl-4 pr-8 flex-1 py-2.5`,children:`Include Node Modules`})]}),(0,H.jsxs)(`div`,{className:`flex w-full gap-4`,children:[(0,H.jsx)(k,{type:`button`,variant:`ghostOutline`,className:`w-full`,onClick:m,children:`Cancel`}),(0,H.jsxs)(k,{variant:`positive`,type:`button`,className:`w-full`,disabled:o,autoFocus:!0,onClick:h,children:[(0,H.jsx)(Mr,{}),` `,f&&!o&&!s?`Download anyway`:c,o?`...`:``]})]})]})})}function Px({files:e,directories:t}){let n=[];return e.length&&n.push(`Overwrite ${h(e.length,`file`,`files`)}`),t.length&&n.push(`Merge ${h(t.length,`directory`,`directories`)}`),n.join(` & `)||`Overwrite`}function Fx(){let[e,t]=(0,B.useState)(null);(0,B.useEffect)(()=>(_a((e,n)=>{t(t=>(t?.resolve(!1),{request:e,resolve:n}))}),()=>_a(void 0)),[]);let n=(0,B.useCallback)(e=>{t(t=>(t?.resolve(e),null))},[]),r=e?.request,i=r?[...r.directories,...r.files]:[];return(0,H.jsx)(It,{open:!!e,onOpenChange:e=>!e&&n(!1),children:(0,H.jsxs)(at,{className:`text-popover-foreground`,children:[(0,H.jsxs)(Yt,{children:[(0,H.jsx)(Wt,{children:`Overwrite existing items?`}),(0,H.jsx)(rr,{children:r?.directories.length?`Some of these already exist. Files will be overwritten and directories merged.`:`Some of these files already exist and will be overwritten.`})]}),i.length>0&&(0,H.jsxs)(`div`,{className:`max-h-48 overflow-y-auto rounded-md border border-border bg-muted/40 p-2 text-sm whitespace-pre-wrap break-all`,children:[i.slice(0,50).join(`
|
|
296
|
+
`),i.length>50?`\n…and ${i.length-50} more`:``]}),(0,H.jsxs)(nt,{children:[(0,H.jsx)(Ge,{onClick:()=>n(!1),children:`Cancel`}),(0,H.jsx)(Ht,{className:O({variant:`destructive`}),onClick:()=>n(!0),children:r?Px(r):`Overwrite`})]})]})})}function Ix(){let{value:e,trigger:t}=Ee(`ShowRedeployApplicationModal`,!1),n=D(),r=dt(),i=cr(),a=Yn(),o=Zt(),s=je(r),c=kn(),{openedEntry:l}=V(),u=l?.package,{mutateAsync:d,isPending:f}=xt(),[p,m]=(0,B.useState)(!1),h=(0,B.useRef)(void 0);(0,B.useEffect)(()=>()=>{h.current=void 0},[]);let[g,_]=(0,B.useState)(!1),v=A({defaultValues:{applicationUrl:u,installCommand:``,stageOnly:!1}}),{control:y,handleSubmit:b,reset:x,watch:S}=v,C=a&&S(`stageOnly`);(0,B.useEffect)(()=>{x({applicationUrl:u,stageOnly:!1})},[x,u]);let w=(0,B.useCallback)(()=>{R(`ShowRedeployApplicationModal`,!1),Cx(t),x({applicationUrl:u,stageOnly:!1}),m(!1),h.current=void 0,_(!1),o.reset()},[x,u,t,o]),T=(0,B.useCallback)(()=>{n.invalidateQueries({queryKey:[r.entityId,`get_components`],refetchType:`active`})},[n,r.entityId]),E=(0,B.useCallback)(async(e,t,n)=>{if(!l)return;let i=l.project,a=Symbol(i),u=()=>h.current===a;o.reset(),o.markStarted(),m(!0),_(n),h.current=a;let f;try{f=await d({request:{kind:n?`stage`:`deploy`,project:i,package:e,installCommand:t},useSSE:!0,onEvent:o.onEvent,...r})}catch(e){if(e instanceof Gn){u()&&o.markSettled(`inconclusive`),n?j.warning(`${i} may not be staged`,{description:`Live updates ended before the stage finished. Check Deployments for its record.`}):(T(),await st(i,void 0,s)),u()&&w();return}let t=e instanceof Te;(t||ye(e))&&T();let{message:r}=xn(e);if(u()){o.markSettled(`error`,t?void 0:r,{failure:e});return}let a=t?`${i} did not reach every node`:Ve(e,i,n?`stage`:`redeploy`);j.error(a,{description:r,action:c(wt(e).deploymentId)});return}if(n){u()&&o.markSettled(`success`,void 0,{result:f}),Pr(i,f,{action:c(f?.deployment_id)}),u()&&!Qe(f).warn&&w();return}let p=f?.rollout?.state!==`unfollowable`;u()&&o.markSettled(p?`success`:`inconclusive`,void 0,{result:f}),T(),await st(i,f,s,{action:c(f?.deployment_id)}),u()&&p&&!Qe(f).warn&&w()},[d,l,r,o,T,s,w,c]),O=(0,B.useCallback)(async(e,t,n)=>{if(!l)return;let i=l.project;w();let a=j.loading(n?`Staging...`:`Redeploying...`),o;try{o=await d({request:{kind:n?`stage`:`deploy`,project:i,package:e,installCommand:t},...r})}catch(e){let t=c(wt(e).deploymentId);if(e instanceof Te){j.error(`${i} did not reach every node`,{id:a,description:e.message,action:t}),T();return}ye(e)&&T(),j.error(Ve(e,i,n?`stage`:`redeploy`),{id:a,description:xn(e).message,action:t});return}if(n){Pr(i,o,{id:a,action:c(o?.deployment_id)});return}Dt(i,o,{title:`Application ${i} redeployed successfully`},{id:a,action:c(o?.deployment_id)}),T()},[d,l,r,T,w,c]),ee=({applicationUrl:e,installCommand:t,stageOnly:n})=>{if(!e)return;let r=a&&!!n;i?E(e,t,r):O(e,t,r)};return(0,H.jsx)(fn,{onOpenChange:w,open:e,children:(0,H.jsxs)(Ln,{"aria-describedby":void 0,className:`text-popover-foreground`,children:[(0,H.jsxs)(Sn,{children:[(0,H.jsx)(er,{children:`Redeploy Package`}),(0,H.jsx)(hr,{children:p?`${g?`Staging`:`Redeploying`} ${l?.project??`package`}…`:`Redeploy this package?`})]}),p?(0,H.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,H.jsx)(vn,{state:o.state,onNavigateAway:w,staging:g}),(0,H.jsx)(k,{type:`button`,variant:`ghostOutline`,className:`w-full`,onClick:w,disabled:f,children:f?`Deploying…`:`Close`})]}):(0,H.jsx)(`div`,{children:(0,H.jsx)(Cr,{...v,children:(0,H.jsxs)(`form`,{id:`instance-redeploy-app-form`,name:`instance-redeploy-app-form`,className:`flex flex-col w-full gap-4`,onSubmit:b(ee),children:[(0,H.jsx)(At,{control:y,name:`applicationUrl`,render:({field:e})=>(0,H.jsxs)(Er,{children:[(0,H.jsx)(Ar,{className:`pb-1`,children:`Package Reference`}),(0,H.jsx)(Pe,{children:(0,H.jsx)(en,{type:`text`,autoFocus:!0,...e})}),(0,H.jsx)(br,{})]})}),(0,H.jsx)(At,{control:y,name:`installCommand`,render:({field:e})=>(0,H.jsxs)(Er,{children:[(0,H.jsx)(Ar,{className:`pb-1`,children:`Install Command`}),(0,H.jsx)(Pe,{children:(0,H.jsx)(en,{type:`text`,placeholder:`Leave blank to install dependencies automatically`,...e})}),(0,H.jsx)(br,{})]})}),a&&(0,H.jsx)(At,{control:y,name:`stageOnly`,render:({field:e})=>(0,H.jsxs)(Er,{className:`flex flex-row items-start gap-3`,children:[(0,H.jsx)(Pe,{children:(0,H.jsx)(Tn,{checked:e.value,onCheckedChange:e.onChange})}),(0,H.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,H.jsx)(Ar,{children:`Stage only`}),(0,H.jsx)(ut,{children:`Install it on every node without making it live. Activate it later from Deployments.`})]})]})}),(0,H.jsxs)(k,{variant:`positiveOutline`,type:`submit`,className:`w-full`,disabled:f,children:[(0,H.jsx)(Fn,{}),` `,C?`Stage Application`:`Redeploy Application`]}),(0,H.jsx)(k,{type:`button`,variant:`ghostOutline`,className:`w-full`,onClick:w,disabled:f,children:`Cancel`})]})})})]})})}function Lx(e){return Vn(e.split(`/`).slice(0,-1))}function Rx(e,t){return Vn(Lx(e),t)}function zx(e){return z(e)?e.entries.flatMap(zx):[e]}function Bx(){let{value:e,trigger:t}=Ee(`ShowRenameFileModal`,!1),n=(0,B.useCallback)(()=>{R(`ShowRenameFileModal`,!1),Cx(t)},[t]),{openedEntry:r,entryExists:i,reloadRootEntries:a}=V(),o=dt(),s=D(),u=c({name:l().trim().nonempty({error:`Please enter a valid name.`}).regex(/^[a-zA-Z0-9_\- .]*$/,{error:`Names can only contain letters, numbers, underscores, hyphens, periods, and spaces.`}).max(50,{error:`Names cannot be longer than 50 characters.`}).refine(e=>e!==r?.name,{error:`Please enter a new name.`})}),[d,f]=(0,B.useState)(!1),p=ha(),m=A({resolver:ee(u),mode:`onTouched`}),{isDirty:h,isValid:g}=m.formState;(0,B.useEffect)(()=>{r?.name&&m.reset({name:r?.name})},[m,r?.name]);let _=(0,B.useCallback)(async e=>{if(!r)return;let t=Rx(r.path,e.name),c=z(r);if(i(t)&&!await va({files:c?[]:[t],directories:c?[t]:[]}))return;let l=c?zx(r).map(e=>({from:e.path,to:t+e.path.slice(r.path.length)})):[{from:r.path,to:t}];f(!0);let u=await p(l);if(u&&c){let e=e=>e.split(`/`).slice(1).join(`/`);try{l.length===0&&await pe({...o,project:r.project,file:e(t),payload:void 0}),await re({...o,project:r.project,file:e(r.path)}),ce(s,o.entityId,r.path),await a()}catch(e){let{title:t,description:n}=ye(e)?xn(e):{title:`Rename Failed`,description:e instanceof Error?e.message:`Could not remove the original directory.`};j.error(t,{description:n}),f(!1);return}}f(!1),u&&(n(),m.reset(),R(c?`FocusFileTree`:`FocusEditor`,!0))},[n,i,m,o,r,s,a,p,f]),v=(0,B.useCallback)(()=>{n(),m.reset()},[n,m]);return(0,H.jsx)(fn,{onOpenChange:n,open:e,children:(0,H.jsx)(Ln,{"aria-describedby":void 0,className:`text-popover-foreground`,onOpenAutoFocus:e=>{e.preventDefault(),requestAnimationFrame(()=>m.setFocus(`name`,{shouldSelect:!0}))},children:(0,H.jsx)(Cr,{...m,children:(0,H.jsxs)(`form`,{id:`instance-rename-app-file-form`,name:`instance-rename-app-file-form`,onSubmit:m.handleSubmit(_),onKeyDown:Ne(m),children:[(0,H.jsxs)(Sn,{children:[(0,H.jsxs)(er,{children:[`Rename `,z(r)?`Directory`:`File`]}),(0,H.jsx)(hr,{children:r?.path})]}),(0,H.jsx)(At,{control:m.control,name:`name`,render:({field:e})=>(0,H.jsxs)(Er,{className:`my-2`,children:[(0,H.jsx)(Ar,{children:`Name`}),(0,H.jsx)(Et,{disabled:d,type:`text`,autoComplete:`off`,autoCapitalize:`off`,maxLength:u.shape.name.maxLength,...e}),(0,H.jsx)(br,{})]})}),(0,H.jsx)(hn,{children:(0,H.jsxs)(`div`,{className:`flex justify-between w-full`,children:[(0,H.jsx)(k,{type:`button`,variant:`ghostOutline`,onClick:v,children:`Cancel`}),(0,H.jsxs)(k,{variant:`positiveOutline`,type:`submit`,disabled:d||!h||!g,children:[(0,H.jsx)(lt,{}),` Rename`]})]})})]})})})})}function Vx(){let e=qt(),t=w({strict:!1}),{toggle:n,toggled:r}=la(`ApplicationsSidebarOpened`,!0),{width:i,minWidth:a,maxWidth:o,isResizing:c,sidebarRef:l,startResizing:u,handleKeyDown:d}=Sx();return e?(0,H.jsxs)(bx,{children:[(0,H.jsxs)(`aside`,{id:`file-explorer-sidebar`,ref:l,className:s(`pt-[calc(--spacing(32))] w-[var(--app-sidebar-width)] fixed top-0 left-0 bottom-0 z-30`,`bg-violet-50 border-r border-violet-200 shadow shadow-black/10`,`dark:bg-grey-700 dark:border-grey-600 dark:shadow-black`,`transition-transform -translate-x-full`,r?`translate-x-0`:`md:translate-x-0`),"aria-label":`Sidebar`,children:[(0,H.jsx)(fs,{}),(0,H.jsx)(ps,{width:i,minWidth:a,maxWidth:o,isResizing:c,onPointerDown:u,onKeyDown:d})]}),(0,H.jsxs)(`div`,{ref:l,className:s(`applications-content`,`overflow-y-auto overflow-x-hidden`,`fixed top-32 right-0 bottom-0 left-0`,!c&&`transition-[left]`,`md:left-[var(--app-sidebar-width)]`,r&&`sm:left-[var(--app-sidebar-width)]`),children:[(0,H.jsx)(px,{}),(0,H.jsx)(Ts,{toggledSidebar:r,toggleSidebar:n})]}),(0,H.jsx)(Tx,{}),(0,H.jsx)(Dx,{}),(0,H.jsx)(Nx,{}),(0,H.jsx)(Ix,{}),(0,H.jsx)(Bx,{}),(0,H.jsx)(Fx,{})]}):(0,H.jsx)(T,{to:Vt(t,`databases`)})}export{Vx as ApplicationsEditor};
|