@marimo-team/islands 0.16.4 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ConnectedDataExplorerComponent-CCjhPKMy.js → ConnectedDataExplorerComponent-DJEUH6Bb.js} +78 -100
- package/dist/{_baseIsEqual-oN7pRNcM.js → _baseIsEqual-CN4oFUZ4.js} +20 -20
- package/dist/{_basePickBy-CYvzhRjy.js → _basePickBy-CzSvE_-f.js} +3 -3
- package/dist/{_baseProperty-DGUdIBuu.js → _baseProperty-DbbUiyUD.js} +5 -5
- package/dist/{_baseUniq-B5gfSl8S.js → _baseUniq-DwoC-LVO.js} +4 -4
- package/dist/any-language-editor-CEXn1vFs.js +156 -0
- package/dist/apl-DuVfHsPc.js +4 -0
- package/dist/architecture-O4VJ6CD3-lp-opOaL.js +21 -0
- package/dist/{architectureDiagram-W76B3OCA-DkEhipkW.js → architectureDiagram-W76B3OCA-CoBORy6u.js} +34 -34
- package/dist/asciiarmor-qIVWsi4F.js +4 -0
- package/dist/asn1-BjPqARr7.js +4 -0
- package/dist/assets/__vite-browser-external-lX-sn9m2.js +1 -0
- package/dist/assets/worker-vPn7gxWj.js +54 -0
- package/dist/{blockDiagram-QIGZ2CNN-DZOqLMYa.js → blockDiagram-QIGZ2CNN-0yzoLIar.js} +75 -86
- package/dist/brainfuck-DPGTVfkE.js +4 -0
- package/dist/{button-CEcjneWG.js → button-DcnBVpVa.js} +11 -14
- package/dist/{c4Diagram-FPNF74CW-DVaR7c9q.js → c4Diagram-FPNF74CW-CKsIA_DD.js} +27 -51
- package/dist/{channel-Uh0KpgGW.js → channel-3LVvQZcD.js} +1 -1
- package/dist/{check-BK9zDfQk.js → check-D7ifz5op.js} +1 -1
- package/dist/{chunk-3AY6CYHV-Dk2R2-S1.js → chunk-3AY6CYHV-B2C-aVc3.js} +35 -35
- package/dist/{chunk-4BX2VUAB-CqO6zUIz.js → chunk-4BX2VUAB-DEd4VI9L.js} +1 -1
- package/dist/{chunk-4KMFLZZN-CloTfTwP.js → chunk-4KMFLZZN-DnvP3O4K.js} +216 -325
- package/dist/{chunk-55IACEB6-I0rmqTua.js → chunk-55IACEB6-BcCzwOOl.js} +1 -1
- package/dist/{chunk-6OXUPJBA-BuROSTmo.js → chunk-6OXUPJBA-eNAAfJ3Q.js} +7 -7
- package/dist/{chunk-7GE3RBXV-B1-tsIPP.js → chunk-7GE3RBXV-CSAeQvLz.js} +1 -1
- package/dist/{chunk-ABZYJK2D-CLlso8tj.js → chunk-ABZYJK2D-CZcb_1iM.js} +16 -20
- package/dist/{chunk-BN7GFLIU-Db2-FjLn.js → chunk-BN7GFLIU-pBc5O5Rh.js} +1 -1
- package/dist/{chunk-CVBHYZKI-BONeiloK.js → chunk-CVBHYZKI-CivHZg9P.js} +3 -3
- package/dist/{chunk-CXMOBAN2-U9GJSP1d.js → chunk-CXMOBAN2-Dd0E6qb0.js} +46 -54
- package/dist/chunk-EXTU4WIE-GQ2ZWfJo.js +10 -0
- package/dist/{chunk-FMBD7UC4-DyV3BR_I.js → chunk-FMBD7UC4-C6YcisV6.js} +1 -1
- package/dist/{chunk-JA3XYJ7Z-C9A1076P.js → chunk-JA3XYJ7Z-DYeQaT57.js} +21 -25
- package/dist/{chunk-JEIROHC2-BGnFkSVq.js → chunk-JEIROHC2-B-EZMP4V.js} +1 -1
- package/dist/{chunk-K7UQS3LO-033LOsjK.js → chunk-K7UQS3LO-DENzlS-M.js} +7 -7
- package/dist/{chunk-KMC2YHZD-DT4Sq4Ld.js → chunk-KMC2YHZD-SckhHdEh.js} +1 -1
- package/dist/{chunk-QN33PNHL-gs44MZla.js → chunk-QN33PNHL-Cjq5b604.js} +2 -2
- package/dist/{chunk-QYVHNE3D-B8BO1AnT.js → chunk-QYVHNE3D-CNUuivie.js} +3 -4
- package/dist/{chunk-QZHKN3VN-CeN_GkU6.js → chunk-QZHKN3VN-DugEU_bA.js} +1 -1
- package/dist/chunk-S3R3BYOJ-itCT6Vif.js +380 -0
- package/dist/{chunk-T44TD3VJ-BwzD6YE0.js → chunk-T44TD3VJ-BLdfTX8J.js} +1 -1
- package/dist/{chunk-TVAH2DTR-Bi6jpQJQ.js → chunk-TVAH2DTR-BOnwF9d8.js} +7 -8
- package/dist/{chunk-TZMSLE5B-D8klz2H_.js → chunk-TZMSLE5B-DGs66AlL.js} +4 -5
- package/dist/{chunk-WFRQ32O7-CzSwSlN0.js → chunk-WFRQ32O7-CPsipkmJ.js} +1 -1
- package/dist/{chunk-WFWHJNB7-DN_cavM6.js → chunk-WFWHJNB7-Cmed18Pk.js} +1 -1
- package/dist/{chunk-XRWGC2XP-Bb5eGNM2.js → chunk-XRWGC2XP-DH5GDaY8.js} +1 -1
- package/dist/{chunk-ZPAFE4SF-S5UYNb0V.js → chunk-ZPAFE4SF-DPDwaqZm.js} +22 -22
- package/dist/classDiagram-KNZD7YFC-azuS_99k.js +39 -0
- package/dist/classDiagram-v2-RKCZMP56-CQpyQQOR.js +39 -0
- package/dist/{click-outside-container-DE4e7p1p.js → click-outside-container-CL_FkgGY.js} +7 -12
- package/dist/{clike-CxAz4p9E.js → clike-DYfRWWXk.js} +1 -1
- package/dist/{clike-Cg_DBrJ0.js → clike-bzZTreP4.js} +1 -1
- package/dist/clojure-ATksAecl.js +4 -0
- package/dist/{clone-Dk4FkKH0.js → clone-Msbhmn2a.js} +1 -1
- package/dist/cmake-CWylaz2C.js +4 -0
- package/dist/cobol-BiLLCZIQ.js +4 -0
- package/dist/coffeescript-Ca4jipi8.js +4 -0
- package/dist/commonlisp-BwFjyEC7.js +4 -0
- package/dist/{constants-Cjd_3kwd.js → constants-BCOEQoEQ.js} +3 -3
- package/dist/{copy-C5RFg7ok.js → copy-BkZ8PkBM.js} +6 -2
- package/dist/{cose-bilkent-S5V4N54A-B3iOTGu5.js → cose-bilkent-S5V4N54A-BZnbwyVD.js} +20 -20
- package/dist/crystal-BhUsQHbh.js +4 -0
- package/dist/css-Cf4wlIyV.js +5 -0
- package/dist/cypher-Dj8Hzgxa.js +4 -0
- package/dist/{cytoscape.esm-DTDV0Nbj.js → cytoscape.esm-BTpRoPd2.js} +586 -661
- package/dist/d-DZI7tbTy.js +4 -0
- package/dist/{dagre-5GWH7T2D-KM4Z11yT.js → dagre-5GWH7T2D-BGaiSZZO.js} +32 -37
- package/dist/{dagre-B0u1urxE.js → dagre-pyfDIOWJ.js} +57 -76
- package/dist/data-grid-overlay-editor-867aBz0Y.js +133 -0
- package/dist/{diagram-N5W7TBWH-CtO7az4G.js → diagram-N5W7TBWH-CzLE0jZB.js} +35 -51
- package/dist/diagram-QEK2KX5R-AGS60xEZ.js +245 -0
- package/dist/{diagram-S2PKOQOG-CiXElLNQ.js → diagram-S2PKOQOG-BxRoG6yW.js} +28 -28
- package/dist/diff-WQISUHG5.js +4 -0
- package/dist/{dist-CdE2C2In.js → dist-2Ne-33Xy.js} +15 -20
- package/dist/{dist-DKFaZRVk.js → dist-B0YD1aXi.js} +2 -2
- package/dist/{dist-DBhzmFyH.js → dist-B1Dv8Sdk.js} +3 -3
- package/dist/{dist-CGIZPq3J.js → dist-BFkr6kAQ.js} +2 -2
- package/dist/{dist-DL_ci7Yc.js → dist-BL2DSY0P.js} +1 -1
- package/dist/dist-BawZu0ix.js +10 -0
- package/dist/{dist-Bar1QnNM.js → dist-BhVFggab.js} +3 -3
- package/dist/{textile-Cy55fYGC.js → dist-BiOF7987.js} +4 -2
- package/dist/{dist-BQmQQqFH.js → dist-BpzZrRd6.js} +1 -1
- package/dist/{dist-CxD5E6Sh.js → dist-C7zhQ7K0.js} +24 -22
- package/dist/{dist-BqgkUnEN.js → dist-CBhnQKQ4.js} +3 -3
- package/dist/{dist-Dzk1C8l5.js → dist-CId4IPXu.js} +10 -13
- package/dist/{dist-CUnh_3Ii.js → dist-CYhQCVru.js} +2 -2
- package/dist/{dist-BBlFk9ki.js → dist-CZq5-ZyD.js} +1 -1
- package/dist/{dist-elblfNXO.js → dist-Cacac5HV.js} +2 -2
- package/dist/{dist-CChOkSUg.js → dist-CfQHSIQC.js} +3 -3
- package/dist/{dist-JCAky9ND.js → dist-CkvGMBAS.js} +17 -22
- package/dist/dist-Cs3McXEj.js +6 -0
- package/dist/{dist-o7fhJC7U.js → dist-CvyfRaIr.js} +3 -3
- package/dist/{dist-CZfRM7pE.js → dist-D-3fICwh.js} +2 -2
- package/dist/dist-D3aaithT.js +6 -0
- package/dist/{dist-CutXTm8t.js → dist-DBhEu3-F.js} +1 -1
- package/dist/dist-DELcMSpJ.js +6 -0
- package/dist/{dist-C7ASiFxI.js → dist-DMxl6Qbu.js} +273 -263
- package/dist/{dist-CLvpViod.js → dist-DS6nuHYK.js} +2 -3
- package/dist/dist-Dgts3WXd.js +6 -0
- package/dist/{dist--I6Htnlv.js → dist-DlHkZUnY.js} +5 -5
- package/dist/dist-Doiq_KIP.js +15 -0
- package/dist/dist-DtpUiDG_.js +6 -0
- package/dist/{dist-DzOpMdwb.js → dist-NUdHX0XE.js} +4 -4
- package/dist/{dist-C3WYsf4K.js → dist-PGgOcwbF.js} +4 -10
- package/dist/{dist-DNnYAdRE.js → dist-RdxOJbBw.js} +2 -2
- package/dist/{dist-BEvIw5Nh.js → dist-RwqAqkpG.js} +1 -1
- package/dist/dist-ZjnJq_jD.js +10 -0
- package/dist/{dist-CbRkrKrP.js → dist-biZ846D9.js} +5 -5
- package/dist/{dist-DW9er3Zq.js → dist-d5NxvX2s.js} +44 -23
- package/dist/{dist-C3QUag__.js → dist-ivwkJchV.js} +3 -3
- package/dist/dist-mof3iuBu.js +12 -0
- package/dist/{dist-Cib4sGDA.js → dist-reo2kYlN.js} +2 -2
- package/dist/{dist-BZBitvuL.js → dist-wHVprCkn.js} +1 -1
- package/dist/{dist-C5zMs_n5.js → dist-y8uoXYaE.js} +3 -3
- package/dist/{dist-DPF5TTUg.js → dist-z_iuDES7.js} +126 -115
- package/dist/{dockerfile-Dum_1b-5.js → dockerfile-sZMPcXVY.js} +1 -1
- package/dist/dtd-B2M8dhfC.js +4 -0
- package/dist/dylan-CU3Vt8SC.js +4 -0
- package/dist/ecl-B8ESAVq4.js +4 -0
- package/dist/eiffel-DDfMIKeA.js +4 -0
- package/dist/elm-Bj6rj8jf.js +4 -0
- package/dist/{erDiagram-AWTI2OKA-ZTIl9iQO.js → erDiagram-AWTI2OKA-CTxzb-U8.js} +20 -20
- package/dist/erlang-BxyshZUq.js +4 -0
- package/dist/{error-banner-OQIGTqFR.js → error-banner-npbEfanI.js} +13 -13
- package/dist/{esm-DxFkg7a6.js → esm-BdiY4QsX.js} +1528 -1492
- package/dist/{esm-d0g2RsOH.js → esm-CAWW9sum.js} +6 -8
- package/dist/{esm-1_Mp6VD2.js → esm-YY5zh7KV.js} +324 -395
- package/dist/{esm-BO9n_s6u.js → esm-svAVli9f.js} +5 -5
- package/dist/{factor-CdgiDGiu.js → factor-CRFTmP_a.js} +1 -1
- package/dist/factor-CYk6XT8r.js +5 -0
- package/dist/{flowDiagram-PVAE7QVJ-DsbofOzu.js → flowDiagram-PVAE7QVJ-Dck2hiJe.js} +22 -22
- package/dist/{formats-D5C6JAJf.js → formats-BnqXUb1V.js} +13 -17
- package/dist/forth-fcoJkd-f.js +4 -0
- package/dist/fortran-IxZHu4wc.js +4 -0
- package/dist/{fullscreen-D1yTiBlu.js → fullscreen-blsKUrtN.js} +741 -744
- package/dist/{ganttDiagram-OWAHRB6G-FnCH1Yj3.js → ganttDiagram-OWAHRB6G-AWzfzpup.js} +9 -9
- package/dist/gas-B8rmKcim.js +4 -0
- package/dist/gherkin-BTm-jIdJ.js +4 -0
- package/dist/gitGraph-ZV4HHKMB-DFg_OLQb.js +21 -0
- package/dist/{gitGraphDiagram-NY62KEGX-B0wvMNqU.js → gitGraphDiagram-NY62KEGX-GyNboWSV.js} +31 -34
- package/dist/{glide-data-editor-CYfKmSNp.js → glide-data-editor-DHuN8kQ8.js} +1701 -1771
- package/dist/{graphlib-BGmr7CYF.js → graphlib-hb3zmtVD.js} +5 -5
- package/dist/groovy-01kRHFMD.js +4 -0
- package/dist/haskell-B3PhE05w.js +4 -0
- package/dist/haxe-DEoAm8oA.js +5 -0
- package/dist/{hotkeys-yFrUwyJK.js → hotkeys-Ct2T3e9O.js} +4 -7
- package/dist/idl-DsDJU9cV.js +4 -0
- package/dist/info-63CPKGFF-D3DZmDBa.js +21 -0
- package/dist/infoDiagram-STP46IZ2-ec08vi_U.js +44 -0
- package/dist/{isArrayLikeObject-DiDsNamC.js → isArrayLikeObject-BlvK28do.js} +3 -5
- package/dist/{isEmpty-BBG-u1GM.js → isEmpty--odfYjh1.js} +2 -2
- package/dist/{isSymbol-BxF-_8BA.js → isSymbol-Cb1f2HgO.js} +1 -1
- package/dist/{javascript-Dfq1qI35.js → javascript-BfCTmOnk.js} +2 -2
- package/dist/javascript-gwczVhuU.js +5 -0
- package/dist/jinja2-AkZRdFk3.js +4 -0
- package/dist/{journeyDiagram-BIP6EPQ6-B3PotfAW.js → journeyDiagram-BIP6EPQ6-TmXYCUbT.js} +23 -24
- package/dist/julia-_s6qe3bf.js +4 -0
- package/dist/{kanban-definition-6OIFK2YF-BTrQZ3LN.js → kanban-definition-6OIFK2YF-B6ozleHo.js} +15 -15
- package/dist/{katex-dN__NFdn.js → katex-mPzRsXEy.js} +1 -1
- package/dist/{katex-BE4xflfm.js → katex-mkWmhPUh.js} +149 -173
- package/dist/{label-BinTsX-u.js → label-VVRKZmrP.js} +21 -24
- package/dist/{linear-DyTdUIqX.js → linear-iebAbJVD.js} +1 -1
- package/dist/livescript-CwPHQdv5.js +4 -0
- package/dist/{loader-Dijti3y4.js → loader-CM0VALo9.js} +19 -26
- package/dist/lua-s7nRxkCP.js +4 -0
- package/dist/main.js +8234 -8633
- package/dist/{marked.esm-3RjvXPoO.js → marked.esm-DJM8la36.js} +5 -5
- package/dist/mathematica-Ci36yd1q.js +4 -0
- package/dist/mbox-DbOYMNCO.js +4 -0
- package/dist/{memoize-Dq87l1O_.js → memoize-DYoRBSLn.js} +1 -1
- package/dist/{merge-BPDCIm8P.js → merge-BjuR6j_w.js} +1 -1
- package/dist/{mermaid-BlJDcO4M.js → mermaid-YPPMBmhk.js} +58 -76
- package/dist/{mermaid-parser.core-CSFx6MQ7.js → mermaid-parser.core-BLkyTSZj.js} +8 -8
- package/dist/{mhchem-DZ68WS0G.js → mhchem-Dw7wvXtr.js} +1 -1
- package/dist/{min-BzhKOmZo.js → min-B_i2ahn4.js} +7 -7
- package/dist/{mindmap-definition-Q6HEUPPD-9hhnrO1k.js → mindmap-definition-Q6HEUPPD-F6-JnXwq.js} +17 -17
- package/dist/mirc-VmNe8AwF.js +4 -0
- package/dist/mllike-BdD7SJEa.js +6 -0
- package/dist/modelica-BA4VqzC3.js +4 -0
- package/dist/mscgen-DF-5WHJm.js +6 -0
- package/dist/mumps-c_Uia_QN.js +4 -0
- package/dist/{node-sql-parser-13oju30e.js → node-sql-parser-BqKV-TpL.js} +14343 -14351
- package/dist/{now-DVBcRCoE.js → now-CwRqw0nS.js} +1 -1
- package/dist/nsis-BAANGODV.js +5 -0
- package/dist/{nsis-BW6_XagK.js → nsis-BWJEeUyS.js} +1 -1
- package/dist/ntriples-Bslqh2Ki.js +4 -0
- package/dist/{number-overlay-editor-D1YdiOrm.js → number-overlay-editor-CeyruAX4.js} +17 -23
- package/dist/octave-DYn5ltia.js +4 -0
- package/dist/oz-B_N-StZq.js +4 -0
- package/dist/packet-HUATNLJX-CkqjFdAv.js +21 -0
- package/dist/pascal-DU4CtAUu.js +4 -0
- package/dist/perl-Bae6k32u.js +4 -0
- package/dist/pie-WTHONI2E-D0rWwX5P.js +21 -0
- package/dist/{pieDiagram-ADFJNKIX-CSBC0ZgF.js → pieDiagram-ADFJNKIX-C5dSQVCn.js} +28 -28
- package/dist/pig-DSIxUEgX.js +4 -0
- package/dist/powershell-31lcPgIF.js +4 -0
- package/dist/powershell-BZx53Ujw.js +236 -0
- package/dist/properties-lmYbntDG.js +4 -0
- package/dist/protobuf-BTYoCEpV.js +4 -0
- package/dist/pug-DMFM7zzO.js +5 -0
- package/dist/{pug-Bmups_z0.js → pug-PJh82u1M.js} +1 -1
- package/dist/puppet-B0ub07d-.js +4 -0
- package/dist/python-C4jT87Nt.js +5 -0
- package/dist/{q-BzWcnVri.js → q-CMoUHJ5Q.js} +3 -2
- package/dist/q-YbPYlqRI.js +4 -0
- package/dist/{quadrantDiagram-LMRXKWRM-h7nHf8xG.js → quadrantDiagram-LMRXKWRM-DlahxNiy.js} +7 -7
- package/dist/r-OfNu6HAI.js +4 -0
- package/dist/radar-NJJJXTRR-Bxqv4O5a.js +21 -0
- package/dist/{range-CgK0-PEw.js → range-DxfkexCE.js} +3 -3
- package/dist/{react-plotly-BZakcxdv.js → react-plotly-D_IAfR8f.js} +4364 -4705
- package/dist/{requirementDiagram-4UW4RH46-BGEurQYq.js → requirementDiagram-4UW4RH46-DTkinyvU.js} +17 -17
- package/dist/rpm-D_3b5peD.js +5 -0
- package/dist/ruby-CehsJy_T.js +4 -0
- package/dist/{sankeyDiagram-GR3RE2ED-CxeJ_jfl.js → sankeyDiagram-GR3RE2ED-CsLnEnnq.js} +3 -3
- package/dist/sas-DwQHzPoF.js +4 -0
- package/dist/scheme-B6ArxiQu.js +4 -0
- package/dist/{sequenceDiagram-C3RYC4MD-CbFxwyr_.js → sequenceDiagram-C3RYC4MD-BdEOR6SC.js} +20 -30
- package/dist/shell-AHmQgDfc.js +4 -0
- package/dist/sieve-CgodKOcx.js +4 -0
- package/dist/{simple-mode-Cgyya8F-.js → simple-mode-BP3Jd4vf.js} +1 -1
- package/dist/{slides-component-BEyG25AH.js → slides-component-2bbal1YJ.js} +24 -46
- package/dist/smalltalk-BeFzDkbo.js +4 -0
- package/dist/sparql-BWxq-Lnx.js +4 -0
- package/dist/{src-BNNJRxz3.js → src-DZkaBUmt.js} +6 -6
- package/dist/{stateDiagram-KXAO66HF-A61bMf29.js → stateDiagram-KXAO66HF-DQLH2jhP.js} +39 -41
- package/dist/stateDiagram-v2-UMBNRL4Z-D9v8fKjF.js +38 -0
- package/dist/stex-Dvaq0qsm.js +5 -0
- package/dist/style.css +1 -1
- package/dist/stylus-Ge0ofWlZ.js +4 -0
- package/dist/swift-CjQfbVxV.js +4 -0
- package/dist/tcl-CAGDF11K.js +4 -0
- package/dist/textile-CrXreJtf.js +4 -0
- package/dist/{time-D3tzCqJ6.js → time-CFkXkVrt.js} +1 -1
- package/dist/{timeline-definition-XQNQX7LJ-BwdsB7CR.js → timeline-definition-XQNQX7LJ-bToVq14i.js} +4 -5
- package/dist/{timer-D3Zlu9ow.js → timer-CzOhIJuk.js} +2 -2
- package/dist/{toNumber-efKT08hh.js → toNumber-EFF1Z9T1.js} +2 -2
- package/dist/{toString-BvCd3yJc.js → toString-C2mCkasT.js} +2 -2
- package/dist/toml-AdLXKwEi.js +4 -0
- package/dist/{toml-CIUkU1CP.js → toml-eSl4PUAH.js} +6 -2
- package/dist/treemap-75Q7IDZK-Da9Jv6a_.js +21 -0
- package/dist/troff-C-LaM2ex.js +4 -0
- package/dist/ttcn-DTclUi6T.js +4 -0
- package/dist/ttcn-cfg-BtBPbmLX.js +4 -0
- package/dist/turtle-BODDDg5O.js +4 -0
- package/dist/{types-Dcb1hf55.js → types-CRXV0KD5.js} +385 -252
- package/dist/{useAsyncData-DAtPzJzP.js → useAsyncData-uMVTsDI9.js} +1 -1
- package/dist/{useDateFormatter-CiUlIu7v.js → useDateFormatter-Dcz7jstn.js} +6 -6
- package/dist/{useTheme-CmsvrO5o.js → useTheme-NbEx-ZNV.js} +14 -10
- package/dist/vb-Cb1HQHii.js +4 -0
- package/dist/vbscript-CpXOP4wZ.js +4 -0
- package/dist/{vega-component-B3LA6qbm.js → vega-component-hegVmfuS.js} +21 -21
- package/dist/{vega-loader.browser.module-Bi3ttvdj.js → vega-loader.browser.module-DcW8jnKp.js} +1 -2
- package/dist/velocity-Dz0rBQIk.js +4 -0
- package/dist/verilog-6Di9aLKw.js +4 -0
- package/dist/vhdl-BRNesXYc.js +4 -0
- package/dist/webidl-BpRNYIYn.js +4 -0
- package/dist/xquery-DXWcJ7b6.js +4 -0
- package/dist/{xychartDiagram-6GGTOJPD-BJRRi5HC.js → xychartDiagram-6GGTOJPD-C7Bhm_yt.js} +12 -13
- package/dist/yacas-DbSARPz4.js +4 -0
- package/dist/z80-DzslPj_l.js +4 -0
- package/dist/{zod-UPQf9SGn.js → zod-ChY6miG5.js} +71 -81
- package/package.json +12 -12
- package/src/__mocks__/requests.ts +2 -0
- package/src/__tests__/chat-history.test.ts +123 -0
- package/src/components/app-config/ai-config.tsx +23 -0
- package/src/components/app-config/mcp-config.tsx +42 -2
- package/src/components/app-config/user-config-form.tsx +29 -49
- package/src/components/chat/acp/__tests__/context-utils.test.ts +1 -1
- package/src/components/chat/acp/agent-panel.tsx +1 -1
- package/src/components/chat/acp/blocks.tsx +46 -53
- package/src/components/chat/acp/common.tsx +1 -1
- package/src/components/chat/acp/context-utils.ts +1 -1
- package/src/components/chat/acp/session-tabs.tsx +1 -1
- package/src/components/chat/chat-history-popover.tsx +125 -0
- package/src/components/chat/chat-history-utils.ts +69 -0
- package/src/components/chat/chat-panel.tsx +9 -57
- package/src/components/chat/chat-utils.ts +11 -4
- package/src/components/data-table/__tests__/header-items.test.tsx +117 -0
- package/src/components/data-table/column-header.tsx +4 -2
- package/src/components/data-table/columns.tsx +2 -1
- package/src/components/data-table/data-table.tsx +7 -2
- package/src/components/data-table/header-items.tsx +63 -10
- package/src/components/dependency-graph/custom-node.tsx +11 -11
- package/src/components/dependency-graph/elements.ts +9 -4
- package/src/components/dependency-graph/panels.tsx +6 -4
- package/src/components/editor/Output.tsx +6 -1
- package/src/components/editor/__tests__/data-attributes.test.tsx +1 -1
- package/src/components/editor/actions/useNotebookActions.tsx +2 -4
- package/src/components/editor/ai/__tests__/completion-utils.test.ts +23 -31
- package/src/components/editor/ai/ai-completion-editor.tsx +135 -5
- package/src/components/editor/ai/completion-handlers.tsx +106 -22
- package/src/components/editor/cell/CreateCellButton.tsx +14 -2
- package/src/components/editor/cell/code/cell-editor.tsx +6 -0
- package/src/components/editor/chrome/panels/cache-panel.tsx +216 -0
- package/src/components/editor/chrome/panels/empty-state.tsx +3 -1
- package/src/components/editor/chrome/types.ts +66 -22
- package/src/components/editor/chrome/wrapper/app-chrome.tsx +2 -0
- package/src/components/editor/database/schemas.ts +2 -10
- package/src/components/editor/errors/auto-fix.tsx +138 -32
- package/src/components/editor/errors/fix-mode.ts +15 -0
- package/src/components/editor/navigation/__tests__/clipboard.test.ts +0 -5
- package/src/components/editor/navigation/clipboard.ts +2 -1
- package/src/components/editor/{Cell.tsx → notebook-cell.tsx} +25 -8
- package/src/components/editor/output/ConsoleOutput.tsx +27 -33
- package/src/components/editor/output/JsonOutput.tsx +9 -0
- package/src/components/editor/output/MarimoErrorOutput.tsx +4 -34
- package/src/components/editor/output/MarimoTracebackOutput.tsx +10 -7
- package/src/components/editor/output/__tests__/json-output.test.ts +43 -0
- package/src/components/editor/package-alert.tsx +3 -0
- package/src/components/editor/renderers/{CellArray.tsx → cell-array.tsx} +1 -1
- package/src/components/forms/__tests__/form-utils.test.ts +6 -4
- package/src/components/icons/copy-icon.tsx +11 -5
- package/src/components/mcp/hooks.ts +48 -0
- package/src/components/mcp/mcp-status-indicator.tsx +144 -0
- package/src/components/shortcuts/renderShortcut.tsx +3 -1
- package/src/components/ui/button.tsx +2 -0
- package/src/components/ui/confirmation-button.tsx +85 -0
- package/src/components/ui/number-field.tsx +4 -1
- package/src/components/ui/switch.tsx +2 -0
- package/src/core/ai/context/providers/__tests__/__snapshots__/tables.test.ts.snap +13 -19
- package/src/core/ai/context/providers/__tests__/cell-output.test.ts +0 -1
- package/src/core/ai/context/providers/__tests__/datasource.test.ts +14 -7
- package/src/core/ai/context/providers/__tests__/error.test.ts +24 -15
- package/src/core/ai/context/providers/cell-output.ts +5 -5
- package/src/core/ai/context/providers/common.ts +13 -4
- package/src/core/ai/context/providers/datasource.ts +56 -21
- package/src/core/ai/context/providers/error.ts +3 -4
- package/src/core/ai/context/providers/file.ts +2 -2
- package/src/core/ai/context/providers/tables.ts +36 -8
- package/src/core/ai/context/providers/variable.ts +2 -3
- package/src/core/ai/state.ts +6 -3
- package/src/core/ai/tools/__tests__/registry.test.ts +33 -8
- package/src/core/ai/tools/base.ts +81 -1
- package/src/core/ai/tools/registry.ts +36 -10
- package/src/core/ai/tools/sample-tool.ts +44 -8
- package/src/core/cache/requests.ts +5 -0
- package/src/core/cells/__tests__/cells.test.ts +6 -6
- package/src/core/cells/cells.ts +13 -14
- package/src/core/cells/scrollCellIntoView.ts +1 -1
- package/src/core/codemirror/__tests__/__snapshots__/setup.test.ts.snap +2 -0
- package/src/core/codemirror/__tests__/replace-editor-content.test.ts +336 -0
- package/src/core/codemirror/__tests__/setup.test.ts +1 -0
- package/src/core/codemirror/cm.ts +3 -2
- package/src/core/codemirror/find-replace/navigate.ts +2 -2
- package/src/core/codemirror/format.ts +2 -9
- package/src/core/codemirror/language/__tests__/sql.test.ts +24 -6
- package/src/core/codemirror/language/languages/python.ts +1 -3
- package/src/core/codemirror/language/languages/sql/sql.ts +23 -13
- package/src/core/codemirror/language/panel/panel.tsx +1 -6
- package/src/core/codemirror/language/utils.ts +3 -8
- package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +21 -14
- package/src/core/codemirror/lsp/federated-lsp.ts +20 -9
- package/src/core/codemirror/lsp/notebook-lsp.ts +35 -29
- package/src/core/codemirror/lsp/types.ts +0 -13
- package/src/core/codemirror/replace-editor-content.ts +87 -0
- package/src/core/config/__tests__/config-schema.test.ts +5 -0
- package/src/core/config/config-schema.ts +10 -0
- package/src/core/config/feature-flag.tsx +2 -6
- package/src/core/edit-app.tsx +1 -1
- package/src/core/errors/__tests__/errors.test.ts +1 -0
- package/src/core/errors/errors.ts +20 -6
- package/src/core/islands/bridge.ts +2 -0
- package/src/core/islands/main.ts +4 -0
- package/src/core/kernel/messages.ts +1 -0
- package/src/core/network/CachingRequestRegistry.ts +2 -2
- package/src/core/network/requests-network.ts +14 -0
- package/src/core/network/requests-static.ts +2 -0
- package/src/core/network/requests-toasting.ts +2 -0
- package/src/core/network/types.ts +5 -0
- package/src/core/saving/save-component.tsx +43 -36
- package/src/core/wasm/bridge.ts +2 -0
- package/src/core/websocket/useMarimoWebSocket.tsx +8 -0
- package/src/css/app/codemirror-completions.css +1 -1
- package/src/custom.d.ts +2 -0
- package/src/plugins/core/registerReactComponent.tsx +5 -1
- package/src/plugins/impl/DataTablePlugin.tsx +19 -19
- package/src/plugins/impl/__tests__/DateTimePickerPlugin.test.tsx +32 -0
- package/src/plugins/impl/chat/ChatPlugin.tsx +1 -1
- package/src/plugins/impl/chat/chat-ui.tsx +17 -2
- package/src/plugins/impl/chat/types.ts +1 -1
- package/src/plugins/impl/data-frames/DataFramePlugin.tsx +7 -2
- package/src/plugins/impl/plotly/__tests__/parse-from-template.test.ts +17 -0
- package/src/plugins/impl/plotly/parse-from-template.ts +2 -1
- package/src/stories/cell.stories.tsx +1 -1
- package/src/stories/layout/vertical/one-column.stories.tsx +1 -1
- package/src/utils/__tests__/formatting.test.ts +107 -0
- package/src/utils/__tests__/json-parser.test.ts +13 -0
- package/src/utils/copy.ts +6 -0
- package/src/utils/formatting.ts +51 -0
- package/src/utils/json/json-parser.ts +28 -3
- package/src/utils/numbers.ts +24 -1
- package/dist/any-language-editor-CVFQlioK.js +0 -156
- package/dist/apl-ChlaBfxB.js +0 -4
- package/dist/architecture-O4VJ6CD3-BVeaxUcM.js +0 -21
- package/dist/asciiarmor-CcJmm3l_.js +0 -4
- package/dist/asn1-ThRYxoBE.js +0 -4
- package/dist/assets/__vite-browser-external-BeNtI_tJ.js +0 -1
- package/dist/assets/worker-DnuXpGWN.js +0 -54
- package/dist/brainfuck-CEM0JgDn.js +0 -4
- package/dist/chunk-EXTU4WIE-DECT9AAK.js +0 -14
- package/dist/chunk-S3R3BYOJ-DMQ1yeyq.js +0 -386
- package/dist/classDiagram-KNZD7YFC-BG53O6Jt.js +0 -39
- package/dist/classDiagram-v2-RKCZMP56-BmKILsGU.js +0 -39
- package/dist/clojure-B7RHyE9t.js +0 -4
- package/dist/cmake-TeTMP4I5.js +0 -4
- package/dist/cobol-DI-mxUER.js +0 -4
- package/dist/coffeescript-DHUFLqWp.js +0 -4
- package/dist/commonlisp-SLiUrh1m.js +0 -4
- package/dist/crystal-B4fY1ZfJ.js +0 -4
- package/dist/css-Bdoq3TzK.js +0 -5
- package/dist/cypher-CBU182fp.js +0 -4
- package/dist/d-D8myDZeH.js +0 -4
- package/dist/data-grid-overlay-editor-qNmJk2x0.js +0 -135
- package/dist/diagram-QEK2KX5R-fu8Noi3H.js +0 -245
- package/dist/diff-DJF_UB7H.js +0 -4
- package/dist/dist-52-_pKoy.js +0 -6
- package/dist/dist-6DOMStFn.js +0 -6
- package/dist/dist-B334aW7p.js +0 -10
- package/dist/dist-BOI9lUz-.js +0 -12
- package/dist/dist-C06uhBzF.js +0 -6
- package/dist/dist-CGkpguCB.js +0 -6
- package/dist/dist-CrApzUED.js +0 -6
- package/dist/dist-Dp2GLdCl.js +0 -14
- package/dist/dist-WHFsbMDr.js +0 -6
- package/dist/dist-hyKcTPG9.js +0 -10
- package/dist/dtd-DY8q65lC.js +0 -4
- package/dist/dylan-CBLcjWCi.js +0 -4
- package/dist/ecl-BSXPNfOw.js +0 -4
- package/dist/eiffel-BJf0PQX-.js +0 -4
- package/dist/elm-DWQwPCZS.js +0 -4
- package/dist/erlang-BWBaGZ5e.js +0 -4
- package/dist/factor-DT1-MBPl.js +0 -5
- package/dist/forth-D9GDt3FB.js +0 -4
- package/dist/fortran-DHkRhDWw.js +0 -4
- package/dist/gas-7lQEOM0H.js +0 -4
- package/dist/gherkin-BLLyroYi.js +0 -4
- package/dist/gitGraph-ZV4HHKMB-z2v_cInC.js +0 -21
- package/dist/groovy-C-wabwj0.js +0 -4
- package/dist/haskell-DaxVQ_d1.js +0 -4
- package/dist/haxe-C2yLoC7h.js +0 -5
- package/dist/idl-DQBP8i7k.js +0 -4
- package/dist/info-63CPKGFF-GS4w6pCB.js +0 -21
- package/dist/infoDiagram-STP46IZ2-DE9YYPFg.js +0 -44
- package/dist/javascript-DRwFV9r5.js +0 -5
- package/dist/jinja2-CNoIpVmN.js +0 -4
- package/dist/julia-DXDf-GhP.js +0 -4
- package/dist/livescript-S2uhJQx7.js +0 -4
- package/dist/lua-Bvgs0y2G.js +0 -4
- package/dist/mathematica-D2zqfwIg.js +0 -4
- package/dist/mbox-SBcPaDuZ.js +0 -4
- package/dist/mirc-hkQc7sVF.js +0 -4
- package/dist/mllike-DRWPBlr9.js +0 -6
- package/dist/modelica-CO2ROGlP.js +0 -4
- package/dist/mscgen-BpX61bO6.js +0 -6
- package/dist/mumps-BCnFeIn6.js +0 -4
- package/dist/nsis-BaTOxlD1.js +0 -5
- package/dist/ntriples-zEo5BWjr.js +0 -4
- package/dist/octave-BE0RnCM9.js +0 -4
- package/dist/oz-C4_2Ttul.js +0 -4
- package/dist/packet-HUATNLJX-CjHqJIqk.js +0 -21
- package/dist/pascal-Q3jJucpw.js +0 -4
- package/dist/perl-DkXZIWHF.js +0 -4
- package/dist/pie-WTHONI2E-D67gLWtR.js +0 -21
- package/dist/pig-DCgEHdsu.js +0 -4
- package/dist/powershell-3rK_nRRJ.js +0 -236
- package/dist/powershell-Eo2-7MoM.js +0 -4
- package/dist/properties-C0IOX8WR.js +0 -4
- package/dist/protobuf--lGQUSRO.js +0 -4
- package/dist/pug-Cf8AQHMJ.js +0 -5
- package/dist/puppet-D7Z3dTJn.js +0 -4
- package/dist/python-FHIx_i8Y.js +0 -5
- package/dist/q-B7UA1feM.js +0 -4
- package/dist/r-Cc9R2A7N.js +0 -4
- package/dist/radar-NJJJXTRR-C-AZP_Te.js +0 -21
- package/dist/rpm-vhJNlrQ6.js +0 -5
- package/dist/ruby-CVluPY0M.js +0 -4
- package/dist/sas-A8DL8oy3.js +0 -4
- package/dist/scheme-6xHHcSXC.js +0 -4
- package/dist/shell-DHN-e5rf.js +0 -4
- package/dist/sieve-BuQwLY02.js +0 -4
- package/dist/smalltalk-BA4HPg2H.js +0 -4
- package/dist/sparql-Bf4yCuy3.js +0 -4
- package/dist/stateDiagram-v2-UMBNRL4Z-C_0FUzzk.js +0 -38
- package/dist/stex-D-I1cYeE.js +0 -5
- package/dist/stylus-BMeped2l.js +0 -4
- package/dist/swift-lwEdlZoC.js +0 -4
- package/dist/tcl-B03ipeqv.js +0 -4
- package/dist/toml-BLgrVtfu.js +0 -4
- package/dist/treemap-75Q7IDZK-DTvwfpWt.js +0 -21
- package/dist/troff-g6EjN2O2.js +0 -4
- package/dist/ttcn-Dzvba8jK.js +0 -4
- package/dist/ttcn-cfg-CadG0p1K.js +0 -4
- package/dist/turtle-DkXAMWo9.js +0 -4
- package/dist/vb-C5dCiel8.js +0 -4
- package/dist/vbscript-I4bDEQln.js +0 -4
- package/dist/velocity-mt0fDwFH.js +0 -4
- package/dist/verilog-Dxq3KJkc.js +0 -4
- package/dist/vhdl-Km0QUlV-.js +0 -4
- package/dist/webidl-B3lJ2MRL.js +0 -4
- package/dist/xquery-CcIxNPEe.js +0 -4
- package/dist/yacas-oMa-f-tN.js +0 -4
- package/dist/z80-D03Nvn6l.js +0 -4
- /package/dist/{apl-DZqo8Elt.js → apl-CEHentF4.js} +0 -0
- /package/dist/{asciiarmor-DTzHAIeX.js → asciiarmor-DURYiCS0.js} +0 -0
- /package/dist/{asn1-DrAXKsZH.js → asn1-ETAiEoXY.js} +0 -0
- /package/dist/{asterisk-oF4U3h48.js → asterisk-DTpbbXPb.js} +0 -0
- /package/dist/{brainfuck-BYgLey30.js → brainfuck-BWQep-SA.js} +0 -0
- /package/dist/{clojure-Bs2M3OUY.js → clojure-BzFapDkA.js} +0 -0
- /package/dist/{cmake-DpI8vxJN.js → cmake-DvlbIC8x.js} +0 -0
- /package/dist/{cobol-BQyrWo72.js → cobol-BrEI4cPR.js} +0 -0
- /package/dist/{coffeescript-9ke9UHmw.js → coffeescript-B6cvu8mO.js} +0 -0
- /package/dist/{common-keywords-BzgeAvH1.js → common-keywords-WqQm7W8t.js} +0 -0
- /package/dist/{commonlisp-DghUdrUH.js → commonlisp-BIT8PQqi.js} +0 -0
- /package/dist/{crystal-DEf_SInh.js → crystal-B_UcPArT.js} +0 -0
- /package/dist/{css-BzTU9lNO.js → css-dHbnt_zl.js} +0 -0
- /package/dist/{cypher-a2v0c11S.js → cypher-Dh3FOpL7.js} +0 -0
- /package/dist/{d-SAswny-M.js → d-CQD1IHee.js} +0 -0
- /package/dist/{diff-OJ-xLXcG.js → diff-CpF_IDx0.js} +0 -0
- /package/dist/{dtd-BsUf-rer.js → dtd-DYoNpy6c.js} +0 -0
- /package/dist/{duckdb-keywords-B0NOra5o.js → duckdb-keywords-CdIsl9L0.js} +0 -0
- /package/dist/{dylan-C0ZYngjn.js → dylan-Bc_2G1E-.js} +0 -0
- /package/dist/{ebnf-DF1xx0b_.js → ebnf-jGVT_YpN.js} +0 -0
- /package/dist/{ecl-Bsuvoouq.js → ecl-UIU-P-Ar.js} +0 -0
- /package/dist/{eiffel-DgfSpLi-.js → eiffel-C90Oyuix.js} +0 -0
- /package/dist/{elm-GNxDj-5E.js → elm-B9fWSySj.js} +0 -0
- /package/dist/{erlang-Ds3uY1kL.js → erlang-Ccff0UAn.js} +0 -0
- /package/dist/{fcl-CqBgSioc.js → fcl-CGR8NxAg.js} +0 -0
- /package/dist/{forth-JCaLysGk.js → forth-U1ROGcBY.js} +0 -0
- /package/dist/{fortran-Dc2AoKAl.js → fortran-3nOkjDmc.js} +0 -0
- /package/dist/{gas-Q4Uz82YW.js → gas-B_4H5FzV.js} +0 -0
- /package/dist/{gherkin-Dpxe49sQ.js → gherkin-B0eru5Uz.js} +0 -0
- /package/dist/{groovy-D8mTRCu6.js → groovy-dqjtZUVf.js} +0 -0
- /package/dist/{haskell-2_8cC4wY.js → haskell-DFzCCQzo.js} +0 -0
- /package/dist/{haxe-Bl9zkZlz.js → haxe-Da8Pj5RT.js} +0 -0
- /package/dist/{http-DKCqY6yS.js → http-1HACL_9s.js} +0 -0
- /package/dist/{idl-Dn-HNfGW.js → idl-D3NXs5iM.js} +0 -0
- /package/dist/{jinja2-JjFiAGKk.js → jinja2-gBHAxUdF.js} +0 -0
- /package/dist/{julia-R5wne8eu.js → julia-bG-6nJ-_.js} +0 -0
- /package/dist/{livescript-DSwokrYj.js → livescript-BlsRC8UJ.js} +0 -0
- /package/dist/{lua-CgXfrp2-.js → lua-BbDC0_5w.js} +0 -0
- /package/dist/{mathematica-BVli92MR.js → mathematica-YZTe3-PF.js} +0 -0
- /package/dist/{mbox-CMFlocdS.js → mbox-CY5idp08.js} +0 -0
- /package/dist/{mirc-BkW04Zpc.js → mirc-CbQuFZKk.js} +0 -0
- /package/dist/{mllike-DEjvHvNV.js → mllike-DsbHMX-5.js} +0 -0
- /package/dist/{modelica-CxDn-oje.js → modelica-CQuvsOQk.js} +0 -0
- /package/dist/{mscgen-D78wmE-w.js → mscgen-LIpBP9VR.js} +0 -0
- /package/dist/{mumps-Bi0IvPOV.js → mumps-Ct5NXoaG.js} +0 -0
- /package/dist/{nginx-DErPZFhX.js → nginx-Dvc62C8z.js} +0 -0
- /package/dist/{ntriples-Btyp6wRL.js → ntriples-jVkxWUuv.js} +0 -0
- /package/dist/{octave-CZA6-2F8.js → octave-jGOImUB0.js} +0 -0
- /package/dist/{oz-Bm6LSNfE.js → oz-Y0FKDMS2.js} +0 -0
- /package/dist/{pascal-B4J6a9BH.js → pascal-BaLtPWWB.js} +0 -0
- /package/dist/{perl-CzVqxS08.js → perl-CjfE0JLo.js} +0 -0
- /package/dist/{pig-Clh03cnn.js → pig-DE4epV99.js} +0 -0
- /package/dist/{properties-D7ch1Wyb.js → properties-CLyCG5C-.js} +0 -0
- /package/dist/{protobuf-DrkdrMPK.js → protobuf-BjBBs_V4.js} +0 -0
- /package/dist/{puppet-BtZG8zdO.js → puppet-ZImLuomA.js} +0 -0
- /package/dist/{python-B6FKOVIv.js → python-C9YN71pR.js} +0 -0
- /package/dist/{r-Dnvo5-96.js → r-DILmKWWW.js} +0 -0
- /package/dist/{rpm-B1DrgfnX.js → rpm-fpIsm1Kr.js} +0 -0
- /package/dist/{ruby-CelfUg17.js → ruby-BuiQI41h.js} +0 -0
- /package/dist/{sas-DfSQFMWG.js → sas-C76sJ1zF.js} +0 -0
- /package/dist/{scheme-BplhaWuO.js → scheme-DHjM-txv.js} +0 -0
- /package/dist/{shell-DqU5OS2c.js → shell--7NmGJ9p.js} +0 -0
- /package/dist/{sieve-BE4_IyGa.js → sieve-DaPvBv1M.js} +0 -0
- /package/dist/{smalltalk-B_WPL8Nx.js → smalltalk-KPvwrjCs.js} +0 -0
- /package/dist/{solr-DlJFg7H5.js → solr-PvZUtEDb.js} +0 -0
- /package/dist/{sparql-7XIlcOgW.js → sparql-CXSUIQer.js} +0 -0
- /package/dist/{spreadsheet-BdZSVwVp.js → spreadsheet-DPJdGPkx.js} +0 -0
- /package/dist/{sql-CCrq7lfJ.js → sql-Dp4ZLSIa.js} +0 -0
- /package/dist/{stex-BiFc8QAu.js → stex-CeXW4zzk.js} +0 -0
- /package/dist/{stylus-DlSH9xpH.js → stylus-BXcmrg9w.js} +0 -0
- /package/dist/{swift-e3tMTZgJ.js → swift-DD8I7hKP.js} +0 -0
- /package/dist/{tcl-DfZMC20G.js → tcl-B9Lp4GtA.js} +0 -0
- /package/dist/{textile-DaSeca5U.js → textile-qdiY0teq.js} +0 -0
- /package/dist/{tiddlywiki-dfoiz8pS.js → tiddlywiki-t32lkubq.js} +0 -0
- /package/dist/{tiki-yJbQzhma.js → tiki-B0qKrSMl.js} +0 -0
- /package/dist/{troff-FN_FrCXR.js → troff-105XJOEu.js} +0 -0
- /package/dist/{ttcn-7_i4HlyB.js → ttcn-1_BxDcM8.js} +0 -0
- /package/dist/{ttcn-cfg-B46AlBUV.js → ttcn-cfg-Cn_XgXiw.js} +0 -0
- /package/dist/{turtle-QQfeFveR.js → turtle-BI6LyfEu.js} +0 -0
- /package/dist/{vb-DToPVnLa.js → vb-BecoBfmr.js} +0 -0
- /package/dist/{vbscript-CtsNaTz4.js → vbscript-De-zpA4i.js} +0 -0
- /package/dist/{velocity-CAoNe6ns.js → velocity-DhlYJTrD.js} +0 -0
- /package/dist/{verilog-DrDOMiJq.js → verilog-BDZgxDOW.js} +0 -0
- /package/dist/{vhdl-DnO0OEPh.js → vhdl-CV0OKTbp.js} +0 -0
- /package/dist/{webidl-Or6d1ZfA.js → webidl-BOM1Fs0O.js} +0 -0
- /package/dist/{xquery-CEp_Mcpr.js → xquery-CltP_CGh.js} +0 -0
- /package/dist/{yacas-DgnYrSlp.js → yacas-Dch4E2Dg.js} +0 -0
- /package/dist/{z80-DlG_kyeB.js → z80-B5Yly27o.js} +0 -0
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),l=e=>t=>c(t.default,e),u=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function.")});function d(e){return e}function f(e,t){let n=e.map(e=>`"${e}"`).join(`, `);return Error(`This RPC instance cannot ${t} because the transport did not provide one or more of these methods: ${n}`)}function p(e={}){let t={};function n(e){t=e}let r={};function i(e){r.unregisterHandler&&r.unregisterHandler(),r=e,r.registerHandler?.(se)}let a;function o(e){if(typeof e==`function`){a=e;return}a=(t,n)=>{let r=e[t];if(r)return r(n);let i=e._;if(!i)throw Error(`The requested method has no handler: ${t}`);return i(t,n)}}let{maxRequestTime:s=1e3}=e;e.transport&&i(e.transport),e.requestHandler&&o(e.requestHandler),e._debugHooks&&n(e._debugHooks);let c=0;function l(){return c<=1e10?++c:c=0}let u=new Map,d=new Map;function p(e,...n){let i=n[0];return new Promise((n,a)=>{if(!r.send)throw f([`send`],`make requests`);let o=l(),c={type:`request`,id:o,method:e,params:i};u.set(o,{resolve:n,reject:a}),s!==1/0&&d.set(o,setTimeout(()=>{d.delete(o),a(Error(`RPC request timed out.`))},s)),t.onSend?.(c),r.send(c)})}let ee=new Proxy(p,{get:(e,t,n)=>t in e?Reflect.get(e,t,n):e=>p(t,e)}),te=ee;function ne(e,...n){let i=n[0];if(!r.send)throw f([`send`],`send messages`);let a={type:`message`,id:e,payload:i};t.onSend?.(a),r.send(a)}let re=new Proxy(ne,{get:(e,t,n)=>t in e?Reflect.get(e,t,n):e=>ne(t,e)}),ie=re,m=new Map,ae=new Set;function h(e,t){if(!r.registerHandler)throw f([`registerHandler`],`register message listeners`);if(e===`*`){ae.add(t);return}m.has(e)||m.set(e,new Set),m.get(e)?.add(t)}function oe(e,t){if(e===`*`){ae.delete(t);return}m.get(e)?.delete(t),m.get(e)?.size===0&&m.delete(e)}async function se(e){if(t.onReceive?.(e),!(`type`in e))throw Error(`Message does not contain a type.`);if(e.type===`request`){if(!r.send||!a)throw f([`send`,`requestHandler`],`handle requests`);let{id:n,method:i,params:o}=e,s;try{s={type:`response`,id:n,success:!0,payload:await a(i,o)}}catch(e){if(!(e instanceof Error))throw e;s={type:`response`,id:n,success:!1,error:e.message}}t.onSend?.(s),r.send(s);return}if(e.type===`response`){let t=d.get(e.id);t!=null&&clearTimeout(t);let{resolve:n,reject:r}=u.get(e.id)??{};e.success?n?.(e.payload):r?.(Error(e.error));return}if(e.type===`message`){for(let t of ae)t(e.id,e.payload);let t=m.get(e.id);if(!t)return;for(let n of t)n(e.payload);return}throw Error(`Unexpected RPC message type: ${e.type}`)}return{setTransport:i,setRequestHandler:o,request:ee,requestProxy:te,send:re,sendProxy:ie,addMessageListener:h,removeMessageListener:oe,proxy:{send:ie,request:te},_setDebugHooks:n}}function ee(e){return p(e)}const te=`[transport-id]`;function ne(e,t){let{transportId:n}=t;return n==null?e:{[te]:n,data:e}}function re(e,t){let{transportId:n,filter:r}=t,i=r?.();if(n!=null&&i!=null)throw Error("Cannot use both `transportId` and `filter` at the same time");let a=e;if(n){if(e[te]!==n)return[!0];a=e.data}return i===!1?[!0]:[!1,a]}function ie(e,t={}){let{transportId:n,filter:r,remotePort:i}=t,a=e,o=i??e,s;return{send(e){o.postMessage(ne(e,{transportId:n}))},registerHandler(e){s=t=>{let i=t.data,[a,o]=re(i,{transportId:n,filter:()=>r?.(t)});a||e(o)},a.addEventListener(`message`,s)},unregisterHandler(){s&&a.removeEventListener(`message`,s)}}}function m(e){return ie(self,e)}var ae=Object.defineProperty,h=(e,t)=>ae(e,`name`,{value:t,configurable:!0}),oe=(e=>typeof u<`u`?u:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof u<`u`?u:e)[t]}):e)(function(e){if(typeof u<`u`)return u.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)});function se(e){return!isNaN(parseFloat(e))&&isFinite(e)}h(se,`_isNumber`);function g(e){return e.charAt(0).toUpperCase()+e.substring(1)}h(g,`_capitalize`);function ce(e){return function(){return this[e]}}h(ce,`_getter`);var _=[`isConstructor`,`isEval`,`isNative`,`isToplevel`],v=[`columnNumber`,`lineNumber`],y=[`fileName`,`functionName`,`source`],le=_.concat(v,y,[`args`],[`evalOrigin`]);function b(e){if(e)for(var t=0;t<le.length;t++)e[le[t]]!==void 0&&this[`set`+g(le[t])](e[le[t]])}for(h(b,`StackFrame`),b.prototype={getArgs:function(){return this.args},setArgs:function(e){if(Object.prototype.toString.call(e)!==`[object Array]`)throw TypeError(`Args must be an Array`);this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof b)this.evalOrigin=e;else if(e instanceof Object)this.evalOrigin=new b(e);else throw TypeError(`Eval Origin must be an Object or StackFrame`)},toString:function(){var e=this.getFileName()||``,t=this.getLineNumber()||``,n=this.getColumnNumber()||``,r=this.getFunctionName()||``;return this.getIsEval()?e?`[eval] (`+e+`:`+t+`:`+n+`)`:`[eval]:`+t+`:`+n:r?r+` (`+e+`:`+t+`:`+n+`)`:e+`:`+t+`:`+n}},b.fromString=h(function(e){var t=e.indexOf(`(`),n=e.lastIndexOf(`)`),r=e.substring(0,t),i=e.substring(t+1,n).split(`,`),a=e.substring(n+1);if(a.indexOf(`@`)===0)var o=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(a,``),s=o[1],c=o[2],l=o[3];return new b({functionName:r,args:i||void 0,fileName:s,lineNumber:c||void 0,columnNumber:l||void 0})},`StackFrame$$fromString`),x=0;x<_.length;x++)b.prototype[`get`+g(_[x])]=ce(_[x]),b.prototype[`set`+g(_[x])]=function(e){return function(t){this[e]=!!t}}(_[x]);var x;for(S=0;S<v.length;S++)b.prototype[`get`+g(v[S])]=ce(v[S]),b.prototype[`set`+g(v[S])]=function(e){return function(t){if(!se(t))throw TypeError(e+` must be a Number`);this[e]=Number(t)}}(v[S]);var S;for(C=0;C<y.length;C++)b.prototype[`get`+g(y[C])]=ce(y[C]),b.prototype[`set`+g(y[C])]=function(e){return function(t){this[e]=String(t)}}(y[C]);var C,ue=b;function de(){var e=/^\s*at .*(\S+:\d+|\(native\))/m,t=/^(eval@)?(\[native code])?$/;return{parse:h(function(t){if(t.stack&&t.stack.match(e))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw Error(`Cannot parse given Error object`)},`ErrorStackParser$$parse`),extractLocation:h(function(e){if(e.indexOf(`:`)===-1)return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,``));return[t[1],t[2]||void 0,t[3]||void 0]},`ErrorStackParser$$extractLocation`),parseV8OrIE:h(function(t){return t.stack.split(`
|
|
2
|
-
`).filter(function(t){return!!t.match(e)},this).map(function(e){e.indexOf(`(eval `)>-1&&(e=e.replace(/eval code/g,`eval`).replace(/(\(eval at [^()]*)|(,.*$)/g,``));var t=e.replace(/^\s+/,``).replace(/\(eval code/g,`(`).replace(/^.*?\s+/,``),n=t.match(/ (\(.+\)$)/);t=n?t.replace(n[0],``):t;var r=this.extractLocation(n?n[1]:t),i=n&&t||void 0,a=[`eval`,`<anonymous>`].indexOf(r[0])>-1?void 0:r[0];return new ue({functionName:i,fileName:a,lineNumber:r[1],columnNumber:r[2],source:e})},this)},`ErrorStackParser$$parseV8OrIE`),parseFFOrSafari:h(function(e){return e.stack.split(`
|
|
3
|
-
`).filter(function(e){return!e.match(t)},this).map(function(e){if(e.indexOf(` > eval`)>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,`:$1`)),e.indexOf(`@`)===-1&&e.indexOf(`:`)===-1)return new ue({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(t,``));return new ue({functionName:r,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})},this)},`ErrorStackParser$$parseFFOrSafari`)}}h(de,`ErrorStackParser`);var fe=new de,w=typeof process==`object`&&typeof process.versions==`object`&&typeof process.versions.node==`string`&&!process.browser,pe=w&&typeof module<`u`&&typeof module.exports<`u`&&typeof oe<`u`&&typeof __dirname<`u`,me=w&&!pe;globalThis.Bun;var he=!w&&!(typeof Deno<`u`),ge=he&&typeof window==`object`&&typeof document==`object`&&typeof document.createElement==`function`&&`sessionStorage`in window&&typeof importScripts!=`function`,_e=he&&typeof importScripts==`function`&&typeof self==`object`;typeof navigator==`object`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Chrome`)==-1&&navigator.userAgent.indexOf(`Safari`);var ve,ye,be,xe,Se;async function Ce(){if(!w||(ve=(await import(`./__vite-browser-external-BeNtI_tJ.js`).then(l(1))).default,xe=await import(`./__vite-browser-external-BeNtI_tJ.js`).then(l(1)),Se=await import(`./__vite-browser-external-BeNtI_tJ.js`).then(l(1)),be=(await import(`./__vite-browser-external-BeNtI_tJ.js`).then(l(1))).default,ye=await import(`./__vite-browser-external-BeNtI_tJ.js`).then(l(1)),De=ye.sep,typeof oe<`u`))return;let e=xe,t=await import(`./__vite-browser-external-BeNtI_tJ.js`).then(l(1)),n=await import(`./__vite-browser-external-BeNtI_tJ.js`).then(l(1)),r=await import(`./__vite-browser-external-BeNtI_tJ.js`).then(l(1)),i={fs:e,crypto:t,ws:n,child_process:r};globalThis.require=function(e){return i[e]}}h(Ce,`initNodeModules`);function we(e,t){return ye.resolve(t||`.`,e)}h(we,`node_resolvePath`);function Te(e,t){return t===void 0&&(t=location),new URL(e,t).toString()}h(Te,`browser_resolvePath`);var Ee=w?we:Te,De;w||(De=`/`);function Oe(e,t){return e.startsWith(`file://`)&&(e=e.slice(7)),e.includes(`://`)?{response:fetch(e)}:{binary:Se.readFile(e).then(e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}}h(Oe,`node_getBinaryResponse`);function ke(e,t){let n=new URL(e,location);return{response:fetch(n,t?{integrity:t}:{})}}h(ke,`browser_getBinaryResponse`);var Ae=w?Oe:ke;async function je(e,t){let{response:n,binary:r}=Ae(e,t);if(r)return r;let i=await n;if(!i.ok)throw Error(`Failed to load '${e}': request failed.`);return new Uint8Array(await i.arrayBuffer())}h(je,`loadBinaryFile`);var Me;if(ge)Me=h(async e=>await import(e),`loadScript`);else if(_e)Me=h(async e=>{try{globalThis.importScripts(e)}catch(t){if(t instanceof TypeError)await import(e);else throw t}},`loadScript`);else if(w)Me=Ne;else throw Error(`Cannot determine runtime environment`);async function Ne(e){e.startsWith(`file://`)&&(e=e.slice(7)),e.includes(`://`)?be.runInThisContext(await(await fetch(e)).text()):await import(ve.pathToFileURL(e).href)}h(Ne,`nodeLoadScript`);async function Pe(e){if(w){await Ce();let t=await Se.readFile(e,{encoding:`utf8`});return JSON.parse(t)}else return await(await fetch(e)).json()}h(Pe,`loadLockFile`);async function Fe(){if(pe)return __dirname;let e;try{throw Error()}catch(t){e=t}let t=fe.parse(e)[0].fileName;if(w&&!t.startsWith(`file://`)&&(t=`file://${t}`),me){let e=await import(`./__vite-browser-external-BeNtI_tJ.js`).then(l(1));return(await import(`./__vite-browser-external-BeNtI_tJ.js`).then(l(1))).fileURLToPath(e.dirname(t))}let n=t.lastIndexOf(De);if(n===-1)throw Error(`Could not extract indexURL path from pyodide module location`);return t.slice(0,n)}h(Fe,`calculateDirname`);function Ie(e){let t=e.FS,n=e.FS.filesystems.MEMFS,r=e.PATH,i={DIR_MODE:16895,FILE_MODE:33279,mount:function(e){if(!e.opts.fileSystemHandle)throw Error(`opts.fileSystemHandle is required`);return n.mount.apply(null,arguments)},syncfs:async(e,t,n)=>{try{let r=i.getLocalSet(e),a=await i.getRemoteSet(e),o=t?a:r,s=t?r:a;await i.reconcile(e,o,s),n(null)}catch(e){n(e)}},getLocalSet:e=>{let n=Object.create(null);function i(e){return e!==`.`&&e!==`..`}h(i,`isRealDir`);function a(e){return t=>r.join2(e,t)}h(a,`toAbsolute`);let o=t.readdir(e.mountpoint).filter(i).map(a(e.mountpoint));for(;o.length;){let e=o.pop(),r=t.stat(e);t.isDir(r.mode)&&o.push.apply(o,t.readdir(e).filter(i).map(a(e))),n[e]={timestamp:r.mtime,mode:r.mode}}return{type:`local`,entries:n}},getRemoteSet:async e=>{let t=Object.create(null),n=await Le(e.opts.fileSystemHandle);for(let[a,o]of n)a!==`.`&&(t[r.join2(e.mountpoint,a)]={timestamp:o.kind===`file`?new Date((await o.getFile()).lastModified):new Date,mode:o.kind===`file`?i.FILE_MODE:i.DIR_MODE});return{type:`remote`,entries:t,handles:n}},loadLocalEntry:e=>{let r=t.lookupPath(e).node,i=t.stat(e);if(t.isDir(i.mode))return{timestamp:i.mtime,mode:i.mode};if(t.isFile(i.mode))return r.contents=n.getFileDataAsTypedArray(r),{timestamp:i.mtime,mode:i.mode,contents:r.contents};throw Error(`node type not supported`)},storeLocalEntry:(e,n)=>{if(t.isDir(n.mode))t.mkdirTree(e,n.mode);else if(t.isFile(n.mode))t.writeFile(e,n.contents,{canOwn:!0});else throw Error(`node type not supported`);t.chmod(e,n.mode),t.utime(e,n.timestamp,n.timestamp)},removeLocalEntry:e=>{var n=t.stat(e);t.isDir(n.mode)?t.rmdir(e):t.isFile(n.mode)&&t.unlink(e)},loadRemoteEntry:async e=>{if(e.kind===`file`){let t=await e.getFile();return{contents:new Uint8Array(await t.arrayBuffer()),mode:i.FILE_MODE,timestamp:new Date(t.lastModified)}}else{if(e.kind===`directory`)return{mode:i.DIR_MODE,timestamp:new Date};throw Error(`unknown kind: `+e.kind)}},storeRemoteEntry:async(e,n,i)=>{let a=e.get(r.dirname(n)),o=t.isFile(i.mode)?await a.getFileHandle(r.basename(n),{create:!0}):await a.getDirectoryHandle(r.basename(n),{create:!0});if(o.kind===`file`){let e=await o.createWritable();await e.write(i.contents),await e.close()}e.set(n,o)},removeRemoteEntry:async(e,t)=>{await e.get(r.dirname(t)).removeEntry(r.basename(t)),e.delete(t)},reconcile:async(e,n,a)=>{let o=0,s=[];Object.keys(n.entries).forEach(function(e){let r=n.entries[e],i=a.entries[e];(!i||t.isFile(r.mode)&&r.timestamp.getTime()>i.timestamp.getTime())&&(s.push(e),o++)}),s.sort();let c=[];if(Object.keys(a.entries).forEach(function(e){n.entries[e]||(c.push(e),o++)}),c.sort().reverse(),!o)return;let l=n.type===`remote`?n.handles:a.handles;for(let t of s){let n=r.normalize(t.replace(e.mountpoint,`/`)).substring(1);if(a.type===`local`){let e=l.get(n),r=await i.loadRemoteEntry(e);i.storeLocalEntry(t,r)}else{let e=i.loadLocalEntry(t);await i.storeRemoteEntry(l,n,e)}}for(let t of c)if(a.type===`local`)i.removeLocalEntry(t);else{let n=r.normalize(t.replace(e.mountpoint,`/`)).substring(1);await i.removeRemoteEntry(l,n)}}};e.FS.filesystems.NATIVEFS_ASYNC=i}h(Ie,`initializeNativeFS`);var Le=h(async e=>{let t=[];async function n(e){for await(let r of e.values())t.push(r),r.kind===`directory`&&await n(r)}h(n,`collect`),await n(e);let r=new Map;r.set(`.`,e);for(let n of t){let t=(await e.resolve(n)).join(`/`);r.set(t,n)}return r},`getFsHandles`);function Re(e){let t={noImageDecoding:!0,noAudioDecoding:!0,noWasmDecoding:!1,preRun:Ue(e),quit(e,n){throw t.exited={status:e,toThrow:n},n},print:e.stdout,printErr:e.stderr,thisProgram:e._sysExecutable,arguments:e.args,API:{config:e},locateFile:t=>e.indexURL+t,instantiateWasm:We(e.indexURL)};return t}h(Re,`createSettings`);function ze(e){return function(t){try{t.FS.mkdirTree(e)}catch(t){console.error(`Error occurred while making a home directory '${e}':`),console.error(t),console.error(`Using '/' for a home directory instead`),e=`/`}t.FS.chdir(e)}}h(ze,`createHomeDirectory`);function Be(e){return function(t){Object.assign(t.ENV,e)}}h(Be,`setEnvironment`);function Ve(e){return e?[async t=>{t.addRunDependency(`fsInitHook`);try{await e(t.FS,{sitePackages:t.API.sitePackages})}finally{t.removeRunDependency(`fsInitHook`)}}]:[]}h(Ve,`callFsInitHook`);function He(e){let t=je(e);return async e=>{let n=e._py_version_major(),r=e._py_version_minor();e.FS.mkdirTree(`/lib`),e.API.sitePackages=`/lib/python${n}.${r}/site-packages`,e.FS.mkdirTree(e.API.sitePackages),e.addRunDependency(`install-stdlib`);try{let i=await t;e.FS.writeFile(`/lib/python${n}${r}.zip`,i)}catch(e){console.error(`Error occurred while installing the standard library:`),console.error(e)}finally{e.removeRunDependency(`install-stdlib`)}}}h(He,`installStdlib`);function Ue(e){let t;return t=e.stdLibURL==null?e.indexURL+`python_stdlib.zip`:e.stdLibURL,[...Ve(e.fsInit),He(t),ze(e.env.HOME),Be(e.env),Ie]}h(Ue,`getFileSystemInitializationFuncs`);function We(e){if(typeof WasmOffsetConverter<`u`)return;let{binary:t,response:n}=Ae(e+`pyodide.asm.wasm`);return function(e,r){return async function(){try{let i;i=n?await WebAssembly.instantiateStreaming(n,e):await WebAssembly.instantiate(await t,e);let{instance:a,module:o}=i;r(a,o)}catch(e){console.warn(`wasm instantiation failed!`),console.warn(e)}}(),{}}}h(We,`getInstantiateWasmFunc`);var Ge=`0.27.7`;async function Ke(e={}){var t,n;await Ce();let r=e.indexURL||await Fe();r=Ee(r),r.endsWith(`/`)||(r+=`/`),e.indexURL=r;let i={fullStdLib:!1,jsglobals:globalThis,stdin:globalThis.prompt?globalThis.prompt:void 0,lockFileURL:r+`pyodide-lock.json`,args:[],env:{},packageCacheDir:r,packages:[],enableRunUntilComplete:!0,checkAPIVersion:!0,BUILD_ID:`e94377f5ce7dcf67e0417b69a0016733c2cfb6b4622ee8c490a6f17eb58e863b`},a=Object.assign(i,e);(t=a.env).HOME??(t.HOME=`/home/pyodide`),(n=a.env).PYTHONINSPECT??(n.PYTHONINSPECT=`1`);let o=Re(a),s=o.API;if(s.lockFilePromise=Pe(a.lockFileURL),typeof _createPyodideModule!=`function`){let e=`${a.indexURL}pyodide.asm.js`;await Me(e)}let c;if(e._loadSnapshot){let t=await e._loadSnapshot;c=ArrayBuffer.isView(t)?t:new Uint8Array(t),o.noInitialRun=!0,o.INITIAL_MEMORY=c.length}let l=await _createPyodideModule(o);if(o.exited)throw o.exited.toThrow;if(e.pyproxyToStringRepr&&s.setPyProxyToStringMethod(!0),s.version!==Ge&&a.checkAPIVersion)throw Error(`Pyodide version does not match: '${Ge}' <==> '${s.version}'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.`);l.locateFile=e=>{throw Error(`Didn't expect to load any more file_packager files!`)};let u;c&&(u=s.restoreSnapshot(c));let d=s.finalizeBootstrap(u,e._snapshotDeserializer);return s.sys.path.insert(0,``),d.version.includes(`dev`)||s.setCdnUrl(`https://cdn.jsdelivr.net/pyodide/v${d.version}/full/`),s._pyodide.set_excepthook(),await s.packageIndexReady,s.initializeStreams(a.stdin,a.stdout,a.stderr),d}h(Ke,`loadPyodide`);function qe(e){return e.includes(`dev`),`v${Ge}`}var Je=class{buffer;started=!1;onMessage;constructor(e){this.onMessage=e,this.buffer=[]}push=e=>{this.started?this.onMessage(e):this.buffer.push(e)};start=()=>{this.started=!0,this.buffer.forEach(e=>this.onMessage(e)),this.buffer=[]}};const Ye={NOOP:()=>{},ASYNC_NOOP:async()=>{},THROW:()=>{throw Error(`Should not be called`)},asUpdater:e=>typeof e==`function`?e:()=>e,identity:e=>e},Xe=(e,t)=>{let n=`[${e}]`;return{debug:(...e)=>console.debug(n,...e),log:(...e)=>t.log(n,...e),warn:(...e)=>t.warn(n,...e),error:(...e)=>t.error(n,...e),trace:(...e)=>t.trace(n,...e),get:n=>Xe(`${e}:${n}`,t),disabled:(e=!0)=>e?Qe:t}},Ze={debug:(...e)=>{console.debug(...e)},log:(...e)=>{console.log(...e)},warn:(...e)=>{console.warn(...e)},error:(...e)=>{console.error(...e)},trace:(...e)=>{console.trace(...e)},get:e=>Xe(`marimo:${e}`,Ze),disabled:(e=!0)=>e?Qe:Ze},Qe={debug:()=>Ye.NOOP,log:()=>Ye.NOOP,warn:()=>Ye.NOOP,error:()=>Ye.NOOP,trace:()=>Ye.NOOP,get:()=>Qe,disabled:()=>Qe};function $e(){return typeof window<`u`&&window.Logger||Ze}const T=$e();var et=class{promise;resolve;reject;status=`pending`;constructor(){this.promise=new Promise((e,t)=>{this.reject=e=>{this.status=`rejected`,t(e)},this.resolve=t=>{this.status=`resolved`,e(t)}})}};Object.freeze({status:`aborted`});function E(e,t,n){function r(n,r){var i;for(let a in Object.defineProperty(n,`_zod`,{value:n._zod??{},enumerable:!1}),(i=n._zod).traits??(i.traits=new Set),n._zod.traits.add(e),t(n,r),o.prototype)a in n||Object.defineProperty(n,a,{value:o.prototype[a].bind(n)});n._zod.constr=o,n._zod.def=r}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var D=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},tt=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};const nt={};function O(e){return e&&Object.assign(nt,e),nt}function rt(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function it(e,t){return typeof t==`bigint`?t.toString():t}function at(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function ot(e){return e==null}function st(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ct(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i,o=Number.parseInt(e.toFixed(a).replace(`.`,``)),s=Number.parseInt(t.toFixed(a).replace(`.`,``));return o%s/10**a}const lt=Symbol(`evaluating`);function k(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==lt)return r===void 0&&(r=lt,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function A(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function j(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ut(e){return JSON.stringify(e)}const dt=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function ft(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const pt=at(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function M(e){if(ft(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(ft(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function mt(e){return M(e)?{...e}:Array.isArray(e)?[...e]:e}const ht=new Set([`string`,`number`,`symbol`]);function gt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function N(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function P(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function _t(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}const vt={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function yt(e,t){let n=e._zod.def,r=j(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return A(this,`shape`,e),e},checks:[]});return N(e,r)}function bt(e,t){let n=e._zod.def,r=j(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return A(this,`shape`,r),r},checks:[]});return N(e,r)}function xt(e,t){if(!M(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0)throw Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let r=j(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return A(this,`shape`,n),n},checks:[]});return N(e,r)}function St(e,t){if(!M(t))throw Error(`Invalid input to safeExtend: expected a plain object`);let n={...e._zod.def,get shape(){let n={...e._zod.def.shape,...t};return A(this,`shape`,n),n},checks:e._zod.def.checks};return N(e,n)}function Ct(e,t){let n=j(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return A(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]});return N(e,n)}function wt(e,t,n){let r=j(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return A(this,`shape`,i),i},checks:[]});return N(t,r)}function Tt(e,t,n){let r=j(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return A(this,`shape`,i),i},checks:[]});return N(t,r)}function F(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function I(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Et(e){return typeof e==`string`?e:e?.message}function L(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=Et(e.inst?._zod.def?.error?.(e))??Et(t?.error?.(e))??Et(n.customError?.(e))??Et(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Dt(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Ot(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}const kt=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,it,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},At=E(`$ZodError`,kt),jt=E(`$ZodError`,kt,{Parent:Error});function Mt(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Nt(e,t){let n=t||function(e){return e.message},r={_errors:[]},i=e=>{for(let t of e.issues)if(t.code===`invalid_union`&&t.errors.length)t.errors.map(e=>i({issues:e}));else if(t.code===`invalid_key`)i({issues:t.issues});else if(t.code===`invalid_element`)i({issues:t.issues});else if(t.path.length===0)r._errors.push(n(t));else{let e=r,i=0;for(;i<t.path.length;){let r=t.path[i];i===t.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(n(t))):e[r]=e[r]||{_errors:[]},e=e[r],i++}}};return i(e),r}const Pt=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new D;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>L(e,a,O())));throw dt(t,i?.callee),t}return o.value},Ft=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>L(e,a,O())));throw dt(t,i?.callee),t}return o.value},It=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new D;return a.issues.length?{success:!1,error:new(e??At)(a.issues.map(e=>L(e,i,O())))}:{success:!0,data:a.value}},Lt=It(jt),Rt=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>L(e,i,O())))}:{success:!0,data:a.value}},zt=Rt(jt),Bt=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Pt(e)(t,n,i)},Vt=e=>(t,n,r)=>Pt(e)(t,n,r),Ht=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Ft(e)(t,n,i)},Ut=e=>async(t,n,r)=>Ft(e)(t,n,r),Wt=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return It(e)(t,n,i)},Gt=e=>(t,n,r)=>It(e)(t,n,r),Kt=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Rt(e)(t,n,i)},qt=e=>async(t,n,r)=>Rt(e)(t,n,r),Jt=/^[cC][^\s-]{8,}$/,Yt=/^[0-9a-z]+$/,Xt=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Zt=/^[0-9a-vA-V]{20}$/,Qt=/^[A-Za-z0-9]{27}$/,$t=/^[a-zA-Z0-9_-]{21}$/,en=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,tn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,nn=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,rn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;function an(){return RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`)}const on=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,sn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,cn=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,ln=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,un=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,dn=/^[A-Za-z0-9_-]*$/,fn=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,pn=/^\+(?:[0-9]){6,14}[0-9]$/,mn=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,hn=RegExp(`^${mn}$`);function gn(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function _n(e){return RegExp(`^${gn(e)}$`)}function vn(e){let t=gn({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${mn}T(?:${r})$`)}const yn=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},bn=/^-?\d+$/,xn=/^-?\d+(?:\.\d+)?/,Sn=/^(?:true|false)$/i,Cn=/^[^A-Z]*$/,wn=/^[^a-z]*$/,R=E(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Tn={number:`number`,bigint:`bigint`,object:`date`},En=E(`$ZodCheckLessThan`,(e,t)=>{R.init(e,t);let n=Tn[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Dn=E(`$ZodCheckGreaterThan`,(e,t)=>{R.init(e,t);let n=Tn[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),On=E(`$ZodCheckMultipleOf`,(e,t)=>{R.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):ct(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),kn=E(`$ZodCheckNumberFormat`,(e,t)=>{R.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=vt[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=bn)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inst:e})}}),An=E(`$ZodCheckMaxLength`,(e,t)=>{var n;R.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ot(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Dt(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),jn=E(`$ZodCheckMinLength`,(e,t)=>{var n;R.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ot(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Dt(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Mn=E(`$ZodCheckLengthEquals`,(e,t)=>{var n;R.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ot(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Dt(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Nn=E(`$ZodCheckStringFormat`,(e,t)=>{var n,r;R.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Pn=E(`$ZodCheckRegex`,(e,t)=>{Nn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Fn=E(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Cn,Nn.init(e,t)}),In=E(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=wn,Nn.init(e,t)}),Ln=E(`$ZodCheckIncludes`,(e,t)=>{R.init(e,t);let n=gt(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Rn=E(`$ZodCheckStartsWith`,(e,t)=>{R.init(e,t);let n=RegExp(`^${gt(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),zn=E(`$ZodCheckEndsWith`,(e,t)=>{R.init(e,t);let n=RegExp(`.*${gt(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Bn=E(`$ZodCheckOverwrite`,(e,t)=>{R.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});var Vn=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
4
|
-
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
5
|
-
`))}};const Hn={major:4,minor:1,patch:11},z=E(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Hn;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=F(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new D;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=F(e,t))});else{if(e.issues.length===t)continue;r||=F(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(F(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new D;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new D;return o.then(e=>t(e,r,a))}return t(o,r,a)}}e[`~standard`]={validate:t=>{try{let n=Lt(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return zt(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}}),Un=E(`$ZodString`,(e,t)=>{z.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??yn(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),B=E(`$ZodStringFormat`,(e,t)=>{Nn.init(e,t),Un.init(e,t)}),Wn=E(`$ZodGUID`,(e,t)=>{t.pattern??=tn,B.init(e,t)}),Gn=E(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=nn(e)}else t.pattern??=nn();B.init(e,t)}),Kn=E(`$ZodEmail`,(e,t)=>{t.pattern??=rn,B.init(e,t)}),qn=E(`$ZodURL`,(e,t)=>{B.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:fn.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Jn=E(`$ZodEmoji`,(e,t)=>{t.pattern??=an(),B.init(e,t)}),Yn=E(`$ZodNanoID`,(e,t)=>{t.pattern??=$t,B.init(e,t)}),Xn=E(`$ZodCUID`,(e,t)=>{t.pattern??=Jt,B.init(e,t)}),Zn=E(`$ZodCUID2`,(e,t)=>{t.pattern??=Yt,B.init(e,t)}),Qn=E(`$ZodULID`,(e,t)=>{t.pattern??=Xt,B.init(e,t)}),$n=E(`$ZodXID`,(e,t)=>{t.pattern??=Zt,B.init(e,t)}),er=E(`$ZodKSUID`,(e,t)=>{t.pattern??=Qt,B.init(e,t)}),tr=E(`$ZodISODateTime`,(e,t)=>{t.pattern??=vn(t),B.init(e,t)}),nr=E(`$ZodISODate`,(e,t)=>{t.pattern??=hn,B.init(e,t)}),rr=E(`$ZodISOTime`,(e,t)=>{t.pattern??=_n(t),B.init(e,t)}),ir=E(`$ZodISODuration`,(e,t)=>{t.pattern??=en,B.init(e,t)}),ar=E(`$ZodIPv4`,(e,t)=>{t.pattern??=on,B.init(e,t),e._zod.onattach.push(e=>{let t=e._zod.bag;t.format=`ipv4`})}),or=E(`$ZodIPv6`,(e,t)=>{t.pattern??=sn,B.init(e,t),e._zod.onattach.push(e=>{let t=e._zod.bag;t.format=`ipv6`}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),sr=E(`$ZodCIDRv4`,(e,t)=>{t.pattern??=cn,B.init(e,t)}),cr=E(`$ZodCIDRv6`,(e,t)=>{t.pattern??=ln,B.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function lr(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const ur=E(`$ZodBase64`,(e,t)=>{t.pattern??=un,B.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding=`base64`}),e._zod.check=n=>{lr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function dr(e){if(!dn.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`),n=t.padEnd(Math.ceil(t.length/4)*4,`=`);return lr(n)}const fr=E(`$ZodBase64URL`,(e,t)=>{t.pattern??=dn,B.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding=`base64url`}),e._zod.check=n=>{dr(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),pr=E(`$ZodE164`,(e,t)=>{t.pattern??=pn,B.init(e,t)});function mr(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}const hr=E(`$ZodJWT`,(e,t)=>{B.init(e,t),e._zod.check=n=>{mr(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),gr=E(`$ZodNumber`,(e,t)=>{z.init(e,t),e._zod.pattern=e._zod.bag.pattern??xn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),_r=E(`$ZodNumber`,(e,t)=>{kn.init(e,t),gr.init(e,t)}),vr=E(`$ZodBoolean`,(e,t)=>{z.init(e,t),e._zod.pattern=Sn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),yr=E(`$ZodUnknown`,(e,t)=>{z.init(e,t),e._zod.parse=e=>e}),br=E(`$ZodNever`,(e,t)=>{z.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function xr(e,t,n){e.issues.length&&t.issues.push(...I(n,e.issues)),t.value[n]=e.value}const Sr=E(`$ZodArray`,(e,t)=>{z.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>xr(t,n,e))):xr(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function Cr(e,t,n,r){e.issues.length&&t.issues.push(...I(n,e.issues)),e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function wr(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=_t(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Tr(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type;for(let i of Object.keys(t)){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Cr(e,n,i,t))):Cr(a,n,i,t)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}const Er=E(`$ZodObject`,(e,t)=>{if(z.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=at(()=>wr(t));k(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=ft,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e]._zod.run({value:s[e],issues:[]},o);n instanceof Promise?c.push(n.then(n=>Cr(n,t,e,s))):Cr(n,t,e,s)}return i?Tr(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Dr=E(`$ZodObjectJIT`,(e,t)=>{Er.init(e,t);let n=e._zod.parse,r=at(()=>wr(t)),i=e=>{let t=new Vn([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=ut(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let e of n.keys){let n=a[e],r=ut(e);t.write(`const ${n} = ${i(e)};`),t.write(`
|
|
6
|
-
if (${n}.issues.length) {
|
|
7
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
8
|
-
...iss,
|
|
9
|
-
path: iss.path ? [${r}, ...iss.path] : [${r}]
|
|
10
|
-
})));
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
if (${n}.value === undefined) {
|
|
15
|
-
if (${r} in input) {
|
|
16
|
-
newResult[${r}] = undefined;
|
|
17
|
-
}
|
|
18
|
-
} else {
|
|
19
|
-
newResult[${r}] = ${n}.value;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=ft,s=!nt.jitless,c=s&&pt.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?Tr([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function Or(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!F(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>L(e,r,O())))}),t)}const kr=E(`$ZodUnion`,(e,t)=>{z.init(e,t),k(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),k(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),k(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),k(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>st(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>Or(t,i,e,a)):Or(s,i,e,a)}}),Ar=E(`$ZodIntersection`,(e,t)=>{z.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Mr(e,t,n)):Mr(e,i,a)}});function jr(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(M(e)&&M(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=jr(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=jr(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Mr(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),F(e))return e;let r=jr(t.value,n.value);if(!r.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const Nr=E(`$ZodRecord`,(e,t)=>{z.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!M(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[];if(t.keyType._zod.values){let o=t.keyType._zod.values;n.value={};for(let e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...I(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...I(e,o.issues)),n.value[e]=o.value)}let s;for(let e in i)o.has(e)||(s??=[],s.push(e));s&&s.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:s})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`)continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>L(e,r,O())),input:o,path:[o],inst:e}),n.value[s.value]=s.value;continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...I(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...I(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Pr=E(`$ZodEnum`,(e,t)=>{z.init(e,t);let n=rt(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>ht.has(typeof e)).map(e=>typeof e==`string`?gt(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Fr=E(`$ZodTransform`,(e,t)=>{z.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new tt(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new D;return n.value=i,n}});function Ir(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Lr=E(`$ZodOptional`,(e,t)=>{z.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,k(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),k(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${st(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>Ir(t,e.value)):Ir(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Rr=E(`$ZodNullable`,(e,t)=>{z.init(e,t),k(e._zod,`optin`,()=>t.innerType._zod.optin),k(e._zod,`optout`,()=>t.innerType._zod.optout),k(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${st(e.source)}|null)$`):void 0}),k(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),zr=E(`$ZodDefault`,(e,t)=>{z.init(e,t),e._zod.optin=`optional`,k(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Br(e,t)):Br(r,t)}});function Br(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Vr=E(`$ZodPrefault`,(e,t)=>{z.init(e,t),e._zod.optin=`optional`,k(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Hr=E(`$ZodNonOptional`,(e,t)=>{z.init(e,t),k(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Ur(t,e)):Ur(i,e)}});function Ur(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}const Wr=E(`$ZodCatch`,(e,t)=>{z.init(e,t),k(e._zod,`optin`,()=>t.innerType._zod.optin),k(e._zod,`optout`,()=>t.innerType._zod.optout),k(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>L(e,n,O()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>L(e,n,O()))},input:e.value}),e.issues=[]),e)}}),Gr=E(`$ZodPipe`,(e,t)=>{z.init(e,t),k(e._zod,`values`,()=>t.in._zod.values),k(e._zod,`optin`,()=>t.in._zod.optin),k(e._zod,`optout`,()=>t.out._zod.optout),k(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Kr(e,t.in,n)):Kr(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Kr(e,t.out,n)):Kr(r,t.out,n)}});function Kr(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const qr=E(`$ZodReadonly`,(e,t)=>{z.init(e,t),k(e._zod,`propValues`,()=>t.innerType._zod.propValues),k(e._zod,`values`,()=>t.innerType._zod.values),k(e._zod,`optin`,()=>t.innerType._zod.optin),k(e._zod,`optout`,()=>t.innerType._zod.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Jr):Jr(r)}});function Jr(e){return e.value=Object.freeze(e.value),e}const Yr=E(`$ZodCustom`,(e,t)=>{R.init(e,t),z.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Xr(t,n,r,e));Xr(i,n,r,e)}});function Xr(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Ot(e))}}var Zr=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];if(this._map.set(e,n),n&&typeof n==`object`&&`id`in n){if(this._idmap.has(n.id))throw Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Qr(){return new Zr}const $r=Qr();function ei(e,t){return new e({type:`string`,...P(t)})}function ti(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...P(t)})}function ni(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...P(t)})}function ri(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...P(t)})}function ii(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...P(t)})}function ai(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...P(t)})}function oi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...P(t)})}function si(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...P(t)})}function ci(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...P(t)})}function li(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...P(t)})}function ui(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...P(t)})}function di(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...P(t)})}function fi(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...P(t)})}function pi(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...P(t)})}function mi(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...P(t)})}function hi(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...P(t)})}function gi(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...P(t)})}function _i(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...P(t)})}function vi(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...P(t)})}function yi(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...P(t)})}function bi(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...P(t)})}function xi(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...P(t)})}function Si(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...P(t)})}function Ci(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...P(t)})}function wi(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...P(t)})}function Ti(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...P(t)})}function Ei(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...P(t)})}function Di(e,t){return new e({type:`number`,checks:[],...P(t)})}function Oi(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...P(t)})}function ki(e,t){return new e({type:`boolean`,...P(t)})}function Ai(e){return new e({type:`unknown`})}function ji(e,t){return new e({type:`never`,...P(t)})}function Mi(e,t){return new En({check:`less_than`,...P(t),value:e,inclusive:!1})}function Ni(e,t){return new En({check:`less_than`,...P(t),value:e,inclusive:!0})}function Pi(e,t){return new Dn({check:`greater_than`,...P(t),value:e,inclusive:!1})}function Fi(e,t){return new Dn({check:`greater_than`,...P(t),value:e,inclusive:!0})}function Ii(e,t){return new On({check:`multiple_of`,...P(t),value:e})}function Li(e,t){return new An({check:`max_length`,...P(t),maximum:e})}function Ri(e,t){return new jn({check:`min_length`,...P(t),minimum:e})}function zi(e,t){return new Mn({check:`length_equals`,...P(t),length:e})}function Bi(e,t){return new Pn({check:`string_format`,format:`regex`,...P(t),pattern:e})}function Vi(e){return new Fn({check:`string_format`,format:`lowercase`,...P(e)})}function Hi(e){return new In({check:`string_format`,format:`uppercase`,...P(e)})}function Ui(e,t){return new Ln({check:`string_format`,format:`includes`,...P(t),includes:e})}function Wi(e,t){return new Rn({check:`string_format`,format:`starts_with`,...P(t),prefix:e})}function Gi(e,t){return new zn({check:`string_format`,format:`ends_with`,...P(t),suffix:e})}function Ki(e){return new Bn({check:`overwrite`,tx:e})}function qi(e){return Ki(t=>t.normalize(e))}function Ji(){return Ki(e=>e.trim())}function Yi(){return Ki(e=>e.toLowerCase())}function Xi(){return Ki(e=>e.toUpperCase())}function Zi(e,t,n){return new e({type:`array`,element:t,...P(n)})}function Qi(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...P(n)})}function $i(e){let t=ea(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(Ot(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(Ot(r))}},e(n.value,n)));return t}function ea(e,t){let n=new R({check:`custom`,...P(t)});return n._zod.check=e,n}const ta=E(`ZodISODateTime`,(e,t)=>{tr.init(e,t),W.init(e,t)});function na(e){return Ci(ta,e)}const ra=E(`ZodISODate`,(e,t)=>{nr.init(e,t),W.init(e,t)});function ia(e){return wi(ra,e)}const aa=E(`ZodISOTime`,(e,t)=>{rr.init(e,t),W.init(e,t)});function oa(e){return Ti(aa,e)}const sa=E(`ZodISODuration`,(e,t)=>{ir.init(e,t),W.init(e,t)});function ca(e){return Ei(sa,e)}const la=(e,t)=>{At.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Nt(e,t)},flatten:{value:t=>Mt(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,it,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,it,2)}},isEmpty:{get(){return e.issues.length===0}}})};E(`ZodError`,la);const V=E(`ZodError`,la,{Parent:Error}),ua=Pt(V),da=Ft(V),fa=It(V),pa=Rt(V),ma=Bt(V),ha=Vt(V),ga=Ht(V),_a=Ut(V),va=Wt(V),ya=Gt(V),ba=Kt(V),xa=qt(V),H=E(`ZodType`,(e,t)=>(z.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(j(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]})),e.clone=(t,n)=>N(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>ua(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>fa(e,t,n),e.parseAsync=async(t,n)=>da(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>pa(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>ma(e,t,n),e.decode=(t,n)=>ha(e,t,n),e.encodeAsync=async(t,n)=>ga(e,t,n),e.decodeAsync=async(t,n)=>_a(e,t,n),e.safeEncode=(t,n)=>va(e,t,n),e.safeDecode=(t,n)=>ya(e,t,n),e.safeEncodeAsync=async(t,n)=>ba(e,t,n),e.safeDecodeAsync=async(t,n)=>xa(e,t,n),e.refine=(t,n)=>e.check(Do(t,n)),e.superRefine=t=>e.check(Oo(t)),e.overwrite=t=>e.check(Ki(t)),e.optional=()=>uo(e),e.nullable=()=>po(e),e.nullish=()=>uo(po(e)),e.nonoptional=t=>yo(e,t),e.array=()=>K(e),e.or=t=>to([e,t]),e.and=t=>ro(e,t),e.transform=t=>Co(e,co(t)),e.default=t=>ho(e,t),e.prefault=t=>_o(e,t),e.catch=t=>xo(e,t),e.pipe=t=>Co(e,t),e.readonly=()=>To(e),e.describe=t=>{let n=e.clone();return $r.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return $r.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return $r.get(e);let n=e.clone();return $r.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Sa=E(`_ZodString`,(e,t)=>{Un.init(e,t),H.init(e,t);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(Bi(...t)),e.includes=(...t)=>e.check(Ui(...t)),e.startsWith=(...t)=>e.check(Wi(...t)),e.endsWith=(...t)=>e.check(Gi(...t)),e.min=(...t)=>e.check(Ri(...t)),e.max=(...t)=>e.check(Li(...t)),e.length=(...t)=>e.check(zi(...t)),e.nonempty=(...t)=>e.check(Ri(1,...t)),e.lowercase=t=>e.check(Vi(t)),e.uppercase=t=>e.check(Hi(t)),e.trim=()=>e.check(Ji()),e.normalize=(...t)=>e.check(qi(...t)),e.toLowerCase=()=>e.check(Yi()),e.toUpperCase=()=>e.check(Xi())}),Ca=E(`ZodString`,(e,t)=>{Un.init(e,t),Sa.init(e,t),e.email=t=>e.check(ti(wa,t)),e.url=t=>e.check(si(Da,t)),e.jwt=t=>e.check(Si(Ha,t)),e.emoji=t=>e.check(ci(Oa,t)),e.guid=t=>e.check(ni(Ta,t)),e.uuid=t=>e.check(ri(Ea,t)),e.uuidv4=t=>e.check(ii(Ea,t)),e.uuidv6=t=>e.check(ai(Ea,t)),e.uuidv7=t=>e.check(oi(Ea,t)),e.nanoid=t=>e.check(li(ka,t)),e.guid=t=>e.check(ni(Ta,t)),e.cuid=t=>e.check(ui(Aa,t)),e.cuid2=t=>e.check(di(ja,t)),e.ulid=t=>e.check(fi(Ma,t)),e.base64=t=>e.check(yi(za,t)),e.base64url=t=>e.check(bi(Ba,t)),e.xid=t=>e.check(pi(Na,t)),e.ksuid=t=>e.check(mi(Pa,t)),e.ipv4=t=>e.check(hi(Fa,t)),e.ipv6=t=>e.check(gi(Ia,t)),e.cidrv4=t=>e.check(_i(La,t)),e.cidrv6=t=>e.check(vi(Ra,t)),e.e164=t=>e.check(xi(Va,t)),e.datetime=t=>e.check(na(t)),e.date=t=>e.check(ia(t)),e.time=t=>e.check(oa(t)),e.duration=t=>e.check(ca(t))});function U(e){return ei(Ca,e)}const W=E(`ZodStringFormat`,(e,t)=>{B.init(e,t),Sa.init(e,t)}),wa=E(`ZodEmail`,(e,t)=>{Kn.init(e,t),W.init(e,t)}),Ta=E(`ZodGUID`,(e,t)=>{Wn.init(e,t),W.init(e,t)}),Ea=E(`ZodUUID`,(e,t)=>{Gn.init(e,t),W.init(e,t)}),Da=E(`ZodURL`,(e,t)=>{qn.init(e,t),W.init(e,t)}),Oa=E(`ZodEmoji`,(e,t)=>{Jn.init(e,t),W.init(e,t)}),ka=E(`ZodNanoID`,(e,t)=>{Yn.init(e,t),W.init(e,t)}),Aa=E(`ZodCUID`,(e,t)=>{Xn.init(e,t),W.init(e,t)}),ja=E(`ZodCUID2`,(e,t)=>{Zn.init(e,t),W.init(e,t)}),Ma=E(`ZodULID`,(e,t)=>{Qn.init(e,t),W.init(e,t)}),Na=E(`ZodXID`,(e,t)=>{$n.init(e,t),W.init(e,t)}),Pa=E(`ZodKSUID`,(e,t)=>{er.init(e,t),W.init(e,t)}),Fa=E(`ZodIPv4`,(e,t)=>{ar.init(e,t),W.init(e,t)}),Ia=E(`ZodIPv6`,(e,t)=>{or.init(e,t),W.init(e,t)}),La=E(`ZodCIDRv4`,(e,t)=>{sr.init(e,t),W.init(e,t)}),Ra=E(`ZodCIDRv6`,(e,t)=>{cr.init(e,t),W.init(e,t)}),za=E(`ZodBase64`,(e,t)=>{ur.init(e,t),W.init(e,t)}),Ba=E(`ZodBase64URL`,(e,t)=>{fr.init(e,t),W.init(e,t)}),Va=E(`ZodE164`,(e,t)=>{pr.init(e,t),W.init(e,t)}),Ha=E(`ZodJWT`,(e,t)=>{hr.init(e,t),W.init(e,t)}),Ua=E(`ZodNumber`,(e,t)=>{gr.init(e,t),H.init(e,t),e.gt=(t,n)=>e.check(Pi(t,n)),e.gte=(t,n)=>e.check(Fi(t,n)),e.min=(t,n)=>e.check(Fi(t,n)),e.lt=(t,n)=>e.check(Mi(t,n)),e.lte=(t,n)=>e.check(Ni(t,n)),e.max=(t,n)=>e.check(Ni(t,n)),e.int=t=>e.check(Ka(t)),e.safe=t=>e.check(Ka(t)),e.positive=t=>e.check(Pi(0,t)),e.nonnegative=t=>e.check(Fi(0,t)),e.negative=t=>e.check(Mi(0,t)),e.nonpositive=t=>e.check(Ni(0,t)),e.multipleOf=(t,n)=>e.check(Ii(t,n)),e.step=(t,n)=>e.check(Ii(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Wa(e){return Di(Ua,e)}const Ga=E(`ZodNumberFormat`,(e,t)=>{_r.init(e,t),Ua.init(e,t)});function Ka(e){return Oi(Ga,e)}const qa=E(`ZodBoolean`,(e,t)=>{vr.init(e,t),H.init(e,t)});function G(e){return ki(qa,e)}const Ja=E(`ZodUnknown`,(e,t)=>{yr.init(e,t),H.init(e,t)});function Ya(){return Ai(Ja)}const Xa=E(`ZodNever`,(e,t)=>{br.init(e,t),H.init(e,t)});function Za(e){return ji(Xa,e)}const Qa=E(`ZodArray`,(e,t)=>{Sr.init(e,t),H.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(Ri(t,n)),e.nonempty=t=>e.check(Ri(1,t)),e.max=(t,n)=>e.check(Li(t,n)),e.length=(t,n)=>e.check(zi(t,n)),e.unwrap=()=>e.element});function K(e,t){return Zi(Qa,e,t)}const $a=E(`ZodObject`,(e,t)=>{Dr.init(e,t),H.init(e,t),k(e,`shape`,()=>t.shape),e.keyof=()=>Y(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ya()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ya()}),e.strict=()=>e.clone({...e._zod.def,catchall:Za()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>xt(e,t),e.safeExtend=t=>St(e,t),e.merge=t=>Ct(e,t),e.pick=t=>yt(e,t),e.omit=t=>bt(e,t),e.partial=(...t)=>wt(lo,e,t[0]),e.required=(...t)=>Tt(vo,e,t[0])});function q(e,t){let n={type:`object`,shape:e??{},...P(t)};return new $a(n)}function J(e,t){return new $a({type:`object`,shape:e,catchall:Ya(),...P(t)})}const eo=E(`ZodUnion`,(e,t)=>{kr.init(e,t),H.init(e,t),e.options=t.options});function to(e,t){return new eo({type:`union`,options:e,...P(t)})}const no=E(`ZodIntersection`,(e,t)=>{Ar.init(e,t),H.init(e,t)});function ro(e,t){return new no({type:`intersection`,left:e,right:t})}const io=E(`ZodRecord`,(e,t)=>{Nr.init(e,t),H.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function ao(e,t,n){return new io({type:`record`,keyType:e,valueType:t,...P(n)})}const oo=E(`ZodEnum`,(e,t)=>{Pr.init(e,t),H.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new oo({...t,checks:[],...P(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new oo({...t,checks:[],...P(r),entries:i})}});function Y(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new oo({type:`enum`,entries:n,...P(t)})}const so=E(`ZodTransform`,(e,t)=>{Fr.init(e,t),H.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new tt(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ot(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Ot(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function co(e){return new so({type:`transform`,transform:e})}const lo=E(`ZodOptional`,(e,t)=>{Lr.init(e,t),H.init(e,t),e.unwrap=()=>e._zod.def.innerType});function uo(e){return new lo({type:`optional`,innerType:e})}const fo=E(`ZodNullable`,(e,t)=>{Rr.init(e,t),H.init(e,t),e.unwrap=()=>e._zod.def.innerType});function po(e){return new fo({type:`nullable`,innerType:e})}const mo=E(`ZodDefault`,(e,t)=>{zr.init(e,t),H.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function ho(e,t){return new mo({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():mt(t)}})}const go=E(`ZodPrefault`,(e,t)=>{Vr.init(e,t),H.init(e,t),e.unwrap=()=>e._zod.def.innerType});function _o(e,t){return new go({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():mt(t)}})}const vo=E(`ZodNonOptional`,(e,t)=>{Hr.init(e,t),H.init(e,t),e.unwrap=()=>e._zod.def.innerType});function yo(e,t){return new vo({type:`nonoptional`,innerType:e,...P(t)})}const bo=E(`ZodCatch`,(e,t)=>{Wr.init(e,t),H.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function xo(e,t){return new bo({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}const So=E(`ZodPipe`,(e,t)=>{Gr.init(e,t),H.init(e,t),e.in=t.in,e.out=t.out});function Co(e,t){return new So({type:`pipe`,in:e,out:t})}const wo=E(`ZodReadonly`,(e,t)=>{qr.init(e,t),H.init(e,t),e.unwrap=()=>e._zod.def.innerType});function To(e){return new wo({type:`readonly`,innerType:e})}const Eo=E(`ZodCustom`,(e,t)=>{Yr.init(e,t),H.init(e,t)});function Do(e,t={}){return Qi(Eo,e,t)}function Oo(e){return $i(e)}const ko=q({detail:U()}),Ao=q({error:U()});function jo(e){if(!e)return`Unknown error`;if(e instanceof Error){let t=ko.safeParse(e.cause);return t.success?t.data.detail:Mo(e.message)}if(typeof e==`object`){let t=ko.safeParse(e);if(t.success)return t.data.detail;let n=Ao.safeParse(e);if(n.success)return n.data.error}try{return JSON.stringify(e)}catch{return String(e)}}function Mo(e){let t=No(e);if(!t)return e;let n=ko.safeParse(t);if(n.success)return n.data.detail;let r=Ao.safeParse(t);return r.success?r.data.error:e}function No(e){try{return JSON.parse(e)}catch{return e}}function Po(e,t){if(!e)throw Error(t)}const Fo=[`pip`,`uv`,`rye`,`poetry`,`pixi`],Io=[`normal`,`compact`,`medium`,`full`,`columns`],Lo=[`auto`,`native`,`polars`,`lazy-polars`,`pandas`],Ro=[`html`,`markdown`,`ipynb`],X=q({api_key:U().optional(),base_url:U().optional()}).loose(),zo=q({chat_model:U().nullish(),edit_model:U().nullish(),autocomplete_model:U().nullish(),displayed_models:K(U()).default([]),custom_models:K(U()).default([])}),Bo=J({completion:q({activate_on_typing:G().prefault(!0),copilot:to([G(),Y([`github`,`codeium`,`custom`])]).prefault(!1).transform(e=>e===!0?`github`:e),codeium_api_key:U().nullish()}).prefault({}),save:J({autosave:Y([`off`,`after_delay`]).prefault(`after_delay`),autosave_delay:Wa().nonnegative().transform(e=>Math.max(e,1e3)).prefault(1e3),format_on_save:G().prefault(!1)}).prefault({}),formatting:J({line_length:Wa().nonnegative().prefault(79).transform(e=>Math.min(e,1e3))}).prefault({}),keymap:J({preset:Y([`default`,`vim`]).prefault(`default`),overrides:ao(U(),U()).prefault({}),destructive_delete:G().prefault(!0)}).prefault({}),runtime:J({auto_instantiate:G().prefault(!0),on_cell_change:Y([`lazy`,`autorun`]).prefault(`autorun`),auto_reload:Y([`off`,`lazy`,`autorun`]).prefault(`off`),watcher_on_save:Y([`lazy`,`autorun`]).prefault(`lazy`),default_sql_output:Y(Lo).prefault(`auto`),default_auto_download:K(Y(Ro)).prefault([])}).prefault({}),display:J({theme:Y([`light`,`dark`,`system`]).prefault(`light`),code_editor_font_size:Wa().nonnegative().prefault(14),cell_output:Y([`above`,`below`]).prefault(`above`),dataframes:Y([`rich`,`plain`]).prefault(`rich`),default_table_page_size:Wa().prefault(10),default_table_max_columns:Wa().prefault(50),default_width:Y(Io).prefault(`medium`).transform(e=>e===`normal`?`compact`:e),locale:U().nullable().optional(),reference_highlighting:G().prefault(!1)}).prefault({}),package_management:J({manager:Y(Fo).prefault(`pip`)}).prefault({}),ai:J({rules:U().prefault(``),mode:Y([`manual`,`ask`]).prefault(`manual`),open_ai:X.optional(),anthropic:X.optional(),google:X.optional(),ollama:X.optional(),openrouter:X.optional(),open_ai_compatible:X.optional(),azure:X.optional(),bedrock:J({region_name:U().optional(),profile_name:U().optional(),aws_access_key_id:U().optional(),aws_secret_access_key:U().optional()}).optional(),models:zo.prefault({displayed_models:[],custom_models:[]})}).prefault({}),experimental:J({markdown:G().optional(),rtc:G().optional()}).prefault(()=>({})),server:J({}).prefault(()=>({})),sharing:J({html:G().optional(),wasm:G().optional()}).optional(),mcp:J({presets:K(Y([`marimo`,`context7`])).optional()}).optional().prefault({})}).partial().prefault(()=>({completion:{},save:{},formatting:{},keymap:{},runtime:{},display:{},experimental:{},server:{},ai:{},package_management:{},mcp:{}})),Vo=U(),Ho=Y(Lo).prefault(`auto`);q({width:Y(Io).prefault(`medium`).transform(e=>e===`normal`?`compact`:e),app_title:Vo.nullish(),css_file:U().nullish(),html_head_file:U().nullish(),auto_download:K(Y(Ro)).prefault([]),sql_output:Ho}).prefault(()=>({width:`medium`,auto_download:[],sql_output:`auto`}));function Uo(){return Bo.parse({completion:{},save:{},formatting:{},keymap:{},runtime:{},display:{},experimental:{},server:{},ai:{},package_management:{},mcp:{}})}const Wo=e=>new TextDecoder().decode(e);function Go(e){return e.FS}const Ko=`notebook.py`,qo=`/marimo`,Z={NOTEBOOK_FILENAME:Ko,HOME_DIR:qo,createHomeDir:e=>{let t=Go(e);try{t.mkdirTree(qo)}catch{}t.chdir(qo)},mountFS:e=>{Go(e).mount(e.FS.filesystems.IDBFS,{root:`.`},qo)},populateFilesToMemory:async e=>{await Jo(e,!0)},persistFilesToRemote:async e=>{await Jo(e,!1)},readNotebook:e=>{let t=Go(e),n=`${qo}/${Ko}`;return Wo(t.readFile(n))},initNotebookCode:e=>{let{pyodide:t,filename:n,code:r}=e,i=Go(t),a=e=>{try{return Wo(i.readFile(e))}catch{return null}};if(n&&n!==Ko){let e=a(n);if(e)return{code:e,filename:n}}return i.writeFile(Ko,r),{code:r,filename:Ko}}};function Jo(e,t){return new Promise((n,r)=>{Go(e).syncfs(t,e=>{if(e instanceof Error){r(e);return}n()})})}function Yo(e){return`marimo-base`}const Q=new class{spans=[];startSpan(e,t={}){let n={name:e,startTime:Date.now(),attributes:t,end:(e=`ok`)=>this.endSpan(n,e)};return this.spans.push(n),n}endSpan(e,t=`ok`){e.endTime=Date.now(),e.status=t}getSpans(){return this.spans}wrap(e,t,n={}){let r=this.startSpan(t||e.name,n);try{let t=e();return this.endSpan(r),t}catch(e){throw this.endSpan(r,`error`),e}}wrapAsync(e,t,n={}){return(async(...r)=>{let i=this.startSpan(t||e.name,n);try{let t=await e(...r);return this.endSpan(i),t}catch(e){throw this.endSpan(i,`error`),e}})}logSpans(){}};globalThis.t=Q;var Xo=class{pyodide=null;get requirePyodide(){return Po(this.pyodide,`Pyodide not loaded`),this.pyodide}async bootstrap(e){return await this.loadPyodideAndPackages(e)}async loadPyodideAndPackages(e){if(!Ke)throw Error(`loadPyodide is not defined`);let t=Q.startSpan(`loadPyodide`);try{let n=await Ke({packages:[`micropip`,`msgspec`,Yo(e.version),`Markdown`,`pymdown-extensions`,`narwhals`,`packaging`],_makeSnapshot:!1,lockFileURL:`https://wasm.marimo.app/pyodide-lock.json?v=${e.version}&pyodide=${e.pyodideVersion}`,indexURL:`https://cdn.jsdelivr.net/pyodide/${e.pyodideVersion}/full/`});return this.pyodide=n,t.end(`ok`),n}catch(e){throw T.error(`Failed to load Pyodide`,e),e}}async mountFilesystem(e){let t=Q.startSpan(`mountFilesystem`);return Z.createHomeDir(this.requirePyodide),Z.mountFS(this.requirePyodide),await Z.populateFilesToMemory(this.requirePyodide),t.end(`ok`),Z.initNotebookCode({pyodide:this.requirePyodide,code:e.code,filename:e.filename})}async startSession(e){let{code:t,filename:n,onMessage:r,queryParameters:i,userConfig:a}=e;self.messenger={callback:r},self.query_params=i,self.user_config=a;let o=Q.startSpan(`startSession.runPython`),s=n||Z.NOTEBOOK_FILENAME,[c,l,u]=this.requirePyodide.runPython(`
|
|
23
|
-
print("[py] Starting marimo...")
|
|
24
|
-
import asyncio
|
|
25
|
-
import js
|
|
26
|
-
from marimo._pyodide.bootstrap import create_session, instantiate
|
|
27
|
-
|
|
28
|
-
assert js.messenger, "messenger is not defined"
|
|
29
|
-
assert js.query_params, "query_params is not defined"
|
|
30
|
-
|
|
31
|
-
session, bridge = create_session(
|
|
32
|
-
filename="${s}",
|
|
33
|
-
query_params=js.query_params.to_py(),
|
|
34
|
-
message_callback=js.messenger.callback,
|
|
35
|
-
user_config=js.user_config.to_py(),
|
|
36
|
-
)
|
|
37
|
-
|
|
38
|
-
def init(auto_instantiate=True):
|
|
39
|
-
instantiate(session, auto_instantiate)
|
|
40
|
-
asyncio.create_task(session.start())
|
|
41
|
-
|
|
42
|
-
# Find the packages to install
|
|
43
|
-
with open("${s}", "r") as f:
|
|
44
|
-
packages = session.find_packages(f.read())
|
|
45
|
-
|
|
46
|
-
bridge, init, packages`);o.end();let d=new Set(u.toJs());return this.loadNotebookDeps(t,d).then(()=>l(a.runtime.auto_instantiate)),c}async loadNotebookDeps(e,t){let n=this.requirePyodide;e.includes(`mo.sql`)&&(e=`import pandas\n${e}`,e=`import duckdb\n${e}`,e=`import sqlglot\n${e}`,e.includes(`polars`)&&(e=`import pyarrow\n${e}`)),e=`import docutils\n${e}`,e=`import pygments\n${e}`,e=`import jedi\n${e}`,e=`import pyodide_http\n${e}`;let r=[...t],i=Q.startSpan(`pyodide.loadPackage`);await n.loadPackagesFromImports(e,{errorCallback:T.error,messageCallback:T.log}),i.end(),i=Q.startSpan(`micropip.install`);let a=r.filter(e=>!n.loadedPackages[e]);a.length>0&&await n.runPythonAsync(`
|
|
47
|
-
import micropip
|
|
48
|
-
import sys
|
|
49
|
-
# Filter out builtins
|
|
50
|
-
missing = [p for p in ${JSON.stringify(a)} if p not in sys.modules]
|
|
51
|
-
if len(missing) > 0:
|
|
52
|
-
print("Loading from micropip:", missing)
|
|
53
|
-
await micropip.install(missing)
|
|
54
|
-
`).catch(e=>{T.error(`Failed to load packages from micropip`,e)}),i.end()}},Zo=class extends Xo{async bootstrap(e){return await super.bootstrap(e)}async mountFilesystem(e){let{code:t,filename:n}=e;try{return Z.createHomeDir(this.requirePyodide),Z.initNotebookCode({pyodide:this.requirePyodide,code:t,filename:n})}catch(e){T.error(e)}return{code:t,filename:n}}async startSession(e){return super.startSession({queryParameters:{},code:e.code,filename:e.filename,onMessage:e.onMessage,userConfig:Uo()})}};async function Qo(){let e=rs(),t=qe(e);try{self.controller=new Zo,self.pyodide=await self.controller.bootstrap({version:e,pyodideVersion:t})}catch(e){T.error(`Error bootstrapping`,e),$.send.initializedError({error:jo(e)})}}const $o=Qo(),es=new Je(e=>{$.send.kernelMessage({message:e})}),ts=new et,ns=d({startSession:async e=>{await $o;try{Po(self.controller,`Controller not loaded`);let t=await self.controller.mountFilesystem({code:e.code,filename:`app-${e.appId}.py`}),n=await self.controller.startSession({...t,onMessage:es.push});ts.resolve(n),$.send.initialized({})}catch(e){$.send.initializedError({error:jo(e)})}},loadPackages:async e=>{await $o,e.includes(`mo.sql`)&&(e=`import pandas\n${e}`,e=`import duckdb\n${e}`,e=`import sqlglot\n${e}`,e.includes(`polars`)&&(e=`import pyarrow\n${e}`)),await self.pyodide.loadPackagesFromImports(e,{messageCallback:T.log,errorCallback:T.error})},bridge:async e=>{await $o;let{functionName:t,payload:n}=e,r=await ts.promise,i=n==null?null:typeof n==`string`?n:JSON.stringify(n),a=i==null?await r[t]():await r[t](i);return typeof a==`string`?JSON.parse(a):a}}),$=ee({transport:m({transportId:`marimo-transport`}),requestHandler:ns});$.send(`ready`,{}),$.addMessageListener(`consumerReady`,async()=>{await $o,es.start()});function rs(){return self.name}export{o as __commonJSMin};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { r as __name, t as select_default } from "./src-BNNJRxz3.js";
|
|
2
|
-
import { b as getConfig2 } from "./chunk-ABZYJK2D-CLlso8tj.js";
|
|
3
|
-
var selectSvgElement = /* @__PURE__ */ __name((e) => {
|
|
4
|
-
var _a;
|
|
5
|
-
let { securityLevel: r } = getConfig2(), i = select_default("body");
|
|
6
|
-
if (r === "sandbox") {
|
|
7
|
-
let n = ((_a = select_default(`#i${e}`).node()) == null ? void 0 : _a.contentDocument) ?? document;
|
|
8
|
-
i = select_default(n.body);
|
|
9
|
-
}
|
|
10
|
-
return i.select(`#${e}`);
|
|
11
|
-
}, "selectSvgElement");
|
|
12
|
-
export {
|
|
13
|
-
selectSvgElement as t
|
|
14
|
-
};
|
|
@@ -1,386 +0,0 @@
|
|
|
1
|
-
var _a;
|
|
2
|
-
import { s as __toESM } from "./chunk-DgPTj83v.js";
|
|
3
|
-
import { t as memoize_default } from "./memoize-Dq87l1O_.js";
|
|
4
|
-
import { t as merge_default } from "./merge-BPDCIm8P.js";
|
|
5
|
-
import { _ as basis_default, a as monotoneX, c as catmullRomOpen_default, d as cardinalOpen_default, f as cardinalClosed_default, g as basisClosed_default, h as basisOpen_default, i as natural_default, l as catmullRomClosed_default, m as bundle_default, n as stepBefore, o as monotoneY, p as cardinal_default, r as step_default, s as linearClosed_default, t as stepAfter, u as catmullRom_default, v as linear_default } from "./step-IHYrujTc.js";
|
|
6
|
-
import { i as log, r as __name, t as select_default } from "./src-BNNJRxz3.js";
|
|
7
|
-
import { F as sanitizeDirective, f as detectType, m as directiveRegex, r as assignWithDepth_default, s as common_default } from "./chunk-ABZYJK2D-CLlso8tj.js";
|
|
8
|
-
import { t as require_dist } from "./dist-CK8Gj3GX.js";
|
|
9
|
-
var Bump = class {
|
|
10
|
-
constructor(m, U) {
|
|
11
|
-
this._context = m, this._x = U;
|
|
12
|
-
}
|
|
13
|
-
areaStart() {
|
|
14
|
-
this._line = 0;
|
|
15
|
-
}
|
|
16
|
-
areaEnd() {
|
|
17
|
-
this._line = NaN;
|
|
18
|
-
}
|
|
19
|
-
lineStart() {
|
|
20
|
-
this._point = 0;
|
|
21
|
-
}
|
|
22
|
-
lineEnd() {
|
|
23
|
-
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
|
|
24
|
-
}
|
|
25
|
-
point(m, U) {
|
|
26
|
-
switch (m = +m, U = +U, this._point) {
|
|
27
|
-
case 0:
|
|
28
|
-
this._point = 1, this._line ? this._context.lineTo(m, U) : this._context.moveTo(m, U);
|
|
29
|
-
break;
|
|
30
|
-
case 1:
|
|
31
|
-
this._point = 2;
|
|
32
|
-
default:
|
|
33
|
-
this._x ? this._context.bezierCurveTo(this._x0 = (this._x0 + m) / 2, this._y0, this._x0, U, m, U) : this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + U) / 2, m, this._y0, m, U);
|
|
34
|
-
break;
|
|
35
|
-
}
|
|
36
|
-
this._x0 = m, this._y0 = U;
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
function bumpX(m) {
|
|
40
|
-
return new Bump(m, true);
|
|
41
|
-
}
|
|
42
|
-
function bumpY(m) {
|
|
43
|
-
return new Bump(m, false);
|
|
44
|
-
}
|
|
45
|
-
var import_dist = /* @__PURE__ */ __toESM(require_dist(), 1), ZERO_WIDTH_SPACE = "\u200B", d3CurveTypes = {
|
|
46
|
-
curveBasis: basis_default,
|
|
47
|
-
curveBasisClosed: basisClosed_default,
|
|
48
|
-
curveBasisOpen: basisOpen_default,
|
|
49
|
-
curveBumpX: bumpX,
|
|
50
|
-
curveBumpY: bumpY,
|
|
51
|
-
curveBundle: bundle_default,
|
|
52
|
-
curveCardinalClosed: cardinalClosed_default,
|
|
53
|
-
curveCardinalOpen: cardinalOpen_default,
|
|
54
|
-
curveCardinal: cardinal_default,
|
|
55
|
-
curveCatmullRomClosed: catmullRomClosed_default,
|
|
56
|
-
curveCatmullRomOpen: catmullRomOpen_default,
|
|
57
|
-
curveCatmullRom: catmullRom_default,
|
|
58
|
-
curveLinear: linear_default,
|
|
59
|
-
curveLinearClosed: linearClosed_default,
|
|
60
|
-
curveMonotoneX: monotoneX,
|
|
61
|
-
curveMonotoneY: monotoneY,
|
|
62
|
-
curveNatural: natural_default,
|
|
63
|
-
curveStep: step_default,
|
|
64
|
-
curveStepAfter: stepAfter,
|
|
65
|
-
curveStepBefore: stepBefore
|
|
66
|
-
}, directiveWithoutOpen = /\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi, detectInit = /* @__PURE__ */ __name(function(m, U) {
|
|
67
|
-
let W = detectDirective(m, /(?:init\b)|(?:initialize\b)/), G = {};
|
|
68
|
-
if (Array.isArray(W)) {
|
|
69
|
-
let m2 = W.map((m3) => m3.args);
|
|
70
|
-
sanitizeDirective(m2), G = assignWithDepth_default(G, [...m2]);
|
|
71
|
-
} else G = W.args;
|
|
72
|
-
if (!G) return;
|
|
73
|
-
let K = detectType(m, U), q = "config";
|
|
74
|
-
return G[q] !== void 0 && (K === "flowchart-v2" && (K = "flowchart"), G[K] = G[q], delete G[q]), G;
|
|
75
|
-
}, "detectInit"), detectDirective = /* @__PURE__ */ __name(function(m, U = null) {
|
|
76
|
-
var _a2, _b;
|
|
77
|
-
try {
|
|
78
|
-
let W = RegExp(`[%]{2}(?![{]${directiveWithoutOpen.source})(?=[}][%]{2}).*
|
|
79
|
-
`, "ig");
|
|
80
|
-
m = m.trim().replace(W, "").replace(/'/gm, '"'), log.debug(`Detecting diagram directive${U === null ? "" : " type:" + U} based on the text:${m}`);
|
|
81
|
-
let G, K = [];
|
|
82
|
-
for (; (G = directiveRegex.exec(m)) !== null; ) if (G.index === directiveRegex.lastIndex && directiveRegex.lastIndex++, G && !U || U && ((_a2 = G[1]) == null ? void 0 : _a2.match(U)) || U && ((_b = G[2]) == null ? void 0 : _b.match(U))) {
|
|
83
|
-
let m2 = G[1] ? G[1] : G[2], U2 = G[3] ? G[3].trim() : G[4] ? JSON.parse(G[4].trim()) : null;
|
|
84
|
-
K.push({
|
|
85
|
-
type: m2,
|
|
86
|
-
args: U2
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
return K.length === 0 ? {
|
|
90
|
-
type: m,
|
|
91
|
-
args: null
|
|
92
|
-
} : K.length === 1 ? K[0] : K;
|
|
93
|
-
} catch (W) {
|
|
94
|
-
return log.error(`ERROR: ${W.message} - Unable to parse directive type: '${U}' based on the text: '${m}'`), {
|
|
95
|
-
type: void 0,
|
|
96
|
-
args: null
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
}, "detectDirective"), removeDirectives = /* @__PURE__ */ __name(function(m) {
|
|
100
|
-
return m.replace(directiveRegex, "");
|
|
101
|
-
}, "removeDirectives"), isSubstringInArray = /* @__PURE__ */ __name(function(m, U) {
|
|
102
|
-
for (let [W, G] of U.entries()) if (G.match(m)) return W;
|
|
103
|
-
return -1;
|
|
104
|
-
}, "isSubstringInArray");
|
|
105
|
-
function interpolateToCurve(m, U) {
|
|
106
|
-
if (!m) return U;
|
|
107
|
-
let W = `curve${m.charAt(0).toUpperCase() + m.slice(1)}`;
|
|
108
|
-
return d3CurveTypes[W] ?? U;
|
|
109
|
-
}
|
|
110
|
-
__name(interpolateToCurve, "interpolateToCurve");
|
|
111
|
-
function formatUrl(m, U) {
|
|
112
|
-
let W = m.trim();
|
|
113
|
-
if (W) return U.securityLevel === "loose" ? W : (0, import_dist.sanitizeUrl)(W);
|
|
114
|
-
}
|
|
115
|
-
__name(formatUrl, "formatUrl");
|
|
116
|
-
var runFunc = /* @__PURE__ */ __name((m, ...U) => {
|
|
117
|
-
let W = m.split("."), G = W.length - 1, K = W[G], q = window;
|
|
118
|
-
for (let U2 = 0; U2 < G; U2++) if (q = q[W[U2]], !q) {
|
|
119
|
-
log.error(`Function name: ${m} not found in window`);
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
q[K](...U);
|
|
123
|
-
}, "runFunc");
|
|
124
|
-
function distance(m, U) {
|
|
125
|
-
return !m || !U ? 0 : Math.sqrt((U.x - m.x) ** 2 + (U.y - m.y) ** 2);
|
|
126
|
-
}
|
|
127
|
-
__name(distance, "distance");
|
|
128
|
-
function traverseEdge(m) {
|
|
129
|
-
let U, W = 0;
|
|
130
|
-
m.forEach((m2) => {
|
|
131
|
-
W += distance(m2, U), U = m2;
|
|
132
|
-
});
|
|
133
|
-
let G = W / 2;
|
|
134
|
-
return calculatePoint(m, G);
|
|
135
|
-
}
|
|
136
|
-
__name(traverseEdge, "traverseEdge");
|
|
137
|
-
function calcLabelPosition(m) {
|
|
138
|
-
return m.length === 1 ? m[0] : traverseEdge(m);
|
|
139
|
-
}
|
|
140
|
-
__name(calcLabelPosition, "calcLabelPosition");
|
|
141
|
-
var roundNumber = /* @__PURE__ */ __name((m, U = 2) => {
|
|
142
|
-
let W = 10 ** U;
|
|
143
|
-
return Math.round(m * W) / W;
|
|
144
|
-
}, "roundNumber"), calculatePoint = /* @__PURE__ */ __name((m, U) => {
|
|
145
|
-
let W, G = U;
|
|
146
|
-
for (let U2 of m) {
|
|
147
|
-
if (W) {
|
|
148
|
-
let m2 = distance(U2, W);
|
|
149
|
-
if (m2 === 0) return W;
|
|
150
|
-
if (m2 < G) G -= m2;
|
|
151
|
-
else {
|
|
152
|
-
let K = G / m2;
|
|
153
|
-
if (K <= 0) return W;
|
|
154
|
-
if (K >= 1) return {
|
|
155
|
-
x: U2.x,
|
|
156
|
-
y: U2.y
|
|
157
|
-
};
|
|
158
|
-
if (K > 0 && K < 1) return {
|
|
159
|
-
x: roundNumber((1 - K) * W.x + K * U2.x, 5),
|
|
160
|
-
y: roundNumber((1 - K) * W.y + K * U2.y, 5)
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
W = U2;
|
|
165
|
-
}
|
|
166
|
-
throw Error("Could not find a suitable point for the given distance");
|
|
167
|
-
}, "calculatePoint"), calcCardinalityPosition = /* @__PURE__ */ __name((m, U, W) => {
|
|
168
|
-
log.info(`our points ${JSON.stringify(U)}`), U[0] !== W && (U = U.reverse());
|
|
169
|
-
let G = calculatePoint(U, 25), K = m ? 10 : 5, q = Math.atan2(U[0].y - G.y, U[0].x - G.x), J = {
|
|
170
|
-
x: 0,
|
|
171
|
-
y: 0
|
|
172
|
-
};
|
|
173
|
-
return J.x = Math.sin(q) * K + (U[0].x + G.x) / 2, J.y = -Math.cos(q) * K + (U[0].y + G.y) / 2, J;
|
|
174
|
-
}, "calcCardinalityPosition");
|
|
175
|
-
function calcTerminalLabelPosition(m, U, W) {
|
|
176
|
-
let G = structuredClone(W);
|
|
177
|
-
log.info("our points", G), U !== "start_left" && U !== "start_right" && G.reverse();
|
|
178
|
-
let K = 25 + m, q = calculatePoint(G, K), J = 10 + m * 0.5, Y = Math.atan2(G[0].y - q.y, G[0].x - q.x), X = {
|
|
179
|
-
x: 0,
|
|
180
|
-
y: 0
|
|
181
|
-
};
|
|
182
|
-
return U === "start_left" ? (X.x = Math.sin(Y + Math.PI) * J + (G[0].x + q.x) / 2, X.y = -Math.cos(Y + Math.PI) * J + (G[0].y + q.y) / 2) : U === "end_right" ? (X.x = Math.sin(Y - Math.PI) * J + (G[0].x + q.x) / 2 - 5, X.y = -Math.cos(Y - Math.PI) * J + (G[0].y + q.y) / 2 - 5) : U === "end_left" ? (X.x = Math.sin(Y) * J + (G[0].x + q.x) / 2 - 5, X.y = -Math.cos(Y) * J + (G[0].y + q.y) / 2 - 5) : (X.x = Math.sin(Y) * J + (G[0].x + q.x) / 2, X.y = -Math.cos(Y) * J + (G[0].y + q.y) / 2), X;
|
|
183
|
-
}
|
|
184
|
-
__name(calcTerminalLabelPosition, "calcTerminalLabelPosition");
|
|
185
|
-
function getStylesFromArray(m) {
|
|
186
|
-
let U = "", W = "";
|
|
187
|
-
for (let G of m) G !== void 0 && (G.startsWith("color:") || G.startsWith("text-align:") ? W = W + G + ";" : U = U + G + ";");
|
|
188
|
-
return {
|
|
189
|
-
style: U,
|
|
190
|
-
labelStyle: W
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
__name(getStylesFromArray, "getStylesFromArray");
|
|
194
|
-
var cnt = 0, generateId = /* @__PURE__ */ __name(() => (cnt++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + cnt), "generateId");
|
|
195
|
-
function makeRandomHex(m) {
|
|
196
|
-
let U = "";
|
|
197
|
-
for (let W = 0; W < m; W++) U += "0123456789abcdef".charAt(Math.floor(Math.random() * 16));
|
|
198
|
-
return U;
|
|
199
|
-
}
|
|
200
|
-
__name(makeRandomHex, "makeRandomHex");
|
|
201
|
-
var random = /* @__PURE__ */ __name((m) => makeRandomHex(m.length), "random"), getTextObj = /* @__PURE__ */ __name(function() {
|
|
202
|
-
return {
|
|
203
|
-
x: 0,
|
|
204
|
-
y: 0,
|
|
205
|
-
fill: void 0,
|
|
206
|
-
anchor: "start",
|
|
207
|
-
style: "#666",
|
|
208
|
-
width: 100,
|
|
209
|
-
height: 100,
|
|
210
|
-
textMargin: 0,
|
|
211
|
-
rx: 0,
|
|
212
|
-
ry: 0,
|
|
213
|
-
valign: void 0,
|
|
214
|
-
text: ""
|
|
215
|
-
};
|
|
216
|
-
}, "getTextObj"), drawSimpleText = /* @__PURE__ */ __name(function(m, U) {
|
|
217
|
-
let W = U.text.replace(common_default.lineBreakRegex, " "), [, G] = parseFontSize(U.fontSize), K = m.append("text");
|
|
218
|
-
K.attr("x", U.x), K.attr("y", U.y), K.style("text-anchor", U.anchor), K.style("font-family", U.fontFamily), K.style("font-size", G), K.style("font-weight", U.fontWeight), K.attr("fill", U.fill), U.class !== void 0 && K.attr("class", U.class);
|
|
219
|
-
let q = K.append("tspan");
|
|
220
|
-
return q.attr("x", U.x + U.textMargin * 2), q.attr("fill", U.fill), q.text(W), K;
|
|
221
|
-
}, "drawSimpleText"), wrapLabel = memoize_default((m, U, W) => {
|
|
222
|
-
if (!m || (W = Object.assign({
|
|
223
|
-
fontSize: 12,
|
|
224
|
-
fontWeight: 400,
|
|
225
|
-
fontFamily: "Arial",
|
|
226
|
-
joinWith: "<br/>"
|
|
227
|
-
}, W), common_default.lineBreakRegex.test(m))) return m;
|
|
228
|
-
let G = m.split(" ").filter(Boolean), K = [], q = "";
|
|
229
|
-
return G.forEach((m2, J) => {
|
|
230
|
-
let Y = calculateTextWidth(`${m2} `, W), X = calculateTextWidth(q, W);
|
|
231
|
-
if (Y > U) {
|
|
232
|
-
let { hyphenatedStrings: G2, remainingWord: J2 } = breakString(m2, U, "-", W);
|
|
233
|
-
K.push(q, ...G2), q = J2;
|
|
234
|
-
} else X + Y >= U ? (K.push(q), q = m2) : q = [q, m2].filter(Boolean).join(" ");
|
|
235
|
-
J + 1 === G.length && K.push(q);
|
|
236
|
-
}), K.filter((m2) => m2 !== "").join(W.joinWith);
|
|
237
|
-
}, (m, U, W) => `${m}${U}${W.fontSize}${W.fontWeight}${W.fontFamily}${W.joinWith}`), breakString = memoize_default((m, U, W = "-", G) => {
|
|
238
|
-
G = Object.assign({
|
|
239
|
-
fontSize: 12,
|
|
240
|
-
fontWeight: 400,
|
|
241
|
-
fontFamily: "Arial",
|
|
242
|
-
margin: 0
|
|
243
|
-
}, G);
|
|
244
|
-
let K = [...m], q = [], J = "";
|
|
245
|
-
return K.forEach((m2, Y) => {
|
|
246
|
-
let X = `${J}${m2}`;
|
|
247
|
-
if (calculateTextWidth(X, G) >= U) {
|
|
248
|
-
let m3 = Y + 1, U2 = K.length === m3, G2 = `${X}${W}`;
|
|
249
|
-
q.push(U2 ? X : G2), J = "";
|
|
250
|
-
} else J = X;
|
|
251
|
-
}), {
|
|
252
|
-
hyphenatedStrings: q,
|
|
253
|
-
remainingWord: J
|
|
254
|
-
};
|
|
255
|
-
}, (m, U, W = "-", G) => `${m}${U}${W}${G.fontSize}${G.fontWeight}${G.fontFamily}`);
|
|
256
|
-
function calculateTextHeight(m, U) {
|
|
257
|
-
return calculateTextDimensions(m, U).height;
|
|
258
|
-
}
|
|
259
|
-
__name(calculateTextHeight, "calculateTextHeight");
|
|
260
|
-
function calculateTextWidth(m, U) {
|
|
261
|
-
return calculateTextDimensions(m, U).width;
|
|
262
|
-
}
|
|
263
|
-
__name(calculateTextWidth, "calculateTextWidth");
|
|
264
|
-
var calculateTextDimensions = memoize_default((m, U) => {
|
|
265
|
-
let { fontSize: W = 12, fontFamily: G = "Arial", fontWeight: K = 400 } = U;
|
|
266
|
-
if (!m) return {
|
|
267
|
-
width: 0,
|
|
268
|
-
height: 0
|
|
269
|
-
};
|
|
270
|
-
let [, q] = parseFontSize(W), J = ["sans-serif", G], Y = m.split(common_default.lineBreakRegex), X = [], Z = select_default("body");
|
|
271
|
-
if (!Z.remove) return {
|
|
272
|
-
width: 0,
|
|
273
|
-
height: 0,
|
|
274
|
-
lineHeight: 0
|
|
275
|
-
};
|
|
276
|
-
let Q = Z.append("svg");
|
|
277
|
-
for (let m2 of J) {
|
|
278
|
-
let U2 = 0, W2 = {
|
|
279
|
-
width: 0,
|
|
280
|
-
height: 0,
|
|
281
|
-
lineHeight: 0
|
|
282
|
-
};
|
|
283
|
-
for (let G2 of Y) {
|
|
284
|
-
let J2 = getTextObj();
|
|
285
|
-
J2.text = G2 || "\u200B";
|
|
286
|
-
let Y2 = drawSimpleText(Q, J2).style("font-size", q).style("font-weight", K).style("font-family", m2), X2 = (Y2._groups || Y2)[0][0].getBBox();
|
|
287
|
-
if (X2.width === 0 && X2.height === 0) throw Error("svg element not in render tree");
|
|
288
|
-
W2.width = Math.round(Math.max(W2.width, X2.width)), U2 = Math.round(X2.height), W2.height += U2, W2.lineHeight = Math.round(Math.max(W2.lineHeight, U2));
|
|
289
|
-
}
|
|
290
|
-
X.push(W2);
|
|
291
|
-
}
|
|
292
|
-
Q.remove();
|
|
293
|
-
let $ = isNaN(X[1].height) || isNaN(X[1].width) || isNaN(X[1].lineHeight) || X[0].height > X[1].height && X[0].width > X[1].width && X[0].lineHeight > X[1].lineHeight ? 0 : 1;
|
|
294
|
-
return X[$];
|
|
295
|
-
}, (m, U) => `${m}${U.fontSize}${U.fontWeight}${U.fontFamily}`), InitIDGenerator = (_a = class {
|
|
296
|
-
constructor(m = false, U) {
|
|
297
|
-
this.count = 0, this.count = U ? U.length : 0, this.next = m ? () => this.count++ : () => Date.now();
|
|
298
|
-
}
|
|
299
|
-
}, __name(_a, "InitIDGenerator"), _a), decoder, entityDecode = /* @__PURE__ */ __name(function(m) {
|
|
300
|
-
return decoder || (decoder = document.createElement("div")), m = escape(m).replace(/%26/g, "&").replace(/%23/g, "#").replace(/%3B/g, ";"), decoder.innerHTML = m, unescape(decoder.textContent);
|
|
301
|
-
}, "entityDecode");
|
|
302
|
-
function isDetailedError(m) {
|
|
303
|
-
return "str" in m;
|
|
304
|
-
}
|
|
305
|
-
__name(isDetailedError, "isDetailedError");
|
|
306
|
-
var insertTitle = /* @__PURE__ */ __name((m, U, W, G) => {
|
|
307
|
-
var _a2;
|
|
308
|
-
if (!G) return;
|
|
309
|
-
let K = (_a2 = m.node()) == null ? void 0 : _a2.getBBox();
|
|
310
|
-
K && m.append("text").text(G).attr("text-anchor", "middle").attr("x", K.x + K.width / 2).attr("y", -W).attr("class", U);
|
|
311
|
-
}, "insertTitle"), parseFontSize = /* @__PURE__ */ __name((m) => {
|
|
312
|
-
if (typeof m == "number") return [m, m + "px"];
|
|
313
|
-
let U = parseInt(m ?? "", 10);
|
|
314
|
-
return Number.isNaN(U) ? [void 0, void 0] : m === String(U) ? [U, m + "px"] : [U, m];
|
|
315
|
-
}, "parseFontSize");
|
|
316
|
-
function cleanAndMerge(m, U) {
|
|
317
|
-
return merge_default({}, m, U);
|
|
318
|
-
}
|
|
319
|
-
__name(cleanAndMerge, "cleanAndMerge");
|
|
320
|
-
var utils_default = {
|
|
321
|
-
assignWithDepth: assignWithDepth_default,
|
|
322
|
-
wrapLabel,
|
|
323
|
-
calculateTextHeight,
|
|
324
|
-
calculateTextWidth,
|
|
325
|
-
calculateTextDimensions,
|
|
326
|
-
cleanAndMerge,
|
|
327
|
-
detectInit,
|
|
328
|
-
detectDirective,
|
|
329
|
-
isSubstringInArray,
|
|
330
|
-
interpolateToCurve,
|
|
331
|
-
calcLabelPosition,
|
|
332
|
-
calcCardinalityPosition,
|
|
333
|
-
calcTerminalLabelPosition,
|
|
334
|
-
formatUrl,
|
|
335
|
-
getStylesFromArray,
|
|
336
|
-
generateId,
|
|
337
|
-
random,
|
|
338
|
-
runFunc,
|
|
339
|
-
entityDecode,
|
|
340
|
-
insertTitle,
|
|
341
|
-
isLabelCoordinateInPath,
|
|
342
|
-
parseFontSize,
|
|
343
|
-
InitIDGenerator
|
|
344
|
-
}, encodeEntities = /* @__PURE__ */ __name(function(m) {
|
|
345
|
-
let U = m;
|
|
346
|
-
return U = U.replace(/style.*:\S*#.*;/g, function(m2) {
|
|
347
|
-
return m2.substring(0, m2.length - 1);
|
|
348
|
-
}), U = U.replace(/classDef.*:\S*#.*;/g, function(m2) {
|
|
349
|
-
return m2.substring(0, m2.length - 1);
|
|
350
|
-
}), U = U.replace(/#\w+;/g, function(m2) {
|
|
351
|
-
let U2 = m2.substring(1, m2.length - 1);
|
|
352
|
-
return /^\+?\d+$/.test(U2) ? "\uFB02\xB0\xB0" + U2 + "\xB6\xDF" : "\uFB02\xB0" + U2 + "\xB6\xDF";
|
|
353
|
-
}), U;
|
|
354
|
-
}, "encodeEntities"), decodeEntities = /* @__PURE__ */ __name(function(m) {
|
|
355
|
-
return m.replace(/fl°°/g, "&#").replace(/fl°/g, "&").replace(/¶ß/g, ";");
|
|
356
|
-
}, "decodeEntities"), getEdgeId = /* @__PURE__ */ __name((m, U, { counter: W = 0, prefix: G, suffix: K }, q) => q || `${G ? `${G}_` : ""}${m}_${U}_${W}${K ? `_${K}` : ""}`, "getEdgeId");
|
|
357
|
-
function handleUndefinedAttr(m) {
|
|
358
|
-
return m ?? null;
|
|
359
|
-
}
|
|
360
|
-
__name(handleUndefinedAttr, "handleUndefinedAttr");
|
|
361
|
-
function isLabelCoordinateInPath(m, U) {
|
|
362
|
-
let W = Math.round(m.x), G = Math.round(m.y), K = U.replace(/(\d+\.\d+)/g, (m2) => Math.round(parseFloat(m2)).toString());
|
|
363
|
-
return K.includes(W.toString()) || K.includes(G.toString());
|
|
364
|
-
}
|
|
365
|
-
__name(isLabelCoordinateInPath, "isLabelCoordinateInPath");
|
|
366
|
-
export {
|
|
367
|
-
wrapLabel as _,
|
|
368
|
-
decodeEntities as a,
|
|
369
|
-
getEdgeId as c,
|
|
370
|
-
interpolateToCurve as d,
|
|
371
|
-
isDetailedError as f,
|
|
372
|
-
utils_default as g,
|
|
373
|
-
removeDirectives as h,
|
|
374
|
-
cleanAndMerge as i,
|
|
375
|
-
getStylesFromArray as l,
|
|
376
|
-
random as m,
|
|
377
|
-
calculateTextHeight as n,
|
|
378
|
-
encodeEntities as o,
|
|
379
|
-
parseFontSize as p,
|
|
380
|
-
calculateTextWidth as r,
|
|
381
|
-
generateId as s,
|
|
382
|
-
ZERO_WIDTH_SPACE as t,
|
|
383
|
-
handleUndefinedAttr as u,
|
|
384
|
-
bumpX as v,
|
|
385
|
-
bumpY as y
|
|
386
|
-
};
|