ryugi-artifacts 1.71.0 → 1.71.1
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/cli.cjs +2 -2
- package/dist/server.cjs +1 -1
- package/dist/viewer/ArtboardLayout-D9vW142o.js +12 -0
- package/dist/viewer/{ArtifactList-DV4G_qK2.js → ArtifactList-BaaDdeyG.js} +2 -2
- package/dist/viewer/{Avatar-DGMPym4p.js → Avatar-BRabEIqd.js} +1 -1
- package/dist/viewer/CompositeItem-CnLoBKgZ.js +1 -0
- package/dist/viewer/{DocumentLayout-BXegH0sF.js → DocumentLayout-CUpZEyW7.js} +2 -2
- package/dist/viewer/DocumentPage-xNNNq2h-.js +4 -0
- package/dist/viewer/{DropdownMenu-C4feb-Mq.js → DropdownMenu-D7hUzUyn.js} +1 -1
- package/dist/viewer/{HtmlLayout-DltXJryH.js → HtmlLayout-mCyTlMnl.js} +1 -1
- package/dist/viewer/MenuSubmenuTrigger-CLH7yclO.js +1 -0
- package/dist/viewer/MenuTrigger-CGvPp0uG.js +1 -0
- package/dist/viewer/{PhoneArtboardBar-BUlgF3vS.js → PhoneArtboardBar-CQHPMPTZ.js} +1 -1
- package/dist/viewer/Popover-BKx9uy8c.js +1 -0
- package/dist/viewer/{PreviewLayout-CMYzEEL_.js → PreviewLayout-Bg9AZ91J.js} +2 -2
- package/dist/viewer/{Segmented-CRw0XP1f.js → Segmented-CilJn7c1.js} +1 -1
- package/dist/viewer/Select-BsKM3yA4.js +1 -0
- package/dist/viewer/SelectScrollUpArrow-ByDfz8M9.js +1 -0
- package/dist/viewer/SettingsDialog-cLAMjprj.js +1 -0
- package/dist/viewer/{SnapshotDocument-DK5PtxZf.js → SnapshotDocument-Dmb9xl0_.js} +1 -1
- package/dist/viewer/{SplitShell-BXL8Wrt6.js → SplitShell-DjZU0qzt.js} +1 -1
- package/dist/viewer/{ThreadView-BB278JlB.js → ThreadView-9YdOYaZS.js} +1 -1
- package/dist/viewer/TooltipPopup-CZJRZOwb.js +1 -0
- package/dist/viewer/{VirtualizedEditor-uWe43zaI-CU144P8N.js → VirtualizedEditor-uWe43zaI-BrB88Dlu.js} +1 -1
- package/dist/viewer/{VirtualizedRenderer-C_d95FXi-F9BGUjW7.js → VirtualizedRenderer-C_d95FXi-3s0DYFB9.js} +1 -1
- package/dist/viewer/{WarningsBadge-8P8HTqhj.js → WarningsBadge-DrpIotPt.js} +1 -1
- package/dist/viewer/{WhiteboardLayout-CvpcOBD0.js → WhiteboardLayout-BxqvWOOl.js} +1 -1
- package/dist/viewer/{abnfDiagram-VCTEODGH-B0LKfCdw.js → abnfDiagram-VCTEODGH-Bc35SdtA.js} +1 -1
- package/dist/viewer/{ar-SA-G6X2FPQ2-B5ymZ6-7.js → ar-SA-G6X2FPQ2-DpKAPqx2.js} +1 -1
- package/dist/viewer/{architectureDiagram-5GKGNRK7-CTIIuGJC.js → architectureDiagram-5GKGNRK7-BXdkr_7B.js} +1 -1
- package/dist/viewer/{az-AZ-76LH7QW2-0e4OEoQn.js → az-AZ-76LH7QW2-BU_FX3A9.js} +1 -1
- package/dist/viewer/{bg-BG-XCXSNQG7-BK4Yfu0v.js → bg-BG-XCXSNQG7-mmCthvru.js} +1 -1
- package/dist/viewer/{blockDiagram-I7D4REHJ-BCY39CK-.js → blockDiagram-I7D4REHJ-CthtWmpx.js} +1 -1
- package/dist/viewer/{bn-BD-2XOGV67Q-DY0dhZri.js → bn-BD-2XOGV67Q-C-7hyuN5.js} +1 -1
- package/dist/viewer/{c4Diagram-7LVT6UL2-C4bAGSRF.js → c4Diagram-7LVT6UL2-AjKurpqZ.js} +1 -1
- package/dist/viewer/{ca-ES-6MX7JW3Y-DYeaKAAZ.js → ca-ES-6MX7JW3Y-DwkjxPm1.js} +1 -1
- package/dist/viewer/{channel-CMKOAKFL.js → channel-N_XGshwu.js} +149 -149
- package/dist/viewer/{chunk-4HAMMTFA-DKKrCtt5.js → chunk-4HAMMTFA-Cz1ytWvC.js} +1 -1
- package/dist/viewer/{chunk-75Z2AOVW-CxnIcYMY.js → chunk-75Z2AOVW-CISHRYJO.js} +1 -1
- package/dist/viewer/{chunk-EIO257PC-qXGHvKXr.js → chunk-EIO257PC-B7UvTySU.js} +1 -1
- package/dist/viewer/{chunk-GMAD6QVW-BbSqVE_3.js → chunk-GMAD6QVW-Dt3OZ5hF.js} +1 -1
- package/dist/viewer/{chunk-GVQU2GXP-CybTk49_.js → chunk-GVQU2GXP-C1CWLRAj.js} +1 -1
- package/dist/viewer/{chunk-IMKFNOWR-jCedT_zr.js → chunk-IMKFNOWR-Jdp7qrnE.js} +1 -1
- package/dist/viewer/{chunk-L3NEJ4N5-CdvkCIkZ.js → chunk-L3NEJ4N5-Bdf4aC2p.js} +1 -1
- package/dist/viewer/{chunk-OSK3NFVY-9vAyeFw7.js → chunk-OSK3NFVY-3EsGMoPL.js} +1 -1
- package/dist/viewer/{chunk-SHT3W25Y-DYrFyqoc.js → chunk-SHT3W25Y-BUOHurMx.js} +1 -1
- package/dist/viewer/{chunk-SVP7TREG-dMNx_CcY.js → chunk-SVP7TREG-CED6GZRt.js} +1 -1
- package/dist/viewer/{chunk-TICWLB2K-BGQtf-K3.js → chunk-TICWLB2K-Bdccqr5F.js} +1 -1
- package/dist/viewer/classDiagram-ZZMXUADV-BzkuHWSi.js +1 -0
- package/dist/viewer/classDiagram-v2-VYDZK3BY-BzkuHWSi.js +1 -0
- package/dist/viewer/{cs-CZ-2BRQDIVT-DjaDntjh.js → cs-CZ-2BRQDIVT-dNYvE-kq.js} +1 -1
- package/dist/viewer/{cynefinDiagram-5FMLGOSQ-Y54wafYF.js → cynefinDiagram-5FMLGOSQ-ZgH60Wlu.js} +1 -1
- package/dist/viewer/{da-DK-5WZEPLOC-Tqj9zEgt.js → da-DK-5WZEPLOC-CPit3wEX.js} +1 -1
- package/dist/viewer/{dagre-GXQ25YYZ-BehPXdKF.js → dagre-GXQ25YYZ-Cx8-Ku-w.js} +1 -1
- package/dist/viewer/{de-DE-XR44H4JA-B7Ys3_AN.js → de-DE-XR44H4JA-BgST5hxN.js} +1 -1
- package/dist/viewer/{diagram-S7CK7UJ4-CUPMHvHL.js → diagram-S7CK7UJ4-iah0F5hM.js} +1 -1
- package/dist/viewer/{diagram-UQ7AKVKN-Cnsotkkq.js → diagram-UQ7AKVKN-BFKg0a1r.js} +1 -1
- package/dist/viewer/{diagram-VSXAHHWV-_Gb0p4Xt.js → diagram-VSXAHHWV-cOb8lp6F.js} +1 -1
- package/dist/viewer/{diagram-VX7I27RA-6b_DdSPn.js → diagram-VX7I27RA-B9eWRveB.js} +1 -1
- package/dist/viewer/{diagram-Z3DM3KII-C3auC1O2.js → diagram-Z3DM3KII-BkYL5iCF.js} +1 -1
- package/dist/viewer/{dist-B2Pz6jKV.js → dist-7JCFiE75.js} +1 -1
- package/dist/viewer/{dist-CivKp_88.js → dist-B22SvRqe.js} +1 -1
- package/dist/viewer/{dist-Bpc6MjnN.js → dist-BAf-9lY0.js} +1 -1
- package/dist/viewer/{dist-xaJ7cT-p.js → dist-BDpeSiox.js} +1 -1
- package/dist/viewer/{dist-BNqLQbx8.js → dist-BdOAwIlj.js} +1 -1
- package/dist/viewer/{dist-C30QaZlo.js → dist-Bvxg-KAL.js} +1 -1
- package/dist/viewer/{dist-D1ltcskn.js → dist-C4FEemnI.js} +1 -1
- package/dist/viewer/{dist-CLMpMvW8.js → dist-CEQRYr8z.js} +1 -1
- package/dist/viewer/{dist-pOfDFOb4.js → dist-CIdd9Ct_.js} +1 -1
- package/dist/viewer/{dist-C54IWjMq.js → dist-CPz_Tn45.js} +1 -1
- package/dist/viewer/{dist-DmX9cG26.js → dist-CfKVG2Ej.js} +1 -1
- package/dist/viewer/{dist-D0jfqsk3.js → dist-CgFeUoj2.js} +1 -1
- package/dist/viewer/{dist-SjMB3ORD.js → dist-CgW32RMd.js} +1 -1
- package/dist/viewer/{dist-D8yTrHOe.js → dist-Cjwzo1C4.js} +1 -1
- package/dist/viewer/{dist-Dvpwh6aN.js → dist-CpNmMuMi.js} +1 -1
- package/dist/viewer/{dist-ujkFdcwL.js → dist-CvUVJeYy.js} +4 -4
- package/dist/viewer/{dist-DKC2CFz3.js → dist-D2yHk53d.js} +1 -1
- package/dist/viewer/{dist-7UQnJyoY.js → dist-DG5iRaEk.js} +1 -1
- package/dist/viewer/{dist-DYYos7aA.js → dist-DO4dZIR6.js} +1 -1
- package/dist/viewer/{dist-Q62YQ6Tz.js → dist-DT8NF295.js} +1 -1
- package/dist/viewer/{dist-DjX-jLyv.js → dist-DYPSN_M0.js} +1 -1
- package/dist/viewer/{dist-BKIoajE3.js → dist-DnCCztsa.js} +1 -1
- package/dist/viewer/{dist-CAlOKecF.js → dist-VUIHn7Nh.js} +1 -1
- package/dist/viewer/{dist-DJD7Rxl_.js → dist-u1JQCEhv.js} +1 -1
- package/dist/viewer/{ebnfDiagram-PWID7BFC-CE0BLrbg.js → ebnfDiagram-PWID7BFC-B3GyFqUI.js} +1 -1
- package/dist/viewer/{el-GR-BZB4AONW-D1iu3D-5.js → el-GR-BZB4AONW-DKbd5-qY.js} +1 -1
- package/dist/viewer/{en-B4ZKOASM-q9ZI4jM7.js → en-B4ZKOASM-BCMkizin.js} +1 -1
- package/dist/viewer/{erDiagram-RLTQ6QDP-gRel-NWS.js → erDiagram-RLTQ6QDP-Clgs0Z4Z.js} +1 -1
- package/dist/viewer/{es-ES-U4NZUMDT-C2iEjmwQ.js → es-ES-U4NZUMDT-Dba65Czl.js} +1 -1
- package/dist/viewer/{eu-ES-A7QVB2H4-BT6Rltb3.js → eu-ES-A7QVB2H4-CsjR6Siq.js} +1 -1
- package/dist/viewer/{fa-IR-HGAKTJCU-CqwuajY6.js → fa-IR-HGAKTJCU-DOoo7RWO.js} +1 -1
- package/dist/viewer/{fi-FI-Z5N7JZ37-B5eOrZnB.js → fi-FI-Z5N7JZ37-uFQf8h3n.js} +1 -1
- package/dist/viewer/flowDiagram-HODETNUW-BasE-zlm.js +1 -0
- package/dist/viewer/{fr-FR-RHASNOE6-CuAP0ov3.js → fr-FR-RHASNOE6-C77ZGKbL.js} +1 -1
- package/dist/viewer/{ganttDiagram-EL5Y4UJY-A51eLNzS.js → ganttDiagram-EL5Y4UJY-peAiSDl5.js} +1 -1
- package/dist/viewer/{gitGraphDiagram-WWUBYQGX-CpflpsWN.js → gitGraphDiagram-WWUBYQGX-DoCbQiRs.js} +1 -1
- package/dist/viewer/{gl-ES-HMX3MZ6V-DNzL8ZLj.js → gl-ES-HMX3MZ6V-CtZ1R4UJ.js} +1 -1
- package/dist/viewer/{he-IL-6SHJWFNN-BL2IqUA2.js → he-IL-6SHJWFNN-8iDk2Cj9.js} +1 -1
- package/dist/viewer/{hi-IN-IWLTKZ5I-Cc_Z6cIK.js → hi-IN-IWLTKZ5I-Dkheq-4c.js} +1 -1
- package/dist/viewer/{hu-HU-A5ZG7DT2-BpJys7hD.js → hu-HU-A5ZG7DT2-CAkdx9va.js} +1 -1
- package/dist/viewer/{id-ID-SAP4L64H-D4zLMff9.js → id-ID-SAP4L64H-AgmEmoWZ.js} +1 -1
- package/dist/viewer/{image-GAAHSSAO-BKQeWnXf.js → image-GAAHSSAO-Drde0Cu5.js} +1 -1
- package/dist/viewer/index.html +4 -4
- package/dist/viewer/index.js +2 -2
- package/dist/viewer/{infoDiagram-27XIBGKW-Cb6BEK3u.js → infoDiagram-27XIBGKW-GnjUjFHj.js} +1 -1
- package/dist/viewer/{ishikawaDiagram-5VMMS53U-wRvUis49.js → ishikawaDiagram-5VMMS53U-1MxSfjTh.js} +1 -1
- package/dist/viewer/{it-IT-JPQ66NNP-DQMNMOSZ.js → it-IT-JPQ66NNP-C3OkbwQe.js} +1 -1
- package/dist/viewer/{ja-JP-DBVTYXUO-CyTOe7Y8.js → ja-JP-DBVTYXUO-B1vxIH8D.js} +1 -1
- package/dist/viewer/{kaa-6HZHGXH3-Bid3n_YF.js → kaa-6HZHGXH3-K4DVCpsJ.js} +1 -1
- package/dist/viewer/{kab-KAB-ZGHBKWFO-BYjsuHFe.js → kab-KAB-ZGHBKWFO-BLSOrGEs.js} +1 -1
- package/dist/viewer/{kanban-definition-UXKFOSKX-DWK9G9rt.js → kanban-definition-UXKFOSKX-WS8PEvLu.js} +1 -1
- package/dist/viewer/{kk-KZ-P5N5QNE5-DP8c-ogr.js → kk-KZ-P5N5QNE5-Cy9nbuqq.js} +1 -1
- package/dist/viewer/{km-KH-HSX4SM5Z-xmnFjfoK.js → km-KH-HSX4SM5Z-Dmzrc51V.js} +1 -1
- package/dist/viewer/{ko-KR-MTYHY66A-DBXzp-hP.js → ko-KR-MTYHY66A-ZYlhHg_q.js} +1 -1
- package/dist/viewer/{ku-TR-6OUDTVRD-DjqLLQgd.js → ku-TR-6OUDTVRD-D085fxQI.js} +1 -1
- package/dist/viewer/{local-split-host-D5XeWHs2.js → local-split-host-eo64M6MH.js} +1 -1
- package/dist/viewer/{lt-LT-XHIRWOB4-CiXIbBlP.js → lt-LT-XHIRWOB4-THLmEcof.js} +1 -1
- package/dist/viewer/{lv-LV-5QDEKY6T-BBg2ICUg.js → lv-LV-5QDEKY6T-BVkHnyu-.js} +1 -1
- package/dist/viewer/{mindmap-definition-YA3MSWOX-D-RKw5yH.js → mindmap-definition-YA3MSWOX-CTOVCiY3.js} +1 -1
- package/dist/viewer/{mr-IN-CRQNXWMA-BvFZO2Ww.js → mr-IN-CRQNXWMA-BZc1Fr4Y.js} +1 -1
- package/dist/viewer/{my-MM-5M5IBNSE-B2vH-znI.js → my-MM-5M5IBNSE-DN7swKPn.js} +1 -1
- package/dist/viewer/{nb-NO-T6EIAALU-BbKLi7pg.js → nb-NO-T6EIAALU-CXrn-L5C.js} +1 -1
- package/dist/viewer/{nl-NL-IS3SIHDZ-Djj6TAo1.js → nl-NL-IS3SIHDZ-CN_y-E71.js} +1 -1
- package/dist/viewer/{nn-NO-6E72VCQL-C9FENQ04.js → nn-NO-6E72VCQL--d0l9Nub.js} +1 -1
- package/dist/viewer/{oc-FR-POXYY2M6-Bb9oRGl0.js → oc-FR-POXYY2M6-UcoZ6zgZ.js} +1 -1
- package/dist/viewer/{pa-IN-N4M65BXN-GiTIcI0J.js → pa-IN-N4M65BXN-Cxa1pvd8.js} +1 -1
- package/dist/viewer/{parseTrigger-G_dEUQ-S.js → parseTrigger-CDKivKrD.js} +1 -1
- package/dist/viewer/{pegDiagram-XKGWAZYB-DoKug0Ul.js → pegDiagram-XKGWAZYB-DllevYMi.js} +1 -1
- package/dist/viewer/percentages-BXMCSKIN-XV2ztRnw.js +1 -0
- package/dist/viewer/{pieDiagram-E7YTZNPT-cjr6q7MN.js → pieDiagram-E7YTZNPT-VZHNvIpn.js} +1 -1
- package/dist/viewer/{pl-PL-T2D74RX3-Bn1NSuWG.js → pl-PL-T2D74RX3-Gdale6hY.js} +1 -1
- package/dist/viewer/preview.html +1 -1
- package/dist/viewer/preview.js +1 -1
- package/dist/viewer/{prod-CaFKRNhp.js → prod-DO1G2WEh.js} +9 -9
- package/dist/viewer/{pt-BR-5N22H2LF-BI-zbYLr.js → pt-BR-5N22H2LF-BxE6VyHB.js} +1 -1
- package/dist/viewer/{pt-PT-UZXXM6DQ-319Tw5BW.js → pt-PT-UZXXM6DQ-CL9Y5MlX.js} +1 -1
- package/dist/viewer/{railroadDiagram-O6MQD6OU-DbEnsKie.js → railroadDiagram-O6MQD6OU-Cjb5aHlF.js} +1 -1
- package/dist/viewer/{ref-BwCMEjB3.js → ref-BCmtKUu8.js} +1 -1
- package/dist/viewer/{requirementDiagram-BXWQKSXE-D92sYU7y.js → requirementDiagram-BXWQKSXE-B_NeP8_P.js} +1 -1
- package/dist/viewer/{ro-RO-JPDTUUEW-VijYgS5D.js → ro-RO-JPDTUUEW-eUjxUc3w.js} +1 -1
- package/dist/viewer/{route-messages-CJ5JptAX.js → route-messages-pcZcPdUb.js} +1 -1
- package/dist/viewer/{ru-RU-B4JR7IUQ-HPA0KGMP.js → ru-RU-B4JR7IUQ-DCvMZJIS.js} +1 -1
- package/dist/viewer/{sequenceDiagram-WJ2MYXX4-lImr5uIr.js → sequenceDiagram-WJ2MYXX4-Cg6wzcic.js} +1 -1
- package/dist/viewer/{si-LK-N5RQ5JYF-D3xEcphZ.js → si-LK-N5RQ5JYF-CbTYgtex.js} +1 -1
- package/dist/viewer/{sk-SK-C5VTKIMK-Db8aZYTC.js → sk-SK-C5VTKIMK-FQopkhlI.js} +1 -1
- package/dist/viewer/{sl-SI-NN7IZMDC-eFJNBgsb.js → sl-SI-NN7IZMDC-D4WFci-O.js} +1 -1
- package/dist/viewer/{split-url-DL2J8T-a.js → split-url-DDv_DQdJ.js} +1 -1
- package/dist/viewer/{stateDiagram-D77RDMKH-DlBhDgXR.js → stateDiagram-D77RDMKH-DjJ1bO50.js} +1 -1
- package/dist/viewer/stateDiagram-v2-MP3YSRHH-Dmdejofr.js +1 -0
- package/dist/viewer/subset-shared.chunk-DR1g3zEi.js +1 -0
- package/dist/viewer/{subset-worker.chunk-7eRPBTIK.js → subset-worker.chunk-BvgdjbxH.js} +1 -1
- package/dist/viewer/{sv-SE-XGPEYMSR-1ooAaIdn.js → sv-SE-XGPEYMSR-D_VjGxQN.js} +1 -1
- package/dist/viewer/{swimlanes-42K2YHIH-Dk9L2F9U.js → swimlanes-42K2YHIH-QftDj785.js} +1 -1
- package/dist/viewer/swimlanesDiagram-VR7AAH4N-DbyqL88Q.js +8 -0
- package/dist/viewer/{ta-IN-2NMHFXQM-r-PlEE_o.js → ta-IN-2NMHFXQM-CbIk9sKC.js} +1 -1
- package/dist/viewer/{th-TH-HPSO5L25-DCSuXNKm.js → th-TH-HPSO5L25-C2GDyix8.js} +1 -1
- package/dist/viewer/{timeline-definition-24CTP7MA-CuLHXBb9.js → timeline-definition-24CTP7MA-CY9vFTWf.js} +1 -1
- package/dist/viewer/{tr-TR-DEFEU3FU-DmRbSHuX.js → tr-TR-DEFEU3FU-DQ_4wb7D.js} +1 -1
- package/dist/viewer/{uk-UA-QMV73CPH-CcDh2WkS.js → uk-UA-QMV73CPH-BhV6yPhs.js} +1 -1
- package/dist/viewer/{useAriaLabelledBy-Cu8JrnAw.js → useAriaLabelledBy-fHDdTRK0.js} +1 -1
- package/dist/viewer/useOpenInteractionType-BK_FRxTI.js +1 -0
- package/dist/viewer/useTypeFavicon-BX7a9gHJ.js +1 -0
- package/dist/viewer/{vennDiagram-4TSXK5OY-Dm5qhhY3.js → vennDiagram-4TSXK5OY-DTS-F2mG.js} +1 -1
- package/dist/viewer/{vi-VN-M7AON7JQ-DWAX0NEb.js → vi-VN-M7AON7JQ-Bj22Jpmu.js} +1 -1
- package/dist/viewer/{viewport-CFJHn_Y6-B-kdQ7xr.js → viewport-CFJHn_Y6-DoDATgb9.js} +1 -1
- package/dist/viewer/{wardleyDiagram-VM6X3IG4-DTCi6DmX.js → wardleyDiagram-VM6X3IG4-BGSn8C9A.js} +1 -1
- package/dist/viewer/{xychartDiagram-S5SC5T6Z-DxA0cQ3A.js → xychartDiagram-S5SC5T6Z-xLCsGqTC.js} +1 -1
- package/dist/viewer/{zh-CN-LNUGB5OW-C0GKmW1G.js → zh-CN-LNUGB5OW-C7oz2qIW.js} +1 -1
- package/dist/viewer/{zh-HK-E62DVLB3-CnrjNkY6.js → zh-HK-E62DVLB3-BJDaInsT.js} +1 -1
- package/dist/viewer/{zh-TW-RAJ6MFWO-CzT4lffH.js → zh-TW-RAJ6MFWO-BNVa6Qkx.js} +1 -1
- package/dist/viewer-lib/{Canvas-Czt9ltgM.js → Canvas-BYynUnDw.js} +1 -1
- package/dist/viewer-lib/{PhoneArtboardBar-KVFmaCba.js → PhoneArtboardBar-CLfao6kr.js} +1 -1
- package/dist/viewer-lib/{PreviewView-BWt3dX8d.js → PreviewView-CSw_F2_D.js} +1 -1
- package/dist/viewer-lib/{ReadOnlyWhiteboard-DkN-iQ5e.js → ReadOnlyWhiteboard-mIG3KcnM.js} +1 -1
- package/dist/viewer-lib/{SnapshotDocument-CbuCIqIZ.js → SnapshotDocument-DgvoMt60.js} +43 -35
- package/dist/viewer-lib/{VirtualizedEditor-uWe43zaI-XBNVQjy2.js → VirtualizedEditor-uWe43zaI-FwG433XJ.js} +2 -2
- package/dist/viewer-lib/{VirtualizedRenderer-C_d95FXi-8iSF4rXx.js → VirtualizedRenderer-C_d95FXi-MJi54PZt.js} +3 -3
- package/dist/viewer-lib/core.js +1 -1
- package/dist/viewer-lib/{dist-Csam7y04.js → dist-B4pJnLZf.js} +1 -1
- package/dist/viewer-lib/{dist-zUHol6rl.js → dist-BE-dZoek.js} +2 -2
- package/dist/viewer-lib/{dist-jwZIUB0I.js → dist-BL5CFTvj.js} +4 -4
- package/dist/viewer-lib/{dist-DVGe9QEo.js → dist-BnoMOjLj.js} +3 -3
- package/dist/viewer-lib/{dist-DQDlkYqz.js → dist-BsrD-y9h.js} +3 -3
- package/dist/viewer-lib/{dist-80gN5MDf.js → dist-C2lCObag.js} +3 -3
- package/dist/viewer-lib/{dist-D01J0hzJ.js → dist-CECBnb7n.js} +2 -2
- package/dist/viewer-lib/{dist-C05yE_u3.js → dist-CnlV8nO0.js} +3 -3
- package/dist/viewer-lib/{dist-TYFSuN0R.js → dist-CoLudW7r.js} +3 -3
- package/dist/viewer-lib/{dist-CLixy726.js → dist-Cyom2LY9.js} +4 -4
- package/dist/viewer-lib/{dist-Dug8w68g.js → dist-D1GOMPbd.js} +4 -4
- package/dist/viewer-lib/{dist-DczdJ0Ss.js → dist-D9dZ-mn3.js} +3 -3
- package/dist/viewer-lib/{dist-Cl-thFU5.js → dist-DBowVBGn.js} +3 -3
- package/dist/viewer-lib/{dist-B8C9-q9r.js → dist-DCjJphk5.js} +2 -2
- package/dist/viewer-lib/{dist-lWjeTWd-.js → dist-DIg-JAYd.js} +2 -2
- package/dist/viewer-lib/{dist-CXXXkgsH.js → dist-DKunk6l6.js} +1 -1
- package/dist/viewer-lib/{dist-V1Zz1gd6.js → dist-DUJwwi8d.js} +3 -3
- package/dist/viewer-lib/{dist-B1eQ7mh1.js → dist-DdKqqpsH.js} +2 -2
- package/dist/viewer-lib/{dist-DHj3-Pp5.js → dist-DeSsn41-.js} +2 -2
- package/dist/viewer-lib/{dist-CG3jaold.js → dist-a_keh4GI.js} +2 -2
- package/dist/viewer-lib/{dist-BAFLptZH.js → dist-dVPJOpRx.js} +3 -3
- package/dist/viewer-lib/{dist-BGKw9XQy.js → dist-ecmDeQtW.js} +2 -2
- package/dist/viewer-lib/{dist-D33Sd5z1.js → dist-o8reI3_C.js} +3 -3
- package/dist/viewer-lib/document.js +803 -773
- package/dist/viewer-lib/index.js +5 -5
- package/dist/viewer-lib/{plugin-_bGVeqI0-BuoZIQw-.js → plugin-_bGVeqI0-mNQAAi1o.js} +1 -1
- package/dist/viewer-lib/types/src/viewer/document/crossfade.d.ts +3 -0
- package/dist/viewer-lib/{viewport-CFJHn_Y6-C1O9ia_N.js → viewport-CFJHn_Y6-CqN5AlP3.js} +1 -1
- package/package.json +1 -1
- package/dist/viewer/ArtboardLayout-eR_sC6MB.js +0 -12
- package/dist/viewer/CompositeItem-DA-WyEr7.js +0 -1
- package/dist/viewer/DocumentPage-Dw7m0Oxi.js +0 -4
- package/dist/viewer/MenuSubmenuTrigger-B_Ya87it.js +0 -1
- package/dist/viewer/MenuTrigger-C421vH74.js +0 -1
- package/dist/viewer/Popover-C23mZ93A.js +0 -1
- package/dist/viewer/Select-BCfJ7Dw_.js +0 -1
- package/dist/viewer/SelectScrollUpArrow-CTtHJLxk.js +0 -1
- package/dist/viewer/SettingsDialog-DXraxvYr.js +0 -1
- package/dist/viewer/TooltipPopup-CfrIPB9r.js +0 -1
- package/dist/viewer/classDiagram-ZZMXUADV-I3gtgBTd.js +0 -1
- package/dist/viewer/classDiagram-v2-VYDZK3BY-I3gtgBTd.js +0 -1
- package/dist/viewer/flowDiagram-HODETNUW-yZn6O744.js +0 -1
- package/dist/viewer/percentages-BXMCSKIN-D095tJfv.js +0 -1
- package/dist/viewer/stateDiagram-v2-MP3YSRHH-Byaeiehp.js +0 -1
- package/dist/viewer/subset-shared.chunk-BNAGyqG3.js +0 -1
- package/dist/viewer/swimlanesDiagram-VR7AAH4N-DNI8atPj.js +0 -8
- package/dist/viewer/useOpenInteractionType-LXvb6AtX.js +0 -1
- package/dist/viewer/useTypeFavicon-DIU-6w2G.js +0 -1
|
@@ -1,41 +1,42 @@
|
|
|
1
1
|
import './stylex-DSPr67HN.css';
|
|
2
2
|
import './document-Dvtvl0mY.css';
|
|
3
|
-
import {
|
|
4
|
-
import { c as
|
|
5
|
-
import { c as
|
|
6
|
-
import { a as
|
|
7
|
-
import { $t as
|
|
8
|
-
import { n as
|
|
9
|
-
import { Fragment as
|
|
3
|
+
import { At as e, En as t, Gt as n, It as r, Lt as i, Rt as a, Sn as o, Vt as s, b as c, d as l, f as u, g as d, jt as f, kt as p, mn as m, nn as h, on as g, qt as _, rn as v, sn as y, tn as b, wn as x, xn as S, y as C, zt as w } from "./route-messages-YkEDJrGo.js";
|
|
4
|
+
import { c as T, l as E, o as D, p as O, s as k, t as ee } from "./RyugiLoader-CxyL1n9v.js";
|
|
5
|
+
import { c as A, d as te, l as ne, n as j, o as re, s as ie, t as ae, u as oe } from "./WarningsBadge-SVKLlXSz.js";
|
|
6
|
+
import { a as se, i as ce } from "./agentLook-D56IP3D7.js";
|
|
7
|
+
import { $t as le, An as ue, At as M, Bt as N, Cn as P, Ct as de, Fn as fe, Gt as pe, Ht as me, In as he, Jt as ge, Kt as _e, Ln as ve, Lt as ye, Mn as be, Nn as xe, On as F, Ot as I, Pn as Se, Qt as Ce, Rt as we, Sn as Te, St as Ee, Tt as De, Ut as Oe, Vt as ke, Wt as Ae, Xt as je, Yt as L, Zt as Me, _ as Ne, _t as Pe, a as Fe, bt as Ie, c as Le, cn as Re, d as ze, dt as Be, en as Ve, f as He, fn as R, ft as Ue, g as We, gt as z, h as Ge, ht as Ke, i as qe, in as B, jn as Je, kn as Ye, l as Xe, m as Ze, mn as Qe, mt as $e, nn as et, o as tt, p as nt, pt as rt, qt as it, r as at, rn as ot, s as st, t as ct, tn as lt, u as ut, un as dt, ut as ft, vt as pt, wt as mt, xt as ht, yt as gt, zt as _t } from "./SnapshotDocument-DgvoMt60.js";
|
|
8
|
+
import { n as vt } from "./plugin-_bGVeqI0-mNQAAi1o.js";
|
|
9
|
+
import { Fragment as yt, cloneElement as bt, createContext as xt, createElement as St, isValidElement as Ct, useCallback as V, useContext as wt, useEffect as H, useLayoutEffect as Tt, useMemo as U, useRef as W, useState as G, useSyncExternalStore as Et } from "react";
|
|
10
10
|
import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
11
|
-
import { ArrowDown as
|
|
11
|
+
import { ArrowDown as Dt, ChevronDown as Ot, ChevronRight as kt, ChevronUp as At, CircleAlert as jt, LayoutDashboard as Mt, Link as Nt, Lock as Pt, MessageSquare as Ft, PanelRightOpen as It, PenLine as Lt, RotateCw as Rt, X as zt } from "lucide-react";
|
|
12
|
+
import { flushSync as Bt } from "react-dom";
|
|
12
13
|
// src/viewer/hooks/useEmbedPainted.ts
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
let t =
|
|
14
|
+
var Vt = xt(() => {});
|
|
15
|
+
function Ht(e) {
|
|
16
|
+
let t = wt(Vt);
|
|
16
17
|
H(() => {
|
|
17
18
|
if (!e) return;
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
t(),
|
|
19
|
+
let n = 0, i = requestAnimationFrame(() => {
|
|
20
|
+
n = requestAnimationFrame(() => {
|
|
21
|
+
t(), r() && s({ kind: "painted" });
|
|
21
22
|
});
|
|
22
23
|
});
|
|
23
24
|
return () => {
|
|
24
|
-
cancelAnimationFrame(i), cancelAnimationFrame(
|
|
25
|
+
cancelAnimationFrame(i), cancelAnimationFrame(n);
|
|
25
26
|
};
|
|
26
27
|
}, [e, t]);
|
|
27
28
|
}
|
|
28
29
|
// src/viewer/split/useSplitHeader.ts
|
|
29
|
-
function
|
|
30
|
-
let n = U(() =>
|
|
31
|
-
|
|
32
|
-
if (n) return
|
|
33
|
-
e.kind === "chrome" &&
|
|
30
|
+
function Ut(e, t) {
|
|
31
|
+
let n = U(() => a(), []), [r, i] = G(!1), o = W(t);
|
|
32
|
+
o.current = t, H(() => {
|
|
33
|
+
if (n) return w((e) => {
|
|
34
|
+
e.kind === "chrome" && i(e.hosted), e.kind === "history" && o.current(e.action);
|
|
34
35
|
});
|
|
35
36
|
}, [n]);
|
|
36
37
|
let { activity: c, comments: l, history: u, historyOpen: d } = e;
|
|
37
38
|
return H(() => {
|
|
38
|
-
n &&
|
|
39
|
+
n && s({
|
|
39
40
|
kind: "header",
|
|
40
41
|
activity: c,
|
|
41
42
|
comments: l,
|
|
@@ -51,37 +52,61 @@ function zt(e, t) {
|
|
|
51
52
|
]), n && r;
|
|
52
53
|
}
|
|
53
54
|
// src/viewer/document/agentActivity.ts
|
|
54
|
-
function
|
|
55
|
+
function Wt({ editing: e, pending: t, agentActiveAt: n, now: r }) {
|
|
55
56
|
return e ? { kind: "editing" } : t === 0 ? { kind: "idle" } : {
|
|
56
57
|
kind: "working",
|
|
57
58
|
pending: t,
|
|
58
59
|
idleMs: n === void 0 ? null : Math.max(0, r - n)
|
|
59
60
|
};
|
|
60
61
|
}
|
|
61
|
-
function
|
|
62
|
-
return e < 6e4 ?
|
|
62
|
+
function Gt(e) {
|
|
63
|
+
return e < 6e4 ? D.t("time.seconds", { count: Math.floor(e / 1e3) }) : e < 36e5 ? D.t("time.minutes", { count: Math.floor(e / 6e4) }) : D.t("time.hours", { count: Math.floor(e / 36e5) });
|
|
63
64
|
}
|
|
64
|
-
function
|
|
65
|
+
function Kt(e, t, n) {
|
|
65
66
|
switch (e.kind) {
|
|
66
|
-
case "editing": return n ?
|
|
67
|
+
case "editing": return n ? D.t("activity.editingSection", {
|
|
67
68
|
agent: t,
|
|
68
69
|
section: n
|
|
69
|
-
}) :
|
|
70
|
+
}) : D.t("activity.editing", { agent: t });
|
|
70
71
|
case "idle": return null;
|
|
71
72
|
case "working": {
|
|
72
|
-
let n =
|
|
73
|
+
let n = D.t("activity.pending", {
|
|
73
74
|
agent: t,
|
|
74
75
|
count: e.pending
|
|
75
76
|
});
|
|
76
|
-
return e.idleMs === null ? n : e.idleMs < 1e4 ?
|
|
77
|
+
return e.idleMs === null ? n : e.idleMs < 1e4 ? D.t("activity.updatedJustNow", { left: n }) : D.t("activity.updatedAgo", {
|
|
77
78
|
left: n,
|
|
78
|
-
duration:
|
|
79
|
+
duration: Gt(e.idleMs)
|
|
79
80
|
});
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
83
|
}
|
|
84
|
+
// src/viewer/document/crossfade.ts
|
|
85
|
+
var qt = 600, Jt = (e) => Promise.race([e, new Promise((e) => setTimeout(e, qt))]);
|
|
86
|
+
function Yt(e, t) {
|
|
87
|
+
if (typeof document.startViewTransition != "function" || c()) {
|
|
88
|
+
e();
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
let n = document.startViewTransition(async () => {
|
|
92
|
+
Bt(e), await Jt(t);
|
|
93
|
+
});
|
|
94
|
+
n.ready.catch(() => {}), n.finished.catch(() => {});
|
|
95
|
+
}
|
|
96
|
+
function Xt(e) {
|
|
97
|
+
let t = W(null);
|
|
98
|
+
return H(() => {
|
|
99
|
+
if (!e) return;
|
|
100
|
+
let n = () => {
|
|
101
|
+
t.current && e.getRootElement()?.childElementCount && (t.current(), t.current = null);
|
|
102
|
+
};
|
|
103
|
+
return n(), e.registerUpdateListener(n);
|
|
104
|
+
}, [e]), V(() => new Promise((e) => {
|
|
105
|
+
t.current = e;
|
|
106
|
+
}), []);
|
|
107
|
+
}
|
|
83
108
|
// src/viewer/document/DraftPanel.tsx
|
|
84
|
-
function
|
|
109
|
+
function Zt({ left: e, top: t, quote: r, wholeBlock: i, initial: a, restored: o, leaving: s, onChange: c, onSubmit: l, onCancel: u, ref: d }) {
|
|
85
110
|
return /* @__PURE__ */ q("div", {
|
|
86
111
|
ref: d,
|
|
87
112
|
...{
|
|
@@ -90,9 +115,9 @@ function Ut({ left: e, top: n, quote: r, wholeBlock: i, initial: a, restored: o,
|
|
|
90
115
|
}[!!s | 0],
|
|
91
116
|
style: {
|
|
92
117
|
left: e,
|
|
93
|
-
top:
|
|
118
|
+
top: t
|
|
94
119
|
},
|
|
95
|
-
children: /* @__PURE__ */ J(
|
|
120
|
+
children: /* @__PURE__ */ J(ht, {
|
|
96
121
|
active: !0,
|
|
97
122
|
children: [/* @__PURE__ */ J("div", {
|
|
98
123
|
className: "x78zum5 x1pha0wt x167g77z xz9dl7a x1hr3lfm xqfszdh x1j6dyjg",
|
|
@@ -101,12 +126,12 @@ function Ut({ left: e, top: n, quote: r, wholeBlock: i, initial: a, restored: o,
|
|
|
101
126
|
children: i ? r : `“${r}”`
|
|
102
127
|
}), o ? /* @__PURE__ */ q("span", {
|
|
103
128
|
className: "x2lah0s x7zghnd",
|
|
104
|
-
children:
|
|
129
|
+
children: k("document.draftRestored")
|
|
105
130
|
}) : null]
|
|
106
|
-
}), /* @__PURE__ */ q(
|
|
131
|
+
}), /* @__PURE__ */ q(n, {
|
|
107
132
|
autoFocus: !0,
|
|
108
133
|
initial: a,
|
|
109
|
-
placeholder:
|
|
134
|
+
placeholder: k("document.draftPlaceholder"),
|
|
110
135
|
onCancel: u,
|
|
111
136
|
onChange: c,
|
|
112
137
|
onSubmit: l
|
|
@@ -115,8 +140,8 @@ function Ut({ left: e, top: n, quote: r, wholeBlock: i, initial: a, restored: o,
|
|
|
115
140
|
});
|
|
116
141
|
}
|
|
117
142
|
// src/viewer/document/drafts.ts
|
|
118
|
-
var
|
|
119
|
-
function
|
|
143
|
+
var Qt = (e, t, n, r) => `${JSON.stringify([n ?? [e], r ?? null])}\n${t}`;
|
|
144
|
+
function $t() {
|
|
120
145
|
let e = /* @__PURE__ */ new Map();
|
|
121
146
|
return {
|
|
122
147
|
save(t, n) {
|
|
@@ -128,18 +153,18 @@ function Gt() {
|
|
|
128
153
|
};
|
|
129
154
|
}
|
|
130
155
|
// src/viewer/document/useDraftComment.ts
|
|
131
|
-
function
|
|
132
|
-
let t = U(
|
|
133
|
-
|
|
156
|
+
function en(e) {
|
|
157
|
+
let t = U($t, []), [n, r] = G(null), [i, a] = G(!1), o = W(""), s = W(0), c = W(null), l = W(null);
|
|
158
|
+
mt(i ? null : n?.target.range ?? null, i ? void 0 : n?.target.elements);
|
|
134
159
|
let u = V((n) => {
|
|
135
160
|
window.clearTimeout(s.current);
|
|
136
|
-
let i = t.take(
|
|
161
|
+
let i = t.take(Qt(n.blockId, n.quote, n.blockIds, n.textRanges));
|
|
137
162
|
o.current = i, a(!1), r({
|
|
138
163
|
target: n,
|
|
139
164
|
initial: i
|
|
140
165
|
}), window.getSelection()?.removeAllRanges(), e();
|
|
141
166
|
}, [t, e]), d = V((e) => {
|
|
142
|
-
n && (t.save(
|
|
167
|
+
n && (t.save(Qt(n.target.blockId, n.target.quote, n.target.blockIds, n.target.textRanges), e ? o.current : ""), a(!0), s.current = window.setTimeout(() => {
|
|
143
168
|
r(null), a(!1);
|
|
144
169
|
}, 120));
|
|
145
170
|
}, [n, t]);
|
|
@@ -168,16 +193,16 @@ function Kt(e) {
|
|
|
168
193
|
};
|
|
169
194
|
}
|
|
170
195
|
// src/viewer/document/DesktopDocument.tsx
|
|
171
|
-
function
|
|
196
|
+
function tn(e) {
|
|
172
197
|
return {
|
|
173
198
|
left: e.offsetLeft,
|
|
174
199
|
right: Math.min(e.offsetLeft + e.offsetWidth, window.innerWidth - 16)
|
|
175
200
|
};
|
|
176
201
|
}
|
|
177
|
-
function
|
|
178
|
-
let p =
|
|
202
|
+
function nn({ editor: e, threads: t, actions: n, agent: r, canComment: i, selection: a, clearSelection: o, resolveSelection: s, onCreate: c, onMain: l, history: u, shareBase: d, children: f }) {
|
|
203
|
+
let p = en(o), { draft: m, open: h } = p, [g, _] = G(null), v = U(() => ({
|
|
179
204
|
toolbarSlot: g,
|
|
180
|
-
selectionActions: m ? null : /* @__PURE__ */ q(
|
|
205
|
+
selectionActions: m ? null : /* @__PURE__ */ q(Pe, {
|
|
181
206
|
onComment: i ? () => {
|
|
182
207
|
let e = s();
|
|
183
208
|
e && h(e);
|
|
@@ -198,7 +223,7 @@ function Jt({ editor: e, threads: t, actions: n, agent: r, canComment: i, select
|
|
|
198
223
|
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q("div", {
|
|
199
224
|
className: "ryugi-editor-toolbar-slot",
|
|
200
225
|
ref: _
|
|
201
|
-
}), /* @__PURE__ */ q(
|
|
226
|
+
}), /* @__PURE__ */ q(pt, {
|
|
202
227
|
actions: n,
|
|
203
228
|
agent: r,
|
|
204
229
|
editor: e,
|
|
@@ -210,51 +235,51 @@ function Jt({ editor: e, threads: t, actions: n, agent: r, canComment: i, select
|
|
|
210
235
|
top: a.top,
|
|
211
236
|
left: Math.min(a.right + 8, window.innerWidth - (e.offsetParent?.getBoundingClientRect().left ?? 0) - 40),
|
|
212
237
|
onComment: () => p.open(a)
|
|
213
|
-
}) : null, m ? /* @__PURE__ */ q(
|
|
238
|
+
}) : null, m ? /* @__PURE__ */ q(Zt, {
|
|
214
239
|
ref: p.panelRef,
|
|
215
|
-
...
|
|
240
|
+
...we(m.target, tn(e), 340, 8),
|
|
216
241
|
initial: m.initial,
|
|
217
242
|
leaving: p.leaving,
|
|
218
|
-
quote:
|
|
243
|
+
quote: N(m.target),
|
|
219
244
|
restored: p.restored,
|
|
220
245
|
wholeBlock: m.target.kind === "block",
|
|
221
246
|
onCancel: () => p.close(!0),
|
|
222
247
|
onChange: p.onText,
|
|
223
248
|
onSubmit: (e) => c(m.target, e).then((e) => (e && p.close(!1), e))
|
|
224
|
-
},
|
|
249
|
+
}, Qt(m.target.blockId, m.target.quote, m.target.blockIds, m.target.textRanges)) : null] }),
|
|
225
250
|
onMain: l,
|
|
226
|
-
children: /* @__PURE__ */ q(
|
|
251
|
+
children: /* @__PURE__ */ q(_t, {
|
|
227
252
|
value: v,
|
|
228
253
|
children: f
|
|
229
254
|
})
|
|
230
255
|
})] });
|
|
231
256
|
}
|
|
232
257
|
// src/viewer/document/AskBar.tsx
|
|
233
|
-
function
|
|
234
|
-
let { t: l } =
|
|
258
|
+
function rn({ views: e, canAct: t, canWithdraw: n, listening: r, agent: i, bottom: a, onSubmit: o, onWithdraw: s, onJump: c }) {
|
|
259
|
+
let { t: l } = T(), u = a === void 0 ? void 0 : { bottom: a };
|
|
235
260
|
if (!t) return null;
|
|
236
261
|
let d = e.filter((e) => e.state === "draft");
|
|
237
262
|
if (d.length) {
|
|
238
263
|
let e = d.filter((e) => e.changed).length, t = d.filter((e) => e.choice === null && e.text === null);
|
|
239
|
-
return /* @__PURE__ */ J(
|
|
264
|
+
return /* @__PURE__ */ J(re, {
|
|
240
265
|
"data-ask-bar": !0,
|
|
241
266
|
"data-chrome": "ask-bar",
|
|
242
267
|
position: "fixed",
|
|
243
268
|
style: u,
|
|
244
269
|
children: [
|
|
245
|
-
/* @__PURE__ */ q(
|
|
246
|
-
e > 0 && /* @__PURE__ */ q(
|
|
270
|
+
/* @__PURE__ */ q(ne, { children: l("asks.questions", { count: d.length }) }),
|
|
271
|
+
e > 0 && /* @__PURE__ */ q(ne, {
|
|
247
272
|
tone: "changed",
|
|
248
273
|
children: l("asks.changedCount", { count: e })
|
|
249
274
|
}),
|
|
250
|
-
t.length > 0 && /* @__PURE__ */ J(
|
|
275
|
+
t.length > 0 && /* @__PURE__ */ J(ie, {
|
|
251
276
|
"data-ask-jump": !0,
|
|
252
277
|
variant: "link",
|
|
253
278
|
onClick: () => c(t[0].id),
|
|
254
|
-
children: [l("asks.pendingCount", { count: t.length }), /* @__PURE__ */ q(
|
|
279
|
+
children: [l("asks.pendingCount", { count: t.length }), /* @__PURE__ */ q(Dt, { size: 12 })]
|
|
255
280
|
}),
|
|
256
|
-
/* @__PURE__ */ q(
|
|
257
|
-
/* @__PURE__ */ q(
|
|
281
|
+
/* @__PURE__ */ q(A, {}),
|
|
282
|
+
/* @__PURE__ */ q(ie, {
|
|
258
283
|
"data-ask-submit": !0,
|
|
259
284
|
variant: "primary",
|
|
260
285
|
onClick: o,
|
|
@@ -263,15 +288,15 @@ function Yt({ views: e, canAct: t, canWithdraw: n, listening: r, agent: i, botto
|
|
|
263
288
|
]
|
|
264
289
|
});
|
|
265
290
|
}
|
|
266
|
-
return e.some((e) => e.state === "submitted") ? /* @__PURE__ */ J(
|
|
291
|
+
return e.some((e) => e.state === "submitted") ? /* @__PURE__ */ J(re, {
|
|
267
292
|
"data-ask-bar": !0,
|
|
268
293
|
"data-chrome": "ask-bar",
|
|
269
294
|
position: "fixed",
|
|
270
295
|
style: u,
|
|
271
|
-
children: [/* @__PURE__ */ q(
|
|
296
|
+
children: [/* @__PURE__ */ q(ne, {
|
|
272
297
|
tone: "muted",
|
|
273
298
|
children: r ? l("asks.waiting", { agent: i }) : l("asks.sayDone")
|
|
274
|
-
}), n && /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(
|
|
299
|
+
}), n && /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(A, {}), /* @__PURE__ */ q(ie, {
|
|
275
300
|
"data-ask-withdraw": !0,
|
|
276
301
|
variant: "quiet",
|
|
277
302
|
onClick: s,
|
|
@@ -280,7 +305,7 @@ function Yt({ views: e, canAct: t, canWithdraw: n, listening: r, agent: i, botto
|
|
|
280
305
|
}) : null;
|
|
281
306
|
}
|
|
282
307
|
// src/viewer/document/PhoneThread.tsx
|
|
283
|
-
var
|
|
308
|
+
var an = {
|
|
284
309
|
state: {
|
|
285
310
|
kmuXW: "x2lah0s",
|
|
286
311
|
kGuDYH: "xfifm61",
|
|
@@ -298,20 +323,20 @@ var Xt = {
|
|
|
298
323
|
kMwMTN: "xddlp02",
|
|
299
324
|
$$css: !0
|
|
300
325
|
}
|
|
301
|
-
},
|
|
326
|
+
}, on = (e) => new Date(e).toLocaleTimeString([], {
|
|
302
327
|
hour: "2-digit",
|
|
303
328
|
minute: "2-digit"
|
|
304
329
|
});
|
|
305
|
-
function
|
|
306
|
-
let o =
|
|
307
|
-
label:
|
|
308
|
-
tone:
|
|
330
|
+
function sn({ thread: e, agent: t = "Agent", actions: r, active: i = !1, offline: a = !1 }) {
|
|
331
|
+
let o = S(e), s = e.status === "resolved", c = s ? {
|
|
332
|
+
label: k("common.resolved"),
|
|
333
|
+
tone: an.resolved
|
|
309
334
|
} : o === "agent" ? {
|
|
310
|
-
label:
|
|
311
|
-
tone:
|
|
335
|
+
label: k("document.waitingAgentReply", { agent: t }),
|
|
336
|
+
tone: an.waitingAgent
|
|
312
337
|
} : o === "human" ? {
|
|
313
|
-
label:
|
|
314
|
-
tone:
|
|
338
|
+
label: k("document.agentReplied", { agent: t }),
|
|
339
|
+
tone: an.answered
|
|
315
340
|
} : null;
|
|
316
341
|
return /* @__PURE__ */ J("div", {
|
|
317
342
|
"data-thread": e.id,
|
|
@@ -324,20 +349,20 @@ function Qt({ thread: e, agent: n = "Agent", actions: r, active: i = !1, offline
|
|
|
324
349
|
className: "x78zum5 x1pha0wt x167g77z x1lqa7cf x1vo0akb x19ypqd9 x1o5kxid x4z9k3i",
|
|
325
350
|
children: [/* @__PURE__ */ q("span", {
|
|
326
351
|
className: "x98rzlu xeuugli xb3r6kr xuxw1ft xlyipyv x1bo0w0s",
|
|
327
|
-
children:
|
|
352
|
+
children: N(e.anchor)
|
|
328
353
|
}), c ? /* @__PURE__ */ q("span", {
|
|
329
|
-
...
|
|
354
|
+
...E(an.state, c.tone),
|
|
330
355
|
children: c.label
|
|
331
356
|
}) : null]
|
|
332
357
|
}),
|
|
333
358
|
s && !i ? null : e.messages.map((e) => {
|
|
334
|
-
let { label: t, initial: n } =
|
|
359
|
+
let { label: t, initial: n } = ce(e);
|
|
335
360
|
return /* @__PURE__ */ J("div", {
|
|
336
361
|
className: "x14vqqas",
|
|
337
362
|
children: [/* @__PURE__ */ J("div", {
|
|
338
363
|
className: "x78zum5 x6s0dn4 x167g77z x4z9k3i x1s688f",
|
|
339
364
|
children: [
|
|
340
|
-
/* @__PURE__ */ q(
|
|
365
|
+
/* @__PURE__ */ q(_, {
|
|
341
366
|
human: e.author === "human",
|
|
342
367
|
initial: n,
|
|
343
368
|
name: e.name,
|
|
@@ -346,7 +371,7 @@ function Qt({ thread: e, agent: n = "Agent", actions: r, active: i = !1, offline
|
|
|
346
371
|
t,
|
|
347
372
|
/* @__PURE__ */ q("span", {
|
|
348
373
|
className: "xddlp02 xo1l8bm xfifm61",
|
|
349
|
-
children:
|
|
374
|
+
children: on(e.editedAt ?? e.at)
|
|
350
375
|
})
|
|
351
376
|
]
|
|
352
377
|
}), /* @__PURE__ */ q("div", {
|
|
@@ -354,7 +379,7 @@ function Qt({ thread: e, agent: n = "Agent", actions: r, active: i = !1, offline
|
|
|
354
379
|
0: { className: "x1gslohp xxpkpgd x1jvydc1 x1dbl2gt x126k92a xj0a0fe" },
|
|
355
380
|
1: { className: "x1gslohp xxpkpgd x1jvydc1 x1dbl2gt x126k92a xj0a0fe xc7n51q" }
|
|
356
381
|
}[!!e.deleted | 0],
|
|
357
|
-
children: e.deleted ?
|
|
382
|
+
children: e.deleted ? k("common.deleted") : e.text
|
|
358
383
|
})]
|
|
359
384
|
}, e.id);
|
|
360
385
|
}),
|
|
@@ -362,51 +387,51 @@ function Qt({ thread: e, agent: n = "Agent", actions: r, active: i = !1, offline
|
|
|
362
387
|
className: "x78zum5 x6s0dn4 xou54vl x1anpbxc xxpkpgd",
|
|
363
388
|
children: [s ? null : /* @__PURE__ */ q("div", {
|
|
364
389
|
className: "x98rzlu xeuugli x1qyh8g1 xso031l x1q0q8m5 x1iz93xd",
|
|
365
|
-
children: /* @__PURE__ */ q(
|
|
366
|
-
placeholder:
|
|
390
|
+
children: /* @__PURE__ */ q(n, {
|
|
391
|
+
placeholder: k("common.reply"),
|
|
367
392
|
onSubmit: (t) => r.reply(e.id, t)
|
|
368
393
|
})
|
|
369
394
|
}), a ? null : /* @__PURE__ */ q("button", {
|
|
370
395
|
type: "button",
|
|
371
396
|
onClick: () => s ? r.reopen(e.id) : r.resolve(e.id),
|
|
372
397
|
className: "x2lah0s x1gg8mnh xt970qd xdqyycr x1w5wx5t xc342km xjbqb8w x1bo0w0s xqfszdh x4z9k3i x1ypdohk",
|
|
373
|
-
children:
|
|
398
|
+
children: k(s ? "common.reopen" : "common.resolve")
|
|
374
399
|
})]
|
|
375
400
|
}) : null
|
|
376
401
|
]
|
|
377
402
|
});
|
|
378
403
|
}
|
|
379
|
-
var
|
|
380
|
-
function
|
|
381
|
-
let p = W(null), m = e.filter((e) => !e.messages.every((e) => e.deleted)), h = m.filter((e) =>
|
|
404
|
+
var cn = .5, ln = (e) => e === 78 ? cn : e;
|
|
405
|
+
function un({ threads: e, agent: t = "Agent", actions: r, offline: i, draft: a, onCreate: o, onCancelDraft: s, activeId: c, snap: u, onSnap: f }) {
|
|
406
|
+
let p = W(null), m = e.filter((e) => !e.messages.every((e) => e.deleted)), h = m.filter((e) => S(e) === "agent").length, g = i ? k("document.offlineNoComments") : h > 0 ? k("document.waitingCount", {
|
|
382
407
|
count: h,
|
|
383
|
-
agent:
|
|
408
|
+
agent: t
|
|
384
409
|
}) : null;
|
|
385
410
|
return H(() => {
|
|
386
|
-
let e =
|
|
411
|
+
let e = c ? p.current?.querySelector(`[data-thread="${CSS.escape(c)}"]`) : null, t = e?.closest("[data-sheet-body]");
|
|
387
412
|
e && t && (t.scrollTo({
|
|
388
413
|
top: t.scrollTop + e.getBoundingClientRect().top - t.getBoundingClientRect().top - 8,
|
|
389
414
|
behavior: "smooth"
|
|
390
|
-
}),
|
|
415
|
+
}), C(e, [{ backgroundColor: se.warningChip }, { backgroundColor: "transparent" }], {
|
|
391
416
|
duration: 600,
|
|
392
417
|
delay: 250,
|
|
393
|
-
easing:
|
|
418
|
+
easing: d
|
|
394
419
|
}));
|
|
395
|
-
}, [
|
|
396
|
-
snap:
|
|
420
|
+
}, [c]), /* @__PURE__ */ q(l, {
|
|
421
|
+
snap: u,
|
|
397
422
|
snaps: [
|
|
398
423
|
78,
|
|
399
|
-
|
|
424
|
+
cn,
|
|
400
425
|
1
|
|
401
426
|
],
|
|
402
427
|
header: /* @__PURE__ */ J("span", {
|
|
403
428
|
className: "x78zum5 x1pha0wt x17d4w8g xu0aao5 x17qtykl xwib8y2 xqfszdh x1jvydc1 x1s688f",
|
|
404
|
-
children: [
|
|
429
|
+
children: [k("document.sheetComments", { count: m.length }), g ? /* @__PURE__ */ J("span", {
|
|
405
430
|
className: "xddlp02 xfifm61 xo1l8bm",
|
|
406
431
|
children: ["· ", g]
|
|
407
432
|
}) : null]
|
|
408
433
|
}),
|
|
409
|
-
onScrim: () => f(
|
|
434
|
+
onScrim: () => f(cn),
|
|
410
435
|
onSnap: f,
|
|
411
436
|
children: /* @__PURE__ */ J("div", {
|
|
412
437
|
ref: p,
|
|
@@ -418,30 +443,30 @@ function tn({ threads: e, agent: n = "Agent", actions: r, offline: i, draft: a,
|
|
|
418
443
|
className: "x78zum5 x1pha0wt x167g77z x4z9k3i",
|
|
419
444
|
children: [/* @__PURE__ */ q("span", {
|
|
420
445
|
className: "x98rzlu xeuugli x1lqa7cf x1vo0akb x19ypqd9 x1o5kxid xb3r6kr xuxw1ft xlyipyv x1bo0w0s",
|
|
421
|
-
children:
|
|
446
|
+
children: N(a)
|
|
422
447
|
}), /* @__PURE__ */ q("button", {
|
|
423
448
|
type: "button",
|
|
424
|
-
onClick:
|
|
449
|
+
onClick: s,
|
|
425
450
|
className: "x1717udv xc342km xjbqb8w xddlp02 x4z9k3i x1ypdohk",
|
|
426
|
-
children:
|
|
451
|
+
children: k("common.cancel")
|
|
427
452
|
})]
|
|
428
453
|
}), /* @__PURE__ */ q("div", {
|
|
429
454
|
className: "x1xmf6yo x1qyh8g1 xso031l x1q0q8m5 x1iz93xd",
|
|
430
|
-
children: /* @__PURE__ */ q(
|
|
455
|
+
children: /* @__PURE__ */ q(n, {
|
|
431
456
|
autoFocus: !0,
|
|
432
|
-
placeholder:
|
|
433
|
-
onSubmit: (e) => o(a, e).then((e) => (e &&
|
|
457
|
+
placeholder: k("document.agentPlaceholder"),
|
|
458
|
+
onSubmit: (e) => o(a, e).then((e) => (e && s(), e))
|
|
434
459
|
})
|
|
435
460
|
})]
|
|
436
461
|
}) : null,
|
|
437
462
|
m.length === 0 && !a ? /* @__PURE__ */ q("div", {
|
|
438
463
|
className: "xr9q8rw xddlp02 xqfszdh x4z9k3i x2b8uid",
|
|
439
|
-
children:
|
|
464
|
+
children: k("document.noComments")
|
|
440
465
|
}) : null,
|
|
441
|
-
m.map((e) => /* @__PURE__ */ q(
|
|
466
|
+
m.map((e) => /* @__PURE__ */ q(sn, {
|
|
442
467
|
actions: r,
|
|
443
|
-
active: e.id ===
|
|
444
|
-
agent:
|
|
468
|
+
active: e.id === c,
|
|
469
|
+
agent: t,
|
|
445
470
|
offline: i,
|
|
446
471
|
thread: e
|
|
447
472
|
}, e.id))
|
|
@@ -450,70 +475,70 @@ function tn({ threads: e, agent: n = "Agent", actions: r, offline: i, draft: a,
|
|
|
450
475
|
});
|
|
451
476
|
}
|
|
452
477
|
// src/viewer/document/useDocumentAsks.ts
|
|
453
|
-
var
|
|
454
|
-
function
|
|
455
|
-
let [t, n] = G(() =>
|
|
478
|
+
var dn = (e) => e ? t(e.getEditorState().toJSON()) : [], fn = (e, t) => JSON.stringify(e) === JSON.stringify(t);
|
|
479
|
+
function pn(e) {
|
|
480
|
+
let [t, n] = G(() => dn(e));
|
|
456
481
|
return H(() => {
|
|
457
482
|
if (!e) return;
|
|
458
483
|
let t = () => n((t) => {
|
|
459
|
-
let n =
|
|
460
|
-
return
|
|
484
|
+
let n = dn(e);
|
|
485
|
+
return fn(t, n) ? t : n;
|
|
461
486
|
});
|
|
462
487
|
return t(), e.registerUpdateListener(t);
|
|
463
488
|
}, [e]), t;
|
|
464
489
|
}
|
|
465
|
-
function
|
|
466
|
-
return e.registerMutationListener(
|
|
490
|
+
function mn(e) {
|
|
491
|
+
return e.registerMutationListener(Ke, (t) => {
|
|
467
492
|
let n = [...t].filter(([, e]) => e === "created").map(([e]) => e);
|
|
468
493
|
n.length && e.update(() => {
|
|
469
494
|
let t = /* @__PURE__ */ new Map();
|
|
470
|
-
for (let [r, i] of e.getEditorState()._nodeMap) i instanceof
|
|
495
|
+
for (let [r, i] of e.getEditorState()._nodeMap) i instanceof Ke && !n.includes(r) && t.set(i.__ask.askId, r);
|
|
471
496
|
for (let e of n) {
|
|
472
|
-
let n =
|
|
473
|
-
n instanceof
|
|
497
|
+
let n = ot(e);
|
|
498
|
+
n instanceof Ke && (t.has(n.__ask.askId) ? n.remove() : t.set(n.__ask.askId, e));
|
|
474
499
|
}
|
|
475
500
|
});
|
|
476
501
|
});
|
|
477
502
|
}
|
|
478
503
|
// src/viewer/document/DocumentAsks.tsx
|
|
479
|
-
var
|
|
504
|
+
var hn = (e) => ({
|
|
480
505
|
op: "create",
|
|
481
506
|
blockId: "*",
|
|
482
507
|
quote: "",
|
|
483
508
|
submit: e,
|
|
484
509
|
text: e ? "Submitted the answers" : "Withdrew the submit"
|
|
485
510
|
});
|
|
486
|
-
function
|
|
511
|
+
function gn(e) {
|
|
487
512
|
let t = document.querySelector(`[data-ask-tag="${CSS.escape(e)}"]`);
|
|
488
513
|
t?.scrollIntoView({
|
|
489
514
|
block: "center",
|
|
490
515
|
behavior: "smooth"
|
|
491
516
|
}), t?.focus({ preventScroll: !0 });
|
|
492
517
|
}
|
|
493
|
-
function
|
|
494
|
-
let c =
|
|
495
|
-
H(() => e && r ?
|
|
496
|
-
let l = U(() =>
|
|
518
|
+
function _n({ editor: e, threads: t, send: n, canAct: r, listening: i, agent: a, phone: s }) {
|
|
519
|
+
let c = pn(e);
|
|
520
|
+
H(() => e && r ? mn(e) : void 0, [e, r]);
|
|
521
|
+
let l = U(() => o(c, t).filter((e) => e.state !== "orphan"), [c, t]), u = U(() => {
|
|
497
522
|
try {
|
|
498
|
-
return
|
|
523
|
+
return x(t), !0;
|
|
499
524
|
} catch {
|
|
500
525
|
return !1;
|
|
501
526
|
}
|
|
502
527
|
}, [t]);
|
|
503
|
-
return l.length ? /* @__PURE__ */ q(
|
|
504
|
-
agent:
|
|
528
|
+
return l.length ? /* @__PURE__ */ q(rn, {
|
|
529
|
+
agent: a,
|
|
505
530
|
bottom: s ? 90 : void 0,
|
|
506
531
|
canAct: r,
|
|
507
532
|
canWithdraw: u,
|
|
508
533
|
listening: i,
|
|
509
534
|
views: l,
|
|
510
|
-
onJump:
|
|
511
|
-
onSubmit: () => n(
|
|
512
|
-
onWithdraw: () => n(
|
|
535
|
+
onJump: gn,
|
|
536
|
+
onSubmit: () => n(hn(!0)),
|
|
537
|
+
onWithdraw: () => n(hn(!1))
|
|
513
538
|
}) : null;
|
|
514
539
|
}
|
|
515
540
|
// src/viewer/document/history.ts
|
|
516
|
-
async function
|
|
541
|
+
async function vn(e) {
|
|
517
542
|
await new Promise((e) => setTimeout(e, 0));
|
|
518
543
|
let t = [...e.getAllChanges().values()].flat().sort((e, t) => e.lamport - t.lamport || e.peer.localeCompare(t.peer) || e.counter - t.counter), n = e.shallowSinceFrontiers(), r = e.frontiersToVV(n), i = [], a = [];
|
|
519
544
|
try {
|
|
@@ -544,20 +569,20 @@ async function un(e) {
|
|
|
544
569
|
shallow: n.length > 0
|
|
545
570
|
};
|
|
546
571
|
}
|
|
547
|
-
function
|
|
572
|
+
function yn(e, t, n) {
|
|
548
573
|
let r = e.fork(), i;
|
|
549
574
|
try {
|
|
550
575
|
r.checkout(t);
|
|
551
|
-
let e = r.getTree(
|
|
552
|
-
if (e.length !== 1) throw Error(
|
|
553
|
-
let a =
|
|
576
|
+
let e = r.getTree(Ge).roots();
|
|
577
|
+
if (e.length !== 1) throw Error(D.t("history.contentUnavailable"));
|
|
578
|
+
let a = P({
|
|
554
579
|
nodes: n,
|
|
555
580
|
editable: !1,
|
|
556
581
|
onError: (e) => {
|
|
557
582
|
throw e;
|
|
558
583
|
}
|
|
559
584
|
});
|
|
560
|
-
i =
|
|
585
|
+
i = We(a, r);
|
|
561
586
|
let o = e[0].children() ?? [], s = /* @__PURE__ */ new Map(), c = (e, t) => {
|
|
562
587
|
s.set(e.id, t), e.children()?.forEach((e) => c(e, t));
|
|
563
588
|
};
|
|
@@ -570,9 +595,9 @@ function dn(e, t, n) {
|
|
|
570
595
|
i?.dispose(), r.free();
|
|
571
596
|
}
|
|
572
597
|
}
|
|
573
|
-
var
|
|
574
|
-
function
|
|
575
|
-
let r = new Map(n.flatMap((e) => [...e.owners])), i = e.getTree(
|
|
598
|
+
var bn = /^cid:(\d+@\d+):Map$/;
|
|
599
|
+
function xn(e, t, n) {
|
|
600
|
+
let r = new Map(n.flatMap((e) => [...e.owners])), i = e.getTree(Ge), a = /* @__PURE__ */ new Map(), o = new Map(t.map((e, t) => [e, t])), s = (e, t) => {
|
|
576
601
|
let n = a.get(e);
|
|
577
602
|
(!n || o.get(n) < o.get(t)) && a.set(e, t);
|
|
578
603
|
};
|
|
@@ -584,7 +609,7 @@ function pn(e, t, n) {
|
|
|
584
609
|
}, a)) {
|
|
585
610
|
let t = e.getContainerById(o);
|
|
586
611
|
for (; t;) {
|
|
587
|
-
let e =
|
|
612
|
+
let e = bn.exec(t.id)?.[1], i = e && r.get(e);
|
|
588
613
|
if (i) {
|
|
589
614
|
s(i, n);
|
|
590
615
|
break;
|
|
@@ -602,8 +627,8 @@ function pn(e, t, n) {
|
|
|
602
627
|
return a;
|
|
603
628
|
}
|
|
604
629
|
// ../../node_modules/.pnpm/@lexical+headless@0.53.0_typescript@6.0.3/node_modules/@lexical/headless/dist/LexicalHeadless.prod.js
|
|
605
|
-
function
|
|
606
|
-
let t =
|
|
630
|
+
function Sn(e) {
|
|
631
|
+
let t = P(e);
|
|
607
632
|
return t._headless = !0, [
|
|
608
633
|
"registerDecoratorListener",
|
|
609
634
|
"registerRootListener",
|
|
@@ -627,7 +652,7 @@ function mn(e) {
|
|
|
627
652
|
}), t;
|
|
628
653
|
}
|
|
629
654
|
// ../../node_modules/.pnpm/@haklex+rich-compose@0.64.3_de9a3fd27379d7864287b6a0a66e57fe/node_modules/@haklex/rich-compose/dist/compose-DLkWiSFw.js
|
|
630
|
-
function
|
|
655
|
+
function Cn({ text: e }) {
|
|
631
656
|
let t = W(null), n = W(null);
|
|
632
657
|
return H(() => {
|
|
633
658
|
let r = t.current;
|
|
@@ -644,7 +669,7 @@ function hn({ text: e }) {
|
|
|
644
669
|
ref: t
|
|
645
670
|
});
|
|
646
671
|
}
|
|
647
|
-
var Y = (e) => `${
|
|
672
|
+
var Y = (e) => `${he[e]} ${ve[e]}`, wn = {
|
|
648
673
|
h1: Y("headingH1"),
|
|
649
674
|
h2: Y("headingH2"),
|
|
650
675
|
h3: Y("headingH3"),
|
|
@@ -652,14 +677,14 @@ var Y = (e) => `${fe[e]} ${he[e]}`, gn = {
|
|
|
652
677
|
h5: Y("headingH5"),
|
|
653
678
|
h6: Y("headingH6")
|
|
654
679
|
};
|
|
655
|
-
function
|
|
680
|
+
function Tn(e) {
|
|
656
681
|
return e.toLowerCase().trim().replaceAll(/[^\s\w\u3000-\u9FFF\uAC00-\uD7AF\uFF00-\uFFEF-]/g, "").replaceAll(/[\s_]+/g, "-").replaceAll(/^-+|-+$/g, "");
|
|
657
682
|
}
|
|
658
|
-
function
|
|
659
|
-
return e.type === "comment" ? "" : e.text ? e.text : e.children ? e.children.map(
|
|
683
|
+
function En(e) {
|
|
684
|
+
return e.type === "comment" ? "" : e.text ? e.text : e.children ? e.children.map(En).join("") : "";
|
|
660
685
|
}
|
|
661
|
-
var
|
|
662
|
-
function
|
|
686
|
+
var Dn = /^["'«‘“‹「『"']/, On = /["'»’”›」』"']$/;
|
|
687
|
+
function kn(e, t, n, r, i, a) {
|
|
663
688
|
switch (e.type) {
|
|
664
689
|
case "root": return /* @__PURE__ */ q(K, { children: n });
|
|
665
690
|
case "paragraph": {
|
|
@@ -671,19 +696,19 @@ function xn(e, t, n, r, i, a) {
|
|
|
671
696
|
}, t);
|
|
672
697
|
}
|
|
673
698
|
case "heading": {
|
|
674
|
-
let o = e.tag, s =
|
|
699
|
+
let o = e.tag, s = Tn(i || En(e)), c = a ?? s;
|
|
675
700
|
if (a === void 0 && s) {
|
|
676
701
|
let e = r.get(s);
|
|
677
702
|
e === void 0 ? r.set(s, 1) : (c = `${s}-${e}`, r.set(s, e + 1));
|
|
678
703
|
}
|
|
679
704
|
return /* @__PURE__ */ J(o, {
|
|
680
|
-
className:
|
|
705
|
+
className: wn[o],
|
|
681
706
|
id: c || void 0,
|
|
682
707
|
children: [c && /* @__PURE__ */ q("a", {
|
|
683
708
|
className: Y("headingAnchor"),
|
|
684
709
|
href: `#${c}`,
|
|
685
710
|
tabIndex: 0,
|
|
686
|
-
children: /* @__PURE__ */ q(
|
|
711
|
+
children: /* @__PURE__ */ q(Nt, {
|
|
687
712
|
"aria-hidden": !0,
|
|
688
713
|
size: 14,
|
|
689
714
|
strokeWidth: 2
|
|
@@ -693,7 +718,7 @@ function xn(e, t, n, r, i, a) {
|
|
|
693
718
|
}
|
|
694
719
|
case "rich-quote":
|
|
695
720
|
case "quote": {
|
|
696
|
-
let r = (i ||
|
|
721
|
+
let r = (i || En(e)).trim(), a = Dn.test(r), o = On.test(r), s = e.attribution;
|
|
697
722
|
return /* @__PURE__ */ J("blockquote", {
|
|
698
723
|
className: Y("quote"),
|
|
699
724
|
"data-no-close-quote": o ? "" : void 0,
|
|
@@ -725,14 +750,14 @@ function xn(e, t, n, r, i, a) {
|
|
|
725
750
|
href: e.url,
|
|
726
751
|
rel: e.rel || "noopener",
|
|
727
752
|
target: e.target || "_blank",
|
|
728
|
-
children: [/* @__PURE__ */ q(
|
|
753
|
+
children: [/* @__PURE__ */ q(pe, { href: e.url }), n]
|
|
729
754
|
}, t);
|
|
730
755
|
case "autolink": return /* @__PURE__ */ J("a", {
|
|
731
756
|
className: Y("link"),
|
|
732
757
|
href: e.url,
|
|
733
758
|
rel: "noopener",
|
|
734
759
|
target: "_blank",
|
|
735
|
-
children: [/* @__PURE__ */ q(
|
|
760
|
+
children: [/* @__PURE__ */ q(pe, { href: e.url }), n]
|
|
736
761
|
}, t);
|
|
737
762
|
case "horizontalrule": return /* @__PURE__ */ q("hr", { className: Y("hr") }, t);
|
|
738
763
|
case "table": return /* @__PURE__ */ q("div", {
|
|
@@ -754,13 +779,13 @@ function xn(e, t, n, r, i, a) {
|
|
|
754
779
|
case "details": {
|
|
755
780
|
let r = e.summary || "";
|
|
756
781
|
return /* @__PURE__ */ J("details", {
|
|
757
|
-
className: `${L.details} ${
|
|
782
|
+
className: `${L.details} ${je.details}`,
|
|
758
783
|
open: e.open || void 0,
|
|
759
784
|
children: [/* @__PURE__ */ J("summary", {
|
|
760
|
-
className: `${L.summary} ${
|
|
785
|
+
className: `${L.summary} ${je.summary}`,
|
|
761
786
|
children: [/* @__PURE__ */ q("span", {
|
|
762
787
|
"aria-hidden": "true",
|
|
763
|
-
className: `${L.chevron} ${
|
|
788
|
+
className: `${L.chevron} ${je.chevron}`,
|
|
764
789
|
children: /* @__PURE__ */ q("svg", {
|
|
765
790
|
fill: "none",
|
|
766
791
|
height: "20",
|
|
@@ -773,11 +798,11 @@ function xn(e, t, n, r, i, a) {
|
|
|
773
798
|
children: /* @__PURE__ */ q("path", { d: "M8 6L12 10L8 14" })
|
|
774
799
|
})
|
|
775
800
|
}), /* @__PURE__ */ q("span", {
|
|
776
|
-
className: `${L.summaryText} ${
|
|
801
|
+
className: `${L.summaryText} ${je.summaryText}`,
|
|
777
802
|
children: r
|
|
778
803
|
})]
|
|
779
804
|
}), /* @__PURE__ */ q("div", {
|
|
780
|
-
className: `${L.content} ${
|
|
805
|
+
className: `${L.content} ${je.content}`,
|
|
781
806
|
children: n
|
|
782
807
|
})]
|
|
783
808
|
}, t);
|
|
@@ -790,14 +815,14 @@ function xn(e, t, n, r, i, a) {
|
|
|
790
815
|
}, t);
|
|
791
816
|
case "tag": return /* @__PURE__ */ q("span", {
|
|
792
817
|
className: Y("tag"),
|
|
793
|
-
style: { backgroundColor:
|
|
818
|
+
style: { backgroundColor: lt(e.text) },
|
|
794
819
|
children: e.text
|
|
795
820
|
}, t);
|
|
796
|
-
case "comment": return /* @__PURE__ */ q(
|
|
797
|
-
case "ruby": return
|
|
821
|
+
case "comment": return /* @__PURE__ */ q(Cn, { text: e.text ?? "" }, t);
|
|
822
|
+
case "ruby": return St(Se, {
|
|
798
823
|
key: t,
|
|
799
824
|
rendererKey: "Ruby",
|
|
800
|
-
defaultRenderer:
|
|
825
|
+
defaultRenderer: Ae,
|
|
801
826
|
props: {
|
|
802
827
|
reading: e.reading ?? "",
|
|
803
828
|
children: n
|
|
@@ -813,7 +838,7 @@ function xn(e, t, n, r, i, a) {
|
|
|
813
838
|
default: return null;
|
|
814
839
|
}
|
|
815
840
|
}
|
|
816
|
-
var
|
|
841
|
+
var An = (e) => `${he[e]} ${ve[e]}`, jn = [
|
|
817
842
|
[1, "textBold"],
|
|
818
843
|
[2, "textItalic"],
|
|
819
844
|
[4, "textStrikethrough"],
|
|
@@ -823,7 +848,7 @@ var Sn = (e) => `${fe[e]} ${he[e]}`, Cn = [
|
|
|
823
848
|
[64, "textSuperscript"],
|
|
824
849
|
[128, "textHighlight"]
|
|
825
850
|
];
|
|
826
|
-
function
|
|
851
|
+
function Mn(e) {
|
|
827
852
|
let t = {};
|
|
828
853
|
for (let n of e.split(";")) {
|
|
829
854
|
let e = n.indexOf(":");
|
|
@@ -835,18 +860,18 @@ function wn(e) {
|
|
|
835
860
|
}
|
|
836
861
|
return t;
|
|
837
862
|
}
|
|
838
|
-
function
|
|
863
|
+
function Nn(e, t) {
|
|
839
864
|
let n = e.text, r = e.format || 0;
|
|
840
|
-
for (let [e, i] of
|
|
841
|
-
className:
|
|
865
|
+
for (let [e, i] of jn) r & e && (n = /* @__PURE__ */ q("span", {
|
|
866
|
+
className: An(i),
|
|
842
867
|
children: n
|
|
843
868
|
}, `${t}-${e}`));
|
|
844
869
|
return e.style && (n = /* @__PURE__ */ q("span", {
|
|
845
|
-
style:
|
|
870
|
+
style: Mn(e.style),
|
|
846
871
|
children: n
|
|
847
872
|
}, t)), n;
|
|
848
873
|
}
|
|
849
|
-
function
|
|
874
|
+
function Pn(e, t = !1) {
|
|
850
875
|
let n = [], r = t ? e.findIndex((e) => e.type === "paragraph") : -1, i = (e) => e.type === "image" && typeof e.layout == "string" && e.layout.startsWith("float-");
|
|
851
876
|
for (let t = 0; t < e.length; t++) {
|
|
852
877
|
let a = [t];
|
|
@@ -867,7 +892,7 @@ function En(e, t = !1) {
|
|
|
867
892
|
for (let t of n) a.length && t.every((t) => e[t].type === "comment") || a.at(-1)?.every((t) => e[t].type === "comment") ? a.at(-1).push(...t) : a.push(t);
|
|
868
893
|
return a;
|
|
869
894
|
}
|
|
870
|
-
function
|
|
895
|
+
function Fn(e) {
|
|
871
896
|
let t = {}, n = /* @__PURE__ */ new Set(), r = {}, i = 1;
|
|
872
897
|
function a(e) {
|
|
873
898
|
if (e.type === "footnote" && e.identifier) {
|
|
@@ -884,35 +909,35 @@ function Dn(e) {
|
|
|
884
909
|
displayNumberMap: r
|
|
885
910
|
};
|
|
886
911
|
}
|
|
887
|
-
var
|
|
888
|
-
function
|
|
912
|
+
var In = (e) => `${he.alert} ${ve.alert} rich-alert-${e}`;
|
|
913
|
+
function Ln(e, t, n) {
|
|
889
914
|
switch (e.type) {
|
|
890
|
-
case "alert-quote": return
|
|
915
|
+
case "alert-quote": return St("div", {
|
|
891
916
|
key: t,
|
|
892
|
-
className:
|
|
917
|
+
className: In(e.alertType)
|
|
893
918
|
}, n);
|
|
894
|
-
case "banner": return
|
|
919
|
+
case "banner": return St("div", {
|
|
895
920
|
key: t,
|
|
896
921
|
className: `rich-banner rich-banner-${e.bannerType}`
|
|
897
922
|
}, n);
|
|
898
|
-
case "grid-container": return
|
|
923
|
+
case "grid-container": return St("div", {
|
|
899
924
|
key: t,
|
|
900
|
-
className: `${
|
|
925
|
+
className: `${Me.container} ${Ce.container}`
|
|
901
926
|
}, n);
|
|
902
|
-
default: return
|
|
927
|
+
default: return Ct(n) ? bt(n, { key: t }) : n;
|
|
903
928
|
}
|
|
904
929
|
}
|
|
905
|
-
function
|
|
906
|
-
return
|
|
930
|
+
function Rn(e, t, n) {
|
|
931
|
+
return Ct(e) && typeof e.type == "string" ? bt(e, { "data-block-id": t }) : /* @__PURE__ */ q("div", {
|
|
907
932
|
className: "rich-block-anchor",
|
|
908
933
|
"data-block-id": t,
|
|
909
934
|
children: e
|
|
910
935
|
}, `${n}-block-anchor`);
|
|
911
936
|
}
|
|
912
|
-
function
|
|
913
|
-
return t ? (r.blockAnchor ??
|
|
937
|
+
function zn(e, t, n, r) {
|
|
938
|
+
return t ? (r.blockAnchor ?? Rn)(e, t, n) : e;
|
|
914
939
|
}
|
|
915
|
-
function
|
|
940
|
+
function Bn(e, t, n, r, i, a, o) {
|
|
916
941
|
let s = o.recycleKeys ? i : e.getKey ? e.getKey() : i, c = o.headingIds?.get(e.getKey?.()), { builtinNodeOverrides: l } = o;
|
|
917
942
|
if (typeof e.decorate == "function") {
|
|
918
943
|
let r = null;
|
|
@@ -921,41 +946,41 @@ function Mn(e, t, n, r, i, a, o) {
|
|
|
921
946
|
} catch {}
|
|
922
947
|
if (r != null) {
|
|
923
948
|
let t = e.exportJSON ? e.exportJSON() : {}, n = l?.[t.type];
|
|
924
|
-
return
|
|
949
|
+
return zn(n ? n(t, s, [r], () => Ln(t, s, r)) : Ln(t, s, r), a, s, o);
|
|
925
950
|
}
|
|
926
951
|
}
|
|
927
952
|
let u = e.exportJSON ? e.exportJSON() : {};
|
|
928
953
|
if (u.type === "text") {
|
|
929
954
|
let e = l?.text;
|
|
930
|
-
return e ? e(u, s, null, () =>
|
|
955
|
+
return e ? e(u, s, null, () => Nn(u, s)) : Nn(u, s);
|
|
931
956
|
}
|
|
932
957
|
let d = typeof e.getChildren == "function" ? e.getChildren() : [];
|
|
933
958
|
Array.isArray(u.children) && u.children.length === 0 && d.length > 0 && (u.children = d.map((e) => ({ type: typeof e.getType == "function" ? e.getType() : e.__type })));
|
|
934
959
|
let f = null;
|
|
935
|
-
d.length > 0 && (f = d.map((e, i) =>
|
|
960
|
+
d.length > 0 && (f = d.map((e, i) => Bn(e, t, n, r, `${s}-${i}`, void 0, o)));
|
|
936
961
|
let p = e.getTextContent ? e.getTextContent() : void 0, m = l?.[u.type];
|
|
937
|
-
return
|
|
962
|
+
return zn(m ? m(u, s, f, () => kn(u, s, f, r, p, c)) : kn(u, s, f, r, p, c), a, s, o);
|
|
938
963
|
}
|
|
939
|
-
function
|
|
940
|
-
let i =
|
|
964
|
+
function Vn(e, t, n, r) {
|
|
965
|
+
let i = Sn({
|
|
941
966
|
nodes: t,
|
|
942
|
-
theme:
|
|
967
|
+
theme: Ve,
|
|
943
968
|
editable: !1,
|
|
944
969
|
onError: (e) => {
|
|
945
970
|
console.error("[RichRenderer]", e);
|
|
946
971
|
}
|
|
947
972
|
}), a = {
|
|
948
973
|
namespace: "ssr",
|
|
949
|
-
theme:
|
|
950
|
-
}, o =
|
|
974
|
+
theme: Ve
|
|
975
|
+
}, o = _e(e), s = i.parseEditorState(o);
|
|
951
976
|
i.setEditorState(s);
|
|
952
|
-
let c =
|
|
977
|
+
let c = Fn(o), l = o.root?.children, u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), p = s.read(() => {
|
|
953
978
|
let e = /* @__PURE__ */ new Map(), t = (n, r, i) => {
|
|
954
979
|
if (f.set(n.getKey(), i), n.getType() === "heading") {
|
|
955
|
-
let t =
|
|
980
|
+
let t = Tn(n.getTextContent()), i = e.get(t) ?? 0, a = t ? `${t}${i ? `-${i}` : ""}` : "";
|
|
956
981
|
e.set(t, i + 1), u.set(n.getKey(), a), a && d.set(a, r);
|
|
957
982
|
}
|
|
958
|
-
|
|
983
|
+
Te(n) && n.getChildren().forEach((e, n) => t(e, r, `${i}.${n}`));
|
|
959
984
|
}, n = B().getChildren();
|
|
960
985
|
return n.forEach((e, n) => t(e, n, `${n}:0`)), n;
|
|
961
986
|
}), m = /* @__PURE__ */ new Set(), h = p.map((e, t) => {
|
|
@@ -970,7 +995,7 @@ function Nn(e, t, n, r) {
|
|
|
970
995
|
index: t,
|
|
971
996
|
pool: `${n.type}:${n.type === "dynamic" ? n.url : n.tag ?? ""}`
|
|
972
997
|
};
|
|
973
|
-
}), g =
|
|
998
|
+
}), g = Pn(h.map((e) => e.data), r), _ = /* @__PURE__ */ new Map(), v = g.map((e, t) => {
|
|
974
999
|
let n = e.map((e) => (_.set(e, t), h[e])), r = n[0];
|
|
975
1000
|
return {
|
|
976
1001
|
blocks: n,
|
|
@@ -986,7 +1011,7 @@ function Nn(e, t, n, r) {
|
|
|
986
1011
|
for (let [e, t] of d) d.set(e, _.get(t));
|
|
987
1012
|
let y = (e, t) => s.read(() => {
|
|
988
1013
|
let r = v[e];
|
|
989
|
-
return r ? /* @__PURE__ */ q(
|
|
1014
|
+
return r ? /* @__PURE__ */ q(yt, { children: r.blocks.map((e, r) => Bn(p[e.index], i, a, /* @__PURE__ */ new Map(), t === void 0 ? `ssr-${e.index}` : `recycler-${t}-${r}`, l?.[e.index]?.$?.blockId, {
|
|
990
1015
|
...n,
|
|
991
1016
|
headingIds: u,
|
|
992
1017
|
recycleKeys: t !== void 0
|
|
@@ -1003,31 +1028,31 @@ function Nn(e, t, n, r) {
|
|
|
1003
1028
|
},
|
|
1004
1029
|
footnoteData: c,
|
|
1005
1030
|
renderNestedContent: (e) => {
|
|
1006
|
-
let r =
|
|
1031
|
+
let r = Sn({
|
|
1007
1032
|
nodes: t,
|
|
1008
|
-
theme:
|
|
1033
|
+
theme: Ve,
|
|
1009
1034
|
editable: !1,
|
|
1010
1035
|
onError: (e) => {
|
|
1011
1036
|
console.error("[RichRenderer:nested]", e);
|
|
1012
1037
|
}
|
|
1013
1038
|
}), i = {
|
|
1014
1039
|
namespace: "ssr-nested",
|
|
1015
|
-
theme:
|
|
1016
|
-
}, a =
|
|
1040
|
+
theme: Ve
|
|
1041
|
+
}, a = _e(e), o = r.parseEditorState(a);
|
|
1017
1042
|
r.setEditorState(o);
|
|
1018
1043
|
let s = null, c = a.root?.children;
|
|
1019
1044
|
return o.read(() => {
|
|
1020
|
-
let e = B(), t = /* @__PURE__ */ new Map(), a = e.getChildren().map((e, a) =>
|
|
1045
|
+
let e = B(), t = /* @__PURE__ */ new Map(), a = e.getChildren().map((e, a) => Bn(e, r, i, t, `nested-${a}`, c?.[a]?.$?.blockId, n));
|
|
1021
1046
|
s = /* @__PURE__ */ q(K, { children: a });
|
|
1022
1047
|
}), s;
|
|
1023
1048
|
}
|
|
1024
1049
|
};
|
|
1025
1050
|
}
|
|
1026
|
-
function
|
|
1051
|
+
function Hn({ document: e }) {
|
|
1027
1052
|
return e.renderAll();
|
|
1028
1053
|
}
|
|
1029
|
-
function
|
|
1030
|
-
let p =
|
|
1054
|
+
function Un({ value: e, variant: t = "article", theme: n, className: r, style: i, as: a = "div", nested: o = !1, rendererConfig: s, extraNodes: c, builtinNodeOverrides: l, blockAnchor: u, surface: d, virtualization: f }) {
|
|
1055
|
+
let p = fe(t), m = et(), { document: h, footnoteData: g, renderNestedContent: _ } = U(() => Vn(e, c ? [...ge, ...c] : ge, {
|
|
1031
1056
|
blockAnchor: u,
|
|
1032
1057
|
builtinNodeOverrides: l
|
|
1033
1058
|
}, t === "note"), [
|
|
@@ -1036,12 +1061,12 @@ function Fn({ value: e, variant: t = "article", theme: n, className: r, style: i
|
|
|
1036
1061
|
c,
|
|
1037
1062
|
e,
|
|
1038
1063
|
t
|
|
1039
|
-
]), { scrollContainer: v, overscan: y, estimateBlockHeight: b, preserveCapacity: x } = typeof f == "object" ? f : {}, S = !!f, C = f === !1, w = U(() => C ?
|
|
1064
|
+
]), { scrollContainer: v, overscan: y, estimateBlockHeight: b, preserveCapacity: x } = typeof f == "object" ? f : {}, S = !!f, C = f === !1, w = U(() => C ? Hn : S ? vt({
|
|
1040
1065
|
scrollContainer: v,
|
|
1041
1066
|
overscan: y,
|
|
1042
1067
|
estimateBlockHeight: b,
|
|
1043
1068
|
preserveCapacity: x
|
|
1044
|
-
}) : d ??
|
|
1069
|
+
}) : d ?? Hn, [
|
|
1045
1070
|
d,
|
|
1046
1071
|
S,
|
|
1047
1072
|
C,
|
|
@@ -1059,19 +1084,19 @@ function Fn({ value: e, variant: t = "article", theme: n, className: r, style: i
|
|
|
1059
1084
|
"data-rich-nested": o ? "true" : void 0,
|
|
1060
1085
|
"data-theme": n
|
|
1061
1086
|
} : {}, D = n ?? "light";
|
|
1062
|
-
return /* @__PURE__ */ q(
|
|
1087
|
+
return /* @__PURE__ */ q(M, {
|
|
1063
1088
|
className: p,
|
|
1064
1089
|
theme: D,
|
|
1065
|
-
children: /* @__PURE__ */ q(
|
|
1090
|
+
children: /* @__PURE__ */ q(it, {
|
|
1066
1091
|
colorScheme: D,
|
|
1067
|
-
children: /* @__PURE__ */ q(
|
|
1092
|
+
children: /* @__PURE__ */ q(xe, {
|
|
1068
1093
|
config: s,
|
|
1069
1094
|
mode: "renderer",
|
|
1070
1095
|
variant: t,
|
|
1071
|
-
children: /* @__PURE__ */ q(
|
|
1096
|
+
children: /* @__PURE__ */ q(ue, {
|
|
1072
1097
|
definitions: g.definitions,
|
|
1073
1098
|
displayNumberMap: g.displayNumberMap,
|
|
1074
|
-
children: /* @__PURE__ */ q(
|
|
1099
|
+
children: /* @__PURE__ */ q(le, {
|
|
1075
1100
|
value: m ?? _,
|
|
1076
1101
|
children: /* @__PURE__ */ q(a, {
|
|
1077
1102
|
...E,
|
|
@@ -1085,7 +1110,7 @@ function Fn({ value: e, variant: t = "article", theme: n, className: r, style: i
|
|
|
1085
1110
|
});
|
|
1086
1111
|
}
|
|
1087
1112
|
// ../../node_modules/.pnpm/@haklex+rich-ext-steps@0.64.3_b199ac47dca7a4d1e79580754e18a2d5/node_modules/@haklex/rich-ext-steps/dist/node-CEPwMzje.js
|
|
1088
|
-
var
|
|
1113
|
+
var Wn = [Ue], X = {
|
|
1089
1114
|
text: {
|
|
1090
1115
|
kMv6JI: "xqfszdh",
|
|
1091
1116
|
kGuDYH: "x4z9k3i",
|
|
@@ -1869,14 +1894,14 @@ var In = [Be], X = {
|
|
|
1869
1894
|
kAzted: "xbktkl8",
|
|
1870
1895
|
$$css: !0
|
|
1871
1896
|
}
|
|
1872
|
-
},
|
|
1873
|
-
function
|
|
1874
|
-
if (!(e > 0)) return
|
|
1875
|
-
let n = /* @__PURE__ */ new Date(e * 1e3), r = new Date(t), i = Math.round((
|
|
1876
|
-
if (i === 0) return
|
|
1877
|
-
if (i === 1) return
|
|
1897
|
+
}, Gn = 864e5, Kn = (e) => String(e).padStart(2, "0"), qn = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime();
|
|
1898
|
+
function Jn(e, t = Date.now()) {
|
|
1899
|
+
if (!(e > 0)) return D.t("time.notRecorded");
|
|
1900
|
+
let n = /* @__PURE__ */ new Date(e * 1e3), r = new Date(t), i = Math.round((qn(r) - qn(n)) / Gn);
|
|
1901
|
+
if (i === 0) return D.t("time.today");
|
|
1902
|
+
if (i === 1) return D.t("time.yesterday");
|
|
1878
1903
|
let a = n.getFullYear() === r.getFullYear();
|
|
1879
|
-
return new Intl.DateTimeFormat(
|
|
1904
|
+
return new Intl.DateTimeFormat(O[D.language], a ? {
|
|
1880
1905
|
month: "long",
|
|
1881
1906
|
day: "numeric"
|
|
1882
1907
|
} : {
|
|
@@ -1885,35 +1910,35 @@ function Bn(e, t = Date.now()) {
|
|
|
1885
1910
|
day: "numeric"
|
|
1886
1911
|
}).format(n);
|
|
1887
1912
|
}
|
|
1888
|
-
function
|
|
1913
|
+
function Yn(e, t = !1) {
|
|
1889
1914
|
if (!(e > 0)) return "--:--";
|
|
1890
|
-
let n = /* @__PURE__ */ new Date(e * 1e3), r = `${
|
|
1891
|
-
return t ? `${r}:${
|
|
1915
|
+
let n = /* @__PURE__ */ new Date(e * 1e3), r = `${Kn(n.getHours())}:${Kn(n.getMinutes())}`;
|
|
1916
|
+
return t ? `${r}:${Kn(n.getSeconds())}` : r;
|
|
1892
1917
|
}
|
|
1893
|
-
function
|
|
1894
|
-
return e > 0 ? `${
|
|
1918
|
+
function Xn(e) {
|
|
1919
|
+
return e > 0 ? `${Jn(e)} ${Yn(e)}` : D.t("time.notRecorded");
|
|
1895
1920
|
}
|
|
1896
1921
|
// src/viewer/document/HistoryPanel.tsx
|
|
1897
|
-
var
|
|
1922
|
+
var Zn = {
|
|
1898
1923
|
human: "history.sourceHuman",
|
|
1899
1924
|
agent: "history.sourceAgent",
|
|
1900
1925
|
session: "history.sourceSession",
|
|
1901
1926
|
unknown: "history.sourceUnknown"
|
|
1902
1927
|
};
|
|
1903
|
-
function
|
|
1928
|
+
function Qn(e) {
|
|
1904
1929
|
let { session: t, selected: n } = e;
|
|
1905
1930
|
return t && n ? t.history.groups.find((e) => e.entries.includes(n)) : void 0;
|
|
1906
1931
|
}
|
|
1907
|
-
function
|
|
1932
|
+
function $n(e) {
|
|
1908
1933
|
return e.session?.history.entries.at(-1)?.change.timestamp ?? 0;
|
|
1909
1934
|
}
|
|
1910
|
-
function
|
|
1935
|
+
function er({ model: e, strip: t }) {
|
|
1911
1936
|
let { count: n, changeIndex: r, loading: i } = e;
|
|
1912
1937
|
return /* @__PURE__ */ J(K, { children: [
|
|
1913
1938
|
/* @__PURE__ */ J("span", {
|
|
1914
1939
|
"aria-live": "polite",
|
|
1915
1940
|
role: "status",
|
|
1916
|
-
...
|
|
1941
|
+
...E(X.count),
|
|
1917
1942
|
children: [
|
|
1918
1943
|
n ? r + 1 : 0,
|
|
1919
1944
|
" / ",
|
|
@@ -1921,125 +1946,125 @@ function Kn({ model: e, strip: t }) {
|
|
|
1921
1946
|
]
|
|
1922
1947
|
}),
|
|
1923
1948
|
/* @__PURE__ */ q("button", {
|
|
1924
|
-
"aria-label":
|
|
1949
|
+
"aria-label": k("history.previousChange"),
|
|
1925
1950
|
disabled: r === 0 || i,
|
|
1926
1951
|
type: "button",
|
|
1927
|
-
...
|
|
1952
|
+
...E(X.buttonBase, X.icon, t && X.stripIcon),
|
|
1928
1953
|
onClick: () => e.navigate(-1),
|
|
1929
|
-
children: /* @__PURE__ */ q(
|
|
1954
|
+
children: /* @__PURE__ */ q(At, {
|
|
1930
1955
|
"aria-hidden": "true",
|
|
1931
1956
|
size: 14
|
|
1932
1957
|
})
|
|
1933
1958
|
}),
|
|
1934
1959
|
/* @__PURE__ */ q("button", {
|
|
1935
|
-
"aria-label":
|
|
1960
|
+
"aria-label": k("history.nextChange"),
|
|
1936
1961
|
disabled: r >= n - 1 || i,
|
|
1937
1962
|
type: "button",
|
|
1938
|
-
...
|
|
1963
|
+
...E(X.buttonBase, X.icon, t && X.stripIcon),
|
|
1939
1964
|
onClick: () => e.navigate(1),
|
|
1940
|
-
children: /* @__PURE__ */ q(
|
|
1965
|
+
children: /* @__PURE__ */ q(Ot, {
|
|
1941
1966
|
"aria-hidden": "true",
|
|
1942
1967
|
size: 14
|
|
1943
1968
|
})
|
|
1944
1969
|
})
|
|
1945
1970
|
] });
|
|
1946
1971
|
}
|
|
1947
|
-
function
|
|
1972
|
+
function tr({ model: e }) {
|
|
1948
1973
|
return /* @__PURE__ */ q("button", {
|
|
1949
1974
|
"aria-pressed": e.onlyChanges,
|
|
1950
1975
|
type: "button",
|
|
1951
|
-
...
|
|
1976
|
+
...E(X.buttonBase, X.filter, e.onlyChanges && X.filterOn),
|
|
1952
1977
|
onClick: e.toggleOnly,
|
|
1953
|
-
children:
|
|
1978
|
+
children: k("history.onlyChanges")
|
|
1954
1979
|
});
|
|
1955
1980
|
}
|
|
1956
|
-
function
|
|
1981
|
+
function nr({ compact: e, model: t }) {
|
|
1957
1982
|
return t.pending ? /* @__PURE__ */ J("div", {
|
|
1958
1983
|
role: "status",
|
|
1959
|
-
...
|
|
1984
|
+
...E(e ? X.updateCompact : X.update),
|
|
1960
1985
|
children: [/* @__PURE__ */ q("span", {
|
|
1961
|
-
...
|
|
1962
|
-
children: t.streaming ?
|
|
1986
|
+
...E(X.updateText),
|
|
1987
|
+
children: t.streaming ? k("history.waitingEdits") : k("history.newContent", { time: Yn($n(t)) })
|
|
1963
1988
|
}), /* @__PURE__ */ J("button", {
|
|
1964
1989
|
disabled: t.streaming || t.loading,
|
|
1965
1990
|
type: "button",
|
|
1966
|
-
...
|
|
1991
|
+
...E(X.buttonBase, X.updateButton),
|
|
1967
1992
|
onClick: t.refresh,
|
|
1968
|
-
children: [/* @__PURE__ */ q(
|
|
1993
|
+
children: [/* @__PURE__ */ q(Rt, {
|
|
1969
1994
|
"aria-hidden": "true",
|
|
1970
1995
|
size: 12
|
|
1971
|
-
}),
|
|
1996
|
+
}), k("history.refresh")]
|
|
1972
1997
|
})]
|
|
1973
1998
|
}) : null;
|
|
1974
1999
|
}
|
|
1975
|
-
function
|
|
1976
|
-
let { selected: t, blocks: n, count: r } = e, i =
|
|
2000
|
+
function rr({ model: e }) {
|
|
2001
|
+
let { selected: t, blocks: n, count: r } = e, i = Qn(e), a = n.filter((e) => e.kind === "insert" || e.kind === "modify").length, o = n.filter((e) => e.kind === "delete" || e.kind === "modify").length;
|
|
1977
2002
|
return /* @__PURE__ */ J("section", {
|
|
1978
|
-
"aria-label":
|
|
1979
|
-
...
|
|
2003
|
+
"aria-label": k("history.range"),
|
|
2004
|
+
...E(X.compare),
|
|
1980
2005
|
children: [/* @__PURE__ */ J("dl", {
|
|
1981
|
-
...
|
|
2006
|
+
...E(X.compareList),
|
|
1982
2007
|
children: [
|
|
1983
2008
|
/* @__PURE__ */ q("dt", {
|
|
1984
|
-
...
|
|
1985
|
-
children:
|
|
2009
|
+
...E(X.compareTerm),
|
|
2010
|
+
children: k("history.from")
|
|
1986
2011
|
}),
|
|
1987
2012
|
/* @__PURE__ */ J("dd", {
|
|
1988
|
-
...
|
|
2013
|
+
...E(X.compareValue),
|
|
1989
2014
|
children: [/* @__PURE__ */ q("strong", {
|
|
1990
|
-
...
|
|
1991
|
-
children: t ?
|
|
2015
|
+
...E(X.compareStrong),
|
|
2016
|
+
children: t ? Xn(t.change.timestamp) : k("history.pickPoint")
|
|
1992
2017
|
}), i ? /* @__PURE__ */ q("span", {
|
|
1993
|
-
...
|
|
1994
|
-
children:
|
|
2018
|
+
...E(X.compareSpan),
|
|
2019
|
+
children: k(Zn[i.source])
|
|
1995
2020
|
}) : null]
|
|
1996
2021
|
}),
|
|
1997
2022
|
/* @__PURE__ */ q("dt", {
|
|
1998
|
-
...
|
|
1999
|
-
children:
|
|
2023
|
+
...E(X.compareTerm),
|
|
2024
|
+
children: k("history.to")
|
|
2000
2025
|
}),
|
|
2001
2026
|
/* @__PURE__ */ J("dd", {
|
|
2002
|
-
...
|
|
2027
|
+
...E(X.compareValue),
|
|
2003
2028
|
children: [/* @__PURE__ */ q("strong", {
|
|
2004
|
-
...
|
|
2005
|
-
children:
|
|
2029
|
+
...E(X.compareStrong),
|
|
2030
|
+
children: k("history.latestVersion")
|
|
2006
2031
|
}), /* @__PURE__ */ q("span", {
|
|
2007
|
-
...
|
|
2008
|
-
children:
|
|
2032
|
+
...E(X.compareSpan),
|
|
2033
|
+
children: Xn($n(e))
|
|
2009
2034
|
})]
|
|
2010
2035
|
})
|
|
2011
2036
|
]
|
|
2012
2037
|
}), /* @__PURE__ */ J("div", {
|
|
2013
|
-
...
|
|
2038
|
+
...E(X.controls),
|
|
2014
2039
|
children: [
|
|
2015
|
-
/* @__PURE__ */ q("span", { children:
|
|
2040
|
+
/* @__PURE__ */ q("span", { children: k("history.changes", { count: r }) }),
|
|
2016
2041
|
/* @__PURE__ */ J("span", {
|
|
2017
|
-
...
|
|
2042
|
+
...E(X.plus),
|
|
2018
2043
|
children: ["+", a]
|
|
2019
2044
|
}),
|
|
2020
2045
|
/* @__PURE__ */ J("span", {
|
|
2021
|
-
...
|
|
2046
|
+
...E(X.minus),
|
|
2022
2047
|
children: ["−", o]
|
|
2023
2048
|
}),
|
|
2024
|
-
/* @__PURE__ */ q("span", { ...
|
|
2025
|
-
/* @__PURE__ */ q(
|
|
2026
|
-
/* @__PURE__ */ q(
|
|
2049
|
+
/* @__PURE__ */ q("span", { ...E(X.spacer) }),
|
|
2050
|
+
/* @__PURE__ */ q(tr, { model: e }),
|
|
2051
|
+
/* @__PURE__ */ q(er, { model: e })
|
|
2027
2052
|
]
|
|
2028
2053
|
})]
|
|
2029
2054
|
});
|
|
2030
2055
|
}
|
|
2031
|
-
function
|
|
2056
|
+
function ir({ model: e, sheet: t }) {
|
|
2032
2057
|
let [n, r] = G(50), [i, a] = G(() => /* @__PURE__ */ new Set()), { session: o, selected: s, blocks: c } = e;
|
|
2033
2058
|
if (!o) return null;
|
|
2034
2059
|
let { groups: l, entries: u, shallow: d } = o.history, f = l.findIndex((e) => s !== null && e.entries.includes(s)), p = /* @__PURE__ */ new Map();
|
|
2035
2060
|
for (let e of c) e.group && p.set(e.group, (p.get(e.group) ?? 0) + 1);
|
|
2036
|
-
let m = l.slice(0, n), h = (e) =>
|
|
2061
|
+
let m = l.slice(0, n), h = (e) => Jn(e.entries.at(-1).change.timestamp), g = (e) => a((t) => {
|
|
2037
2062
|
let n = new Set(t);
|
|
2038
2063
|
return n.delete(e) || n.add(e), n;
|
|
2039
2064
|
});
|
|
2040
2065
|
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q("ol", {
|
|
2041
|
-
"aria-label":
|
|
2042
|
-
...
|
|
2066
|
+
"aria-label": k("history.timeline"),
|
|
2067
|
+
...E(X.timeline),
|
|
2043
2068
|
children: m.map((n, r) => {
|
|
2044
2069
|
let a = n.entries.at(-1), o = h(n), c = r === 0 || o !== h(m[r - 1]), l = r === f ? "selected" : r === 0 ? "latest" : r < f ? "range" : "outside", u = i.has(n.id), d = r < f ? p.get(n) : void 0;
|
|
2045
2070
|
return /* @__PURE__ */ J("li", {
|
|
@@ -2047,82 +2072,82 @@ function Xn({ model: e, sheet: t }) {
|
|
|
2047
2072
|
"data-lower": r < f ? "in" : "out",
|
|
2048
2073
|
"data-state": l,
|
|
2049
2074
|
"data-upper": r <= f ? "in" : "out",
|
|
2050
|
-
...
|
|
2075
|
+
...E(X.node),
|
|
2051
2076
|
children: [
|
|
2052
2077
|
c ? /* @__PURE__ */ q("div", {
|
|
2053
|
-
...
|
|
2078
|
+
...E(X.day),
|
|
2054
2079
|
children: o
|
|
2055
2080
|
}) : null,
|
|
2056
2081
|
/* @__PURE__ */ J("div", {
|
|
2057
|
-
...
|
|
2082
|
+
...E(X.row),
|
|
2058
2083
|
children: [
|
|
2059
2084
|
/* @__PURE__ */ q("span", {
|
|
2060
2085
|
"aria-hidden": "true",
|
|
2061
2086
|
"data-state": l,
|
|
2062
|
-
...
|
|
2087
|
+
...E(X.dot)
|
|
2063
2088
|
}),
|
|
2064
2089
|
/* @__PURE__ */ J("button", {
|
|
2065
2090
|
"aria-current": l === "selected" ? "true" : void 0,
|
|
2066
2091
|
"data-state": l,
|
|
2067
2092
|
type: "button",
|
|
2068
|
-
...
|
|
2093
|
+
...E(X.buttonBase, X.select, t && X.sheetSelect),
|
|
2069
2094
|
onClick: () => e.select(a),
|
|
2070
2095
|
children: [/* @__PURE__ */ J("span", {
|
|
2071
|
-
...
|
|
2096
|
+
...E(X.line),
|
|
2072
2097
|
children: [
|
|
2073
2098
|
/* @__PURE__ */ q("strong", {
|
|
2074
|
-
...
|
|
2075
|
-
children:
|
|
2099
|
+
...E(X.lineStrong),
|
|
2100
|
+
children: Yn(a.change.timestamp)
|
|
2076
2101
|
}),
|
|
2077
2102
|
/* @__PURE__ */ q("span", {
|
|
2078
|
-
...
|
|
2079
|
-
children:
|
|
2103
|
+
...E(X.lineText),
|
|
2104
|
+
children: k(Zn[n.source])
|
|
2080
2105
|
}),
|
|
2081
2106
|
l === "latest" ? /* @__PURE__ */ q("span", {
|
|
2082
|
-
...
|
|
2083
|
-
children:
|
|
2107
|
+
...E(X.tag),
|
|
2108
|
+
children: k("history.latest")
|
|
2084
2109
|
}) : null,
|
|
2085
2110
|
l === "selected" ? /* @__PURE__ */ q("span", {
|
|
2086
|
-
...
|
|
2087
|
-
children:
|
|
2111
|
+
...E(X.tag, X.tagStart),
|
|
2112
|
+
children: k("history.start")
|
|
2088
2113
|
}) : null
|
|
2089
2114
|
]
|
|
2090
2115
|
}), /* @__PURE__ */ J("span", {
|
|
2091
|
-
...
|
|
2092
|
-
children: [
|
|
2093
|
-
...
|
|
2094
|
-
children:
|
|
2116
|
+
...E(X.meta),
|
|
2117
|
+
children: [k("history.commits", { count: n.entries.length }), d ? /* @__PURE__ */ q("span", {
|
|
2118
|
+
...E(X.changed),
|
|
2119
|
+
children: k("history.changedSuffix", { count: d })
|
|
2095
2120
|
}) : null]
|
|
2096
2121
|
})]
|
|
2097
2122
|
}),
|
|
2098
2123
|
/* @__PURE__ */ q("button", {
|
|
2099
2124
|
"aria-expanded": u,
|
|
2100
|
-
"aria-label":
|
|
2125
|
+
"aria-label": k(u ? "history.collapseCommits" : "history.expandCommits"),
|
|
2101
2126
|
type: "button",
|
|
2102
|
-
...
|
|
2127
|
+
...E(X.buttonBase, X.icon, X.expand),
|
|
2103
2128
|
onClick: () => g(n.id),
|
|
2104
|
-
children: /* @__PURE__ */ q(
|
|
2129
|
+
children: /* @__PURE__ */ q(kt, {
|
|
2105
2130
|
"aria-hidden": "true",
|
|
2106
2131
|
size: 14,
|
|
2107
|
-
...
|
|
2132
|
+
...E(X.expandIcon, u && X.expandIconOpen)
|
|
2108
2133
|
})
|
|
2109
2134
|
})
|
|
2110
2135
|
]
|
|
2111
2136
|
}),
|
|
2112
2137
|
u ? /* @__PURE__ */ q("div", {
|
|
2113
|
-
...
|
|
2138
|
+
...E(X.raw),
|
|
2114
2139
|
children: [...n.entries].reverse().map((t) => /* @__PURE__ */ J("button", {
|
|
2115
2140
|
"aria-current": t === s ? "true" : void 0,
|
|
2116
2141
|
title: t.change.message,
|
|
2117
2142
|
type: "button",
|
|
2118
|
-
...
|
|
2143
|
+
...E(X.buttonBase, X.rawButton),
|
|
2119
2144
|
onClick: () => e.select(t),
|
|
2120
2145
|
children: [/* @__PURE__ */ q("span", {
|
|
2121
|
-
...
|
|
2122
|
-
children:
|
|
2146
|
+
...E(X.rawTime),
|
|
2147
|
+
children: Yn(t.change.timestamp, !0)
|
|
2123
2148
|
}), /* @__PURE__ */ q("code", {
|
|
2124
|
-
...
|
|
2125
|
-
children: t.change.message ||
|
|
2149
|
+
...E(X.rawCode),
|
|
2150
|
+
children: t.change.message || k("history.sourceUnknown")
|
|
2126
2151
|
})]
|
|
2127
2152
|
}, t.id))
|
|
2128
2153
|
}) : null
|
|
@@ -2131,41 +2156,41 @@ function Xn({ model: e, sheet: t }) {
|
|
|
2131
2156
|
})
|
|
2132
2157
|
}), n < l.length ? /* @__PURE__ */ q("button", {
|
|
2133
2158
|
type: "button",
|
|
2134
|
-
...
|
|
2159
|
+
...E(X.buttonBase, X.more),
|
|
2135
2160
|
onClick: () => r((e) => e + 50),
|
|
2136
|
-
children:
|
|
2161
|
+
children: k("history.loadEarlier")
|
|
2137
2162
|
}) : /* @__PURE__ */ J("p", {
|
|
2138
|
-
...
|
|
2163
|
+
...E(X.end),
|
|
2139
2164
|
children: [
|
|
2140
|
-
|
|
2165
|
+
k(d ? "history.shallow" : "history.earliest"),
|
|
2141
2166
|
" ·",
|
|
2142
2167
|
" ",
|
|
2143
|
-
|
|
2144
|
-
edits:
|
|
2145
|
-
commits:
|
|
2168
|
+
k("history.summary", {
|
|
2169
|
+
edits: k("history.edits", { count: l.length }),
|
|
2170
|
+
commits: k("history.commits", { count: u.length })
|
|
2146
2171
|
}),
|
|
2147
2172
|
/* @__PURE__ */ q("br", {}),
|
|
2148
|
-
|
|
2173
|
+
k("history.clockNote")
|
|
2149
2174
|
]
|
|
2150
2175
|
})] });
|
|
2151
2176
|
}
|
|
2152
|
-
function
|
|
2177
|
+
function ar({ streaming: e }) {
|
|
2153
2178
|
return /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
2154
2179
|
role: "status",
|
|
2155
|
-
...
|
|
2180
|
+
...E(X.waitingP),
|
|
2156
2181
|
children: e ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q("strong", {
|
|
2157
|
-
...
|
|
2158
|
-
children:
|
|
2182
|
+
...E(X.waitingStrong),
|
|
2183
|
+
children: k("history.agentEditing")
|
|
2159
2184
|
}), /* @__PURE__ */ q("span", {
|
|
2160
|
-
...
|
|
2161
|
-
children:
|
|
2185
|
+
...E(X.waitingSpan),
|
|
2186
|
+
children: k("history.agentEditingBody")
|
|
2162
2187
|
})] }) : /* @__PURE__ */ q("strong", {
|
|
2163
|
-
...
|
|
2164
|
-
children:
|
|
2188
|
+
...E(X.waitingStrong),
|
|
2189
|
+
children: k("history.loading")
|
|
2165
2190
|
})
|
|
2166
2191
|
}), /* @__PURE__ */ q("div", {
|
|
2167
2192
|
"aria-hidden": "true",
|
|
2168
|
-
...
|
|
2193
|
+
...E(X.skeleton),
|
|
2169
2194
|
children: [
|
|
2170
2195
|
150,
|
|
2171
2196
|
130,
|
|
@@ -2173,76 +2198,76 @@ function Zn({ streaming: e }) {
|
|
|
2173
2198
|
120
|
|
2174
2199
|
].map((e) => /* @__PURE__ */ q("span", {
|
|
2175
2200
|
style: { width: e },
|
|
2176
|
-
...
|
|
2201
|
+
...E(X.skeletonBar)
|
|
2177
2202
|
}, e))
|
|
2178
2203
|
})] });
|
|
2179
2204
|
}
|
|
2180
|
-
function
|
|
2205
|
+
function or({ model: e }) {
|
|
2181
2206
|
return /* @__PURE__ */ J("div", {
|
|
2182
2207
|
role: "alert",
|
|
2183
|
-
...
|
|
2208
|
+
...E(X.failure),
|
|
2184
2209
|
children: [
|
|
2185
2210
|
/* @__PURE__ */ J("strong", {
|
|
2186
|
-
...
|
|
2187
|
-
children: [/* @__PURE__ */ q(
|
|
2211
|
+
...E(X.failureStrong),
|
|
2212
|
+
children: [/* @__PURE__ */ q(jt, {
|
|
2188
2213
|
"aria-hidden": "true",
|
|
2189
2214
|
size: 15
|
|
2190
|
-
}),
|
|
2215
|
+
}), k("history.failed")]
|
|
2191
2216
|
}),
|
|
2192
2217
|
/* @__PURE__ */ q("code", {
|
|
2193
|
-
...
|
|
2218
|
+
...E(X.failureCode),
|
|
2194
2219
|
children: e.error
|
|
2195
2220
|
}),
|
|
2196
2221
|
/* @__PURE__ */ q("span", {
|
|
2197
|
-
...
|
|
2198
|
-
children:
|
|
2222
|
+
...E(X.failureText),
|
|
2223
|
+
children: k("history.failedBody")
|
|
2199
2224
|
}),
|
|
2200
2225
|
/* @__PURE__ */ J("span", {
|
|
2201
|
-
...
|
|
2226
|
+
...E(X.actions),
|
|
2202
2227
|
children: [/* @__PURE__ */ q("button", {
|
|
2203
2228
|
disabled: e.streaming,
|
|
2204
2229
|
type: "button",
|
|
2205
|
-
...
|
|
2230
|
+
...E(X.buttonBase, X.button),
|
|
2206
2231
|
onClick: e.refresh,
|
|
2207
|
-
children:
|
|
2232
|
+
children: k("common.retry")
|
|
2208
2233
|
}), /* @__PURE__ */ q("button", {
|
|
2209
2234
|
type: "button",
|
|
2210
|
-
...
|
|
2235
|
+
...E(X.buttonBase, X.quiet),
|
|
2211
2236
|
onClick: e.close,
|
|
2212
|
-
children:
|
|
2237
|
+
children: k("history.backToComments")
|
|
2213
2238
|
})]
|
|
2214
2239
|
})
|
|
2215
2240
|
]
|
|
2216
2241
|
});
|
|
2217
2242
|
}
|
|
2218
|
-
function
|
|
2219
|
-
let t = [
|
|
2243
|
+
function sr({ model: e }) {
|
|
2244
|
+
let t = [E(X.text, X.panel).className, "history-panel"].filter(Boolean).join(" ");
|
|
2220
2245
|
return /* @__PURE__ */ J("aside", {
|
|
2221
|
-
"aria-label":
|
|
2246
|
+
"aria-label": k("history.title"),
|
|
2222
2247
|
className: t,
|
|
2223
2248
|
children: [
|
|
2224
2249
|
/* @__PURE__ */ J("header", {
|
|
2225
|
-
...
|
|
2250
|
+
...E(X.panelHead),
|
|
2226
2251
|
children: [/* @__PURE__ */ q("h2", {
|
|
2227
|
-
...
|
|
2228
|
-
children:
|
|
2252
|
+
...E(X.panelTitle),
|
|
2253
|
+
children: k("history.title")
|
|
2229
2254
|
}), /* @__PURE__ */ q("button", {
|
|
2230
|
-
"aria-label":
|
|
2255
|
+
"aria-label": k("history.close"),
|
|
2231
2256
|
type: "button",
|
|
2232
|
-
...
|
|
2257
|
+
...E(X.buttonBase, X.icon),
|
|
2233
2258
|
onClick: e.close,
|
|
2234
|
-
children: /* @__PURE__ */ q(
|
|
2259
|
+
children: /* @__PURE__ */ q(zt, {
|
|
2235
2260
|
"aria-hidden": "true",
|
|
2236
2261
|
size: 14
|
|
2237
2262
|
})
|
|
2238
2263
|
})]
|
|
2239
2264
|
}),
|
|
2240
|
-
/* @__PURE__ */ q(
|
|
2241
|
-
e.error ? /* @__PURE__ */ q(
|
|
2265
|
+
/* @__PURE__ */ q(nr, { model: e }),
|
|
2266
|
+
e.error ? /* @__PURE__ */ q(or, { model: e }) : e.session ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(rr, { model: e }), /* @__PURE__ */ q(ir, { model: e })] }) : /* @__PURE__ */ q(ar, { streaming: e.streaming })
|
|
2242
2267
|
]
|
|
2243
2268
|
});
|
|
2244
2269
|
}
|
|
2245
|
-
function
|
|
2270
|
+
function cr({ model: e, onDismiss: t }) {
|
|
2246
2271
|
let n = W(null);
|
|
2247
2272
|
H(() => {
|
|
2248
2273
|
let e = document.activeElement, t = n.current, r = () => [...t?.querySelectorAll("button:not(:disabled), a[href], input:not(:disabled), [tabindex=\"0\"]") ?? []];
|
|
@@ -2257,30 +2282,30 @@ function er({ model: e, onDismiss: t }) {
|
|
|
2257
2282
|
};
|
|
2258
2283
|
}, []);
|
|
2259
2284
|
let r = /* @__PURE__ */ J("div", {
|
|
2260
|
-
...
|
|
2285
|
+
...E(X.sheetHead),
|
|
2261
2286
|
children: [/* @__PURE__ */ J("span", {
|
|
2262
|
-
...
|
|
2287
|
+
...E(X.sheetHeadText),
|
|
2263
2288
|
children: [/* @__PURE__ */ q("strong", {
|
|
2264
|
-
...
|
|
2265
|
-
children:
|
|
2289
|
+
...E(X.sheetTitle),
|
|
2290
|
+
children: k("history.chooseStart")
|
|
2266
2291
|
}), /* @__PURE__ */ q("small", {
|
|
2267
|
-
...
|
|
2268
|
-
children:
|
|
2292
|
+
...E(X.sheetSmall),
|
|
2293
|
+
children: k("history.compareWithLatest", { time: Xn($n(e)) })
|
|
2269
2294
|
})]
|
|
2270
2295
|
}), /* @__PURE__ */ q("button", {
|
|
2271
2296
|
type: "button",
|
|
2272
|
-
...
|
|
2297
|
+
...E(X.buttonBase, X.sheetButton),
|
|
2273
2298
|
onClick: t,
|
|
2274
|
-
children:
|
|
2299
|
+
children: k("common.done")
|
|
2275
2300
|
})]
|
|
2276
2301
|
});
|
|
2277
2302
|
return /* @__PURE__ */ q("div", {
|
|
2278
|
-
"aria-label":
|
|
2303
|
+
"aria-label": k("history.chooseStart"),
|
|
2279
2304
|
"aria-modal": "true",
|
|
2280
2305
|
ref: n,
|
|
2281
2306
|
role: "dialog",
|
|
2282
|
-
...
|
|
2283
|
-
children: /* @__PURE__ */ q(
|
|
2307
|
+
...E(X.text, X.sheet),
|
|
2308
|
+
children: /* @__PURE__ */ q(l, {
|
|
2284
2309
|
header: r,
|
|
2285
2310
|
snap: .85,
|
|
2286
2311
|
snaps: [0, .85],
|
|
@@ -2289,8 +2314,8 @@ function er({ model: e, onDismiss: t }) {
|
|
|
2289
2314
|
e === 0 && t();
|
|
2290
2315
|
},
|
|
2291
2316
|
children: /* @__PURE__ */ q("div", {
|
|
2292
|
-
...
|
|
2293
|
-
children: /* @__PURE__ */ q(
|
|
2317
|
+
...E(X.sheetBody),
|
|
2318
|
+
children: /* @__PURE__ */ q(ir, {
|
|
2294
2319
|
sheet: !0,
|
|
2295
2320
|
model: e
|
|
2296
2321
|
})
|
|
@@ -2299,35 +2324,35 @@ function er({ model: e, onDismiss: t }) {
|
|
|
2299
2324
|
});
|
|
2300
2325
|
}
|
|
2301
2326
|
// src/viewer/document/HistoryContent.tsx
|
|
2302
|
-
var
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
...
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
],
|
|
2309
|
-
[F]:
|
|
2310
|
-
[
|
|
2311
|
-
[
|
|
2312
|
-
[
|
|
2313
|
-
},
|
|
2327
|
+
var lr = [
|
|
2328
|
+
$e,
|
|
2329
|
+
rt,
|
|
2330
|
+
...Wn,
|
|
2331
|
+
Ke,
|
|
2332
|
+
Xe
|
|
2333
|
+
], ur = {
|
|
2334
|
+
[F]: Be,
|
|
2335
|
+
[Ye]: ft,
|
|
2336
|
+
[Je]: Ne,
|
|
2337
|
+
[be]: He
|
|
2338
|
+
}, dr = {
|
|
2314
2339
|
insert: "history.kindInsert",
|
|
2315
2340
|
delete: "history.kindDelete",
|
|
2316
2341
|
modify: "history.kindModify"
|
|
2317
2342
|
};
|
|
2318
|
-
function
|
|
2319
|
-
let { session: o, selected: s, blocks: c, count: l, changeIndex: u, loading: d, error: f, streaming: p, onlyChanges: m } = e, h = [
|
|
2320
|
-
extraNodes:
|
|
2321
|
-
rendererConfig:
|
|
2343
|
+
function fr({ model: e, theme: t, title: n, narrow: r, bodyRef: i, onPick: a }) {
|
|
2344
|
+
let { session: o, selected: s, blocks: c, count: l, changeIndex: u, loading: d, error: f, streaming: p, onlyChanges: m } = e, h = [E(X.text).className, "history-view"].filter(Boolean).join(" "), g = [E(X.hunk).className, "history-hunk"].filter(Boolean).join(" "), _ = (e) => /* @__PURE__ */ q(Un, {
|
|
2345
|
+
extraNodes: lr,
|
|
2346
|
+
rendererConfig: ur,
|
|
2322
2347
|
theme: t,
|
|
2323
2348
|
value: e,
|
|
2324
2349
|
variant: "article"
|
|
2325
2350
|
}), v = -1, y = (t, n) => {
|
|
2326
2351
|
if (t.kind === "equal") return m ? /* @__PURE__ */ q("button", {
|
|
2327
2352
|
type: "button",
|
|
2328
|
-
...
|
|
2353
|
+
...E(X.buttonBase, X.fold),
|
|
2329
2354
|
onClick: e.showAll,
|
|
2330
|
-
children: /* @__PURE__ */ q("span", { children:
|
|
2355
|
+
children: /* @__PURE__ */ q("span", { children: k("history.unchanged", { count: t.value.root.children.length }) })
|
|
2331
2356
|
}, n) : /* @__PURE__ */ q("section", {
|
|
2332
2357
|
className: g,
|
|
2333
2358
|
children: _(t.value)
|
|
@@ -2335,24 +2360,24 @@ function ir({ model: e, theme: t, title: n, narrow: r, bodyRef: i, onPick: a })
|
|
|
2335
2360
|
v++;
|
|
2336
2361
|
let r = t.before ? null : t.kind === "insert" ? "afterBox" : t.kind === "delete" ? "beforeBox" : "mergedBox";
|
|
2337
2362
|
return /* @__PURE__ */ J("section", {
|
|
2338
|
-
className: [g,
|
|
2363
|
+
className: [g, E(X.hunkBox).className].filter(Boolean).join(" "),
|
|
2339
2364
|
"data-current": v === u ? "" : void 0,
|
|
2340
2365
|
"data-history-change": "",
|
|
2341
2366
|
children: [/* @__PURE__ */ J("div", {
|
|
2342
|
-
...
|
|
2367
|
+
...E(X.caption),
|
|
2343
2368
|
children: [/* @__PURE__ */ q("span", {
|
|
2344
2369
|
"data-kind": t.kind,
|
|
2345
|
-
...
|
|
2346
|
-
children:
|
|
2347
|
-
}), t.author ? /* @__PURE__ */ J("span", { children: [
|
|
2370
|
+
...E(X.kind),
|
|
2371
|
+
children: k(dr[t.kind])
|
|
2372
|
+
}), t.author ? /* @__PURE__ */ J("span", { children: [Xn(t.author.change.timestamp), t.group ? ` · ${k(Zn[t.group.source])}` : ""] }) : null]
|
|
2348
2373
|
}), t.before ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q("div", {
|
|
2349
|
-
...
|
|
2374
|
+
...E(X.diffBox, X.beforeBox),
|
|
2350
2375
|
children: _(t.before)
|
|
2351
2376
|
}), /* @__PURE__ */ q("div", {
|
|
2352
|
-
...
|
|
2377
|
+
...E(X.diffBox, X.afterBox, X.afterGap),
|
|
2353
2378
|
children: _(t.value)
|
|
2354
2379
|
})] }) : /* @__PURE__ */ q("div", {
|
|
2355
|
-
...
|
|
2380
|
+
...E(X.diffBox, X[r]),
|
|
2356
2381
|
children: _(t.value)
|
|
2357
2382
|
})]
|
|
2358
2383
|
}, n);
|
|
@@ -2361,71 +2386,71 @@ function ir({ model: e, theme: t, title: n, narrow: r, bodyRef: i, onPick: a })
|
|
|
2361
2386
|
className: h,
|
|
2362
2387
|
children: [
|
|
2363
2388
|
r ? /* @__PURE__ */ J("div", {
|
|
2364
|
-
...
|
|
2389
|
+
...E(X.strip),
|
|
2365
2390
|
children: [
|
|
2366
2391
|
/* @__PURE__ */ J("button", {
|
|
2367
2392
|
type: "button",
|
|
2368
|
-
...
|
|
2393
|
+
...E(X.buttonBase, X.pick),
|
|
2369
2394
|
onClick: a,
|
|
2370
2395
|
children: [/* @__PURE__ */ q("span", {
|
|
2371
|
-
...
|
|
2372
|
-
children:
|
|
2396
|
+
...E(X.pickSpan),
|
|
2397
|
+
children: k("history.compareFrom")
|
|
2373
2398
|
}), /* @__PURE__ */ J("strong", {
|
|
2374
|
-
...
|
|
2375
|
-
children: [
|
|
2399
|
+
...E(X.pickStrong),
|
|
2400
|
+
children: [k("history.toLatest", { from: s ? Xn(s.change.timestamp) : k("history.pickPoint") }), /* @__PURE__ */ q(Ot, {
|
|
2376
2401
|
"aria-hidden": "true",
|
|
2377
2402
|
size: 12
|
|
2378
2403
|
})]
|
|
2379
2404
|
})]
|
|
2380
2405
|
}),
|
|
2381
|
-
/* @__PURE__ */ q(
|
|
2382
|
-
/* @__PURE__ */ q(
|
|
2406
|
+
/* @__PURE__ */ q(tr, { model: e }),
|
|
2407
|
+
/* @__PURE__ */ q(er, {
|
|
2383
2408
|
strip: !0,
|
|
2384
2409
|
model: e
|
|
2385
2410
|
})
|
|
2386
2411
|
]
|
|
2387
2412
|
}) : null,
|
|
2388
|
-
r ? /* @__PURE__ */ q(
|
|
2413
|
+
r ? /* @__PURE__ */ q(nr, {
|
|
2389
2414
|
compact: !0,
|
|
2390
2415
|
model: e
|
|
2391
2416
|
}) : null,
|
|
2392
2417
|
f ? r ? /* @__PURE__ */ J("div", {
|
|
2393
2418
|
role: "alert",
|
|
2394
|
-
...
|
|
2395
|
-
children: [
|
|
2419
|
+
...E(X.message),
|
|
2420
|
+
children: [k("history.readFailed", { error: f }), /* @__PURE__ */ q("button", {
|
|
2396
2421
|
disabled: p,
|
|
2397
2422
|
type: "button",
|
|
2398
|
-
...
|
|
2423
|
+
...E(X.buttonBase, X.messageButton),
|
|
2399
2424
|
onClick: e.refresh,
|
|
2400
|
-
children:
|
|
2425
|
+
children: k("common.retry")
|
|
2401
2426
|
})]
|
|
2402
2427
|
}) : /* @__PURE__ */ q("p", {
|
|
2403
|
-
...
|
|
2404
|
-
children:
|
|
2428
|
+
...E(X.message),
|
|
2429
|
+
children: k("history.unreadable")
|
|
2405
2430
|
}) : d || !o ? /* @__PURE__ */ q("div", {
|
|
2406
|
-
...
|
|
2407
|
-
children: /* @__PURE__ */ q(
|
|
2408
|
-
label:
|
|
2431
|
+
...E(X.message),
|
|
2432
|
+
children: /* @__PURE__ */ q(ee, {
|
|
2433
|
+
label: k(p ? "history.waitingEdits" : "history.computing"),
|
|
2409
2434
|
size: 14
|
|
2410
2435
|
})
|
|
2411
2436
|
}) : /* @__PURE__ */ J("div", {
|
|
2412
|
-
"aria-label":
|
|
2437
|
+
"aria-label": k("history.diffBody"),
|
|
2413
2438
|
ref: i,
|
|
2414
|
-
...
|
|
2439
|
+
...E(X.content),
|
|
2415
2440
|
children: [
|
|
2416
2441
|
o.latest.value.root.children.some((e) => e.type === "heading" && e.tag === "h1") ? null : /* @__PURE__ */ q("h1", {
|
|
2417
|
-
...
|
|
2442
|
+
...E(X.contentTitle),
|
|
2418
2443
|
children: n
|
|
2419
2444
|
}),
|
|
2420
2445
|
l ? null : /* @__PURE__ */ q("p", {
|
|
2421
2446
|
role: "status",
|
|
2422
|
-
...
|
|
2423
|
-
children:
|
|
2447
|
+
...E(X.note),
|
|
2448
|
+
children: k("history.noDiff")
|
|
2424
2449
|
}),
|
|
2425
2450
|
c.map(y),
|
|
2426
2451
|
/* @__PURE__ */ q("p", {
|
|
2427
|
-
...
|
|
2428
|
-
children:
|
|
2452
|
+
...E(X.end),
|
|
2453
|
+
children: k("history.endOfDiff")
|
|
2429
2454
|
})
|
|
2430
2455
|
]
|
|
2431
2456
|
})
|
|
@@ -2433,49 +2458,49 @@ function ir({ model: e, theme: t, title: n, narrow: r, bodyRef: i, onPick: a })
|
|
|
2433
2458
|
});
|
|
2434
2459
|
}
|
|
2435
2460
|
// ../../node_modules/.pnpm/@haklex+rich-diff-core@0.64.3_lexical@0.53.0_typescript@6.0.3_/node_modules/@haklex/rich-diff-core/dist/index.mjs
|
|
2436
|
-
var
|
|
2461
|
+
var pr = 5e4, mr = "background-color: color-mix(in srgb, var(--rc-alert-caution) 22%, transparent); text-decoration: line-through;", hr = "background-color: color-mix(in srgb, var(--rc-alert-tip) 22%, transparent);";
|
|
2437
2462
|
function Z(e) {
|
|
2438
2463
|
let t = e;
|
|
2439
2464
|
return t.type === "heading" ? `heading:${t.tag}` : t.type === "list" ? `list:${t.listType}` : t.type || "unknown";
|
|
2440
2465
|
}
|
|
2441
|
-
function
|
|
2466
|
+
function gr(e, t) {
|
|
2442
2467
|
return JSON.stringify(e) === JSON.stringify(t);
|
|
2443
2468
|
}
|
|
2444
|
-
function
|
|
2469
|
+
function _r(e) {
|
|
2445
2470
|
let t = e;
|
|
2446
2471
|
return t.type === "text" && typeof t.text == "string";
|
|
2447
2472
|
}
|
|
2448
|
-
function
|
|
2473
|
+
function vr(e) {
|
|
2449
2474
|
let t = e;
|
|
2450
2475
|
return Array.isArray(t.children) ? t.children : null;
|
|
2451
2476
|
}
|
|
2452
|
-
function
|
|
2477
|
+
function yr(e, t) {
|
|
2453
2478
|
let n = typeof e == "string" ? e.trim() : "";
|
|
2454
2479
|
return n ? `${n}${n.endsWith(";") ? "" : ";"} ${t}` : t;
|
|
2455
2480
|
}
|
|
2456
2481
|
function Q(e, t, n) {
|
|
2457
2482
|
let { style: r } = e;
|
|
2458
|
-
return n === "delete" ? r =
|
|
2483
|
+
return n === "delete" ? r = yr(r, mr) : n === "insert" && (r = yr(r, hr)), {
|
|
2459
2484
|
...e,
|
|
2460
2485
|
text: t,
|
|
2461
2486
|
style: r
|
|
2462
2487
|
};
|
|
2463
2488
|
}
|
|
2464
|
-
function
|
|
2489
|
+
function br(e, t) {
|
|
2465
2490
|
return {
|
|
2466
2491
|
...e,
|
|
2467
2492
|
children: t
|
|
2468
2493
|
};
|
|
2469
2494
|
}
|
|
2470
2495
|
function $(e, t) {
|
|
2471
|
-
if (
|
|
2472
|
-
let n =
|
|
2473
|
-
return n ?
|
|
2496
|
+
if (_r(e)) return Q(e, e.text, t);
|
|
2497
|
+
let n = vr(e);
|
|
2498
|
+
return n ? br(e, n.map((e) => $(e, t))) : e;
|
|
2474
2499
|
}
|
|
2475
|
-
function
|
|
2500
|
+
function xr(e) {
|
|
2476
2501
|
return Array.from(e).reverse().join("");
|
|
2477
2502
|
}
|
|
2478
|
-
function
|
|
2503
|
+
function Sr(e) {
|
|
2479
2504
|
let t = [];
|
|
2480
2505
|
for (let n of e) {
|
|
2481
2506
|
if (!n.text) continue;
|
|
@@ -2484,7 +2509,7 @@ function mr(e) {
|
|
|
2484
2509
|
}
|
|
2485
2510
|
return t;
|
|
2486
2511
|
}
|
|
2487
|
-
function
|
|
2512
|
+
function Cr(e, t) {
|
|
2488
2513
|
let n = e.length, r = t.length;
|
|
2489
2514
|
if (n === 0 && r === 0) return [];
|
|
2490
2515
|
if (n === 0) return [{
|
|
@@ -2495,7 +2520,7 @@ function hr(e, t) {
|
|
|
2495
2520
|
kind: "delete",
|
|
2496
2521
|
text: e.join("")
|
|
2497
2522
|
}];
|
|
2498
|
-
if (n * r >
|
|
2523
|
+
if (n * r > pr) return [{
|
|
2499
2524
|
kind: "delete",
|
|
2500
2525
|
text: e.join("")
|
|
2501
2526
|
}, {
|
|
@@ -2538,12 +2563,12 @@ function hr(e, t) {
|
|
|
2538
2563
|
text: t[s - 1]
|
|
2539
2564
|
}), s--;
|
|
2540
2565
|
}
|
|
2541
|
-
return
|
|
2566
|
+
return Sr(a.reverse().map((e) => ({
|
|
2542
2567
|
kind: e.kind,
|
|
2543
|
-
text:
|
|
2568
|
+
text: xr(e.text)
|
|
2544
2569
|
})));
|
|
2545
2570
|
}
|
|
2546
|
-
function
|
|
2571
|
+
function wr(e, t) {
|
|
2547
2572
|
let n = Array.from(e), r = Array.from(t), i = 0;
|
|
2548
2573
|
for (; i < n.length && i < r.length && n[i] === r[i];) i++;
|
|
2549
2574
|
let a = n.length - 1, o = r.length - 1;
|
|
@@ -2552,13 +2577,13 @@ function gr(e, t) {
|
|
|
2552
2577
|
return i > 0 && s.push({
|
|
2553
2578
|
kind: "equal",
|
|
2554
2579
|
text: n.slice(0, i).join("")
|
|
2555
|
-
}), s.push(...
|
|
2580
|
+
}), s.push(...Cr(n.slice(i, a + 1), r.slice(i, o + 1))), a < n.length - 1 && s.push({
|
|
2556
2581
|
kind: "equal",
|
|
2557
2582
|
text: n.slice(a + 1).join("")
|
|
2558
|
-
}),
|
|
2583
|
+
}), Sr(s);
|
|
2559
2584
|
}
|
|
2560
|
-
function
|
|
2561
|
-
let n =
|
|
2585
|
+
function Tr(e, t) {
|
|
2586
|
+
let n = wr(e.text, t.text), r = [], i = [], a = !1;
|
|
2562
2587
|
for (let o of n) o.text && (o.kind === "equal" ? (r.push(Q(e, o.text)), i.push(Q(t, o.text))) : (a = !0, o.kind === "delete" ? r.push(Q(e, o.text, "delete")) : i.push(Q(t, o.text, "insert"))));
|
|
2563
2588
|
return {
|
|
2564
2589
|
oldNodes: r.length > 0 ? r : [e],
|
|
@@ -2566,19 +2591,19 @@ function _r(e, t) {
|
|
|
2566
2591
|
changed: a
|
|
2567
2592
|
};
|
|
2568
2593
|
}
|
|
2569
|
-
function
|
|
2594
|
+
function Er(e, t) {
|
|
2570
2595
|
let n = e.length, r = t.length, i = Array.from({ length: n + 1 }, () => Array.from({ length: r + 1 }).fill(0));
|
|
2571
2596
|
for (let a = 1; a <= n; a++) for (let n = 1; n <= r; n++) {
|
|
2572
2597
|
let r = Math.max(i[a - 1][n], i[a][n - 1]);
|
|
2573
2598
|
if (Z(e[a - 1]) === Z(t[n - 1])) {
|
|
2574
|
-
let o =
|
|
2599
|
+
let o = gr(e[a - 1], t[n - 1]) ? 2 : 1;
|
|
2575
2600
|
i[a][n] = Math.max(r, i[a - 1][n - 1] + o);
|
|
2576
2601
|
} else i[a][n] = r;
|
|
2577
2602
|
}
|
|
2578
2603
|
let a = [], o = n, s = r;
|
|
2579
2604
|
for (; o > 0 && s > 0;) {
|
|
2580
2605
|
if (Z(e[o - 1]) === Z(t[s - 1])) {
|
|
2581
|
-
let n =
|
|
2606
|
+
let n = gr(e[o - 1], t[s - 1]), r = n ? 2 : 1;
|
|
2582
2607
|
if (i[o][s] === i[o - 1][s - 1] + r) {
|
|
2583
2608
|
a.push(n ? {
|
|
2584
2609
|
kind: "equal",
|
|
@@ -2609,8 +2634,8 @@ function vr(e, t) {
|
|
|
2609
2634
|
});
|
|
2610
2635
|
return a.reverse(), a;
|
|
2611
2636
|
}
|
|
2612
|
-
function
|
|
2613
|
-
let n =
|
|
2637
|
+
function Dr(e, t) {
|
|
2638
|
+
let n = Er(e, t), r = [], i = [], a = !1;
|
|
2614
2639
|
for (let e of n) switch (e.kind) {
|
|
2615
2640
|
case "equal":
|
|
2616
2641
|
r.push(e.node), i.push(e.node);
|
|
@@ -2622,12 +2647,12 @@ function yr(e, t) {
|
|
|
2622
2647
|
a = !0, i.push($(e.node, "insert"));
|
|
2623
2648
|
break;
|
|
2624
2649
|
case "modify": {
|
|
2625
|
-
if (a = !0,
|
|
2626
|
-
let t =
|
|
2650
|
+
if (a = !0, _r(e.oldNode) && _r(e.newNode)) {
|
|
2651
|
+
let t = Tr(e.oldNode, e.newNode);
|
|
2627
2652
|
r.push(...t.oldNodes), i.push(...t.newNodes);
|
|
2628
2653
|
break;
|
|
2629
2654
|
}
|
|
2630
|
-
let t =
|
|
2655
|
+
let t = Or(e.oldNode, e.newNode);
|
|
2631
2656
|
t ? (r.push(t.oldNode), i.push(t.newNode)) : (r.push($(e.oldNode, "delete")), i.push($(e.newNode, "insert")));
|
|
2632
2657
|
break;
|
|
2633
2658
|
}
|
|
@@ -2638,19 +2663,19 @@ function yr(e, t) {
|
|
|
2638
2663
|
changed: a
|
|
2639
2664
|
};
|
|
2640
2665
|
}
|
|
2641
|
-
function
|
|
2666
|
+
function Or(e, t) {
|
|
2642
2667
|
if (Z(e) !== Z(t)) return null;
|
|
2643
|
-
if (
|
|
2668
|
+
if (gr(e, t)) return {
|
|
2644
2669
|
oldNode: e,
|
|
2645
2670
|
newNode: t,
|
|
2646
2671
|
changed: !1
|
|
2647
2672
|
};
|
|
2648
|
-
let n =
|
|
2673
|
+
let n = vr(e), r = vr(t);
|
|
2649
2674
|
if (!n || !r) return null;
|
|
2650
|
-
let i =
|
|
2675
|
+
let i = Dr(n, r);
|
|
2651
2676
|
return i.changed ? {
|
|
2652
|
-
oldNode:
|
|
2653
|
-
newNode:
|
|
2677
|
+
oldNode: br(e, i.oldChildren),
|
|
2678
|
+
newNode: br(t, i.newChildren),
|
|
2654
2679
|
changed: !0
|
|
2655
2680
|
} : {
|
|
2656
2681
|
oldNode: e,
|
|
@@ -2658,8 +2683,8 @@ function br(e, t) {
|
|
|
2658
2683
|
changed: !1
|
|
2659
2684
|
};
|
|
2660
2685
|
}
|
|
2661
|
-
function
|
|
2662
|
-
let n =
|
|
2686
|
+
function kr(e, t) {
|
|
2687
|
+
let n = Or(e, t);
|
|
2663
2688
|
return n ? {
|
|
2664
2689
|
oldNode: n.oldNode,
|
|
2665
2690
|
newNode: n.newNode
|
|
@@ -2668,13 +2693,13 @@ function xr(e, t) {
|
|
|
2668
2693
|
newNode: $(t, "insert")
|
|
2669
2694
|
};
|
|
2670
2695
|
}
|
|
2671
|
-
function
|
|
2672
|
-
let n =
|
|
2696
|
+
function Ar(e, t) {
|
|
2697
|
+
let n = wr(e.text, t.text), r = [];
|
|
2673
2698
|
for (let i of n) i.text && (i.kind === "equal" ? r.push(Q(t, i.text)) : i.kind === "delete" ? r.push(Q(e, i.text, "delete")) : r.push(Q(t, i.text, "insert")));
|
|
2674
2699
|
return r;
|
|
2675
2700
|
}
|
|
2676
|
-
function
|
|
2677
|
-
let n =
|
|
2701
|
+
function jr(e, t) {
|
|
2702
|
+
let n = Er(e, t), r = [];
|
|
2678
2703
|
for (let e of n) switch (e.kind) {
|
|
2679
2704
|
case "equal":
|
|
2680
2705
|
r.push(e.node);
|
|
@@ -2686,25 +2711,25 @@ function Cr(e, t) {
|
|
|
2686
2711
|
r.push($(e.node, "insert"));
|
|
2687
2712
|
break;
|
|
2688
2713
|
case "modify": {
|
|
2689
|
-
if (
|
|
2690
|
-
r.push(...
|
|
2714
|
+
if (_r(e.oldNode) && _r(e.newNode)) {
|
|
2715
|
+
r.push(...Ar(e.oldNode, e.newNode));
|
|
2691
2716
|
break;
|
|
2692
2717
|
}
|
|
2693
|
-
let t =
|
|
2694
|
-
t && n ? r.push(
|
|
2718
|
+
let t = vr(e.oldNode), n = vr(e.newNode);
|
|
2719
|
+
t && n ? r.push(br(e.newNode, jr(t, n))) : (r.push($(e.oldNode, "delete")), r.push($(e.newNode, "insert")));
|
|
2695
2720
|
break;
|
|
2696
2721
|
}
|
|
2697
2722
|
}
|
|
2698
2723
|
return r;
|
|
2699
2724
|
}
|
|
2700
|
-
function
|
|
2725
|
+
function Mr(e, t) {
|
|
2701
2726
|
if (Z(e) !== Z(t)) return $(t, "insert");
|
|
2702
|
-
if (
|
|
2703
|
-
let n =
|
|
2704
|
-
return !n || !r ? $(t, "insert") :
|
|
2727
|
+
if (gr(e, t)) return t;
|
|
2728
|
+
let n = vr(e), r = vr(t);
|
|
2729
|
+
return !n || !r ? $(t, "insert") : br(t, jr(n, r));
|
|
2705
2730
|
}
|
|
2706
|
-
function
|
|
2707
|
-
let n =
|
|
2731
|
+
function Nr(e, t) {
|
|
2732
|
+
let n = Er(e.root.children, t.root.children), r = [];
|
|
2708
2733
|
for (let e of n) switch (e.kind) {
|
|
2709
2734
|
case "equal": {
|
|
2710
2735
|
let t = r.at(-1);
|
|
@@ -2716,7 +2741,7 @@ function Tr(e, t) {
|
|
|
2716
2741
|
}
|
|
2717
2742
|
case "modify":
|
|
2718
2743
|
{
|
|
2719
|
-
let t =
|
|
2744
|
+
let t = kr(e.oldNode, e.newNode);
|
|
2720
2745
|
r.push({
|
|
2721
2746
|
type: "delete",
|
|
2722
2747
|
nodes: [t.oldNode]
|
|
@@ -2740,19 +2765,19 @@ function Tr(e, t) {
|
|
|
2740
2765
|
return r;
|
|
2741
2766
|
}
|
|
2742
2767
|
// src/viewer/document/historyDiff.ts
|
|
2743
|
-
function
|
|
2768
|
+
function Pr(e) {
|
|
2744
2769
|
let t = { ...e };
|
|
2745
2770
|
if (t.$) {
|
|
2746
2771
|
let { blockId: e, ...n } = t.$;
|
|
2747
2772
|
Object.keys(n).length ? t.$ = n : delete t.$;
|
|
2748
2773
|
}
|
|
2749
|
-
return t.children &&= t.children.map(
|
|
2774
|
+
return t.children &&= t.children.map(Pr), t;
|
|
2750
2775
|
}
|
|
2751
|
-
function
|
|
2776
|
+
function Fr(e, t) {
|
|
2752
2777
|
let { children: n, text: r, ...i } = e, { children: a, text: o, ...s } = t;
|
|
2753
|
-
return JSON.stringify(i) !== JSON.stringify(s) || !!(n && a &&
|
|
2778
|
+
return JSON.stringify(i) !== JSON.stringify(s) || !!(n && a && zr(n, a).some((e) => e.kind === "modify" && Fr(e.old[0], e.current[0])));
|
|
2754
2779
|
}
|
|
2755
|
-
function
|
|
2780
|
+
function Ir(e) {
|
|
2756
2781
|
let t = e;
|
|
2757
2782
|
return t.type === "dynamic" || t.type === "pending" ? {
|
|
2758
2783
|
type: "paragraph",
|
|
@@ -2763,11 +2788,11 @@ function Or(e) {
|
|
|
2763
2788
|
children: [{
|
|
2764
2789
|
type: "text",
|
|
2765
2790
|
version: 1,
|
|
2766
|
-
text: t.type === "dynamic" ?
|
|
2791
|
+
text: t.type === "dynamic" ? D.t("history.dynamic", {
|
|
2767
2792
|
url: t.url,
|
|
2768
2793
|
height: t.initialHeight ?? 320,
|
|
2769
2794
|
props: JSON.stringify(t.props ?? {})
|
|
2770
|
-
}) :
|
|
2795
|
+
}) : D.t("history.pendingIntent", { intent: t.intent ?? "" }),
|
|
2771
2796
|
format: 0,
|
|
2772
2797
|
detail: 0,
|
|
2773
2798
|
mode: "normal",
|
|
@@ -2775,13 +2800,13 @@ function Or(e) {
|
|
|
2775
2800
|
}]
|
|
2776
2801
|
} : t.children ? {
|
|
2777
2802
|
...t,
|
|
2778
|
-
children: t.children.map(
|
|
2803
|
+
children: t.children.map(Ir)
|
|
2779
2804
|
} : t;
|
|
2780
2805
|
}
|
|
2781
|
-
function
|
|
2782
|
-
return
|
|
2806
|
+
function Lr(e) {
|
|
2807
|
+
return Rr(e.map(Ir));
|
|
2783
2808
|
}
|
|
2784
|
-
function
|
|
2809
|
+
function Rr(e) {
|
|
2785
2810
|
return { root: {
|
|
2786
2811
|
type: "root",
|
|
2787
2812
|
version: 1,
|
|
@@ -2791,8 +2816,8 @@ function Ar(e) {
|
|
|
2791
2816
|
children: e
|
|
2792
2817
|
} };
|
|
2793
2818
|
}
|
|
2794
|
-
function
|
|
2795
|
-
let n =
|
|
2819
|
+
function zr(e, t) {
|
|
2820
|
+
let n = Nr(Rr(e), Rr(t)), r = [], i = 0, a = 0;
|
|
2796
2821
|
for (let o = 0; o < n.length; o++) {
|
|
2797
2822
|
let s = n[o];
|
|
2798
2823
|
if (s.type === "equal") {
|
|
@@ -2825,73 +2850,73 @@ function jr(e, t) {
|
|
|
2825
2850
|
}
|
|
2826
2851
|
return r;
|
|
2827
2852
|
}
|
|
2828
|
-
function
|
|
2829
|
-
return
|
|
2853
|
+
function Br(e, t) {
|
|
2854
|
+
return zr(e.root.children.map(Pr), t.root.children.map(Pr)).map((e) => {
|
|
2830
2855
|
let t = {
|
|
2831
2856
|
oldIndex: e.oldIndex,
|
|
2832
2857
|
newIndex: e.newIndex
|
|
2833
2858
|
};
|
|
2834
2859
|
if (e.kind === "modify") {
|
|
2835
2860
|
let n = e.old[0], r = e.current[0];
|
|
2836
|
-
return n.type === r.type && !
|
|
2861
|
+
return n.type === r.type && !Fr(n, r) ? {
|
|
2837
2862
|
kind: "modify",
|
|
2838
|
-
value:
|
|
2863
|
+
value: Lr([Mr(n, r)]),
|
|
2839
2864
|
...t
|
|
2840
2865
|
} : {
|
|
2841
2866
|
kind: "modify",
|
|
2842
|
-
before:
|
|
2843
|
-
value:
|
|
2867
|
+
before: Lr(e.old),
|
|
2868
|
+
value: Lr(e.current),
|
|
2844
2869
|
...t
|
|
2845
2870
|
};
|
|
2846
2871
|
}
|
|
2847
2872
|
let n = e.kind === "delete" ? e.old : e.current;
|
|
2848
2873
|
return {
|
|
2849
2874
|
kind: e.kind,
|
|
2850
|
-
value:
|
|
2875
|
+
value: Lr(e.kind === "equal" ? n : n.map((t) => $(t, e.kind))),
|
|
2851
2876
|
...t
|
|
2852
2877
|
};
|
|
2853
2878
|
});
|
|
2854
2879
|
}
|
|
2855
2880
|
// src/viewer/document/DocumentHistory.tsx
|
|
2856
|
-
var
|
|
2857
|
-
function
|
|
2858
|
-
let [s, c] = G(null), [l, u] = G(null), d = W(null),
|
|
2881
|
+
var Vr = (e) => JSON.stringify(e.frontiers()), Hr = (e, t) => t === void 0 ? void 0 : e[t];
|
|
2882
|
+
function Ur({ doc: e, nodes: t, streaming: n, theme: r, title: i, open: a, onClose: o }) {
|
|
2883
|
+
let [s, c] = G(null), [l, u] = G(null), d = W(null), f = W(null), p = W(0), [m, g] = G(!0), [_, v] = G(null), [y, b] = G(!1), [x, S] = G([]), [C, w] = G(!1), [T, E] = G(0), [D, O] = G(!1), k = h("(max-width: 1100px)"), ee = W(null), A = V(async () => {
|
|
2859
2884
|
if (!e) return;
|
|
2860
|
-
let n = ++
|
|
2885
|
+
let n = ++p.current;
|
|
2861
2886
|
g(!0), v(null);
|
|
2862
2887
|
let r = e.fork();
|
|
2863
2888
|
try {
|
|
2864
|
-
let i = await
|
|
2865
|
-
if (
|
|
2889
|
+
let i = await vn(r), a = yn(r, r.frontiers(), t);
|
|
2890
|
+
if (p.current !== n) {
|
|
2866
2891
|
r.free();
|
|
2867
2892
|
return;
|
|
2868
2893
|
}
|
|
2869
|
-
let o =
|
|
2870
|
-
|
|
2894
|
+
let o = f.current;
|
|
2895
|
+
f.current = r;
|
|
2871
2896
|
let s = (d.current && i.entries.find((e) => e.id === d.current.id)) ?? i.groups[1]?.entries.at(-1) ?? i.entries[0] ?? null;
|
|
2872
2897
|
d.current = s, u(s), c({
|
|
2873
2898
|
doc: r,
|
|
2874
2899
|
history: i,
|
|
2875
2900
|
latest: a
|
|
2876
|
-
}), b(
|
|
2901
|
+
}), b(Vr(e) !== Vr(r)), o?.free();
|
|
2877
2902
|
} catch (e) {
|
|
2878
|
-
r.free(),
|
|
2903
|
+
r.free(), p.current === n && v(e.message);
|
|
2879
2904
|
} finally {
|
|
2880
|
-
|
|
2905
|
+
p.current === n && g(!1);
|
|
2881
2906
|
}
|
|
2882
2907
|
}, [e, t]);
|
|
2883
2908
|
if (H(() => {
|
|
2884
2909
|
if (a) return () => {
|
|
2885
|
-
|
|
2910
|
+
p.current++, f.current?.free(), f.current = null, d.current = null, c(null), u(null), S([]), b(!1), v(null), g(!0), O(!1), w(!1);
|
|
2886
2911
|
};
|
|
2887
2912
|
}, [a, e]), H(() => {
|
|
2888
|
-
a && !n && !
|
|
2913
|
+
a && !n && !f.current && A();
|
|
2889
2914
|
}, [
|
|
2890
2915
|
a,
|
|
2891
|
-
|
|
2916
|
+
A,
|
|
2892
2917
|
n
|
|
2893
2918
|
]), H(() => {
|
|
2894
|
-
if (a && e) return e.subscribe(() => b(
|
|
2919
|
+
if (a && e) return e.subscribe(() => b(f.current !== null && Vr(e) !== Vr(f.current)));
|
|
2895
2920
|
}, [e, a]), H(() => {
|
|
2896
2921
|
if (!a) return;
|
|
2897
2922
|
let e = (e) => {
|
|
@@ -2908,9 +2933,9 @@ function Fr({ doc: e, nodes: t, streaming: n, theme: r, title: i, open: a, onClo
|
|
|
2908
2933
|
g(!0);
|
|
2909
2934
|
let n = setTimeout(() => {
|
|
2910
2935
|
try {
|
|
2911
|
-
let n =
|
|
2936
|
+
let n = yn(s.doc, l.frontiers, t), { entries: r, groups: i } = s.history, a = xn(s.doc, r.slice(r.indexOf(l) + 1), [n, s.latest]), o = new Map(i.flatMap((e) => e.entries.map((t) => [t, e]))), c = Br(n.value, s.latest.value).map((e) => {
|
|
2912
2937
|
if (e.kind === "equal") return e;
|
|
2913
|
-
let t = [
|
|
2938
|
+
let t = [Hr(s.latest.ids, e.newIndex), Hr(n.ids, e.oldIndex)].map((e) => e && a.get(e)).find(Boolean);
|
|
2914
2939
|
return t ? {
|
|
2915
2940
|
...e,
|
|
2916
2941
|
author: t,
|
|
@@ -2932,13 +2957,13 @@ function Fr({ doc: e, nodes: t, streaming: n, theme: r, title: i, open: a, onClo
|
|
|
2932
2957
|
l,
|
|
2933
2958
|
t
|
|
2934
2959
|
]), !a || !e) return null;
|
|
2935
|
-
let
|
|
2960
|
+
let te = x.filter((e) => e.kind !== "equal").length, ne = {
|
|
2936
2961
|
session: s,
|
|
2937
2962
|
selected: l,
|
|
2938
2963
|
blocks: x,
|
|
2939
|
-
count:
|
|
2964
|
+
count: te,
|
|
2940
2965
|
changeIndex: T,
|
|
2941
|
-
loading:
|
|
2966
|
+
loading: m,
|
|
2942
2967
|
error: _,
|
|
2943
2968
|
pending: y,
|
|
2944
2969
|
streaming: n,
|
|
@@ -2947,34 +2972,34 @@ function Fr({ doc: e, nodes: t, streaming: n, theme: r, title: i, open: a, onClo
|
|
|
2947
2972
|
d.current = e, u(e), O(!1);
|
|
2948
2973
|
},
|
|
2949
2974
|
navigate: (e) => {
|
|
2950
|
-
let t = Math.max(0, Math.min(
|
|
2951
|
-
E(t), (
|
|
2975
|
+
let t = Math.max(0, Math.min(te - 1, T + e));
|
|
2976
|
+
E(t), (ee.current?.querySelectorAll("[data-history-change]"))?.[t]?.scrollIntoView?.({
|
|
2952
2977
|
block: "center",
|
|
2953
2978
|
behavior: "instant"
|
|
2954
2979
|
});
|
|
2955
2980
|
},
|
|
2956
2981
|
toggleOnly: () => w((e) => !e),
|
|
2957
2982
|
showAll: () => w(!1),
|
|
2958
|
-
refresh: () => void
|
|
2983
|
+
refresh: () => void A(),
|
|
2959
2984
|
close: o
|
|
2960
2985
|
};
|
|
2961
2986
|
return {
|
|
2962
|
-
content: /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(
|
|
2963
|
-
bodyRef:
|
|
2964
|
-
model:
|
|
2965
|
-
narrow:
|
|
2987
|
+
content: /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(fr, {
|
|
2988
|
+
bodyRef: ee,
|
|
2989
|
+
model: ne,
|
|
2990
|
+
narrow: k,
|
|
2966
2991
|
theme: r,
|
|
2967
2992
|
title: i,
|
|
2968
2993
|
onPick: () => O(!0)
|
|
2969
|
-
}),
|
|
2970
|
-
model:
|
|
2994
|
+
}), k && D ? /* @__PURE__ */ q(cr, {
|
|
2995
|
+
model: ne,
|
|
2971
2996
|
onDismiss: () => O(!1)
|
|
2972
2997
|
}) : null] }),
|
|
2973
|
-
panel:
|
|
2998
|
+
panel: k ? null : /* @__PURE__ */ q(sr, { model: ne })
|
|
2974
2999
|
};
|
|
2975
3000
|
}
|
|
2976
3001
|
// src/viewer/document/LinkedBoards.tsx
|
|
2977
|
-
function
|
|
3002
|
+
function Wr(e) {
|
|
2978
3003
|
let t = /* @__PURE__ */ new Map();
|
|
2979
3004
|
for (let n of e) {
|
|
2980
3005
|
if (!n.artboard) continue;
|
|
@@ -2986,8 +3011,8 @@ function Ir(e) {
|
|
|
2986
3011
|
}
|
|
2987
3012
|
return [...t.values()];
|
|
2988
3013
|
}
|
|
2989
|
-
function
|
|
2990
|
-
let { t: n } =
|
|
3014
|
+
function Gr({ refs: e, onOpen: t }) {
|
|
3015
|
+
let { t: n } = T(), [r, i] = G(!1), a = W(null);
|
|
2991
3016
|
H(() => {
|
|
2992
3017
|
if (!r) return;
|
|
2993
3018
|
let e = (e) => {
|
|
@@ -2995,7 +3020,7 @@ function Lr({ refs: e, onOpen: t }) {
|
|
|
2995
3020
|
};
|
|
2996
3021
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
2997
3022
|
}, [r]);
|
|
2998
|
-
let o =
|
|
3023
|
+
let o = Wr(e);
|
|
2999
3024
|
return o.length ? /* @__PURE__ */ J("div", {
|
|
3000
3025
|
ref: a,
|
|
3001
3026
|
className: "x1n2onr6",
|
|
@@ -3006,13 +3031,13 @@ function Lr({ refs: e, onOpen: t }) {
|
|
|
3006
3031
|
onClick: () => i((e) => !e),
|
|
3007
3032
|
className: "x3nfvp2 x6s0dn4 x17d4w8g x1fgtraw x1awh872 xmkeg23 x1y0btm7 x12xov25 xur7f20 xjbqb8w xo2rkog xjb2p0i xfifm61 x1ypdohk xj0l527",
|
|
3008
3033
|
children: [
|
|
3009
|
-
/* @__PURE__ */ q(
|
|
3034
|
+
/* @__PURE__ */ q(Mt, { size: 14 }),
|
|
3010
3035
|
n("refs.linked"),
|
|
3011
3036
|
/* @__PURE__ */ q("span", {
|
|
3012
3037
|
className: "xddlp02 xss6m8b",
|
|
3013
3038
|
children: o.length
|
|
3014
3039
|
}),
|
|
3015
|
-
/* @__PURE__ */ q(
|
|
3040
|
+
/* @__PURE__ */ q(Ot, { size: 13 })
|
|
3016
3041
|
]
|
|
3017
3042
|
}), r && /* @__PURE__ */ J("div", {
|
|
3018
3043
|
role: "menu",
|
|
@@ -3032,7 +3057,7 @@ function Lr({ refs: e, onOpen: t }) {
|
|
|
3032
3057
|
},
|
|
3033
3058
|
className: "x78zum5 x6s0dn4 x883omv xh8yej3 xe8ttls xc342km xu4hgxq xjbqb8w xo2rkog xjb2p0i x4z9k3i x1yc453h x1ypdohk xj0l527",
|
|
3034
3059
|
children: [
|
|
3035
|
-
/* @__PURE__ */ q(
|
|
3060
|
+
/* @__PURE__ */ q(Mt, { size: 15 }),
|
|
3036
3061
|
/* @__PURE__ */ q("span", {
|
|
3037
3062
|
className: "x98rzlu xeuugli xb3r6kr xlyipyv",
|
|
3038
3063
|
children: e
|
|
@@ -3041,27 +3066,27 @@ function Lr({ refs: e, onOpen: t }) {
|
|
|
3041
3066
|
className: "x1qt5hsa xddlp02",
|
|
3042
3067
|
children: n("refs.count", { count: r })
|
|
3043
3068
|
}),
|
|
3044
|
-
/* @__PURE__ */ q(
|
|
3069
|
+
/* @__PURE__ */ q(It, { size: 15 })
|
|
3045
3070
|
]
|
|
3046
3071
|
}, e))]
|
|
3047
3072
|
})]
|
|
3048
3073
|
}) : null;
|
|
3049
3074
|
}
|
|
3050
3075
|
// src/viewer/document/PhoneEditMenu.tsx
|
|
3051
|
-
function
|
|
3076
|
+
function Kr({ left: e, top: t, placement: n, canComment: r, canEdit: i, onComment: a, onEdit: o }) {
|
|
3052
3077
|
let s = W(null), c = [r ? {
|
|
3053
|
-
label:
|
|
3054
|
-
Icon:
|
|
3078
|
+
label: k("common.comment"),
|
|
3079
|
+
Icon: Ft,
|
|
3055
3080
|
run: a,
|
|
3056
3081
|
primary: !0
|
|
3057
3082
|
} : null, i ? {
|
|
3058
|
-
label:
|
|
3059
|
-
Icon:
|
|
3083
|
+
label: k("document.editText"),
|
|
3084
|
+
Icon: Lt,
|
|
3060
3085
|
run: o,
|
|
3061
3086
|
primary: !1
|
|
3062
3087
|
} : null].filter((e) => e !== null);
|
|
3063
|
-
return
|
|
3064
|
-
|
|
3088
|
+
return Tt(() => {
|
|
3089
|
+
C(s.current, [{
|
|
3065
3090
|
opacity: 0,
|
|
3066
3091
|
transform: "scale(0.96)"
|
|
3067
3092
|
}, {
|
|
@@ -3069,7 +3094,7 @@ function Rr({ left: e, top: t, placement: n, canComment: r, canEdit: i, onCommen
|
|
|
3069
3094
|
transform: "none"
|
|
3070
3095
|
}], {
|
|
3071
3096
|
duration: 160,
|
|
3072
|
-
easing:
|
|
3097
|
+
easing: d
|
|
3073
3098
|
});
|
|
3074
3099
|
}, []), c.length === 0 ? null : /* @__PURE__ */ J("div", {
|
|
3075
3100
|
"data-edit-menu": !0,
|
|
@@ -3103,12 +3128,12 @@ function Rr({ left: e, top: t, placement: n, canComment: r, canEdit: i, onCommen
|
|
|
3103
3128
|
});
|
|
3104
3129
|
}
|
|
3105
3130
|
// src/viewer/document/PhoneLayout.tsx
|
|
3106
|
-
var
|
|
3107
|
-
function
|
|
3108
|
-
let [g, _] = G(null), [v, y] = G(null), [b, x] = G(78), [S, C] = G(null), w =
|
|
3109
|
-
|
|
3131
|
+
var qr = 52;
|
|
3132
|
+
function Jr({ editor: e, threads: t, actions: n, agent: r, canComment: i, canEdit: a, offline: o, selection: s, clearSelection: c, onCreate: l, onEdit: d, onMain: f, history: p, shareBase: m, children: h }) {
|
|
3133
|
+
let [g, _] = G(null), [v, y] = G(null), [b, x] = G(78), [S, C] = G(null), w = de(e, t, g);
|
|
3134
|
+
De(w, t, v), mt(S?.range ?? null, S?.elements);
|
|
3110
3135
|
let T = () => {
|
|
3111
|
-
window.getSelection()?.removeAllRanges(),
|
|
3136
|
+
window.getSelection()?.removeAllRanges(), c();
|
|
3112
3137
|
};
|
|
3113
3138
|
return /* @__PURE__ */ J("main", {
|
|
3114
3139
|
ref: (e) => {
|
|
@@ -3116,43 +3141,43 @@ function Br({ editor: e, threads: t, actions: n, agent: r, canComment: i, canEdi
|
|
|
3116
3141
|
},
|
|
3117
3142
|
className: "x1n2onr6 x1cnzs8 x17qtykl x1ffnkcp",
|
|
3118
3143
|
children: [
|
|
3119
|
-
/* @__PURE__ */ q(
|
|
3120
|
-
e ? /* @__PURE__ */ q(
|
|
3144
|
+
/* @__PURE__ */ q(Ie, { editor: e }),
|
|
3145
|
+
e ? /* @__PURE__ */ q(gt, {
|
|
3121
3146
|
editor: e,
|
|
3122
3147
|
shareBase: m
|
|
3123
3148
|
}) : null,
|
|
3124
3149
|
/* @__PURE__ */ J("article", {
|
|
3125
3150
|
onClick: (e) => {
|
|
3126
|
-
let t =
|
|
3127
|
-
y(t), t && x(
|
|
3151
|
+
let t = Ee(w, e.clientX, e.clientY);
|
|
3152
|
+
y(t), t && x(ln);
|
|
3128
3153
|
},
|
|
3129
3154
|
children: [p?.content, /* @__PURE__ */ q("div", {
|
|
3130
3155
|
hidden: !!p,
|
|
3131
3156
|
children: h
|
|
3132
3157
|
})]
|
|
3133
3158
|
}),
|
|
3134
|
-
s && !S && !p ? /* @__PURE__ */ q(
|
|
3135
|
-
...
|
|
3159
|
+
s && !S && !p ? /* @__PURE__ */ q(Kr, {
|
|
3160
|
+
...ye(s, {
|
|
3136
3161
|
left: 8,
|
|
3137
3162
|
right: (g?.clientWidth ?? 0) - 8
|
|
3138
3163
|
}, 170, 44, {
|
|
3139
3164
|
top: g?.getBoundingClientRect().top ?? 0,
|
|
3140
3165
|
height: window.innerHeight,
|
|
3141
|
-
reserved:
|
|
3166
|
+
reserved: u(b, window.innerHeight - qr)
|
|
3142
3167
|
}),
|
|
3143
3168
|
canComment: i,
|
|
3144
3169
|
canEdit: a && s.kind !== "block",
|
|
3145
3170
|
onComment: () => {
|
|
3146
|
-
C(s), x(
|
|
3171
|
+
C(s), x(cn), T();
|
|
3147
3172
|
},
|
|
3148
3173
|
onEdit: () => {
|
|
3149
|
-
d(s),
|
|
3174
|
+
d(s), c();
|
|
3150
3175
|
}
|
|
3151
3176
|
}) : null,
|
|
3152
3177
|
/* @__PURE__ */ q("div", {
|
|
3153
3178
|
hidden: !!p,
|
|
3154
3179
|
className: "xixxii4 x1ozmhy9 xu96u03 x3m8u43 x1ey2m1c x1355qak x47corl",
|
|
3155
|
-
children: /* @__PURE__ */ q(
|
|
3180
|
+
children: /* @__PURE__ */ q(un, {
|
|
3156
3181
|
actions: n,
|
|
3157
3182
|
activeId: v,
|
|
3158
3183
|
agent: r,
|
|
@@ -3161,7 +3186,7 @@ function Br({ editor: e, threads: t, actions: n, agent: r, canComment: i, canEdi
|
|
|
3161
3186
|
snap: b,
|
|
3162
3187
|
threads: t,
|
|
3163
3188
|
onCancelDraft: () => C(null),
|
|
3164
|
-
onCreate:
|
|
3189
|
+
onCreate: l,
|
|
3165
3190
|
onSnap: x
|
|
3166
3191
|
})
|
|
3167
3192
|
})
|
|
@@ -3169,9 +3194,9 @@ function Br({ editor: e, threads: t, actions: n, agent: r, canComment: i, canEdi
|
|
|
3169
3194
|
});
|
|
3170
3195
|
}
|
|
3171
3196
|
// src/viewer/document/TopBar.tsx
|
|
3172
|
-
function
|
|
3173
|
-
let f = o ?
|
|
3174
|
-
return
|
|
3197
|
+
function Yr({ id: e, title: t, activity: n, agentSection: r, offline: i, openComments: a, cloud: o, compact: s = !1, onDone: c, actions: l, agent: u = "Agent", history: d }) {
|
|
3198
|
+
let f = o ? Kt(n, u, r) : null;
|
|
3199
|
+
return g(e, o ? {
|
|
3175
3200
|
...t ? { title: t } : {},
|
|
3176
3201
|
online: o.online,
|
|
3177
3202
|
comments: a,
|
|
@@ -3191,7 +3216,7 @@ function Vr({ id: e, title: t, activity: n, agentSection: r, offline: i, openCom
|
|
|
3191
3216
|
s ? null : /* @__PURE__ */ J("span", {
|
|
3192
3217
|
className: "xddlp02 xfifm61 xuxw1ft",
|
|
3193
3218
|
children: [
|
|
3194
|
-
|
|
3219
|
+
k("type.document"),
|
|
3195
3220
|
" / ",
|
|
3196
3221
|
/* @__PURE__ */ q("span", {
|
|
3197
3222
|
className: "xo2rkog x1s688f",
|
|
@@ -3208,14 +3233,14 @@ function Vr({ id: e, title: t, activity: n, agentSection: r, offline: i, openCom
|
|
|
3208
3233
|
}) : null,
|
|
3209
3234
|
i ? /* @__PURE__ */ q("span", {
|
|
3210
3235
|
className: "x78zum5 x6s0dn4 x17d4w8g xj8oexa x1awh872 x1e6avla x1j6dyjg xuxw1ft xeuugli xb3r6kr xlyipyv xqdcvd7 x7zghnd",
|
|
3211
|
-
children:
|
|
3236
|
+
children: k("document.notSynced")
|
|
3212
3237
|
}) : null,
|
|
3213
3238
|
d?.open ? /* @__PURE__ */ J("span", {
|
|
3214
3239
|
className: "x78zum5 x6s0dn4 x17d4w8g xj8oexa x1awh872 x1e6avla x1j6dyjg xuxw1ft xeuugli xb3r6kr xlyipyv xahzvm9 x1bo0w0s",
|
|
3215
|
-
children: [/* @__PURE__ */ q(
|
|
3240
|
+
children: [/* @__PURE__ */ q(Pt, {
|
|
3216
3241
|
"aria-hidden": "true",
|
|
3217
3242
|
size: 11
|
|
3218
|
-
}),
|
|
3243
|
+
}), k("document.readOnlyHistory")]
|
|
3219
3244
|
}) : null,
|
|
3220
3245
|
o?.reason && !s ? /* @__PURE__ */ q("span", {
|
|
3221
3246
|
className: "xb3r6kr xddlp02 xfifm61 xuxw1ft xlyipyv",
|
|
@@ -3227,9 +3252,9 @@ function Vr({ id: e, title: t, activity: n, agentSection: r, offline: i, openCom
|
|
|
3227
3252
|
children: [/* @__PURE__ */ q("i", { ...{
|
|
3228
3253
|
0: { className: "xci0xqf x1hagigm x16rqkct xxwmxtg" },
|
|
3229
3254
|
1: { className: "xci0xqf x1hagigm x16rqkct xux1nz0" }
|
|
3230
|
-
}[!!o.online | 0] }), o.online ?
|
|
3255
|
+
}[!!o.online | 0] }), o.online ? k("share.computerOnline") : k("share.computerOffline")]
|
|
3231
3256
|
}) : null,
|
|
3232
|
-
d ? /* @__PURE__ */ q(
|
|
3257
|
+
d ? /* @__PURE__ */ q(y, {
|
|
3233
3258
|
available: d.available,
|
|
3234
3259
|
comments: a,
|
|
3235
3260
|
open: d.open,
|
|
@@ -3240,21 +3265,21 @@ function Vr({ id: e, title: t, activity: n, agentSection: r, offline: i, openCom
|
|
|
3240
3265
|
type: "button",
|
|
3241
3266
|
onClick: c,
|
|
3242
3267
|
className: "x12ulsxz xaope02 xc342km x1kogg8i x19ckca5 xs0jrwl xqfszdh x4z9k3i x1s688f x1ypdohk",
|
|
3243
|
-
children:
|
|
3268
|
+
children: k("common.done")
|
|
3244
3269
|
}) : o || s ? null : l
|
|
3245
3270
|
]
|
|
3246
3271
|
});
|
|
3247
3272
|
}
|
|
3248
3273
|
// src/viewer/document/selectionContext.ts
|
|
3249
|
-
function
|
|
3274
|
+
function Xr(e, t, n) {
|
|
3250
3275
|
let [r, i] = t <= n ? [t, n] : [n, t];
|
|
3251
3276
|
return {
|
|
3252
|
-
blockIds: e.slice(r, i + 1).flatMap((e) => e.id ? [e.id] : []).slice(0,
|
|
3277
|
+
blockIds: e.slice(r, i + 1).flatMap((e) => e.id ? [e.id] : []).slice(0, j.blockIds),
|
|
3253
3278
|
heading: e.slice(0, r + 1).filter((e) => e.heading).pop()?.text ?? ""
|
|
3254
3279
|
};
|
|
3255
3280
|
}
|
|
3256
3281
|
// src/viewer/document/textSelection.ts
|
|
3257
|
-
function
|
|
3282
|
+
function Zr(e, t) {
|
|
3258
3283
|
return B().getChildren().flatMap((n) => {
|
|
3259
3284
|
let r = R(n, I), i = e.getElementByKey(n.getKey());
|
|
3260
3285
|
if (!r || !i || !t.intersectsNode(i)) return [];
|
|
@@ -3271,65 +3296,65 @@ function Ur(e, t) {
|
|
|
3271
3296
|
});
|
|
3272
3297
|
}
|
|
3273
3298
|
// src/viewer/document/useDocumentSelectionSync.ts
|
|
3274
|
-
var
|
|
3299
|
+
var Qr = crypto.randomUUID(), $r = 300, ei = {
|
|
3275
3300
|
quote: "",
|
|
3276
3301
|
blockIds: [],
|
|
3277
3302
|
heading: ""
|
|
3278
3303
|
};
|
|
3279
|
-
function
|
|
3304
|
+
function ti(e) {
|
|
3280
3305
|
let t = e.read(() => {
|
|
3281
|
-
let e =
|
|
3282
|
-
if (!
|
|
3306
|
+
let e = Re();
|
|
3307
|
+
if (!dt(e)) return null;
|
|
3283
3308
|
let t = B().getChildren(), n = t.filter((t) => e.has(t.getKey()));
|
|
3284
3309
|
if (!n.length) return null;
|
|
3285
|
-
let r = t.indexOf(n[0]), { heading: i } =
|
|
3310
|
+
let r = t.indexOf(n[0]), { heading: i } = Xr(t.map((e) => ({
|
|
3286
3311
|
id: R(e, I),
|
|
3287
3312
|
heading: e.getType() === "heading",
|
|
3288
3313
|
text: e.getTextContent()
|
|
3289
3314
|
})), r, r);
|
|
3290
3315
|
return {
|
|
3291
|
-
heading: i.slice(0,
|
|
3292
|
-
blockIds: n.map((e) => R(e, I)).filter(Boolean).slice(0,
|
|
3293
|
-
quote: n.map((e) => e.getTextContent()).join("\n\n").slice(0,
|
|
3316
|
+
heading: i.slice(0, j.heading),
|
|
3317
|
+
blockIds: n.map((e) => R(e, I)).filter(Boolean).slice(0, j.blockIds),
|
|
3318
|
+
quote: n.map((e) => e.getTextContent()).join("\n\n").slice(0, j.quote)
|
|
3294
3319
|
};
|
|
3295
3320
|
});
|
|
3296
3321
|
if (t) return t;
|
|
3297
3322
|
let n = window.getSelection(), r = e.getRootElement();
|
|
3298
|
-
if (!n || n.isCollapsed || !r?.contains(n.anchorNode) || !r.contains(n.focusNode)) return
|
|
3299
|
-
let i = n.toString().trim().slice(0,
|
|
3323
|
+
if (!n || n.isCollapsed || !r?.contains(n.anchorNode) || !r.contains(n.focusNode)) return ei;
|
|
3324
|
+
let i = n.toString().trim().slice(0, j.quote);
|
|
3300
3325
|
return i ? e.read(() => {
|
|
3301
|
-
let t = B().getChildren(), r =
|
|
3326
|
+
let t = B().getChildren(), r = Zr(e, n.getRangeAt(0));
|
|
3302
3327
|
if (!r.length) return {
|
|
3303
|
-
...
|
|
3328
|
+
...ei,
|
|
3304
3329
|
quote: i
|
|
3305
3330
|
};
|
|
3306
|
-
let a = t.findIndex((e) => R(e, I) === r[0].blockId), { heading: o } =
|
|
3331
|
+
let a = t.findIndex((e) => R(e, I) === r[0].blockId), { heading: o } = Xr(t.map((e) => ({
|
|
3307
3332
|
id: R(e, I) || "",
|
|
3308
3333
|
heading: e.getType() === "heading",
|
|
3309
|
-
text: e.getTextContent().slice(0,
|
|
3334
|
+
text: e.getTextContent().slice(0, j.heading)
|
|
3310
3335
|
})), a, a);
|
|
3311
3336
|
return {
|
|
3312
3337
|
quote: i,
|
|
3313
3338
|
heading: o,
|
|
3314
|
-
blockIds: r.map((e) => e.blockId).slice(0,
|
|
3339
|
+
blockIds: r.map((e) => e.blockId).slice(0, j.blockIds)
|
|
3315
3340
|
};
|
|
3316
|
-
}) :
|
|
3341
|
+
}) : ei;
|
|
3317
3342
|
}
|
|
3318
|
-
function
|
|
3319
|
-
let i = W(
|
|
3343
|
+
function ni(e, t, n, r) {
|
|
3344
|
+
let i = W(ei);
|
|
3320
3345
|
H(() => {
|
|
3321
3346
|
if (!e) return;
|
|
3322
3347
|
let n = 0, a = () => {
|
|
3323
|
-
let n =
|
|
3348
|
+
let n = ti(e);
|
|
3324
3349
|
JSON.stringify(n) !== JSON.stringify(i.current) && (i.current = n, r({
|
|
3325
3350
|
type: "selection",
|
|
3326
3351
|
artifact: t,
|
|
3327
|
-
tab:
|
|
3352
|
+
tab: Qr,
|
|
3328
3353
|
human: !0,
|
|
3329
3354
|
...n
|
|
3330
3355
|
}));
|
|
3331
3356
|
}, o = () => {
|
|
3332
|
-
clearTimeout(n), n = window.setTimeout(a,
|
|
3357
|
+
clearTimeout(n), n = window.setTimeout(a, $r);
|
|
3333
3358
|
};
|
|
3334
3359
|
document.addEventListener("selectionchange", o);
|
|
3335
3360
|
let s = e.registerUpdateListener(o);
|
|
@@ -3344,7 +3369,7 @@ function Jr(e, t, n, r) {
|
|
|
3344
3369
|
n && (i.current.quote || i.current.blockIds.length) && r({
|
|
3345
3370
|
type: "selection",
|
|
3346
3371
|
artifact: t,
|
|
3347
|
-
tab:
|
|
3372
|
+
tab: Qr,
|
|
3348
3373
|
human: !1,
|
|
3349
3374
|
...i.current
|
|
3350
3375
|
});
|
|
@@ -3355,28 +3380,28 @@ function Jr(e, t, n, r) {
|
|
|
3355
3380
|
]);
|
|
3356
3381
|
}
|
|
3357
3382
|
// src/viewer/document/usePendingBlocks.ts
|
|
3358
|
-
var
|
|
3383
|
+
var ri = {
|
|
3359
3384
|
count: 0,
|
|
3360
3385
|
firstKey: null
|
|
3361
|
-
},
|
|
3386
|
+
}, ii = (e) => e.read(() => {
|
|
3362
3387
|
let e = B().getChildren().filter((e) => e.getType() === "pending").map((e) => e.getKey());
|
|
3363
3388
|
return {
|
|
3364
3389
|
count: e.length,
|
|
3365
3390
|
firstKey: e[0] ?? null
|
|
3366
3391
|
};
|
|
3367
3392
|
});
|
|
3368
|
-
function
|
|
3369
|
-
let [t, n] = G(
|
|
3393
|
+
function ai(e) {
|
|
3394
|
+
let [t, n] = G(ri);
|
|
3370
3395
|
return H(() => {
|
|
3371
3396
|
if (!e) {
|
|
3372
|
-
n(
|
|
3397
|
+
n(ri);
|
|
3373
3398
|
return;
|
|
3374
3399
|
}
|
|
3375
3400
|
let t = (e) => n((t) => t.count === e.count && t.firstKey === e.firstKey ? t : e);
|
|
3376
|
-
return t(
|
|
3401
|
+
return t(ii(e.getEditorState())), e.registerUpdateListener(({ editorState: e }) => t(ii(e)));
|
|
3377
3402
|
}, [e]), t;
|
|
3378
3403
|
}
|
|
3379
|
-
function
|
|
3404
|
+
function oi(e, t = 15e3) {
|
|
3380
3405
|
let [n, r] = G(() => Date.now());
|
|
3381
3406
|
return H(() => {
|
|
3382
3407
|
if (!e) return;
|
|
@@ -3386,11 +3411,11 @@ function Qr(e, t = 15e3) {
|
|
|
3386
3411
|
}, [e, t]), n;
|
|
3387
3412
|
}
|
|
3388
3413
|
// src/viewer/document/useSelectionComment.ts
|
|
3389
|
-
var
|
|
3390
|
-
function
|
|
3414
|
+
var si = 200;
|
|
3415
|
+
function ci(e, t) {
|
|
3391
3416
|
let n = e.read(() => {
|
|
3392
|
-
let t =
|
|
3393
|
-
return
|
|
3417
|
+
let t = Re();
|
|
3418
|
+
return dt(t) ? B().getChildren().flatMap((n) => {
|
|
3394
3419
|
if (!t.has(n.getKey())) return [];
|
|
3395
3420
|
let r = R(n, I), i = e.getElementByKey(n.getKey());
|
|
3396
3421
|
return r && i ? [{
|
|
@@ -3416,7 +3441,7 @@ function ei(e, t) {
|
|
|
3416
3441
|
}
|
|
3417
3442
|
let r = window.getSelection(), i = e.getRootElement();
|
|
3418
3443
|
if (!r || r.isCollapsed || r.rangeCount === 0 || !i?.contains(r.anchorNode) || !i.contains(r.focusNode)) return null;
|
|
3419
|
-
let a = r.toString().trim(), o = r.getRangeAt(0), s = e.read(() =>
|
|
3444
|
+
let a = r.toString().trim(), o = r.getRangeAt(0), s = e.read(() => Zr(e, o));
|
|
3420
3445
|
if (!s.length || !a) return null;
|
|
3421
3446
|
let c = [...o.getClientRects()], l = c[0] ?? o.getBoundingClientRect(), u = c.at(-1) ?? l, d = t.getBoundingClientRect();
|
|
3422
3447
|
return {
|
|
@@ -3433,12 +3458,12 @@ function ei(e, t) {
|
|
|
3433
3458
|
range: o.cloneRange()
|
|
3434
3459
|
};
|
|
3435
3460
|
}
|
|
3436
|
-
function
|
|
3461
|
+
function li(e, t) {
|
|
3437
3462
|
let [n, r] = G(null);
|
|
3438
3463
|
return H(() => {
|
|
3439
3464
|
if (!e || !t) return;
|
|
3440
3465
|
let n = 0, i = () => {
|
|
3441
|
-
clearTimeout(n), n = window.setTimeout(() => r(
|
|
3466
|
+
clearTimeout(n), n = window.setTimeout(() => r(ci(e, t)), si);
|
|
3442
3467
|
};
|
|
3443
3468
|
document.addEventListener("selectionchange", i);
|
|
3444
3469
|
let a = e.registerUpdateListener(i);
|
|
@@ -3450,167 +3475,172 @@ function ti(e, t) {
|
|
|
3450
3475
|
}, [e, t]), [
|
|
3451
3476
|
n,
|
|
3452
3477
|
V(() => {
|
|
3453
|
-
r(null), e?.read(() =>
|
|
3478
|
+
r(null), e?.read(() => dt(Re())) && e.update(() => Qe(null));
|
|
3454
3479
|
}, [e]),
|
|
3455
|
-
V(() => e && t ?
|
|
3480
|
+
V(() => e && t ? ci(e, t) : null, [e, t])
|
|
3456
3481
|
];
|
|
3457
3482
|
}
|
|
3458
3483
|
// src/viewer/document/DocumentView.tsx
|
|
3459
|
-
var
|
|
3460
|
-
function
|
|
3484
|
+
var ui = [...ge.filter((e) => !Le.some((t) => t.getType() === ("getType" in e ? e.getType() : e.replace.getType()))), ...Le];
|
|
3485
|
+
function di() {
|
|
3461
3486
|
let e = U(() => window.matchMedia("(prefers-color-scheme: dark)"), []), [t, n] = G(e.matches);
|
|
3462
3487
|
return H(() => {
|
|
3463
3488
|
let t = () => n(e.matches);
|
|
3464
3489
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
3465
3490
|
}, [e]), t;
|
|
3466
3491
|
}
|
|
3467
|
-
function
|
|
3492
|
+
function fi(e) {
|
|
3468
3493
|
H(() => {
|
|
3469
3494
|
if (!e) return;
|
|
3470
3495
|
let t = document.createElement("base");
|
|
3471
3496
|
return t.href = e, document.head.prepend(t), () => t.remove();
|
|
3472
3497
|
}, [e]);
|
|
3473
3498
|
}
|
|
3474
|
-
var
|
|
3499
|
+
var pi = {
|
|
3475
3500
|
playing: !1,
|
|
3476
3501
|
section: null
|
|
3477
3502
|
};
|
|
3478
|
-
function
|
|
3479
|
-
let [
|
|
3480
|
-
|
|
3481
|
-
let [
|
|
3482
|
-
e !== void 0 &&
|
|
3483
|
-
}, []), [
|
|
3503
|
+
function mi({ id: t, transport: n, live: r, cloud: a, fallback: o, actions: c, shareBase: l, refs: u }) {
|
|
3504
|
+
let [d, g] = G(null), [_, y] = G(null), [x, S] = G(m), [C, w] = G(!1), [T, E] = G(null);
|
|
3505
|
+
Ht(_ !== null || T !== null);
|
|
3506
|
+
let [D, O] = G(!1), [ee, A] = G(void 0), [te, ne] = G(0), j = V((e) => {
|
|
3507
|
+
e !== void 0 && ne(e - Date.now());
|
|
3508
|
+
}, []), [re, ie] = G(pi), [se, ce] = G(!1), [le, ue] = G(!1), M = !a || a.online && !se, N = le && M;
|
|
3484
3509
|
H(() => {
|
|
3485
|
-
M ||
|
|
3510
|
+
M || ue(!1);
|
|
3486
3511
|
}, [M]), H(() => {
|
|
3487
|
-
if (!
|
|
3488
|
-
let
|
|
3489
|
-
|
|
3512
|
+
if (!a) return;
|
|
3513
|
+
let e = (e) => {
|
|
3514
|
+
v(e) && e.data?.type === "ryugi:document-history" && e.data.id === t && (e.data.action === "close" ? ue(!1) : e.data.action === "toggle" && M && ue((e) => !e));
|
|
3490
3515
|
};
|
|
3491
|
-
return window.addEventListener("message",
|
|
3516
|
+
return window.addEventListener("message", e), () => window.removeEventListener("message", e);
|
|
3492
3517
|
}, [
|
|
3493
|
-
|
|
3494
|
-
|
|
3518
|
+
t,
|
|
3519
|
+
a,
|
|
3495
3520
|
M
|
|
3496
3521
|
]);
|
|
3497
|
-
let [P,
|
|
3498
|
-
|
|
3499
|
-
let
|
|
3500
|
-
let e = await
|
|
3501
|
-
e &&
|
|
3502
|
-
}, [
|
|
3522
|
+
let [P, de] = G(null), fe = qe(P, t, u);
|
|
3523
|
+
tt(P);
|
|
3524
|
+
let pe = Xt(P), he = Fe(fe ? P : null), [ge, _e] = G(null), ve = di(), { artifact: ye, channel: be } = n, xe = !a || a.online, F = !a || a.canEdit, I = h(b), Se = i(I), [Ce, we] = G(!1), Te = Se ? Ce && F : F, Ee = V(async () => {
|
|
3525
|
+
let e = await n.meta();
|
|
3526
|
+
e && g(e);
|
|
3527
|
+
}, [n]), De = o != null;
|
|
3503
3528
|
H(() => {
|
|
3504
|
-
let
|
|
3529
|
+
let t = !1;
|
|
3505
3530
|
return (async () => {
|
|
3506
3531
|
try {
|
|
3507
|
-
await
|
|
3508
|
-
let
|
|
3509
|
-
if (
|
|
3510
|
-
let
|
|
3511
|
-
|
|
3512
|
-
let
|
|
3532
|
+
await Ee();
|
|
3533
|
+
let r = await n.state();
|
|
3534
|
+
if (t) return;
|
|
3535
|
+
let i = new Oe();
|
|
3536
|
+
i.setRecordTimestamp(!0), i.setChangeMergeInterval(20), i.import(nt(r.snapshot)), O(!!r.streaming), A(r.agentActiveAt), j(r.now), S(r.comments ?? m()), w(r.listening === !0);
|
|
3537
|
+
let a = De && !p() ? e() : null;
|
|
3538
|
+
a && f(a);
|
|
3539
|
+
let o = De && !p() ? {
|
|
3513
3540
|
left: window.scrollX,
|
|
3514
3541
|
top: window.scrollY,
|
|
3515
3542
|
behavior: "instant"
|
|
3516
|
-
} : null
|
|
3517
|
-
|
|
3518
|
-
|
|
3543
|
+
} : null, s = () => {
|
|
3544
|
+
t || y(i);
|
|
3545
|
+
};
|
|
3546
|
+
De ? Yt(s, pe()) : s(), o && requestAnimationFrame(() => {
|
|
3547
|
+
t || window.scrollTo(o);
|
|
3519
3548
|
});
|
|
3520
|
-
} catch (
|
|
3521
|
-
|
|
3549
|
+
} catch (e) {
|
|
3550
|
+
t || E(e.message);
|
|
3522
3551
|
}
|
|
3523
3552
|
})(), () => {
|
|
3524
|
-
|
|
3553
|
+
t = !0;
|
|
3525
3554
|
};
|
|
3526
3555
|
}, [
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3556
|
+
n,
|
|
3557
|
+
Ee,
|
|
3558
|
+
j,
|
|
3559
|
+
De,
|
|
3560
|
+
pe
|
|
3561
|
+
]), H(() => be.subscribe((e) => {
|
|
3562
|
+
e.type === "change" ? Ee() : e.type === "doc-status" ? (O(e.streaming), A(e.agentActiveAt), j(e.now)) : e.type === "doc-comments" && (S(e.comments), e.listening !== void 0 && w(e.listening));
|
|
3533
3563
|
}), [
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3564
|
+
be,
|
|
3565
|
+
Ee,
|
|
3566
|
+
j
|
|
3537
3567
|
]), H(() => {
|
|
3538
|
-
P?.setEditable(
|
|
3568
|
+
P?.setEditable(Te && !N);
|
|
3539
3569
|
}, [
|
|
3540
3570
|
P,
|
|
3541
|
-
|
|
3571
|
+
Te,
|
|
3542
3572
|
N
|
|
3543
3573
|
]), H(() => {
|
|
3544
|
-
F ||
|
|
3574
|
+
F || we(!1);
|
|
3545
3575
|
}, [F]);
|
|
3546
|
-
let
|
|
3547
|
-
|
|
3548
|
-
}, [
|
|
3549
|
-
|
|
3550
|
-
let
|
|
3551
|
-
artifact:
|
|
3552
|
-
contentBase:
|
|
3553
|
-
channel:
|
|
3554
|
-
send:
|
|
3576
|
+
let Ae = V((e) => {
|
|
3577
|
+
O(!!e.streaming), A(e.agentActiveAt), j(e.now), e.comments && S(e.comments), e.listening !== void 0 && w(e.listening);
|
|
3578
|
+
}, [j]);
|
|
3579
|
+
fi(d?.contentBase), ni(P, ye, r && !N, n.send);
|
|
3580
|
+
let je = U(() => ({
|
|
3581
|
+
artifact: ye,
|
|
3582
|
+
contentBase: d?.contentBase ?? "",
|
|
3583
|
+
channel: be,
|
|
3584
|
+
send: n.send
|
|
3555
3585
|
}), [
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3586
|
+
ye,
|
|
3587
|
+
d?.contentBase,
|
|
3588
|
+
be,
|
|
3589
|
+
n
|
|
3560
3590
|
]);
|
|
3561
3591
|
H(() => {
|
|
3562
|
-
let
|
|
3563
|
-
document.title =
|
|
3592
|
+
let e = d?.title || t;
|
|
3593
|
+
document.title = e, s({
|
|
3564
3594
|
kind: "title",
|
|
3565
|
-
title:
|
|
3595
|
+
title: e
|
|
3566
3596
|
});
|
|
3567
|
-
}, [
|
|
3568
|
-
let L =
|
|
3569
|
-
editing:
|
|
3597
|
+
}, [d?.title, t]), oe("document");
|
|
3598
|
+
let L = ai(P), Me = oi(L.count > 0 && !D), Ne = Wt({
|
|
3599
|
+
editing: re.playing || D,
|
|
3570
3600
|
pending: L.count,
|
|
3571
|
-
agentActiveAt:
|
|
3572
|
-
now:
|
|
3573
|
-
}),
|
|
3601
|
+
agentActiveAt: ee,
|
|
3602
|
+
now: Me + te
|
|
3603
|
+
}), Pe = d?.agent ?? "Agent", Ie = U(() => ({
|
|
3574
3604
|
nextKey: L.firstKey,
|
|
3575
|
-
agent:
|
|
3576
|
-
activity:
|
|
3605
|
+
agent: Pe,
|
|
3606
|
+
activity: Ne.kind
|
|
3577
3607
|
}), [
|
|
3578
3608
|
L.firstKey,
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
]),
|
|
3582
|
-
activity:
|
|
3583
|
-
comments:
|
|
3609
|
+
Pe,
|
|
3610
|
+
Ne.kind
|
|
3611
|
+
]), Le = U(() => me(x.threads), [x.threads]), Re = Le.filter((e) => e.status === "open").length, [Be, Ve, He] = li(P, ge), R = V(() => ue(!1), []), Ue = Ut({
|
|
3612
|
+
activity: a ? Kt(Ne, Pe, re.section) : null,
|
|
3613
|
+
comments: Re,
|
|
3584
3614
|
history: M,
|
|
3585
3615
|
historyOpen: N
|
|
3586
3616
|
}, (e) => {
|
|
3587
|
-
e === "close" ? R() : M &&
|
|
3588
|
-
}),
|
|
3589
|
-
doc:
|
|
3590
|
-
nodes:
|
|
3591
|
-
streaming:
|
|
3592
|
-
theme:
|
|
3593
|
-
title:
|
|
3617
|
+
e === "close" ? R() : M && ue((e) => !e);
|
|
3618
|
+
}), We = Ur({
|
|
3619
|
+
doc: _,
|
|
3620
|
+
nodes: ui,
|
|
3621
|
+
streaming: D,
|
|
3622
|
+
theme: ve ? "dark" : "light",
|
|
3623
|
+
title: d?.title || t,
|
|
3594
3624
|
open: N,
|
|
3595
3625
|
onClose: R
|
|
3596
3626
|
}), z = V(async (e) => {
|
|
3597
3627
|
try {
|
|
3598
|
-
return
|
|
3628
|
+
return S(await n.comment(e)), !0;
|
|
3599
3629
|
} catch {
|
|
3600
3630
|
return !1;
|
|
3601
3631
|
}
|
|
3602
|
-
}, [
|
|
3603
|
-
threads:
|
|
3632
|
+
}, [n]), Ge = U(() => ({
|
|
3633
|
+
threads: x.threads,
|
|
3604
3634
|
canAnswer: F && !N,
|
|
3605
|
-
phone:
|
|
3635
|
+
phone: Se,
|
|
3606
3636
|
send: (e) => void z(e)
|
|
3607
3637
|
}), [
|
|
3608
|
-
|
|
3638
|
+
x.threads,
|
|
3609
3639
|
F,
|
|
3610
3640
|
N,
|
|
3611
|
-
|
|
3641
|
+
Se,
|
|
3612
3642
|
z
|
|
3613
|
-
]),
|
|
3643
|
+
]), Ke = U(() => ({
|
|
3614
3644
|
reply: (e, t) => z({
|
|
3615
3645
|
op: "reply",
|
|
3616
3646
|
threadId: e,
|
|
@@ -3642,37 +3672,37 @@ function oi({ id: e, transport: t, live: n, cloud: i, fallback: a, actions: s, s
|
|
|
3642
3672
|
...e.textRanges ? { textRanges: e.textRanges } : {},
|
|
3643
3673
|
quote: e.quote,
|
|
3644
3674
|
text: t
|
|
3645
|
-
}), [z]),
|
|
3675
|
+
}), [z]), Je = V((e) => {
|
|
3646
3676
|
if (!P) return;
|
|
3647
|
-
P.setEditable(!0),
|
|
3677
|
+
P.setEditable(!0), we(!0), P.getRootElement()?.focus({ preventScroll: !0 });
|
|
3648
3678
|
let t = window.getSelection();
|
|
3649
3679
|
t?.removeAllRanges(), t?.addRange(e.range);
|
|
3650
3680
|
}, [P]);
|
|
3651
|
-
if (
|
|
3681
|
+
if (T) return /* @__PURE__ */ q("div", {
|
|
3652
3682
|
className: "x1o8uwn5 x2b8uid x1bo0w0s xqfszdh xif65rj",
|
|
3653
|
-
children:
|
|
3683
|
+
children: T
|
|
3654
3684
|
});
|
|
3655
|
-
if (!
|
|
3685
|
+
if (!_) return o ?? /* @__PURE__ */ q("div", {
|
|
3656
3686
|
className: "x1o8uwn5 x2b8uid x1bo0w0s xqfszdh xif65rj",
|
|
3657
|
-
children:
|
|
3687
|
+
children: k("common.loading")
|
|
3658
3688
|
});
|
|
3659
|
-
let
|
|
3660
|
-
value:
|
|
3661
|
-
children: /* @__PURE__ */ q(
|
|
3662
|
-
value:
|
|
3663
|
-
children: /* @__PURE__ */ q(
|
|
3664
|
-
value:
|
|
3665
|
-
children: /* @__PURE__ */ q(
|
|
3666
|
-
value:
|
|
3667
|
-
children: /* @__PURE__ */ q(
|
|
3668
|
-
agent:
|
|
3669
|
-
doc:
|
|
3670
|
-
theme:
|
|
3671
|
-
transport:
|
|
3689
|
+
let Ye = /* @__PURE__ */ q(Ze.Provider, {
|
|
3690
|
+
value: je,
|
|
3691
|
+
children: /* @__PURE__ */ q(ke.Provider, {
|
|
3692
|
+
value: Ge,
|
|
3693
|
+
children: /* @__PURE__ */ q(ut.Provider, {
|
|
3694
|
+
value: fe,
|
|
3695
|
+
children: /* @__PURE__ */ q(ze.Provider, {
|
|
3696
|
+
value: Ie,
|
|
3697
|
+
children: /* @__PURE__ */ q(st, {
|
|
3698
|
+
agent: d?.agent,
|
|
3699
|
+
doc: _,
|
|
3700
|
+
theme: ve ? "dark" : "light",
|
|
3701
|
+
transport: n,
|
|
3672
3702
|
onAgentPlayback: ie,
|
|
3673
|
-
onEditorReady:
|
|
3674
|
-
onOffline:
|
|
3675
|
-
onState:
|
|
3703
|
+
onEditorReady: de,
|
|
3704
|
+
onOffline: ce,
|
|
3705
|
+
onState: Ae
|
|
3676
3706
|
})
|
|
3677
3707
|
})
|
|
3678
3708
|
})
|
|
@@ -3682,84 +3712,84 @@ function oi({ id: e, transport: t, live: n, cloud: i, fallback: a, actions: s, s
|
|
|
3682
3712
|
className: "x1asgpun x1us19tq x1rozbrz xo2rkog",
|
|
3683
3713
|
className: `ryugi-doc ${{ className: "x1asgpun x1us19tq x1rozbrz xo2rkog" }.className ?? ""}`,
|
|
3684
3714
|
children: [
|
|
3685
|
-
|
|
3686
|
-
activity:
|
|
3687
|
-
agent:
|
|
3688
|
-
agentSection:
|
|
3689
|
-
cloud:
|
|
3715
|
+
Ue ? null : /* @__PURE__ */ q(Yr, {
|
|
3716
|
+
activity: Ne,
|
|
3717
|
+
agent: d?.agent,
|
|
3718
|
+
agentSection: re.section,
|
|
3719
|
+
cloud: a,
|
|
3690
3720
|
compact: I,
|
|
3691
|
-
id:
|
|
3692
|
-
offline:
|
|
3693
|
-
openComments:
|
|
3694
|
-
title:
|
|
3695
|
-
actions:
|
|
3696
|
-
refs:
|
|
3697
|
-
onOpen:
|
|
3698
|
-
}),
|
|
3721
|
+
id: t,
|
|
3722
|
+
offline: se,
|
|
3723
|
+
openComments: Re,
|
|
3724
|
+
title: d?.title || t,
|
|
3725
|
+
actions: fe ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Gr, {
|
|
3726
|
+
refs: he,
|
|
3727
|
+
onOpen: fe.open
|
|
3728
|
+
}), c] }) : c,
|
|
3699
3729
|
history: {
|
|
3700
3730
|
available: M,
|
|
3701
3731
|
open: N,
|
|
3702
|
-
toggle: () =>
|
|
3732
|
+
toggle: () => ue((e) => !e),
|
|
3703
3733
|
close: R
|
|
3704
3734
|
},
|
|
3705
|
-
onDone:
|
|
3735
|
+
onDone: Se && Ce ? () => we(!1) : void 0
|
|
3706
3736
|
}),
|
|
3707
|
-
|
|
3708
|
-
actions:
|
|
3709
|
-
agent:
|
|
3710
|
-
canComment:
|
|
3737
|
+
Se ? /* @__PURE__ */ q(Jr, {
|
|
3738
|
+
actions: Ke,
|
|
3739
|
+
agent: d?.agent,
|
|
3740
|
+
canComment: xe,
|
|
3711
3741
|
canEdit: F,
|
|
3712
|
-
clearSelection:
|
|
3742
|
+
clearSelection: Ve,
|
|
3713
3743
|
editor: P,
|
|
3714
|
-
history:
|
|
3715
|
-
offline: !(!
|
|
3716
|
-
selection:
|
|
3717
|
-
shareBase:
|
|
3718
|
-
threads:
|
|
3744
|
+
history: We,
|
|
3745
|
+
offline: !(!a || a.online),
|
|
3746
|
+
selection: Ce ? null : Be,
|
|
3747
|
+
shareBase: l,
|
|
3748
|
+
threads: Le,
|
|
3719
3749
|
onCreate: B,
|
|
3720
|
-
onEdit:
|
|
3721
|
-
onMain:
|
|
3722
|
-
children:
|
|
3723
|
-
}) : /* @__PURE__ */ q(
|
|
3724
|
-
actions:
|
|
3725
|
-
agent:
|
|
3726
|
-
canComment:
|
|
3727
|
-
clearSelection:
|
|
3750
|
+
onEdit: Je,
|
|
3751
|
+
onMain: _e,
|
|
3752
|
+
children: Ye
|
|
3753
|
+
}) : /* @__PURE__ */ q(nn, {
|
|
3754
|
+
actions: Ke,
|
|
3755
|
+
agent: d?.agent,
|
|
3756
|
+
canComment: xe,
|
|
3757
|
+
clearSelection: Ve,
|
|
3728
3758
|
editor: P,
|
|
3729
|
-
history:
|
|
3730
|
-
resolveSelection:
|
|
3731
|
-
selection:
|
|
3732
|
-
shareBase:
|
|
3733
|
-
threads:
|
|
3759
|
+
history: We,
|
|
3760
|
+
resolveSelection: He,
|
|
3761
|
+
selection: Be,
|
|
3762
|
+
shareBase: l,
|
|
3763
|
+
threads: Le,
|
|
3734
3764
|
onCreate: B,
|
|
3735
|
-
onMain:
|
|
3736
|
-
children:
|
|
3765
|
+
onMain: _e,
|
|
3766
|
+
children: Ye
|
|
3737
3767
|
}),
|
|
3738
|
-
/* @__PURE__ */ q(
|
|
3739
|
-
agent:
|
|
3768
|
+
/* @__PURE__ */ q(_n, {
|
|
3769
|
+
agent: Pe,
|
|
3740
3770
|
canAct: F && !N,
|
|
3741
3771
|
editor: P,
|
|
3742
|
-
listening:
|
|
3743
|
-
phone:
|
|
3744
|
-
send:
|
|
3745
|
-
threads:
|
|
3772
|
+
listening: C,
|
|
3773
|
+
phone: Se,
|
|
3774
|
+
send: Ge.send,
|
|
3775
|
+
threads: x.threads
|
|
3746
3776
|
}),
|
|
3747
|
-
/* @__PURE__ */ q(
|
|
3777
|
+
/* @__PURE__ */ q(ae, { warnings: d?.warnings ?? [] })
|
|
3748
3778
|
]
|
|
3749
3779
|
});
|
|
3750
3780
|
}
|
|
3751
3781
|
// src/shared/document-features.ts
|
|
3752
|
-
var
|
|
3782
|
+
var hi = [
|
|
3753
3783
|
"pending",
|
|
3754
3784
|
"ask",
|
|
3755
3785
|
"ref"
|
|
3756
|
-
],
|
|
3786
|
+
], gi = (e) => {
|
|
3757
3787
|
let t = "";
|
|
3758
3788
|
for (let n = 0; n < e.length; n += 32768) t += String.fromCharCode(...e.subarray(n, n + 32768));
|
|
3759
3789
|
return btoa(t);
|
|
3760
3790
|
};
|
|
3761
|
-
function
|
|
3762
|
-
let t =
|
|
3791
|
+
function _i(e) {
|
|
3792
|
+
let t = at(), n = (e.connect ?? te)({
|
|
3763
3793
|
url: e.url,
|
|
3764
3794
|
artifact: e.artifact,
|
|
3765
3795
|
WebSocket: e.WebSocket,
|
|
@@ -3784,8 +3814,8 @@ function li(e) {
|
|
|
3784
3814
|
async update(e) {
|
|
3785
3815
|
await n.request({
|
|
3786
3816
|
op: "update",
|
|
3787
|
-
bytes:
|
|
3788
|
-
features:
|
|
3817
|
+
bytes: gi(e),
|
|
3818
|
+
features: hi
|
|
3789
3819
|
});
|
|
3790
3820
|
},
|
|
3791
3821
|
async comment(e) {
|
|
@@ -3807,7 +3837,7 @@ function li(e) {
|
|
|
3807
3837
|
};
|
|
3808
3838
|
}
|
|
3809
3839
|
// src/viewer/document/useCloudRefBoard.ts
|
|
3810
|
-
function
|
|
3840
|
+
function vi(e) {
|
|
3811
3841
|
return e.status === "private" ? { unavailable: "locked" } : e.status === "unpublished" ? { unavailable: "unpublished" } : e.status === "ok" ? "title" in e && e.type !== void 0 ? { artifact: { title: e.title } } : {
|
|
3812
3842
|
canvas: e.canvas,
|
|
3813
3843
|
layout: e.layout ?? null,
|
|
@@ -3816,25 +3846,25 @@ function ui(e) {
|
|
|
3816
3846
|
stateless: !0
|
|
3817
3847
|
} : null;
|
|
3818
3848
|
}
|
|
3819
|
-
var
|
|
3849
|
+
var yi = [
|
|
3820
3850
|
5e3,
|
|
3821
3851
|
1e4,
|
|
3822
3852
|
2e4,
|
|
3823
3853
|
4e4,
|
|
3824
3854
|
6e4
|
|
3825
|
-
],
|
|
3826
|
-
function
|
|
3855
|
+
], bi = (e) => !!e && !("unavailable" in e);
|
|
3856
|
+
function xi(e) {
|
|
3827
3857
|
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set(), s = 0, c = () => {
|
|
3828
3858
|
s += 1;
|
|
3829
3859
|
for (let e of o) e();
|
|
3830
3860
|
}, l = (a) => {
|
|
3831
|
-
n.has(a) || (n.add(a), e(a).then((e) => e ?
|
|
3832
|
-
if (e !== void 0 && (t.set(a, e), c()),
|
|
3861
|
+
n.has(a) || (n.add(a), e(a).then((e) => e ? vi(e) : void 0).catch(() => void 0).then((e) => {
|
|
3862
|
+
if (e !== void 0 && (t.set(a, e), c()), bi(e)) {
|
|
3833
3863
|
r.delete(a);
|
|
3834
3864
|
return;
|
|
3835
3865
|
}
|
|
3836
3866
|
let n = r.get(a) ?? 0;
|
|
3837
|
-
r.set(a, n + 1), i.set(a, setTimeout(() => u(a),
|
|
3867
|
+
r.set(a, n + 1), i.set(a, setTimeout(() => u(a), yi[Math.min(n, yi.length - 1)]));
|
|
3838
3868
|
}));
|
|
3839
3869
|
}, u = (e) => {
|
|
3840
3870
|
clearTimeout(i.get(e)), i.delete(e), n.delete(e), l(e);
|
|
@@ -3855,16 +3885,16 @@ function pi(e) {
|
|
|
3855
3885
|
version: () => s
|
|
3856
3886
|
};
|
|
3857
3887
|
}
|
|
3858
|
-
function
|
|
3888
|
+
function Si(e) {
|
|
3859
3889
|
let t = !1, n = () => {
|
|
3860
|
-
t || (t = !0,
|
|
3890
|
+
t || (t = !0, w((t) => {
|
|
3861
3891
|
t.kind === "board" && e.receive(t.artboard, t.board);
|
|
3862
3892
|
}), window.addEventListener("focus", e.refresh), document.addEventListener("visibilitychange", () => {
|
|
3863
3893
|
document.visibilityState === "visible" && e.refresh();
|
|
3864
3894
|
}));
|
|
3865
3895
|
};
|
|
3866
3896
|
return function(t) {
|
|
3867
|
-
return H(n, []),
|
|
3897
|
+
return H(n, []), Et(e.subscribe, e.version), e.get(t);
|
|
3868
3898
|
};
|
|
3869
3899
|
}
|
|
3870
|
-
export {
|
|
3900
|
+
export { mi as DocumentView, ct as SnapshotDocument, Si as cloudRefBoardHook, vi as cloudRefLookup, xi as createCloudRefBoards, _i as createRelayTransport };
|