lookatstudy-mobile 0.31.0 → 0.31.2
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/package.json +1 -1
- package/server.cjs +15331 -9819
- package/sql-wasm.wasm +0 -0
- package/web/assets/{CanvasStage-Cyt4NB7v.js → CanvasStage-BbqLSbD4.js} +1 -1
- package/web/assets/{CommandPalette-maHlqYwL.js → CommandPalette-DQ5w84ic.js} +1 -1
- package/web/assets/{CompanionBotLab-BjbCeiRW.js → CompanionBotLab-4Juuhsy3.js} +1 -1
- package/web/assets/{CourseSearchPanel-wyjGWBGr.js → CourseSearchPanel-ThxY4JL1.js} +1 -1
- package/web/assets/{ExamView-BoGgfcwj.js → ExamView-DVLRcljJ.js} +1 -1
- package/web/assets/{ReviewPanel-BxY2T_Ut.js → ReviewPanel-D1jKVMQK.js} +1 -1
- package/web/assets/{SettingsView-CdxkxEkP.js → SettingsView-BHoTkY38.js} +2 -2
- package/web/assets/{VoicePanel-BzRCM6vH.js → VoicePanel-BP1Ur7sF.js} +1 -1
- package/web/assets/{abnfDiagram-N423BO3Z-iXwATPSN.js → abnfDiagram-VCTEODGH-Ca-5zS8J.js} +1 -1
- package/web/assets/{abnfDiagram-VCTEODGH-ODA7YWAP-C1yAT6qh.js → abnfDiagram-VCTEODGH-ODA7YWAP-ZI6_0Jfq.js} +1 -1
- package/web/assets/{arc-DIdxrd7q.js → arc-D2ssjz3E.js} +1 -1
- package/web/assets/{architectureDiagram-5GKGNRK7-C4PU3XN7-NvY1Ic-5.js → architectureDiagram-5GKGNRK7-C4PU3XN7-B2bOUqy0.js} +1 -1
- package/web/assets/{architectureDiagram-T3A2C74G-DwrvQJhj.js → architectureDiagram-5GKGNRK7-DCEYr1uX.js} +1 -1
- package/web/assets/{arrow-right-33rr0pBZ.js → arrow-right---oCZhx2.js} +1 -1
- package/web/assets/blockDiagram-I7D4REHJ-Dx9xiTwp.js +129 -0
- package/web/assets/{blockDiagram-NRAW4CY4-UMJ6PMQQ-DsNh9SAm.js → blockDiagram-NRAW4CY4-UMJ6PMQQ-Do5yGQuh.js} +1 -1
- package/web/assets/c4Diagram-7LVT6UL2-DXh9Ebug.js +38 -0
- package/web/assets/{c4Diagram-UCG6FXSJ-75X3U2P3-Df4YtSzV.js → c4Diagram-UCG6FXSJ-75X3U2P3-DH7ShBLp.js} +1 -1
- package/web/assets/channel-CNRWz7VW.js +1 -0
- package/web/assets/{chunk-2Q5K7J3B-D2YxB7H3.js → chunk-2Q5K7J3B-Bbluh_im.js} +1 -1
- package/web/assets/{chunk-5VM5RSS4-CdfFIz--.js → chunk-5VM5RSS4-CwJZ1eAQ.js} +1 -1
- package/web/assets/{chunk-7XDTSPCN-BBCpJUAH.js → chunk-7XDTSPCN-3TtQfLC2.js} +1 -1
- package/web/assets/{chunk-CTNIYPP6-DW2rJhu_.js → chunk-CTNIYPP6--48noAMq.js} +1 -1
- package/web/assets/{chunk-CXNFBKHE-renpw2QE.js → chunk-CXNFBKHE-BMfLUSYr.js} +1 -1
- package/web/assets/{chunk-2GRJ4B5K-BqUg5toN.js → chunk-F27PBJKO-DQz5Eh8R.js} +1 -1
- package/web/assets/{chunk-5RXB4S5H-zfO8batT.js → chunk-IMKFNOWR-mEHtzDJe.js} +5 -5
- package/web/assets/{chunk-ISA7TJRJ-DhN-xjNX.js → chunk-ISA7TJRJ-Cua7d2fi.js} +1 -1
- package/web/assets/{chunk-JWPE2WC7-smESCI0k.js → chunk-JWPE2WC7-DqWkk9f8.js} +1 -1
- package/web/assets/{chunk-LV3HUYFY-DTGGOw_N.js → chunk-LV3HUYFY-BCzMQT8Q.js} +1 -1
- package/web/assets/{chunk-M3IUQBOH-Cp2xYH3K.js → chunk-M3IUQBOH-B-r9ydC6.js} +1 -1
- package/web/assets/{chunk-NDIOYS4C-B_iYUPk5.js → chunk-NDIOYS4C-DkAwrWHj.js} +1 -1
- package/web/assets/{chunk-KBJHAD2P-CLazgX1V.js → chunk-POPQ4Y6H-BjpioqkZ.js} +1 -1
- package/web/assets/{chunk-RE4WF27V-DFrNGxeZ.js → chunk-RE4WF27V-CJEnGv6g.js} +1 -1
- package/web/assets/{chunk-6Q2QTUOP-c0FQ_SfU.js → chunk-SVP7TREG-DGaiaQgi.js} +4 -4
- package/web/assets/{chunk-GF5L2VYU-DiF8ZWcT.js → chunk-TICWLB2K-DqXyoflV.js} +1 -1
- package/web/assets/{chunk-VII2H2IX-CTIhHlIp.js → chunk-VII2H2IX-CHqS8QXi.js} +1 -1
- package/web/assets/{chunk-X5GNSKZ3-BnL2P09p.js → chunk-X5GNSKZ3-CPiurspk.js} +1 -1
- package/web/assets/{chunk-XCWWM2C3-B3diWYxV.js → chunk-XCWWM2C3-CnpRc-BX.js} +1 -1
- package/web/assets/{chunk-XXDRQBXY-Cm9DsbCI.js → chunk-XXDRQBXY-xXPgDheN.js} +1 -1
- package/web/assets/classDiagram-DTDB5LWJ-LWRDKZ5K-C5s2iR9J.js +1 -0
- package/web/assets/classDiagram-ZZMXUADV-Cjli-tvb.js +1 -0
- package/web/assets/classDiagram-v2-JRS7N3AN-2BZHGRP2-C5s2iR9J.js +1 -0
- package/web/assets/classDiagram-v2-VYDZK3BY-Cjli-tvb.js +1 -0
- package/web/assets/{core-CnhTLa0G.js → core-iYZpQJa6.js} +1 -1
- package/web/assets/{cose-bilkent-JH36ORCC-B1ZJcbUV.js → cose-bilkent-JH36ORCC-Dr_WUhVB.js} +1 -1
- package/web/assets/{cose-bilkent-JH36ORCC-OB24KH3T-BJpRu0cc.js → cose-bilkent-JH36ORCC-OB24KH3T-CQsWVK5X.js} +1 -1
- package/web/assets/{cynefin-OW5HDTMX-GVF3BKWE-CLl32jOg.js → cynefin-OW5HDTMX-GVF3BKWE-DwLRaQ37.js} +1 -1
- package/web/assets/{cynefin-VYW2F7L2-BFZHy-wK.js → cynefin-OW5HDTMX-fybCqBi3.js} +3 -3
- package/web/assets/{cynefinDiagram-MW4NZA55-BECq_tlH.js → cynefinDiagram-5FMLGOSQ-BLqywzF8.js} +2 -2
- package/web/assets/{cynefinDiagram-5FMLGOSQ-H3WIRU3N-BpmHF9Wo.js → cynefinDiagram-5FMLGOSQ-H3WIRU3N-D7Mzcgjs.js} +1 -1
- package/web/assets/cytoscape.esm-Ix0LnXOy.js +331 -0
- package/web/assets/{dagre-3AP2YEHR-DCERTXHT-DIUrMTsj.js → dagre-3AP2YEHR-DCERTXHT-C3dpohva.js} +1 -1
- package/web/assets/dagre-GXQ25YYZ-QPjECY_W.js +4 -0
- package/web/assets/diagram-S7CK7UJ4-CwZRApeF.js +30 -0
- package/web/assets/{diagram-S7CK7UJ4-MULGZGEL-Bpt08-bP.js → diagram-S7CK7UJ4-MULGZGEL-Czqn_Fna.js} +1 -1
- package/web/assets/diagram-UQ7AKVKN-Bo8gzrdx.js +41 -0
- package/web/assets/{diagram-UQ7AKVKN-YQBY353J-DORAQMoA.js → diagram-UQ7AKVKN-YQBY353J-CgDXcRAT.js} +1 -1
- package/web/assets/{diagram-B4RE2ZJO-dNtQBNGN.js → diagram-VSXAHHWV-0w4db5zY.js} +3 -3
- package/web/assets/{diagram-VSXAHHWV-WLNH2ELY-Ce82dDi6.js → diagram-VSXAHHWV-WLNH2ELY-DbTl04rE.js} +1 -1
- package/web/assets/{diagram-Q27KOJAE-Bi0oJVBH.js → diagram-VX7I27RA-DJvH_pmt.js} +11 -11
- package/web/assets/{diagram-VX7I27RA-XW6YQV5G-D-fdo9DM.js → diagram-VX7I27RA-XW6YQV5G-fzWHr6UJ.js} +1 -1
- package/web/assets/{diagram-LBJQPF4R-BoiQEUHl.js → diagram-Z3DM3KII-DsT5qGVe.js} +2 -2
- package/web/assets/{diagram-Z3DM3KII-HG7RF65D-ZqMt25Js.js → diagram-Z3DM3KII-HG7RF65D-CDqb1-LL.js} +1 -1
- package/web/assets/{ebnfDiagram-BXEA7PRR-R3UwRAR7.js → ebnfDiagram-PWID7BFC-BoB0yBxV.js} +1 -1
- package/web/assets/{ebnfDiagram-PWID7BFC-OKY4VHYD-DDVM1P1I.js → ebnfDiagram-PWID7BFC-OKY4VHYD-Dl7tZHv0.js} +1 -1
- package/web/assets/{elk.bundled-Dv5OJ-BO.js → elk.bundled-Fo5ndUql.js} +1 -1
- package/web/assets/erDiagram-RLTQ6QDP-TcPkrxxF.js +99 -0
- package/web/assets/{erDiagram-SSCWMZ5O-PIPKOIK7-CxTLMFn2.js → erDiagram-SSCWMZ5O-PIPKOIK7-C13XODn3.js} +1 -1
- package/web/assets/{flowDiagram-A5DVABFB-2Z4AVO5R-DRUX3zZ5.js → flowDiagram-A5DVABFB-2Z4AVO5R-DNbmNTnm.js} +1 -1
- package/web/assets/flowDiagram-HODETNUW-D2o5XxIm.js +168 -0
- package/web/assets/{ganttDiagram-PKOTCBZU-D-5FV0PV.js → ganttDiagram-EL5Y4UJY-D36iMZvH.js} +1 -1
- package/web/assets/{ganttDiagram-EL5Y4UJY-JZNG7GOG-DjG0obYU.js → ganttDiagram-EL5Y4UJY-JZNG7GOG-C5IgtJLL.js} +1 -1
- package/web/assets/{gitGraphDiagram-WWUBYQGX-DMWMLL3G-D70uly9x.js → gitGraphDiagram-WWUBYQGX-DMWMLL3G-BA7YVBKU.js} +1 -1
- package/web/assets/{gitGraphDiagram-DS77QQ5N-DF-LawNi.js → gitGraphDiagram-WWUBYQGX-DoayvLMW.js} +3 -3
- package/web/assets/{index-X3hjUtR3.js → index-5UvRMS_e.js} +1 -1
- package/web/assets/index-CJuEfFQr.js +53 -0
- package/web/assets/{index-CApU5KjU.js → index-DtMB_WdP.js} +1 -1
- package/web/assets/{index-DawWPxKA.js → index-Zmq94tKz.js} +4 -4
- package/web/assets/{infoDiagram-6WML65LV-w8kz4hEa.js → infoDiagram-27XIBGKW-DbMBXMvx.js} +1 -1
- package/web/assets/{infoDiagram-RXCK75RN-HANS5KVC-C1PHC-YD.js → infoDiagram-RXCK75RN-HANS5KVC-NdEBDyb0.js} +1 -1
- package/web/assets/{ishikawaDiagram-5VMMS53U-7GCIT7WU-BrPFk2Ox.js → ishikawaDiagram-5VMMS53U-7GCIT7WU-CzqV69s-.js} +1 -1
- package/web/assets/{ishikawaDiagram-WSZJBQD7-C34Z0ADb.js → ishikawaDiagram-5VMMS53U-j9THtiQE.js} +4 -4
- package/web/assets/{journeyDiagram-NVQOT4AX-B6wtGi4C.js → journeyDiagram-3NMN7TZE-C3h3msUP.js} +2 -2
- package/web/assets/{journeyDiagram-EYS64GPL-OAPELBT7-CVn7FA19.js → journeyDiagram-EYS64GPL-OAPELBT7-ChETfPiS.js} +1 -1
- package/web/assets/{kanban-definition-3QL26DDD-I7RKWQQY-DSkHnZWn.js → kanban-definition-3QL26DDD-I7RKWQQY-Wjr70XLu.js} +1 -1
- package/web/assets/{kanban-definition-27J2QSJJ-Cauno8t4.js → kanban-definition-UXKFOSKX-C1b6cL5N.js} +6 -6
- package/web/assets/{katex-N6JRN4PM-7jQy_F2_.js → katex-N6JRN4PM-BIpBcqrZ.js} +1 -1
- package/web/assets/layout-D2XzcM9d.js +1 -0
- package/web/assets/{linear-DQOfHiUP.js → linear-CZIIlCMp.js} +1 -1
- package/web/assets/{main-BXa7WYYr.css → main-D9IB7N5p.css} +1 -1
- package/web/assets/{main-CmJlqSDk.js → main-Dj875aWF.js} +83 -83
- package/web/assets/{mermaid-layout-elk.core-h_IjwDpP.js → mermaid-layout-elk.core-CNNSrMhF.js} +2 -2
- package/web/assets/mermaid.core-CnNeOEec.js +312 -0
- package/web/assets/{mindmap-definition-FBJOCRG2-KIYZG64Y-De94GIvB.js → mindmap-definition-FBJOCRG2-KIYZG64Y-CE91aZQc.js} +1 -1
- package/web/assets/{mindmap-definition-FAOFIHXS-oc1QsLGD.js → mindmap-definition-YA3MSWOX-Dz0JwUgH.js} +1 -1
- package/web/assets/{pegDiagram-VL7TDLO6-C9eNGZDr.js → pegDiagram-XKGWAZYB-BEOg8IHd.js} +1 -1
- package/web/assets/{pegDiagram-XKGWAZYB-OIP57N6J-C2k8WABX.js → pegDiagram-XKGWAZYB-OIP57N6J-CB6_i_dk.js} +1 -1
- package/web/assets/{pet-D6jEJc1f.js → pet-B9Zl6XGT.js} +1 -1
- package/web/assets/pie-CJLEE_I4.js +1 -0
- package/web/assets/{pieDiagram-E7YTZNPT-2UOTW327-h1VN7kXL.js → pieDiagram-E7YTZNPT-2UOTW327-C_aP-GDD.js} +1 -1
- package/web/assets/{pieDiagram-7S7Q4E2Y-lAjmXNe_.js → pieDiagram-E7YTZNPT-Btcl-uz0.js} +3 -3
- package/web/assets/{quadrantDiagram-CIZ2JOQS-B0NfwoFD.js → quadrantDiagram-AXDQQJYC-CA7HBTBO.js} +1 -1
- package/web/assets/{quadrantDiagram-AXDQQJYC-SN3ASJJK-CVllGfdW.js → quadrantDiagram-AXDQQJYC-SN3ASJJK-CAd5tIhG.js} +1 -1
- package/web/assets/{railroadDiagram-O6MQD6OU-34742W6X-CqYqMw2v.js → railroadDiagram-O6MQD6OU-34742W6X-CLWiLZG6.js} +1 -1
- package/web/assets/{railroadDiagram-AXF67PYL-BiLISELA.js → railroadDiagram-O6MQD6OU-B7dkMwzi.js} +1 -1
- package/web/assets/{render-O7CIS3YK-C1DYXW0Z.js → render-O7CIS3YK-DQb_czkx.js} +7 -7
- package/web/assets/{requirementDiagram-LRYGKXZP-BMUGWzen.js → requirementDiagram-BXWQKSXE-C70GJhMZ.js} +5 -5
- package/web/assets/{requirementDiagram-EFPCY7ZU-NGAFFSMB-6i5RYobc.js → requirementDiagram-EFPCY7ZU-NGAFFSMB-Bc0CRxi2.js} +1 -1
- package/web/assets/{rotate-ccw-DhViz0iw.js → rotate-ccw-JEjtXKlH.js} +1 -1
- package/web/assets/{sankeyDiagram-P5KCCOFB-3D3M4XPB-EtCUQUn1.js → sankeyDiagram-P5KCCOFB-3D3M4XPB-B9PL6--N.js} +1 -1
- package/web/assets/{sankeyDiagram-W5VNT64P-C_r4P5MM.js → sankeyDiagram-P5KCCOFB-BJl2AqaQ.js} +2 -2
- package/web/assets/{sequenceDiagram-SI44F4Z6-pG01U8Cr.js → sequenceDiagram-WJ2MYXX4-DtmTM2Q1.js} +4 -4
- package/web/assets/{sequenceDiagram-WJ2MYXX4-Q2IOPB4R-sL3lWU4l.js → sequenceDiagram-WJ2MYXX4-Q2IOPB4R-DH1L8a7Q.js} +1 -1
- package/web/assets/{sizeCapture-X5ZJPWSS-TfK3b41W.js → sizeCapture-INFHLROL-e9akerky.js} +1 -1
- package/web/assets/{sizeCapture-X5ZJPWSS-PSGVOMYM-VHssc8WH.js → sizeCapture-X5ZJPWSS-PSGVOMYM-CSyLq32l.js} +1 -1
- package/web/assets/stateDiagram-D77RDMKH-Dc057ccO.js +1 -0
- package/web/assets/{stateDiagram-HBIQ2CUA-4M2S6MAN-DY0svUZL.js → stateDiagram-HBIQ2CUA-4M2S6MAN-D_uV5i1Q.js} +1 -1
- package/web/assets/stateDiagram-v2-4QOOHH4V-LBBLA2WV-DBkBTIqA.js +1 -0
- package/web/assets/stateDiagram-v2-MP3YSRHH-D6iIkIH3.js +1 -0
- package/web/assets/swimlanes-42K2YHIH-ILKBiMPk.js +1 -0
- package/web/assets/{swimlanes-XN3QIQJK-N6N2CCQ6-tXCXpXUD.js → swimlanes-XN3QIQJK-N6N2CCQ6-CJ7qUhPg.js} +1 -1
- package/web/assets/swimlanesDiagram-VK2B7HYN-E6N4H5SY-lkgr5sGZ.js +8 -0
- package/web/assets/swimlanesDiagram-VR7AAH4N-D-ke9u7H.js +8 -0
- package/web/assets/{time-BgujFIZT.js → time-C0TNQg6r.js} +1 -1
- package/web/assets/{timeline-definition-Z64GVDOM-BID9BJj_.js → timeline-definition-24CTP7MA-BckRkRye.js} +3 -3
- package/web/assets/{timeline-definition-24CTP7MA-KN7RSRVM-uhQqtZRP.js → timeline-definition-24CTP7MA-KN7RSRVM-DxSbNuQs.js} +1 -1
- package/web/assets/{transform-B5_amWNh.js → transform-Bd_a5eGM.js} +1 -1
- package/web/assets/{vennDiagram-4TSXK5OY-AKJ7LXAN-MJEMZHM_.js → vennDiagram-4TSXK5OY-AKJ7LXAN-hG9roRh0.js} +1 -1
- package/web/assets/{vennDiagram-T6HMQDX7-noYkNxPf.js → vennDiagram-4TSXK5OY-Bxkq0y0p.js} +5 -5
- package/web/assets/{wardleyDiagram-VM6X3IG4-3B6A3BN5-D_oZuxaD.js → wardleyDiagram-VM6X3IG4-3B6A3BN5-CLmKLRJP.js} +1 -1
- package/web/assets/{wardleyDiagram-T6FBY63Y-CnUMOnEG.js → wardleyDiagram-VM6X3IG4-CaTbamBI.js} +1 -1
- package/web/assets/xychartDiagram-S5SC5T6Z-CHtC3u6M.js +7 -0
- package/web/assets/{xychartDiagram-S5SC5T6Z-OBDNV6WG-Cd6y2GuD.js → xychartDiagram-S5SC5T6Z-OBDNV6WG-ZjDcqfTl.js} +1 -1
- package/web/index.html +3 -3
- package/web/pet.html +2 -2
- package/web/assets/blockDiagram-VBNYF7ZC-BX4qMKoE.js +0 -132
- package/web/assets/c4Diagram-5PPSVZJV-wjiwvuPV.js +0 -10
- package/web/assets/channel-D9baWZnV.js +0 -1
- package/web/assets/chunk-RYQCIY6F-CXmfoCP1.js +0 -1
- package/web/assets/classDiagram-DTDB5LWJ-LWRDKZ5K-CiuZ0TyW.js +0 -1
- package/web/assets/classDiagram-JCYQIIEL-DJMqLmfy.js +0 -1
- package/web/assets/classDiagram-v2-JRS7N3AN-2BZHGRP2-CiuZ0TyW.js +0 -1
- package/web/assets/classDiagram-v2-OCEON4UE-DJMqLmfy.js +0 -1
- package/web/assets/cytoscape.esm-DTSO7Bv0.js +0 -331
- package/web/assets/dagre-VZM6K2ZE-D-oITinM.js +0 -4
- package/web/assets/diagram-7IWD3JNH-07yeFgf1.js +0 -30
- package/web/assets/diagram-UB23O5K3-FLVFr6Cc.js +0 -41
- package/web/assets/erDiagram-JOGREHBK-Dr_g_g8q.js +0 -85
- package/web/assets/flowDiagram-UKHOOZJN-BEX6wJhw.js +0 -156
- package/web/assets/graph-C9eacEi8.js +0 -1
- package/web/assets/index-DZN4z5wF.js +0 -53
- package/web/assets/layout-DEXfKzaS.js +0 -1
- package/web/assets/map-Czzmt4hB.js +0 -1
- package/web/assets/mermaid.core-n1vgOa_E.js +0 -314
- package/web/assets/pie-5VdQHRMI.js +0 -1
- package/web/assets/stateDiagram-OKZ733FA-CHPWqFKU.js +0 -1
- package/web/assets/stateDiagram-v2-4QOOHH4V-LBBLA2WV-B2GuWRPu.js +0 -1
- package/web/assets/stateDiagram-v2-UEYNNEHI-mdLp8HQQ.js +0 -1
- package/web/assets/swimlanes-SLNWSIFB-BoK2wZ7r.js +0 -2
- package/web/assets/swimlanesDiagram-ULZ7WXOC-CI3RFQDZ.js +0 -8
- package/web/assets/swimlanesDiagram-VK2B7HYN-E6N4H5SY-DLkFvd5d.js +0 -8
- package/web/assets/xychartDiagram-ELKLHX3M-Ck_2zrW5.js +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{w as Qe,x as o1,y as u1,z as h1,A as c1,D as m1}from"./main-
|
|
1
|
+
import{w as Qe,x as o1,y as u1,z as h1,A as c1,D as m1}from"./main-Dj875aWF.js";import"./index-CJuEfFQr.js";function d1(r,e){return Qr(r,{})||{type:"root",children:[]}}function Qr(r,e){const t=f1(r,e);return t&&e.afterTransform&&e.afterTransform(r,t),t}function f1(r,e){switch(r.nodeType){case 1:return b1(r,e);case 3:return v1(r);case 8:return g1(r);case 9:return lr(r,e);case 10:return p1();case 11:return lr(r,e);default:return}}function lr(r,e){return{type:"root",children:_r(r,e)}}function p1(){return{type:"doctype"}}function v1(r){return{type:"text",value:r.nodeValue||""}}function g1(r){return{type:"comment",value:r.nodeValue||""}}function b1(r,e){const t=r.namespaceURI,a=t===Qe.svg?o1:u1,n=t===Qe.html?r.tagName.toLowerCase():r.tagName,s=t===Qe.html&&n==="template"?r.content:r,o=r.getAttributeNames(),h={};let c=-1;for(;++c<o.length;)h[o[c]]=r.getAttribute(o[c])||"";return a(n,h,_r(s,e))}function _r(r,e){const t=r.childNodes,a=[];let n=-1;for(;++n<t.length;){const s=Qr(t[n],e);s!==void 0&&a.push(s)}return a}new DOMParser;function y1(r,e){const t=x1(r);return d1(t)}function x1(r){const e=document.createElement("template");return e.innerHTML=r,e.content}const or=(function(r,e,t){const a=h1(t);if(!r||!r.type||!r.children)throw new Error("Expected parent node");if(typeof e=="number"){if(e<0||e===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(e=r.children.indexOf(e),e<0)throw new Error("Expected child node or index");for(;++e<r.children.length;)if(a(r.children[e],e,r))return r.children[e]}),W0=(function(r){if(r==null)return S1;if(typeof r=="string")return k1(r);if(typeof r=="object")return w1(r);if(typeof r=="function")return Rt(r);throw new Error("Expected function, string, or array as `test`")});function w1(r){const e=[];let t=-1;for(;++t<r.length;)e[t]=W0(r[t]);return Rt(a);function a(...n){let s=-1;for(;++s<e.length;)if(e[s].apply(this,n))return!0;return!1}}function k1(r){return Rt(e);function e(t){return t.tagName===r}}function Rt(r){return e;function e(t,a,n){return!!(z1(t)&&r.call(this,t,typeof a=="number"?a:void 0,n||void 0))}}function S1(r){return!!(r&&typeof r=="object"&&"type"in r&&r.type==="element"&&"tagName"in r&&typeof r.tagName=="string")}function z1(r){return r!==null&&typeof r=="object"&&"type"in r&&"tagName"in r}const ur=/\n/g,hr=/[\t ]+/g,pt=W0("br"),cr=W0(E1),A1=W0("p"),mr=W0("tr"),M1=W0(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",q1,N1]),ea=W0(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function T1(r,e){const t=e||{},a="children"in r?r.children:[],n=ea(r),s=aa(r,{whitespace:t.whitespace||"normal"}),o=[];(r.type==="text"||r.type==="comment")&&o.push(...ra(r,{breakBefore:!0,breakAfter:!0}));let h=-1;for(;++h<a.length;)o.push(...ta(a[h],r,{whitespace:s,breakBefore:h?void 0:n,breakAfter:h<a.length-1?pt(a[h+1]):n}));const c=[];let f;for(h=-1;++h<o.length;){const v=o[h];typeof v=="number"?f!==void 0&&v>f&&(f=v):v&&(f!==void 0&&f>-1&&c.push(`
|
|
2
2
|
`.repeat(f)||" "),f=-1,c.push(v))}return c.join("")}function ta(r,e,t){return r.type==="element"?B1(r,e,t):r.type==="text"?t.whitespace==="normal"?ra(r,t):C1(r):[]}function B1(r,e,t){const a=aa(r,t),n=r.children||[];let s=-1,o=[];if(M1(r))return o;let h,c;for(pt(r)||mr(r)&&or(e,r,mr)?c=`
|
|
3
3
|
`:A1(r)?(h=2,c=2):ea(r)&&(h=1,c=1);++s<n.length;)o=o.concat(ta(n[s],r,{whitespace:a,breakBefore:s?void 0:h,breakAfter:s<n.length-1?pt(n[s+1]):c}));return cr(r)&&or(e,r,cr)&&o.push(" "),h&&o.unshift(h),c&&o.push(c),o}function ra(r,e){const t=String(r.value),a=[],n=[];let s=0;for(;s<=t.length;){ur.lastIndex=s;const c=ur.exec(t),f=c&&"index"in c?c.index:t.length;a.push(D1(t.slice(s,f).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),s===0?e.breakBefore:!0,f===t.length?e.breakAfter:!0)),s=f+1}let o=-1,h;for(;++o<a.length;)a[o].charCodeAt(a[o].length-1)===8203||o<a.length-1&&a[o+1].charCodeAt(0)===8203?(n.push(a[o]),h=void 0):a[o]?(typeof h=="number"&&n.push(h),n.push(a[o]),h=0):(o===0||o===a.length-1)&&n.push(0);return n}function C1(r){return[String(r.value)]}function D1(r,e,t){const a=[];let n=0,s;for(;n<r.length;){hr.lastIndex=n;const o=hr.exec(r);s=o?o.index:r.length,!n&&!s&&o&&!e&&a.push(""),n!==s&&a.push(r.slice(n,s)),n=o?s+o[0].length:s}return n!==s&&!t&&a.push(""),a.join(" ")}function aa(r,e){if(r.type==="element"){const t=r.properties||{};switch(r.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return t.wrap?"pre-wrap":"pre";case"td":case"th":return t.noWrap?"nowrap":e.whitespace;case"textarea":return"pre-wrap"}}return e.whitespace}function q1(r){return!!(r.properties||{}).hidden}function E1(r){return r.tagName==="td"||r.tagName==="th"}function N1(r){return r.tagName==="dialog"&&!(r.properties||{}).open}class S extends Error{constructor(e,t){var a="KaTeX parse error: "+e,n,s,o=t&&t.loc;if(o&&o.start<=o.end){var h=o.lexer.input;n=o.start,s=o.end,n===h.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var c=h.slice(n,s).replace(/[^]/g,"$&̲"),f;n>15?f="…"+h.slice(n-15,n):f=h.slice(0,n);var v;s+15<h.length?v=h.slice(s,s+15)+"…":v=h.slice(s),a+=f+c+v}super(a),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,S.prototype),this.position=n,n!=null&&s!=null&&(this.length=s-n),this.rawMessage=e}}var I1=/([A-Z])/g,R1=r=>r.replace(I1,"-$1").toLowerCase(),F1={"&":"&",">":">","<":"<",'"':""","'":"'"},O1=/[&><"']/g,n0=r=>String(r).replace(O1,e=>F1[e]),De=r=>r.type==="ordgroup"||r.type==="color"?r.body.length===1?De(r.body[0]):r:r.type==="font"?De(r.body):r,H1=new Set(["mathord","textord","atom"]),D0=r=>H1.has(De(r).type),L1=r=>{var e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(r);return e?e[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?null:e[1].toLowerCase():"_relative"},vt={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:r=>"#"+r},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(r,e)=>(e.push(r),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:r=>Math.max(0,r),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:r=>Math.max(0,r),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:r=>Math.max(0,r),cli:"-e, --max-expand <n>",cliProcessor:r=>r==="Infinity"?1/0:parseInt(r)},globalGroup:{type:"boolean",cli:!1}};function P1(r){if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function G1(r){if(r.default!==void 0)return r.default;var e=Array.isArray(r.type)?r.type[0]:r.type;return P1(e)}function U1(r,e,t,a){var n=t[e];r[e]=n!==void 0?a.processor?a.processor(n):n:G1(a)}class Ft{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t of Object.keys(vt)){var a=vt[t];a&&U1(this,t,e,a)}}reportNonstrict(e,t,a){var n=this.strict;if(typeof n=="function"&&(n=n(e,t,a)),!(!n||n==="ignore")){if(n===!0||n==="error")throw new S("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),a);n==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,a){var n=this.strict;if(typeof n=="function")try{n=n(e,t,a)}catch{n="error"}return!n||n==="ignore"?!1:n===!0||n==="error"?!0:n==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]")),!1)}isTrusted(e){if("url"in e&&e.url&&!e.protocol){var t=L1(e.url);if(t==null)return!1;e.protocol=t}var a=typeof this.trust=="function"?this.trust(e):this.trust;return!!a}}class F0{constructor(e,t,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=a}sup(){return w0[V1[this.id]]}sub(){return w0[X1[this.id]]}fracNum(){return w0[Y1[this.id]]}fracDen(){return w0[$1[this.id]]}cramp(){return w0[W1[this.id]]}text(){return w0[j1[this.id]]}isTight(){return this.size>=2}}var Ot=0,Ee=1,ee=2,B0=3,me=4,v0=5,te=6,l0=7,w0=[new F0(Ot,0,!1),new F0(Ee,0,!0),new F0(ee,1,!1),new F0(B0,1,!0),new F0(me,2,!1),new F0(v0,2,!0),new F0(te,3,!1),new F0(l0,3,!0)],V1=[me,v0,me,v0,te,l0,te,l0],X1=[v0,v0,v0,v0,l0,l0,l0,l0],Y1=[ee,B0,me,v0,te,l0,te,l0],$1=[B0,B0,v0,v0,l0,l0,l0,l0],W1=[Ee,Ee,B0,B0,v0,v0,l0,l0],j1=[Ot,Ee,ee,B0,ee,B0,ee,B0],R={DISPLAY:w0[Ot],TEXT:w0[ee],SCRIPT:w0[me],SCRIPTSCRIPT:w0[te]},gt=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Z1(r){for(var e=0;e<gt.length;e++)for(var t=gt[e],a=0;a<t.blocks.length;a++){var n=t.blocks[a];if(r>=n[0]&&r<=n[1])return t.name}return null}var qe=[];gt.forEach(r=>r.blocks.forEach(e=>qe.push(...e)));function na(r){for(var e=0;e<qe.length;e+=2)if(r>=qe[e]&&r<=qe[e+1])return!0;return!1}var r0=r=>r+" "+r,_0=80,K1=function(e,t){return"M95,"+(622+e+t)+`
|
|
4
4
|
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./elk.bundled-
|
|
2
|
-
import{r as h,j as e,c as de}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./elk.bundled-Fo5ndUql.js","./index-CJuEfFQr.js","./index-CvvLDKMx.css","./_commonjs-dynamic-modules-TDtrdbi3.js","./mermaid.core-CnNeOEec.js","./main-Dj875aWF.js","./main-D9IB7N5p.css","./transform-Bd_a5eGM.js","./mermaid-layout-elk.core-CNNSrMhF.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as h,j as e,c as de}from"./index-CJuEfFQr.js";import{c as Q,u as L,b as me,r as ue,X as J,_ as U,E as he,H as O,I as fe,N as xe,k as ge,J as be,K as pe,i as Y,O as we,Q as je,R as ye,V as ke}from"./main-Dj875aWF.js";import{M as H,C as F}from"./CanvasStage-BbqLSbD4.js";import{A as ve}from"./arrow-right---oCZhx2.js";import{R as Ne}from"./rotate-ccw-JEjtXKlH.js";/**
|
|
3
3
|
* @license lucide-react v0.468.0 - ISC
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the ISC license.
|
|
@@ -14,8 +14,8 @@ import{r as h,j as e,c as de}from"./index-DZN4z5wF.js";import{c as Q,u as L,b as
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the ISC license.
|
|
16
16
|
* See the LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/const Se=Q("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);function K({title:t,onClose:r,children:a}){const n=L(),s=h.useRef(null);return me(s,!0),h.useEffect(()=>{const i=o=>{o.key==="Escape"&&r()};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[r]),ue.createPortal(e.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col bg-black/80","data-testid":"diagram-viewer-modal","data-noswipe":"",role:"dialog","aria-modal":"true","aria-label":t,children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-2.5 shrink-0",onClick:i=>i.stopPropagation(),children:[e.jsx("h3",{className:"text-body font-bold text-white truncate",children:t}),e.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[e.jsx("span",{className:"text-caption text-white/50 hidden sm:inline",children:n("artifact.viewer.hint")}),e.jsx("button",{onClick:r,"data-testid":"diagram-viewer-close","aria-label":n("action.close"),"data-tooltip":n("action.close"),className:"text-white/70 hover:text-white w-9 h-9 flex items-center justify-center rounded-lg hover:bg-white/10 transition-colors",children:e.jsx(J,{className:"w-5 h-5"})})]})]}),e.jsx("div",{className:"flex-1 min-h-0 px-2 pb-2",onClick:r,children:e.jsx("div",{ref:s,className:"h-full w-full",onClick:i=>i.stopPropagation(),children:a})})]}),document.body)}function T(t,r=13){let a=0;for(const n of t)a+=/[\u2e80-\u9fff\uf900-\ufaff\uff00-\uffef\u3000-\u303f]/.test(n)?r:r*.58;return a}const q=118;function Ee(t){if(T(t)<=q)return[t];const r=[];for(let l=0;l<t.length;l++)/[\s/\-—·]/.test(t[l]??"")&&r.push(l);const a=t.length/2;let n=-1,s=1/0;for(const l of r){const g=Math.abs(l+1-a);g<s&&(s=g,n=l)}let i,o;if(n>=0)i=t.slice(0,n+1).trim(),o=t.slice(n+1).trim();else{let l=0,g=0;for(const w of t)if(l+=T(w),g++,l>=T(t)/2)break;i=t.slice(0,g),o=t.slice(g)}if(T(i)<=q&&T(o)<=q)return[i,o];const c=l=>{let g="";for(const w of l){if(T(g+w+"…")>q)break;g+=w}return g+"…"};return[T(i)>q?c(i):i,T(o)>q?c(o):o]}function ie(t,r){const a=Ee(t),n=r?14:13,s=Math.max(...a.map(l=>T(l,n))),i=r?30:24,o=17,c=r?18:14;return{width:Math.min(r?200:180,Math.max(r?92:76,s+i)),height:c+a.length*o,lines:a}}function ze(t,r,a){const n=new Set(t.map(s=>s.id));if(Array.isArray(a)&&a.length>0){const s=new Set,i=[];for(const o of a){if(!o||typeof o.id!="string"||!o.id)continue;const c=Array.isArray(o.nodeIds)?[...new Set(o.nodeIds.filter(l=>typeof l=="string"&&n.has(l)&&!s.has(l)))]:[];c.length<2||(c.forEach(l=>s.add(l)),i.push({id:o.id,label:typeof o.label=="string"&&o.label?o.label:"分组",nodeIds:c}))}if(i.length>0&&!(i.length===1&&s.size===t.length&&t.length>2))return{groups:i,fallback:!1}}return{groups:$e(t,r),fallback:!0}}function $e(t,r){if(t.length<4)return[];const a=new Map(t.map((m,d)=>[m.id,d])),n=new Map;for(const m of t)n.set(m.id,[]);const s=new Set;for(const m of r){if(!a.has(m.from)||!a.has(m.to)||m.from===m.to)continue;const d=[m.from,m.to].sort().join("→");s.has(d)||(s.add(d),n.get(m.from).push(m.to),n.get(m.to).push(m.from))}const i=[...t].sort((m,d)=>{const f=n.get(m.id).length,C=n.get(d.id).length;return f!==C?C-f:(a.get(m.id)??0)-(a.get(d.id)??0)}),o=Math.min(3,Math.max(1,Math.ceil(t.length/4))),c=i.slice(0,o).filter(m=>{var d;return(((d=n.get(m.id))==null?void 0:d.length)??0)>0});if(c.length===0)return[];const l=new Map;c.forEach((m,d)=>l.set(m.id,d));const g=c.map(m=>m.id);for(;g.length;){const m=g.shift(),d=l.get(m);for(const f of n.get(m)??[])l.has(f)||(l.set(f,d),g.push(f))}const w=[];return c.forEach((m,d)=>{const f=t.filter(C=>l.get(C.id)===d).map(C=>C.id);f.length<2||w.push({id:`grp-${m.id}`,label:m.label.length<=5?`${m.label}相关`:m.label,nodeIds:f})}),w}const W=34;function Ie(t,r,a){var m;const n=new Set(t.map(d=>d.id)),s=new Map;for(const d of t)s.set(d.id,0);const i=new Set,o=[];for(const d of r){if(!n.has(d.from)||!n.has(d.to)||d.from===d.to)continue;const f=[d.from,d.to].sort().join("→");i.has(f)||(i.add(f),o.push(d),s.set(d.from,s.get(d.from)+1),s.set(d.to,s.get(d.to)+1))}let c=((m=t[0])==null?void 0:m.id)??"";for(const d of t)(s.get(d.id)??0)>(s.get(c)??0)&&(c=d.id);const l=new Map;for(const d of a)for(const f of d.nodeIds)n.has(f)&&!l.has(f)&&l.set(f,d.id);const g=d=>{const f=ie(d.label,d.id===c||(s.get(d.id)??0)>=4);return{id:d.id,width:Math.ceil(f.width),height:Math.ceil(f.height)}},w=[];for(const d of a){const f=d.nodeIds.filter(C=>l.get(C)===d.id&&n.has(C));f.length!==0&&w.push({id:`g:${d.id}`,layoutOptions:{"elk.padding":`[top=${W},left=14,bottom=12,right=14]`},children:f.map(C=>g(t.find(p=>p.id===C)))})}for(const d of t)l.has(d.id)||w.push(g(d));return{id:"root",layoutOptions:{"elk.algorithm":"layered","elk.direction":"DOWN","elk.edgeRouting":"ORTHOGONAL","elk.hierarchyHandling":"INCLUDE_CHILDREN","elk.spacing.nodeNode":"34","elk.spacing.edgeNode":"26","elk.spacing.componentComponent":"48","elk.layered.spacing.nodeNodeBetweenLayers":"56"},children:w,edges:o.map((d,f)=>({id:`e${f}`,sources:[d.from],targets:[d.to]}))}}function Te(t){if(t.length===0)return{x:0,y:0};if(t.length===1)return t[0];const r=[];let a=0;for(let s=1;s<t.length;s++){const i=Math.hypot(t[s].x-t[s-1].x,t[s].y-t[s-1].y);r.push(i),a+=i}let n=a/2;for(let s=0;s<r.length;s++){if(n<=r[s]||s===r.length-1){const i=r[s]===0?0:n/r[s];return{x:t[s].x+(t[s+1].x-t[s].x)*i,y:t[s].y+(t[s+1].y-t[s].y)*i}}n-=r[s]}return t[t.length-1]}function Le(t,r,a,n,s,i){var b;const o=new Map(r.map(u=>[u.id,u])),c=new Map;n.forEach((u,x)=>c.set(u.id,x%5));const l=new Map(n.map(u=>[u.id,u])),g=new Map;for(const u of n)for(const x of u.nodeIds)g.has(x)||g.set(x,u.id);const w=[],m=[],d=[],f=new Map([["root",{x:0,y:0}]]),C=[],p=(u,x,y,E)=>{var M;for(const S of u.children??[]){const z=x+(S.x??0),I=y+(S.y??0);if((M=S.children)!=null&&M.length){const k=S.id.startsWith("g:")?S.id.slice(2):S.id,v=l.get(k);m.push({id:k,label:(v==null?void 0:v.label)??"分组",x:z,y:I,w:S.width??0,h:S.height??0,colorIdx:c.get(k)??0}),f.set(S.id,{x:z,y:I}),p(S,z,I,k)}else{const k=o.get(S.id);if(!k)continue;const v=ie(k.label,k.id===i),$=g.get(k.id)??null;w.push({id:k.id,x:z,y:I,w:S.width??Math.ceil(v.width),h:S.height??Math.ceil(v.height),lines:v.lines,hub:k.id===i,groupId:E,colorIdx:$!=null?c.get($)??0:-1})}}for(const S of u.edges??[])C.push({e:S,fallback:{x,y}})};p(t,0,0,null);for(const{e:u,fallback:x}of C){const y=(b=u.sections)==null?void 0:b[0];if(!y)continue;const E=(u.container!=null?f.get(u.container):void 0)??x,M=[y.startPoint,...y.bendPoints??[],y.endPoint].map(I=>({x:I.x+E.x,y:I.y+E.y})),S=Number(u.id.slice(1)),z=a[S];z&&d.push({from:z.from,to:z.to,label:z.label,pts:M,labelPt:z.label?Te(M):null})}return{width:Math.ceil(t.width??0),height:Math.ceil(t.height??0),nodes:w,groups:m,edges:d,hubId:i,groupsFallback:s}}let ae=null;function Re(){return ae??(ae=U(()=>import("./elk.bundled-Dv5OJ-BO.js").then(t=>t.e),__vite__mapDeps([0,1,2,3]),import.meta.url).then(t=>{const r=t,a=r.default??r;return new a})),ae}async function _e(t,r,a){const n=ze(t,r,a),s=Ie(t,r,n.groups),i=qe(t,r),c=await(await Re()).layout(s);return Le(c,t,r,n.groups,n.fallback,i)}function qe(t,r){var o;const a=new Set(t.map(c=>c.id)),n=new Map;for(const c of t)n.set(c.id,0);const s=new Set;for(const c of r){if(!a.has(c.from)||!a.has(c.to)||c.from===c.to)continue;const l=[c.from,c.to].sort().join("→");s.has(l)||(s.add(l),n.set(c.from,n.get(c.from)+1),n.set(c.to,n.get(c.to)+1))}let i=((o=t[0])==null?void 0:o.id)??"";for(const c of t)(n.get(c.id)??0)>(n.get(i)??0)&&(i=c.id);return i}const A=.4,V=2.5,B=.2;function Oe(t){return t.map((r,a)=>`${a===0?"M":"L"} ${r.x.toFixed(1)} ${r.y.toFixed(1)}`).join(" ")}function X({layout:t}){return e.jsxs("svg",{width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,style:{display:"block"},"data-testid":"conceptmap-svg",children:[e.jsx("defs",{children:e.jsx("marker",{id:"cm-arrow",viewBox:"0 0 10 10",refX:9,refY:5,markerWidth:6.5,markerHeight:6.5,orient:"auto-start-reverse",children:e.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-ink-faint"})})}),t.groups.map((r,a)=>e.jsxs("g",{className:"cm-enter",style:{animationDelay:`${a*60}ms`},children:[e.jsx("rect",{x:r.x,y:r.y,width:r.w,height:r.h,rx:14,className:"cm-group-box",style:{fill:`var(--cm-c${r.colorIdx}-fill)`,stroke:`var(--cm-c${r.colorIdx}-line)`}}),e.jsx("rect",{x:r.x,y:r.y,width:r.w,height:W,rx:14,className:"cm-group-head",style:{fill:`var(--cm-c${r.colorIdx}-line)`}}),e.jsx("rect",{x:r.x,y:r.y+W/2,width:r.w,height:W/2,className:"cm-group-head",style:{fill:`var(--cm-c${r.colorIdx}-line)`}}),e.jsx("text",{x:r.x+14,y:r.y+22,fontSize:12,fontWeight:600,fill:`var(--cm-c${r.colorIdx}-line)`,"data-testid":"conceptmap-group-label",children:r.label})]},`g-${r.id}`)),t.edges.map((r,a)=>{const n=r.label?{width:T(r.label,12)+16,height:19}:null;return e.jsxs("g",{className:"cm-enter",style:{animationDelay:`${(t.groups.length+1)*60+a*30}ms`},children:[e.jsx("path",{d:Oe(r.pts),className:"fill-none stroke-ink-faint/80",strokeWidth:1.6,markerEnd:"url(#cm-arrow)"}),r.label&&n&&r.labelPt&&e.jsxs("g",{children:[e.jsx("rect",{x:r.labelPt.x-n.width/2,y:r.labelPt.y-n.height/2,width:n.width,height:n.height,rx:n.height/2,className:"fill-surface-0/95 stroke-[var(--border-faint)]",strokeWidth:1}),e.jsx("text",{x:r.labelPt.x,y:r.labelPt.y+3.5,textAnchor:"middle",fontSize:12,className:"fill-ink-muted font-medium",style:{paintOrder:"stroke"},stroke:"var(--surface-0)",strokeWidth:3,children:r.label})]})]},`e-${a}`)}),t.nodes.map((r,a)=>{const n=r.colorIdx>=0?`var(--cm-c${r.colorIdx}-fill)`:"var(--surface-3)",s=r.colorIdx>=0?`var(--cm-c${r.colorIdx}-line)`:"var(--border)",i=r.hub?14:13;return e.jsxs("g",{className:"cm-enter",style:{animationDelay:`${(t.groups.length+2)*60+a*35}ms`},children:[e.jsx("rect",{x:r.x,y:r.y,width:r.w,height:r.h,rx:r.hub?12:10,fill:n,stroke:s,strokeWidth:r.hub?1.8:1.4}),r.lines.map((o,c)=>e.jsx("text",{x:r.x+r.w/2,y:r.y+r.h/2+(c-(r.lines.length-1)/2)*17+4.5,textAnchor:"middle",fontSize:i,className:r.hub?"fill-ink-strong font-bold":"fill-ink",children:o},c))]},r.id)})]})}function Ae({data:t,variant:r="card"}){const a=t,n=L(),s=h.useMemo(()=>JSON.stringify({n:a.nodes,e:a.edges,g:a.groups??null}),[a.nodes,a.edges,a.groups]),[i,o]=h.useState(null);h.useEffect(()=>{let b=!0;return o(null),_e(a.nodes,a.edges,a.groups??null).then(u=>{b&&o(u)}).catch(()=>{}),()=>{b=!1}},[s]);const[c,l]=h.useState(1),[g,w]=h.useState(!1),m=h.useRef(null);h.useEffect(()=>{const b=m.current;if(!b||!i)return;const u=()=>{const y=(b.clientWidth-16)/i.width;y<1&&l(Math.max(A,+y.toFixed(2)))};u();const x=new ResizeObserver(u);return x.observe(b),()=>x.disconnect()},[i==null?void 0:i.width,i]);const d=h.useCallback(()=>l(b=>Math.min(V,+(b+B).toFixed(2))),[]),f=h.useCallback(()=>l(b=>Math.max(A,+(b-B).toFixed(2))),[]),C=h.useCallback(()=>l(1),[]),p=h.useCallback(b=>{if(!b.ctrlKey&&!b.metaKey)return;b.preventDefault();const u=b.deltaY>0?-B:B;l(x=>Math.min(V,Math.max(A,+(x+u).toFixed(2))))},[]);return r==="canvas"?e.jsx("div",{"data-testid":"conceptmap-canvas-content",children:i?e.jsx(X,{layout:i}):e.jsx("div",{style:{minWidth:320,minHeight:160}})}):e.jsxs("div",{className:"surface-card p-4","data-testid":"artifact-concept-map",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3 gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[e.jsx(he,{className:"w-4 h-4 text-ink-muted shrink-0"}),e.jsx("h3",{className:"text-body font-bold text-ink truncate",children:a.title})]}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-1","data-testid":"conceptmap-zoom-controls",children:[e.jsx("button",{onClick:f,disabled:c<=A,className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-3 disabled:opacity-30 text-label font-bold flex items-center justify-center",title:n("artifact.zoomOut"),children:"−"}),e.jsxs("button",{onClick:C,className:"px-1.5 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-3 text-caption font-bold tabular-nums",title:n("artifact.zoomReset"),children:[Math.round(c*100),"%"]}),e.jsx("button",{onClick:d,disabled:c>=V,className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-3 disabled:opacity-30 text-label font-bold flex items-center justify-center",title:n("artifact.zoomIn"),children:"+"})]}),e.jsx("button",{onClick:()=>w(!0),"data-testid":"conceptmap-expand","aria-label":n("artifact.viewer.open"),"data-tooltip":n("artifact.viewer.open"),className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-3 flex items-center justify-center",children:e.jsx(H,{className:"w-3.5 h-3.5"})})]})]}),e.jsx("div",{ref:m,onClick:()=>w(!0),onWheel:p,className:"bg-surface-0/40 rounded-lg p-2 overflow-auto min-h-[160px] max-h-[500px] select-none",style:{touchAction:"pan-x pan-y"},"data-testid":"conceptmap-render-area","data-noswipe":"",children:i?e.jsx("div",{style:{width:i.width*c,height:i.height*c,margin:"0 auto"},children:e.jsx("div",{style:{transform:`scale(${c})`,transformOrigin:"top left",width:i.width,height:i.height},children:e.jsx(X,{layout:i})})}):e.jsx("div",{className:"h-[152px] flex items-center justify-center text-caption text-ink-muted","data-testid":"conceptmap-loading",children:"…"})}),e.jsx("div",{className:"mt-1.5 flex items-center justify-between text-caption text-ink-muted",children:e.jsx("span",{children:n("artifact.conceptmap.stats",{nodes:a.nodes.length,edges:a.edges.length})})}),a.warnings&&a.warnings.length>0&&e.jsxs("div",{className:"mt-1 text-caption text-warning flex items-start gap-1","data-testid":"artifact-warnings",children:[e.jsx(O,{className:"w-3.5 h-3.5 shrink-0 mt-0.5"}),e.jsx("span",{children:a.warnings.join("; ")})]}),g&&e.jsx(K,{title:a.title,onClose:()=>w(!1),children:e.jsx("div",{className:"h-full w-full rounded-xl overflow-hidden bg-surface-0/60",children:e.jsx(F,{testid:"conceptmap-modal-stage",children:i?e.jsx(X,{layout:i}):e.jsx("div",{className:"min-w-[320px] min-h-[160px]"})})})})]})}function Be(t,r){const{correct:a,total:n}=t,s=n>0&&a===n,i=n>0&&a<n,o=r!=null&&r>=fe,c=r!=null&&r>=xe;return i?[{id:"explain-wrong"},{id:"retry"}]:s&&o?[{id:"next-topic"},{id:"go-deeper"}]:s&&c?[{id:"mark-mastered",advancesMastery:!0},{id:"next-topic"},{id:"go-deeper"}]:[{id:"go-deeper"},{id:"retry"}]}const Pe="ls-quiz-progress:";function We(t){const r=t.questions.map(n=>`${n.prompt}|${(n.options??[]).join("/")}#${n.answer??""}`).join(`
|
|
17
|
+
*/const Se=Q("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);function K({title:t,onClose:r,children:a}){const n=L(),s=h.useRef(null);return me(s,!0),h.useEffect(()=>{const i=o=>{o.key==="Escape"&&r()};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[r]),ue.createPortal(e.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col bg-black/80","data-testid":"diagram-viewer-modal","data-noswipe":"",role:"dialog","aria-modal":"true","aria-label":t,children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-2.5 shrink-0",onClick:i=>i.stopPropagation(),children:[e.jsx("h3",{className:"text-body font-bold text-white truncate",children:t}),e.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[e.jsx("span",{className:"text-caption text-white/50 hidden sm:inline",children:n("artifact.viewer.hint")}),e.jsx("button",{onClick:r,"data-testid":"diagram-viewer-close","aria-label":n("action.close"),"data-tooltip":n("action.close"),className:"text-white/70 hover:text-white w-9 h-9 flex items-center justify-center rounded-lg hover:bg-white/10 transition-colors",children:e.jsx(J,{className:"w-5 h-5"})})]})]}),e.jsx("div",{className:"flex-1 min-h-0 px-2 pb-2",onClick:r,children:e.jsx("div",{ref:s,className:"h-full w-full",onClick:i=>i.stopPropagation(),children:a})})]}),document.body)}function T(t,r=13){let a=0;for(const n of t)a+=/[\u2e80-\u9fff\uf900-\ufaff\uff00-\uffef\u3000-\u303f]/.test(n)?r:r*.58;return a}const q=118;function Ee(t){if(T(t)<=q)return[t];const r=[];for(let l=0;l<t.length;l++)/[\s/\-—·]/.test(t[l]??"")&&r.push(l);const a=t.length/2;let n=-1,s=1/0;for(const l of r){const g=Math.abs(l+1-a);g<s&&(s=g,n=l)}let i,o;if(n>=0)i=t.slice(0,n+1).trim(),o=t.slice(n+1).trim();else{let l=0,g=0;for(const w of t)if(l+=T(w),g++,l>=T(t)/2)break;i=t.slice(0,g),o=t.slice(g)}if(T(i)<=q&&T(o)<=q)return[i,o];const c=l=>{let g="";for(const w of l){if(T(g+w+"…")>q)break;g+=w}return g+"…"};return[T(i)>q?c(i):i,T(o)>q?c(o):o]}function ie(t,r){const a=Ee(t),n=r?14:13,s=Math.max(...a.map(l=>T(l,n))),i=r?30:24,o=17,c=r?18:14;return{width:Math.min(r?200:180,Math.max(r?92:76,s+i)),height:c+a.length*o,lines:a}}function ze(t,r,a){const n=new Set(t.map(s=>s.id));if(Array.isArray(a)&&a.length>0){const s=new Set,i=[];for(const o of a){if(!o||typeof o.id!="string"||!o.id)continue;const c=Array.isArray(o.nodeIds)?[...new Set(o.nodeIds.filter(l=>typeof l=="string"&&n.has(l)&&!s.has(l)))]:[];c.length<2||(c.forEach(l=>s.add(l)),i.push({id:o.id,label:typeof o.label=="string"&&o.label?o.label:"分组",nodeIds:c}))}if(i.length>0&&!(i.length===1&&s.size===t.length&&t.length>2))return{groups:i,fallback:!1}}return{groups:$e(t,r),fallback:!0}}function $e(t,r){if(t.length<4)return[];const a=new Map(t.map((m,d)=>[m.id,d])),n=new Map;for(const m of t)n.set(m.id,[]);const s=new Set;for(const m of r){if(!a.has(m.from)||!a.has(m.to)||m.from===m.to)continue;const d=[m.from,m.to].sort().join("→");s.has(d)||(s.add(d),n.get(m.from).push(m.to),n.get(m.to).push(m.from))}const i=[...t].sort((m,d)=>{const f=n.get(m.id).length,C=n.get(d.id).length;return f!==C?C-f:(a.get(m.id)??0)-(a.get(d.id)??0)}),o=Math.min(3,Math.max(1,Math.ceil(t.length/4))),c=i.slice(0,o).filter(m=>{var d;return(((d=n.get(m.id))==null?void 0:d.length)??0)>0});if(c.length===0)return[];const l=new Map;c.forEach((m,d)=>l.set(m.id,d));const g=c.map(m=>m.id);for(;g.length;){const m=g.shift(),d=l.get(m);for(const f of n.get(m)??[])l.has(f)||(l.set(f,d),g.push(f))}const w=[];return c.forEach((m,d)=>{const f=t.filter(C=>l.get(C.id)===d).map(C=>C.id);f.length<2||w.push({id:`grp-${m.id}`,label:m.label.length<=5?`${m.label}相关`:m.label,nodeIds:f})}),w}const W=34;function Ie(t,r,a){var m;const n=new Set(t.map(d=>d.id)),s=new Map;for(const d of t)s.set(d.id,0);const i=new Set,o=[];for(const d of r){if(!n.has(d.from)||!n.has(d.to)||d.from===d.to)continue;const f=[d.from,d.to].sort().join("→");i.has(f)||(i.add(f),o.push(d),s.set(d.from,s.get(d.from)+1),s.set(d.to,s.get(d.to)+1))}let c=((m=t[0])==null?void 0:m.id)??"";for(const d of t)(s.get(d.id)??0)>(s.get(c)??0)&&(c=d.id);const l=new Map;for(const d of a)for(const f of d.nodeIds)n.has(f)&&!l.has(f)&&l.set(f,d.id);const g=d=>{const f=ie(d.label,d.id===c||(s.get(d.id)??0)>=4);return{id:d.id,width:Math.ceil(f.width),height:Math.ceil(f.height)}},w=[];for(const d of a){const f=d.nodeIds.filter(C=>l.get(C)===d.id&&n.has(C));f.length!==0&&w.push({id:`g:${d.id}`,layoutOptions:{"elk.padding":`[top=${W},left=14,bottom=12,right=14]`},children:f.map(C=>g(t.find(p=>p.id===C)))})}for(const d of t)l.has(d.id)||w.push(g(d));return{id:"root",layoutOptions:{"elk.algorithm":"layered","elk.direction":"DOWN","elk.edgeRouting":"ORTHOGONAL","elk.hierarchyHandling":"INCLUDE_CHILDREN","elk.spacing.nodeNode":"34","elk.spacing.edgeNode":"26","elk.spacing.componentComponent":"48","elk.layered.spacing.nodeNodeBetweenLayers":"56"},children:w,edges:o.map((d,f)=>({id:`e${f}`,sources:[d.from],targets:[d.to]}))}}function Te(t){if(t.length===0)return{x:0,y:0};if(t.length===1)return t[0];const r=[];let a=0;for(let s=1;s<t.length;s++){const i=Math.hypot(t[s].x-t[s-1].x,t[s].y-t[s-1].y);r.push(i),a+=i}let n=a/2;for(let s=0;s<r.length;s++){if(n<=r[s]||s===r.length-1){const i=r[s]===0?0:n/r[s];return{x:t[s].x+(t[s+1].x-t[s].x)*i,y:t[s].y+(t[s+1].y-t[s].y)*i}}n-=r[s]}return t[t.length-1]}function Le(t,r,a,n,s,i){var b;const o=new Map(r.map(u=>[u.id,u])),c=new Map;n.forEach((u,x)=>c.set(u.id,x%5));const l=new Map(n.map(u=>[u.id,u])),g=new Map;for(const u of n)for(const x of u.nodeIds)g.has(x)||g.set(x,u.id);const w=[],m=[],d=[],f=new Map([["root",{x:0,y:0}]]),C=[],p=(u,x,y,E)=>{var M;for(const S of u.children??[]){const z=x+(S.x??0),I=y+(S.y??0);if((M=S.children)!=null&&M.length){const k=S.id.startsWith("g:")?S.id.slice(2):S.id,v=l.get(k);m.push({id:k,label:(v==null?void 0:v.label)??"分组",x:z,y:I,w:S.width??0,h:S.height??0,colorIdx:c.get(k)??0}),f.set(S.id,{x:z,y:I}),p(S,z,I,k)}else{const k=o.get(S.id);if(!k)continue;const v=ie(k.label,k.id===i),$=g.get(k.id)??null;w.push({id:k.id,x:z,y:I,w:S.width??Math.ceil(v.width),h:S.height??Math.ceil(v.height),lines:v.lines,hub:k.id===i,groupId:E,colorIdx:$!=null?c.get($)??0:-1})}}for(const S of u.edges??[])C.push({e:S,fallback:{x,y}})};p(t,0,0,null);for(const{e:u,fallback:x}of C){const y=(b=u.sections)==null?void 0:b[0];if(!y)continue;const E=(u.container!=null?f.get(u.container):void 0)??x,M=[y.startPoint,...y.bendPoints??[],y.endPoint].map(I=>({x:I.x+E.x,y:I.y+E.y})),S=Number(u.id.slice(1)),z=a[S];z&&d.push({from:z.from,to:z.to,label:z.label,pts:M,labelPt:z.label?Te(M):null})}return{width:Math.ceil(t.width??0),height:Math.ceil(t.height??0),nodes:w,groups:m,edges:d,hubId:i,groupsFallback:s}}let ae=null;function Re(){return ae??(ae=U(()=>import("./elk.bundled-Fo5ndUql.js").then(t=>t.e),__vite__mapDeps([0,1,2,3]),import.meta.url).then(t=>{const r=t,a=r.default??r;return new a})),ae}async function _e(t,r,a){const n=ze(t,r,a),s=Ie(t,r,n.groups),i=qe(t,r),c=await(await Re()).layout(s);return Le(c,t,r,n.groups,n.fallback,i)}function qe(t,r){var o;const a=new Set(t.map(c=>c.id)),n=new Map;for(const c of t)n.set(c.id,0);const s=new Set;for(const c of r){if(!a.has(c.from)||!a.has(c.to)||c.from===c.to)continue;const l=[c.from,c.to].sort().join("→");s.has(l)||(s.add(l),n.set(c.from,n.get(c.from)+1),n.set(c.to,n.get(c.to)+1))}let i=((o=t[0])==null?void 0:o.id)??"";for(const c of t)(n.get(c.id)??0)>(n.get(i)??0)&&(i=c.id);return i}const A=.4,V=2.5,B=.2;function Oe(t){return t.map((r,a)=>`${a===0?"M":"L"} ${r.x.toFixed(1)} ${r.y.toFixed(1)}`).join(" ")}function X({layout:t}){return e.jsxs("svg",{width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,style:{display:"block"},"data-testid":"conceptmap-svg",children:[e.jsx("defs",{children:e.jsx("marker",{id:"cm-arrow",viewBox:"0 0 10 10",refX:9,refY:5,markerWidth:6.5,markerHeight:6.5,orient:"auto-start-reverse",children:e.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-ink-faint"})})}),t.groups.map((r,a)=>e.jsxs("g",{className:"cm-enter",style:{animationDelay:`${a*60}ms`},children:[e.jsx("rect",{x:r.x,y:r.y,width:r.w,height:r.h,rx:14,className:"cm-group-box",style:{fill:`var(--cm-c${r.colorIdx}-fill)`,stroke:`var(--cm-c${r.colorIdx}-line)`}}),e.jsx("rect",{x:r.x,y:r.y,width:r.w,height:W,rx:14,className:"cm-group-head",style:{fill:`var(--cm-c${r.colorIdx}-line)`}}),e.jsx("rect",{x:r.x,y:r.y+W/2,width:r.w,height:W/2,className:"cm-group-head",style:{fill:`var(--cm-c${r.colorIdx}-line)`}}),e.jsx("text",{x:r.x+14,y:r.y+22,fontSize:12,fontWeight:600,fill:`var(--cm-c${r.colorIdx}-line)`,"data-testid":"conceptmap-group-label",children:r.label})]},`g-${r.id}`)),t.edges.map((r,a)=>{const n=r.label?{width:T(r.label,12)+16,height:19}:null;return e.jsxs("g",{className:"cm-enter",style:{animationDelay:`${(t.groups.length+1)*60+a*30}ms`},children:[e.jsx("path",{d:Oe(r.pts),className:"fill-none stroke-ink-faint/80",strokeWidth:1.6,markerEnd:"url(#cm-arrow)"}),r.label&&n&&r.labelPt&&e.jsxs("g",{children:[e.jsx("rect",{x:r.labelPt.x-n.width/2,y:r.labelPt.y-n.height/2,width:n.width,height:n.height,rx:n.height/2,className:"fill-surface-0/95 stroke-[var(--border-faint)]",strokeWidth:1}),e.jsx("text",{x:r.labelPt.x,y:r.labelPt.y+3.5,textAnchor:"middle",fontSize:12,className:"fill-ink-muted font-medium",style:{paintOrder:"stroke"},stroke:"var(--surface-0)",strokeWidth:3,children:r.label})]})]},`e-${a}`)}),t.nodes.map((r,a)=>{const n=r.colorIdx>=0?`var(--cm-c${r.colorIdx}-fill)`:"var(--surface-3)",s=r.colorIdx>=0?`var(--cm-c${r.colorIdx}-line)`:"var(--border)",i=r.hub?14:13;return e.jsxs("g",{className:"cm-enter",style:{animationDelay:`${(t.groups.length+2)*60+a*35}ms`},children:[e.jsx("rect",{x:r.x,y:r.y,width:r.w,height:r.h,rx:r.hub?12:10,fill:n,stroke:s,strokeWidth:r.hub?1.8:1.4}),r.lines.map((o,c)=>e.jsx("text",{x:r.x+r.w/2,y:r.y+r.h/2+(c-(r.lines.length-1)/2)*17+4.5,textAnchor:"middle",fontSize:i,className:r.hub?"fill-ink-strong font-bold":"fill-ink",children:o},c))]},r.id)})]})}function Ae({data:t,variant:r="card"}){const a=t,n=L(),s=h.useMemo(()=>JSON.stringify({n:a.nodes,e:a.edges,g:a.groups??null}),[a.nodes,a.edges,a.groups]),[i,o]=h.useState(null);h.useEffect(()=>{let b=!0;return o(null),_e(a.nodes,a.edges,a.groups??null).then(u=>{b&&o(u)}).catch(()=>{}),()=>{b=!1}},[s]);const[c,l]=h.useState(1),[g,w]=h.useState(!1),m=h.useRef(null);h.useEffect(()=>{const b=m.current;if(!b||!i)return;const u=()=>{const y=(b.clientWidth-16)/i.width;y<1&&l(Math.max(A,+y.toFixed(2)))};u();const x=new ResizeObserver(u);return x.observe(b),()=>x.disconnect()},[i==null?void 0:i.width,i]);const d=h.useCallback(()=>l(b=>Math.min(V,+(b+B).toFixed(2))),[]),f=h.useCallback(()=>l(b=>Math.max(A,+(b-B).toFixed(2))),[]),C=h.useCallback(()=>l(1),[]),p=h.useCallback(b=>{if(!b.ctrlKey&&!b.metaKey)return;b.preventDefault();const u=b.deltaY>0?-B:B;l(x=>Math.min(V,Math.max(A,+(x+u).toFixed(2))))},[]);return r==="canvas"?e.jsx("div",{"data-testid":"conceptmap-canvas-content",children:i?e.jsx(X,{layout:i}):e.jsx("div",{style:{minWidth:320,minHeight:160}})}):e.jsxs("div",{className:"surface-card p-4","data-testid":"artifact-concept-map",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3 gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[e.jsx(he,{className:"w-4 h-4 text-ink-muted shrink-0"}),e.jsx("h3",{className:"text-body font-bold text-ink truncate",children:a.title})]}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-1","data-testid":"conceptmap-zoom-controls",children:[e.jsx("button",{onClick:f,disabled:c<=A,className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-3 disabled:opacity-30 text-label font-bold flex items-center justify-center",title:n("artifact.zoomOut"),children:"−"}),e.jsxs("button",{onClick:C,className:"px-1.5 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-3 text-caption font-bold tabular-nums",title:n("artifact.zoomReset"),children:[Math.round(c*100),"%"]}),e.jsx("button",{onClick:d,disabled:c>=V,className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-3 disabled:opacity-30 text-label font-bold flex items-center justify-center",title:n("artifact.zoomIn"),children:"+"})]}),e.jsx("button",{onClick:()=>w(!0),"data-testid":"conceptmap-expand","aria-label":n("artifact.viewer.open"),"data-tooltip":n("artifact.viewer.open"),className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-3 flex items-center justify-center",children:e.jsx(H,{className:"w-3.5 h-3.5"})})]})]}),e.jsx("div",{ref:m,onClick:()=>w(!0),onWheel:p,className:"bg-surface-0/40 rounded-lg p-2 overflow-auto min-h-[160px] max-h-[500px] select-none",style:{touchAction:"pan-x pan-y"},"data-testid":"conceptmap-render-area","data-noswipe":"",children:i?e.jsx("div",{style:{width:i.width*c,height:i.height*c,margin:"0 auto"},children:e.jsx("div",{style:{transform:`scale(${c})`,transformOrigin:"top left",width:i.width,height:i.height},children:e.jsx(X,{layout:i})})}):e.jsx("div",{className:"h-[152px] flex items-center justify-center text-caption text-ink-muted","data-testid":"conceptmap-loading",children:"…"})}),e.jsx("div",{className:"mt-1.5 flex items-center justify-between text-caption text-ink-muted",children:e.jsx("span",{children:n("artifact.conceptmap.stats",{nodes:a.nodes.length,edges:a.edges.length})})}),a.warnings&&a.warnings.length>0&&e.jsxs("div",{className:"mt-1 text-caption text-warning flex items-start gap-1","data-testid":"artifact-warnings",children:[e.jsx(O,{className:"w-3.5 h-3.5 shrink-0 mt-0.5"}),e.jsx("span",{children:a.warnings.join("; ")})]}),g&&e.jsx(K,{title:a.title,onClose:()=>w(!1),children:e.jsx("div",{className:"h-full w-full rounded-xl overflow-hidden bg-surface-0/60",children:e.jsx(F,{testid:"conceptmap-modal-stage",children:i?e.jsx(X,{layout:i}):e.jsx("div",{className:"min-w-[320px] min-h-[160px]"})})})})]})}function Be(t,r){const{correct:a,total:n}=t,s=n>0&&a===n,i=n>0&&a<n,o=r!=null&&r>=fe,c=r!=null&&r>=xe;return i?[{id:"explain-wrong"},{id:"retry"}]:s&&o?[{id:"next-topic"},{id:"go-deeper"}]:s&&c?[{id:"mark-mastered",advancesMastery:!0},{id:"next-topic"},{id:"go-deeper"}]:[{id:"go-deeper"},{id:"retry"}]}const Pe="ls-quiz-progress:";function We(t){const r=t.questions.map(n=>`${n.prompt}|${(n.options??[]).join("/")}#${n.answer??""}`).join(`
|
|
18
18
|
`);let a=2166136261;for(let n=0;n<r.length;n++)a^=r.charCodeAt(n),a=Math.imul(a,16777619);return`${Pe}${(a>>>0).toString(36)}`}function De(t){var r,a;try{const n=localStorage.getItem(t);if(!n)return null;const s=JSON.parse(n);return typeof(s==null?void 0:s.current)=="number"&&s.current>=0&&typeof((r=s==null?void 0:s.score)==null?void 0:r.correct)=="number"&&typeof((a=s==null?void 0:s.score)==null?void 0:a.total)=="number"?s:null}catch{return null}}function He(t,r){try{localStorage.setItem(t,JSON.stringify(r))}catch{}}const Fe={"explain-wrong":{icon:Ce,labelKey:"quiz.action.explainWrong",message:"我刚才有题答错了,帮我讲讲为什么错、正确的思路是什么。"},retry:{icon:Ne,labelKey:"quiz.action.retry",message:"再来一组类似的题巩固一下。"},"go-deeper":{icon:be,labelKey:"quiz.action.goDeeper",message:"这组我答得不错,帮我深入讲讲背后的原理和容易混淆的地方。"},"mark-mastered":{icon:ge,labelKey:"quiz.action.markMastered",message:"这课我觉得掌握了,帮我确认一下——出个综合题检验,通过了就标记为掌握。"},"next-topic":{icon:ve,labelKey:"quiz.action.nextTopic",message:"进入下一个知识点。"}};function Ke({data:t,onAnswered:r,quizMastery:a,onPickAction:n,onQuizCompleted:s}){const i=t,o=L(),c=h.useMemo(()=>We(i),[i]),l=h.useMemo(()=>De(c),[c]),[g,w]=h.useState((l==null?void 0:l.current)??0),[m,d]=h.useState(null),[f,C]=h.useState(!1),[p,b]=h.useState((l==null?void 0:l.score)??{correct:0,total:0}),u=h.useRef([]),x=h.useRef(null);h.useEffect(()=>{He(c,{current:g,score:p})},[c,g,p]);const[y,E]=h.useState(!1);if(g>=i.questions.length){const k=!!n&&!s;if(s)return e.jsxs("div",{className:"surface-card p-4 text-center","data-testid":"artifact-quiz-done",children:[e.jsx("div",{className:"text-2xl mb-2",children:p.correct===p.total?"🎉":"📚"}),e.jsx("div",{className:"text-body font-bold text-ink",children:o("quiz.scoreSummary",{correct:p.correct,total:p.total})}),y?e.jsx("div",{className:"text-label text-ink-muted mt-1","data-testid":"quiz-hook-sent",children:o("quiz.hook.sent")}):e.jsx("button",{onClick:()=>{E(!0),s({title:i.title??"",correct:p.correct,total:p.total,detail:[...u.current]})},"data-testid":"quiz-hook-finish",className:"btn-3d-brand mt-3 px-5 py-2 text-body",children:o("quiz.hook.finish")})]});const v=k?Be(p,a??null):[];return e.jsxs("div",{className:"surface-card p-4 text-center","data-testid":"artifact-quiz-done",children:[e.jsx("div",{className:"text-2xl mb-2",children:p.correct===p.total?"🎉":"📚"}),e.jsx("div",{className:"text-body font-bold text-ink",children:o("quiz.scoreSummary",{correct:p.correct,total:p.total})}),e.jsx("div",{className:"text-label text-ink-muted mt-1",children:p.correct===p.total?o("quiz.allCorrectHint"):o("quiz.tryAgainHint")}),v.length>0&&e.jsxs("div",{className:"mt-3 space-y-2 text-left","data-testid":"quiz-next-actions",children:[e.jsx("div",{className:"text-label text-ink-muted",children:o("quiz.action.nextPrompt")}),v.map(($,j)=>{const N=Fe[$.id],R=N.icon;return e.jsxs("button",{onClick:()=>n==null?void 0:n(N.message),"data-testid":`quiz-action-${$.id}`,className:`${j===0?"btn-3d-brand":"btn-3d-neutral"} w-full py-2 text-body flex items-center justify-center gap-1.5`,children:[e.jsx(R,{className:"w-4 h-4"}),o(N.labelKey)]},$.id)})]})]})}const M=i.questions[g],S=f&&m===M.answer,z=()=>{if(m===null)return;C(!0);const k=m===M.answer;b(v=>({correct:v.correct+(k?1:0),total:v.total+1})),r==null||r(M,m,k),u.current.push({prompt:M.prompt,chosen:M.options[m]??"?",answerText:M.options[M.answer]??"?",correct:k}),de(k?"correct":"wrong",{origin:k&&x.current?(()=>{const v=x.current.getBoundingClientRect();return{x:v.right-48,y:v.top+24}})():void 0})},I=()=>{g===i.questions.length-1&&s&&!y&&(E(!0),s({title:i.title??"",correct:p.correct,total:p.total,detail:[...u.current]})),w(k=>k+1),d(null),C(!1)};return e.jsxs("div",{ref:x,className:"surface-card p-4","data-testid":"artifact-quiz",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(pe,{className:"w-4 h-4 text-brand"}),e.jsx("span",{className:"text-label font-bold text-brand",children:o("quiz.questionProgress",{cur:g+1,total:i.questions.length})})]}),e.jsx("span",{className:"text-label text-ink-muted",children:o("quiz.answeredCorrect",{n:p.correct})})]}),e.jsx("div",{className:"text-body text-ink font-medium mb-3 leading-relaxed",children:M.prompt}),e.jsx("div",{className:"space-y-2 mb-3",children:M.options.map((k,v)=>{const $=m===v,j=f&&v===M.answer,N=f&&$&&!j;return e.jsxs("button",{onClick:()=>!f&&d(v),disabled:f,"data-testid":`quiz-option-${v}`,className:`w-full text-left text-body p-2.5 rounded-lg border-2 font-medium transition-colors ${j?"border-brand bg-brand/10 text-brand animate-answer-correct":N?"border-warning bg-warning/10 text-warning animate-answer-wrong":$?"border-accent bg-accent/10 text-accent":"border-[var(--border)] text-ink-muted hover:border-[var(--border)]"} ${f?"cursor-default":"cursor-pointer"}`,children:[e.jsx("span",{className:"font-bold mr-2",children:String.fromCharCode(65+v)}),k,j&&e.jsx("span",{className:"float-right",children:e.jsx(Y,{className:"w-4 h-4 inline-block"})}),N&&e.jsx("span",{className:"float-right",children:e.jsx(J,{className:"w-4 h-4 inline-block"})})]},v)})}),f&&e.jsxs("div",{className:`rounded-lg p-3 mb-3 text-body leading-relaxed animate-artifact-render ${S?"bg-brand/10 border border-brand/30 text-brand":"bg-warning/10 border border-warning/30 text-warning"}`,"data-testid":"quiz-explanation",children:[e.jsxs("div",{className:"font-bold mb-1 flex items-center gap-1.5",children:[S?e.jsx(Y,{className:"w-4 h-4"}):e.jsx(J,{className:"w-4 h-4"}),e.jsx("span",{children:o(S?"quiz.correct":"quiz.wrong")})]}),e.jsx("div",{className:"text-ink-muted",children:M.explanation})]}),f?e.jsx("button",{onClick:I,"data-testid":"quiz-next",className:"btn-3d-brand w-full py-2 text-body",children:g+1<i.questions.length?o("exercise.next"):o("quiz.finish")}):e.jsx("button",{onClick:z,disabled:m===null,"data-testid":"quiz-submit",className:"btn-3d-brand w-full py-2 text-body disabled:opacity-40",children:o("exercise.submit")}),i.warnings&&i.warnings.length>0&&e.jsxs("div",{className:"mt-2 text-caption text-warning flex items-start gap-1","data-testid":"artifact-warnings",children:[e.jsx(O,{className:"w-3.5 h-3.5 shrink-0 mt-0.5"}),e.jsx("span",{children:i.warnings.join("; ")})]})]})}function oe({data:t,variant:r="card"}){const a=t,n=L(),[s,i]=h.useState(!1),o=e.jsxs("table",{className:"text-body",style:{width:"max-content",minWidth:"100%"},children:[e.jsx("thead",{children:e.jsx("tr",{className:"bg-surface-3/60",children:a.headers.map((c,l)=>e.jsx("th",{className:`px-3 py-2.5 text-left font-bold border-b border-[var(--border)] ${l===0?"text-ink-strong":"text-ink"}`,children:c},l))})}),e.jsx("tbody",{children:a.rows.map((c,l)=>e.jsx("tr",{className:l%2===0?"bg-surface-0/40":"",children:c.map((g,w)=>e.jsx("td",{className:`px-3 py-2.5 border-b border-[var(--border-faint)] align-top leading-relaxed ${w===0?"font-bold text-ink-strong whitespace-nowrap bg-surface-1/40":"text-ink-muted"}`,style:w===0?void 0:{maxWidth:260,overflowWrap:"anywhere"},children:g},w))},l))})]});return r==="canvas"?e.jsx("div",{className:"w-fit","data-testid":"comparetable-canvas-content",children:o}):e.jsxs("div",{className:"surface-card p-4","data-testid":"artifact-compare-table",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2 mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(we,{className:"w-4 h-4 text-ink-muted shrink-0"}),e.jsx("h3",{className:"text-body font-bold text-ink truncate",children:a.title})]}),e.jsx("button",{onClick:()=>i(!0),"data-testid":"comparetable-expand","aria-label":n("artifact.viewer.open"),"data-tooltip":n("artifact.viewer.open"),className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-3 flex items-center justify-center shrink-0",children:e.jsx(H,{className:"w-3.5 h-3.5"})})]}),e.jsx("div",{className:"overflow-x-auto rounded-lg border border-[var(--border-faint)]",onClick:()=>i(!0),style:{touchAction:"pan-x pan-y"},"data-noswipe":"",children:o}),a.warnings&&a.warnings.length>0&&e.jsxs("div",{className:"mt-2 text-caption text-warning flex items-start gap-1","data-testid":"artifact-warnings",children:[e.jsx(O,{className:"w-3.5 h-3.5 shrink-0 mt-0.5"}),e.jsx("span",{children:a.warnings.join("; ")})]}),s&&e.jsx(K,{title:a.title,onClose:()=>i(!1),children:e.jsx("div",{className:"h-full w-full rounded-xl overflow-hidden bg-surface-0/60",children:e.jsx(F,{testid:"comparetable-modal-stage",children:e.jsx("div",{className:"p-2 surface-card",children:e.jsx(oe,{data:t,variant:"canvas"})})})})})]})}function Ve(t){const r=t.split(`
|
|
19
19
|
`);for(let a=0;a<r.length;a++){const n=r[a]??"",s=n.trim();if(!(!s||s.startsWith("%%")))return/^flowchart-elk\b/i.test(s)?t:/^(flowchart|graph)\b/i.test(s)?(r[a]=n.replace(/^(\s*)(flowchart|graph)\b/i,"$1flowchart-elk"),r.join(`
|
|
20
|
-
`)):t}return t}let D=null;function Xe(){return D||(D=U(()=>import("./mermaid.core-n1vgOa_E.js").then(t=>t.aW),__vite__mapDeps([4,5,1,2,6,7]),import.meta.url).then(async t=>{const r=t.default,{default:a}=await U(async()=>{const{default:n}=await import("./mermaid-layout-elk.core-h_IjwDpP.js").then(s=>s.m);return{default:n}},__vite__mapDeps([8,5,1,2,6]),import.meta.url);return r.registerLayoutLoaders(a),r.initialize({startOnLoad:!1,theme:"base",securityLevel:"loose",themeVariables:Ge(),flowchart:{useMaxWidth:!0,htmlLabels:!0,curve:"basis",nodeSpacing:42,rankSpacing:54,padding:10},sequence:{useMaxWidth:!0,boxMargin:8,noteMargin:8,messageMargin:32}}),r})),D}function Ge(){const t=(a,n)=>{if(typeof document>"u")return n;const s=getComputedStyle(document.documentElement).getPropertyValue(a).trim();return s?`rgb(${s})`:n};return{background:"transparent",fontFamily:typeof document<"u"&&getComputedStyle(document.body).fontFamily||"ui-sans-serif, system-ui, sans-serif",fontSize:"14px",primaryColor:t("--surface-3-rgb","rgb(42 43 46)"),primaryBorderColor:t("--border-rgb","rgb(37 38 41)"),primaryTextColor:t("--ink-strong-rgb","rgb(250 250 250)"),secondaryColor:t("--surface-2-rgb","rgb(32 33 36)"),secondaryBorderColor:t("--border-faint-rgb","rgb(26 26 29)"),secondaryTextColor:t("--ink-rgb","rgb(245 245 250)"),tertiaryColor:t("--surface-1-rgb","rgb(24 25 27)"),tertiaryBorderColor:t("--border-faint-rgb","rgb(26 26 29)"),tertiaryTextColor:t("--ink-rgb","rgb(245 245 250)"),lineColor:t("--ink-faint-rgb","rgb(117 117 126)"),textColor:t("--ink-rgb","rgb(245 245 250)"),edgeLabelBackground:t("--surface-0-rgb","rgb(12 13 15)"),clusterBkg:t("--surface-1-rgb","rgb(24 25 27)"),clusterBorder:t("--border-faint-rgb","rgb(26 26 29)"),nodeBorder:t("--border-rgb","rgb(37 38 41)"),mainBkg:t("--surface-3-rgb","rgb(42 43 46)"),nodeTextColor:t("--ink-rgb","rgb(245 245 250)"),arrowheadColor:t("--ink-faint-rgb","rgb(117 117 126)"),actorBkg:t("--surface-3-rgb","rgb(42 43 46)"),actorBorder:t("--border-rgb","rgb(37 38 41)"),actorTextColor:t("--ink-strong-rgb","rgb(250 250 250)"),activationBkgColor:t("--surface-3-rgb","rgb(42 43 46)"),activationBorderColor:t("--border-rgb","rgb(37 38 41)"),signalColor:t("--ink-rgb","rgb(245 245 250)"),signalTextColor:t("--ink-rgb","rgb(245 245 250)"),labelBoxBkgColor:t("--surface-2-rgb","rgb(32 33 36)"),labelBoxBorderColor:t("--border-rgb","rgb(37 38 41)"),labelTextColor:t("--ink-rgb","rgb(245 245 250)"),loopTextColor:t("--ink-strong-rgb","rgb(250 250 250)"),noteBkgColor:"rgb(255 200 0 / 0.12)",noteBorderColor:"rgb(255 200 0 / 0.4)",noteTextColor:t("--ink-rgb","rgb(245 245 250)")}}typeof window<"u"&&window.addEventListener("theme-changed",()=>{D=null});async function Ze(t,r){const a=await Xe(),n=Ve(r);try{await a.parse(n)}catch(i){throw new Error(`mermaid 语法校验失败: ${i instanceof Error?i.message:String(i)}`)}const{svg:s}=await a.render(t,n);if(s.includes('aria-roledescription="error"')||s.includes('class="error-text"')||s.includes("Syntax error"))throw new Error("mermaid 渲染失败(语法错误或节点 label 含未转义特殊字符)");return s}function ne(t){let r=5381;for(let a=0;a<t.length;a++)r=(r<<5)+r+t.charCodeAt(a)>>>0;return r.toString(36)}const G=.3,Z=3,P=.2;function ce({data:t,variant:r="card"}){const a=t,n=L(),s={flowchart:n("artifact.diagram.flowchart"),sequence:n("artifact.diagram.sequence"),state:n("artifact.diagram.state")},i=h.useId().replace(/[:]/g,"_"),[o,c]=h.useState({status:"loading"}),[l,g]=h.useState(()=>{try{return sessionStorage.getItem(`mmdfix:${a.mermaid.length}:${ne(a.mermaid)}`)??a.mermaid}catch{return a.mermaid}}),[w,m]=h.useState(!1),[d,f]=h.useState(!1),[C,p]=h.useState(0);h.useEffect(()=>{const j=()=>p(N=>N+1);return window.addEventListener("theme-changed",j),()=>window.removeEventListener("theme-changed",j)},[]);const[b,u]=h.useState(null),[x,y]=h.useState(1),[E,M]=h.useState(!1);h.useEffect(()=>{let j=!1;return c({status:"loading"}),u(null),Ze(`mmd-${i}`,l).then(N=>{if(!j&&(c({status:"rendered",svg:N}),l!==a.mermaid))try{sessionStorage.setItem(`mmdfix:${a.mermaid.length}:${ne(a.mermaid)}`,l)}catch{}}).catch(N=>{j||(console.error("[MermaidArtifact] render failed:",N),c({status:"error",message:N instanceof Error?N.message:String(N)}))}),()=>{j=!0}},[l,i,C,a.mermaid]),h.useEffect(()=>{var j;o.status!=="error"||w||(m(!0),l===a.mermaid&&(j=window.api)!=null&&j.repairMermaidDiagram&&(f(!0),window.api.repairMermaidDiagram({mermaid:l,errorMessage:o.message,diagramType:a.diagramType}).then(N=>{N.ok&&N.mermaid.trim()&&g(N.mermaid)}).catch(()=>{}).finally(()=>f(!1))))},[o,w,l,a.mermaid,a.diagramType]);const S=`https://mermaid.live/edit#${encodeURIComponent(l)}`,z=h.useCallback(()=>y(j=>Math.min(Z,+(j+P).toFixed(2))),[]),I=h.useCallback(()=>y(j=>Math.max(G,+(j-P).toFixed(2))),[]),k=h.useCallback(()=>y(1),[]),v=h.useCallback(j=>{if(!j.ctrlKey&&!j.metaKey)return;j.preventDefault();const N=j.deltaY>0?-P:P;y(R=>Math.min(Z,Math.max(G,+(R+N).toFixed(2))))},[]),$=o.status==="rendered"?e.jsx("div",{ref:j=>{var N;if(j&&!b){const R=j.querySelector("svg");if(R){const ee=R.getBoundingClientRect(),_=(N=R.viewBox)==null?void 0:N.baseVal,te=_&&_.width?_.width:ee.width,re=_&&_.height?_.height:ee.height;te>0&&re>0&&u({width:te,height:re})}}},style:{width:(b==null?void 0:b.width)??void 0,height:(b==null?void 0:b.height)??void 0},dangerouslySetInnerHTML:{__html:o.svg},"data-testid":"mermaid-svg"}):null;return r==="canvas"?e.jsx("div",{"data-testid":"mermaid-canvas-content",children:$}):e.jsxs("div",{className:"surface-card p-4","data-testid":"artifact-mermaid",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3 gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[e.jsx(Se,{className:"w-4 h-4 text-ink-muted shrink-0"}),e.jsx("h3",{className:"text-body font-bold text-ink truncate",children:a.title}),e.jsx("span",{className:"text-caption font-bold px-1.5 py-0.5 rounded bg-accent/15 text-accent shrink-0",children:s[a.diagramType]??a.diagramType})]}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[o.status==="rendered"&&e.jsxs("div",{className:"flex items-center gap-1","data-testid":"mermaid-zoom-controls",children:[e.jsx("button",{onClick:I,disabled:x<=G,className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-1 hover:bg-surface-3 disabled:opacity-30 text-label font-bold flex items-center justify-center",title:n("artifact.zoomOut"),"data-testid":"mermaid-zoom-out",children:"−"}),e.jsxs("button",{onClick:k,className:"px-1.5 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-1 hover:bg-surface-3 text-caption font-bold tabular-nums",title:n("artifact.zoomReset"),"data-testid":"mermaid-zoom-reset",children:[Math.round(x*100),"%"]}),e.jsx("button",{onClick:z,disabled:x>=Z,className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-1 hover:bg-surface-3 disabled:opacity-30 text-label font-bold flex items-center justify-center",title:n("artifact.zoomIn"),"data-testid":"mermaid-zoom-in",children:"+"})]}),o.status==="rendered"&&e.jsx("button",{onClick:()=>M(!0),"data-testid":"mermaid-expand","aria-label":n("artifact.viewer.open"),"data-tooltip":n("artifact.viewer.open"),className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-3 flex items-center justify-center",children:e.jsx(H,{className:"w-3.5 h-3.5"})})]}),e.jsx("button",{onClick:()=>window.open(S,"_blank"),className:"text-caption text-accent hover:underline font-bold shrink-0","data-testid":"mermaid-open-live",title:n("artifact.mermaid.openLive"),children:"mermaid.live ↗"})]}),e.jsxs("div",{onClick:()=>{o.status==="rendered"&&M(!0)},onWheel:v,className:"bg-surface-0/40 rounded-lg p-3 overflow-auto min-h-[120px] max-h-[500px] select-none",style:{touchAction:"pan-x pan-y"},"data-testid":"mermaid-render-area","data-noswipe":"",children:[o.status==="loading"&&e.jsxs("div",{className:"flex items-center gap-2 text-body text-ink-muted my-8 justify-center","data-testid":"mermaid-loading",children:[e.jsx("span",{className:"typing-dot w-1.5 h-1.5 bg-accent rounded-full inline-block"}),e.jsx("span",{children:n("artifact.mermaid.rendering")})]}),o.status==="rendered"&&e.jsx("div",{style:{width:b?b.width*x:"auto",height:b?b.height*x:"auto",margin:"0 auto"},children:e.jsx("div",{style:{transform:`scale(${x})`,transformOrigin:"top left"},children:$})}),o.status==="error"&&d&&e.jsxs("div",{className:"flex items-center gap-2 text-body text-ink-muted my-8 justify-center","data-testid":"mermaid-repairing",children:[e.jsx("span",{className:"typing-dot w-1.5 h-1.5 bg-accent rounded-full inline-block"}),e.jsx("span",{children:n("artifact.mermaid.repairing")})]}),o.status==="error"&&!d&&e.jsxs("div",{className:"w-full text-center my-4","data-testid":"mermaid-fallback",children:[e.jsxs("div",{className:"text-body text-warning mb-2 flex items-center justify-center gap-1.5",children:[e.jsx(O,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{children:n("artifact.mermaid.renderFailed")})]}),e.jsx("pre",{className:"text-label bg-surface-1/60 rounded p-2 overflow-x-auto text-ink-muted font-mono text-left",children:l}),e.jsx("div",{className:"text-caption text-ink-muted mt-2",children:n("artifact.mermaid.errorPrefix",{msg:o.message})})]})]}),o.status==="rendered"&&e.jsx("div",{className:"mt-1.5 text-caption text-ink-muted flex items-center gap-2",children:e.jsx("span",{children:n("artifact.mermaid.hint")})}),E&&o.status==="rendered"&&e.jsx(K,{title:a.title,onClose:()=>M(!1),children:e.jsx("div",{className:"h-full w-full rounded-xl overflow-hidden bg-surface-0/60",children:e.jsx(F,{testid:"mermaid-modal-stage",children:e.jsx(ce,{data:t,variant:"canvas"})})})}),a.warnings&&a.warnings.length>0&&e.jsxs("div",{className:"mt-2 text-caption text-warning flex items-start gap-1","data-testid":"artifact-warnings",children:[e.jsx(O,{className:"w-3.5 h-3.5 shrink-0 mt-0.5"}),e.jsx("span",{children:a.warnings.join("; ")})]})]})}function le({data:t,variant:r="card"}){const a=t,n=L(),[s,i]=h.useState(null),[o,c]=h.useState(!1),l=h.useRef([]),g=h.useRef([]),w=a.code.split(`
|
|
20
|
+
`)):t}return t}let D=null;function Xe(){return D||(D=U(()=>import("./mermaid.core-CnNeOEec.js").then(t=>t.bI),__vite__mapDeps([4,5,1,2,6,7]),import.meta.url).then(async t=>{const r=t.default,{default:a}=await U(async()=>{const{default:n}=await import("./mermaid-layout-elk.core-CNNSrMhF.js").then(s=>s.m);return{default:n}},__vite__mapDeps([8,5,1,2,6]),import.meta.url);return r.registerLayoutLoaders(a),r.initialize({startOnLoad:!1,theme:"base",securityLevel:"loose",themeVariables:Ge(),flowchart:{useMaxWidth:!0,htmlLabels:!0,curve:"basis",nodeSpacing:42,rankSpacing:54,padding:10},sequence:{useMaxWidth:!0,boxMargin:8,noteMargin:8,messageMargin:32}}),r})),D}function Ge(){const t=(a,n)=>{if(typeof document>"u")return n;const s=getComputedStyle(document.documentElement).getPropertyValue(a).trim();return s?`rgb(${s})`:n};return{background:"transparent",fontFamily:typeof document<"u"&&getComputedStyle(document.body).fontFamily||"ui-sans-serif, system-ui, sans-serif",fontSize:"14px",primaryColor:t("--surface-3-rgb","rgb(42 43 46)"),primaryBorderColor:t("--border-rgb","rgb(37 38 41)"),primaryTextColor:t("--ink-strong-rgb","rgb(250 250 250)"),secondaryColor:t("--surface-2-rgb","rgb(32 33 36)"),secondaryBorderColor:t("--border-faint-rgb","rgb(26 26 29)"),secondaryTextColor:t("--ink-rgb","rgb(245 245 250)"),tertiaryColor:t("--surface-1-rgb","rgb(24 25 27)"),tertiaryBorderColor:t("--border-faint-rgb","rgb(26 26 29)"),tertiaryTextColor:t("--ink-rgb","rgb(245 245 250)"),lineColor:t("--ink-faint-rgb","rgb(117 117 126)"),textColor:t("--ink-rgb","rgb(245 245 250)"),edgeLabelBackground:t("--surface-0-rgb","rgb(12 13 15)"),clusterBkg:t("--surface-1-rgb","rgb(24 25 27)"),clusterBorder:t("--border-faint-rgb","rgb(26 26 29)"),nodeBorder:t("--border-rgb","rgb(37 38 41)"),mainBkg:t("--surface-3-rgb","rgb(42 43 46)"),nodeTextColor:t("--ink-rgb","rgb(245 245 250)"),arrowheadColor:t("--ink-faint-rgb","rgb(117 117 126)"),actorBkg:t("--surface-3-rgb","rgb(42 43 46)"),actorBorder:t("--border-rgb","rgb(37 38 41)"),actorTextColor:t("--ink-strong-rgb","rgb(250 250 250)"),activationBkgColor:t("--surface-3-rgb","rgb(42 43 46)"),activationBorderColor:t("--border-rgb","rgb(37 38 41)"),signalColor:t("--ink-rgb","rgb(245 245 250)"),signalTextColor:t("--ink-rgb","rgb(245 245 250)"),labelBoxBkgColor:t("--surface-2-rgb","rgb(32 33 36)"),labelBoxBorderColor:t("--border-rgb","rgb(37 38 41)"),labelTextColor:t("--ink-rgb","rgb(245 245 250)"),loopTextColor:t("--ink-strong-rgb","rgb(250 250 250)"),noteBkgColor:"rgb(255 200 0 / 0.12)",noteBorderColor:"rgb(255 200 0 / 0.4)",noteTextColor:t("--ink-rgb","rgb(245 245 250)")}}typeof window<"u"&&window.addEventListener("theme-changed",()=>{D=null});async function Ze(t,r){const a=await Xe(),n=Ve(r);try{await a.parse(n)}catch(i){throw new Error(`mermaid 语法校验失败: ${i instanceof Error?i.message:String(i)}`)}const{svg:s}=await a.render(t,n);if(s.includes('aria-roledescription="error"')||s.includes('class="error-text"')||s.includes("Syntax error"))throw new Error("mermaid 渲染失败(语法错误或节点 label 含未转义特殊字符)");return s}function ne(t){let r=5381;for(let a=0;a<t.length;a++)r=(r<<5)+r+t.charCodeAt(a)>>>0;return r.toString(36)}const G=.3,Z=3,P=.2;function ce({data:t,variant:r="card"}){const a=t,n=L(),s={flowchart:n("artifact.diagram.flowchart"),sequence:n("artifact.diagram.sequence"),state:n("artifact.diagram.state")},i=h.useId().replace(/[:]/g,"_"),[o,c]=h.useState({status:"loading"}),[l,g]=h.useState(()=>{try{return sessionStorage.getItem(`mmdfix:${a.mermaid.length}:${ne(a.mermaid)}`)??a.mermaid}catch{return a.mermaid}}),[w,m]=h.useState(!1),[d,f]=h.useState(!1),[C,p]=h.useState(0);h.useEffect(()=>{const j=()=>p(N=>N+1);return window.addEventListener("theme-changed",j),()=>window.removeEventListener("theme-changed",j)},[]);const[b,u]=h.useState(null),[x,y]=h.useState(1),[E,M]=h.useState(!1);h.useEffect(()=>{let j=!1;return c({status:"loading"}),u(null),Ze(`mmd-${i}`,l).then(N=>{if(!j&&(c({status:"rendered",svg:N}),l!==a.mermaid))try{sessionStorage.setItem(`mmdfix:${a.mermaid.length}:${ne(a.mermaid)}`,l)}catch{}}).catch(N=>{j||(console.error("[MermaidArtifact] render failed:",N),c({status:"error",message:N instanceof Error?N.message:String(N)}))}),()=>{j=!0}},[l,i,C,a.mermaid]),h.useEffect(()=>{var j;o.status!=="error"||w||(m(!0),l===a.mermaid&&(j=window.api)!=null&&j.repairMermaidDiagram&&(f(!0),window.api.repairMermaidDiagram({mermaid:l,errorMessage:o.message,diagramType:a.diagramType}).then(N=>{N.ok&&N.mermaid.trim()&&g(N.mermaid)}).catch(()=>{}).finally(()=>f(!1))))},[o,w,l,a.mermaid,a.diagramType]);const S=`https://mermaid.live/edit#${encodeURIComponent(l)}`,z=h.useCallback(()=>y(j=>Math.min(Z,+(j+P).toFixed(2))),[]),I=h.useCallback(()=>y(j=>Math.max(G,+(j-P).toFixed(2))),[]),k=h.useCallback(()=>y(1),[]),v=h.useCallback(j=>{if(!j.ctrlKey&&!j.metaKey)return;j.preventDefault();const N=j.deltaY>0?-P:P;y(R=>Math.min(Z,Math.max(G,+(R+N).toFixed(2))))},[]),$=o.status==="rendered"?e.jsx("div",{ref:j=>{var N;if(j&&!b){const R=j.querySelector("svg");if(R){const ee=R.getBoundingClientRect(),_=(N=R.viewBox)==null?void 0:N.baseVal,te=_&&_.width?_.width:ee.width,re=_&&_.height?_.height:ee.height;te>0&&re>0&&u({width:te,height:re})}}},style:{width:(b==null?void 0:b.width)??void 0,height:(b==null?void 0:b.height)??void 0},dangerouslySetInnerHTML:{__html:o.svg},"data-testid":"mermaid-svg"}):null;return r==="canvas"?e.jsx("div",{"data-testid":"mermaid-canvas-content",children:$}):e.jsxs("div",{className:"surface-card p-4","data-testid":"artifact-mermaid",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3 gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[e.jsx(Se,{className:"w-4 h-4 text-ink-muted shrink-0"}),e.jsx("h3",{className:"text-body font-bold text-ink truncate",children:a.title}),e.jsx("span",{className:"text-caption font-bold px-1.5 py-0.5 rounded bg-accent/15 text-accent shrink-0",children:s[a.diagramType]??a.diagramType})]}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[o.status==="rendered"&&e.jsxs("div",{className:"flex items-center gap-1","data-testid":"mermaid-zoom-controls",children:[e.jsx("button",{onClick:I,disabled:x<=G,className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-1 hover:bg-surface-3 disabled:opacity-30 text-label font-bold flex items-center justify-center",title:n("artifact.zoomOut"),"data-testid":"mermaid-zoom-out",children:"−"}),e.jsxs("button",{onClick:k,className:"px-1.5 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-1 hover:bg-surface-3 text-caption font-bold tabular-nums",title:n("artifact.zoomReset"),"data-testid":"mermaid-zoom-reset",children:[Math.round(x*100),"%"]}),e.jsx("button",{onClick:z,disabled:x>=Z,className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-1 hover:bg-surface-3 disabled:opacity-30 text-label font-bold flex items-center justify-center",title:n("artifact.zoomIn"),"data-testid":"mermaid-zoom-in",children:"+"})]}),o.status==="rendered"&&e.jsx("button",{onClick:()=>M(!0),"data-testid":"mermaid-expand","aria-label":n("artifact.viewer.open"),"data-tooltip":n("artifact.viewer.open"),className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-3 flex items-center justify-center",children:e.jsx(H,{className:"w-3.5 h-3.5"})})]}),e.jsx("button",{onClick:()=>window.open(S,"_blank"),className:"text-caption text-accent hover:underline font-bold shrink-0","data-testid":"mermaid-open-live",title:n("artifact.mermaid.openLive"),children:"mermaid.live ↗"})]}),e.jsxs("div",{onClick:()=>{o.status==="rendered"&&M(!0)},onWheel:v,className:"bg-surface-0/40 rounded-lg p-3 overflow-auto min-h-[120px] max-h-[500px] select-none",style:{touchAction:"pan-x pan-y"},"data-testid":"mermaid-render-area","data-noswipe":"",children:[o.status==="loading"&&e.jsxs("div",{className:"flex items-center gap-2 text-body text-ink-muted my-8 justify-center","data-testid":"mermaid-loading",children:[e.jsx("span",{className:"typing-dot w-1.5 h-1.5 bg-accent rounded-full inline-block"}),e.jsx("span",{children:n("artifact.mermaid.rendering")})]}),o.status==="rendered"&&e.jsx("div",{style:{width:b?b.width*x:"auto",height:b?b.height*x:"auto",margin:"0 auto"},children:e.jsx("div",{style:{transform:`scale(${x})`,transformOrigin:"top left"},children:$})}),o.status==="error"&&d&&e.jsxs("div",{className:"flex items-center gap-2 text-body text-ink-muted my-8 justify-center","data-testid":"mermaid-repairing",children:[e.jsx("span",{className:"typing-dot w-1.5 h-1.5 bg-accent rounded-full inline-block"}),e.jsx("span",{children:n("artifact.mermaid.repairing")})]}),o.status==="error"&&!d&&e.jsxs("div",{className:"w-full text-center my-4","data-testid":"mermaid-fallback",children:[e.jsxs("div",{className:"text-body text-warning mb-2 flex items-center justify-center gap-1.5",children:[e.jsx(O,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{children:n("artifact.mermaid.renderFailed")})]}),e.jsx("pre",{className:"text-label bg-surface-1/60 rounded p-2 overflow-x-auto text-ink-muted font-mono text-left",children:l}),e.jsx("div",{className:"text-caption text-ink-muted mt-2",children:n("artifact.mermaid.errorPrefix",{msg:o.message})})]})]}),o.status==="rendered"&&e.jsx("div",{className:"mt-1.5 text-caption text-ink-muted flex items-center gap-2",children:e.jsx("span",{children:n("artifact.mermaid.hint")})}),E&&o.status==="rendered"&&e.jsx(K,{title:a.title,onClose:()=>M(!1),children:e.jsx("div",{className:"h-full w-full rounded-xl overflow-hidden bg-surface-0/60",children:e.jsx(F,{testid:"mermaid-modal-stage",children:e.jsx(ce,{data:t,variant:"canvas"})})})}),a.warnings&&a.warnings.length>0&&e.jsxs("div",{className:"mt-2 text-caption text-warning flex items-start gap-1","data-testid":"artifact-warnings",children:[e.jsx(O,{className:"w-3.5 h-3.5 shrink-0 mt-0.5"}),e.jsx("span",{children:a.warnings.join("; ")})]})]})}function le({data:t,variant:r="card"}){const a=t,n=L(),[s,i]=h.useState(null),[o,c]=h.useState(!1),l=h.useRef([]),g=h.useRef([]),w=a.code.split(`
|
|
21
21
|
`),[m,d]=h.useState(null);h.useEffect(()=>{let u=!0;return je(a.code,a.language).then(x=>{u&&x&&d(x)}),()=>{u=!1}},[a.code,a.language]);const f=u=>{if(s===null)return!1;const x=a.annotations[s];return x&&u>=x.lineStart&&u<=x.lineEnd},C=u=>{const x=s===u?null:u;if(i(x),x!==null){const y=a.annotations[x],E=(o?g:l).current[y.lineStart-1];E==null||E.scrollIntoView({behavior:"smooth",block:"center"})}},p=u=>e.jsx("div",{className:"bg-neutral-950 rounded-lg overflow-hidden border border-neutral-800 max-h-[420px] overflow-y-auto",children:e.jsx("pre",{className:"text-label font-mono leading-relaxed overflow-x-auto",children:e.jsx("code",{children:w.map((x,y)=>{const E=y+1;return e.jsxs("div",{ref:M=>{u.current[y]=M},className:`flex ${f(E)?"bg-brand/15":""}`,children:[e.jsx("span",{className:"select-none text-neutral-600 pr-3 pl-3 text-right w-10 shrink-0 border-r border-neutral-800 tabular-nums",children:E}),m&&m[y]!=null?e.jsx("span",{className:"pl-3 whitespace-pre text-neutral-200","data-testid":"walk-shiki-line",dangerouslySetInnerHTML:{__html:m[y]||" "}}):e.jsx("span",{className:"text-neutral-200 pl-3 whitespace-pre",children:x||" "})]},y)})})})}),b=e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-caption font-bold text-ink-muted",children:n("artifact.codewalk.sectionLabel")}),a.annotations.map((u,x)=>e.jsxs("button",{onClick:()=>C(x),"data-testid":`annotation-${x}`,className:`w-full text-left p-2.5 rounded-lg border transition-colors ${s===x?"border-brand bg-brand/10":"border-[var(--border-faint)] hover:border-[var(--border)]"}`,children:[e.jsx("div",{className:"text-caption font-bold text-brand mb-0.5",children:u.lineEnd!==u.lineStart?n("artifact.codewalk.lineRange",{a:u.lineStart,b:u.lineEnd}):n("artifact.codewalk.lineSingle",{n:u.lineStart})}),e.jsx("div",{className:"text-body text-ink-muted leading-relaxed",children:u.note})]},x))]});return r==="canvas"?e.jsx("div",{className:"w-fit","data-testid":"codewalk-canvas-content",children:p(g)}):e.jsxs("div",{className:"surface-card p-4","data-testid":"artifact-code-walkthrough",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2 mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(ye,{className:"w-4 h-4 text-ink-muted shrink-0"}),e.jsx("h3",{className:"text-body font-bold text-ink truncate",children:a.title}),e.jsx("span",{className:"text-caption font-bold px-1.5 py-0.5 rounded bg-surface-3 text-ink-muted font-mono shrink-0",children:a.language})]}),e.jsx("button",{onClick:()=>c(!0),"data-testid":"codewalk-expand","aria-label":n("artifact.viewer.open"),"data-tooltip":n("artifact.viewer.open"),className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-3 flex items-center justify-center shrink-0",children:e.jsx(H,{className:"w-3.5 h-3.5"})})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3",children:[e.jsx("div",{onClick:()=>{o||c(!0)},style:{touchAction:"pan-x pan-y"},"data-noswipe":"",children:p(l)}),b]}),a.warnings&&a.warnings.length>0&&e.jsxs("div",{className:"mt-2 text-caption text-warning flex items-start gap-1","data-testid":"artifact-warnings",children:[e.jsx(O,{className:"w-3.5 h-3.5 shrink-0 mt-0.5"}),e.jsx("span",{children:a.warnings.join("; ")})]}),o&&e.jsx(K,{title:a.title,onClose:()=>c(!1),children:e.jsx("div",{className:"h-full w-full rounded-xl overflow-hidden bg-surface-0/60",children:e.jsx(F,{testid:"codewalk-modal-stage",children:e.jsx(le,{data:t,variant:"canvas"})})})})]})}function Je({data:t,onPickAction:r}){const a=t,n=L(),[s,i]=h.useState(null),o=c=>{s||(i(c.id),r==null||r(`${n("guess.pickedPrefix")}${c.label}`))};return e.jsxs("div",{className:"surface-card p-4","data-testid":"artifact-guess",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(Me,{className:"w-4 h-4 text-accent"}),e.jsx("span",{className:"text-label font-bold text-accent",children:n("guess.header")})]}),e.jsx("div",{className:"text-body text-ink font-medium mb-3 leading-relaxed",children:a.prompt}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2 mb-2",children:a.options.map(c=>{const l=s===c.id,g=s!==null;return e.jsxs("button",{onClick:()=>o(c),disabled:g,"data-testid":`guess-option-${c.id}`,className:`text-body p-2.5 rounded-lg border-2 font-medium transition-colors text-left flex items-center justify-between gap-2 ${l?"border-accent bg-accent/10 text-accent":g?"border-[var(--border-faint)] text-ink-faint cursor-default":"border-[var(--border)] text-ink-muted hover:border-accent hover:text-accent cursor-pointer"}`,children:[e.jsx("span",{children:c.label}),l&&e.jsx(Y,{className:"w-4 h-4 shrink-0"})]},c.id)})}),s&&e.jsx("div",{className:"text-label text-ink-muted mt-1","data-testid":"guess-picked-hint",children:n("guess.waitReveal")}),a.warnings&&a.warnings.length>0&&e.jsx("div",{className:"mt-2 text-caption text-warning","data-testid":"artifact-warnings",children:a.warnings.join("; ")})]})}function rt({data:t,onQuizAnswered:r,quizMastery:a,onPickAction:n,onQuizCompleted:s,variant:i="card"}){const o=t;if(!o||!o.artifactType)return e.jsx(se,{data:t});switch(o.artifactType){case"concept_map":return e.jsx(Ae,{data:t,variant:i});case"quiz":return e.jsx(Ke,{data:t,onAnswered:r,quizMastery:a,onPickAction:n,onQuizCompleted:s});case"compare_table":return e.jsx(oe,{data:t,variant:i});case"diagram":return e.jsx(ce,{data:t,variant:i});case"code_walkthrough":return e.jsx(le,{data:t,variant:i});case"guess":return e.jsx(Je,{data:t,onPickAction:n});default:return e.jsx(se,{data:t})}}function se({data:t}){var a;const r=L();return e.jsxs("div",{className:"surface-card p-4 text-body text-ink-muted","data-testid":"artifact-unknown",children:[e.jsxs("div",{className:"font-bold mb-1 flex items-center gap-1.5",children:[e.jsx(ke,{className:"w-4 h-4"}),r("artifact.unknownHeader")]}),e.jsx("pre",{className:"text-caption overflow-x-auto text-ink-muted",children:(a=JSON.stringify(t,null,2))==null?void 0:a.slice(0,200)})]})}export{rt as ArtifactRenderer,le as CodeWalkthroughArtifact,oe as CompareTableArtifact,Ae as ConceptMapArtifact,Je as GuessArtifact,ce as MermaidArtifact,Ke as QuizArtifact};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e,l as s,
|
|
1
|
+
import{_ as e,l as s,F as n,d as i}from"./mermaid.core-CnNeOEec.js";import{p}from"./cynefin-OW5HDTMX-fybCqBi3.js";import"./main-Dj875aWF.js";import"./index-CJuEfFQr.js";import"./transform-Bd_a5eGM.js";var g={parse:e(async r=>{const a=await p("info",r);s.debug(a)},"parse")},d={version:"11.17.2"},v=e(()=>d.version,"getVersion"),m={getVersion:v},c=e((r,a,o)=>{s.debug(`rendering info diagram
|
|
2
2
|
`+r);const t=n(a);i(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${o}`)},"draw"),l={draw:c},y={parser:g,db:m,renderer:l};export{y as diagram};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as i}from"./cynefin-OW5HDTMX-GVF3BKWE-
|
|
1
|
+
import{p as i}from"./cynefin-OW5HDTMX-GVF3BKWE-DwLRaQ37.js";import{_ as e,l as o,G as n,d as p}from"./render-O7CIS3YK-DQb_czkx.js";import"./main-Dj875aWF.js";import"./index-CJuEfFQr.js";import"./mermaid-layout-elk.core-CNNSrMhF.js";import"./transform-Bd_a5eGM.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";var g={parse:e(async r=>{const a=await i("info",r);o.debug(a)},"parse")},d={version:"11.17.0"},m=e(()=>d.version,"getVersion"),v={getVersion:m},c=e((r,a,s)=>{o.debug(`rendering info diagram
|
|
2
2
|
`+r);const t=n(a);p(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${s}`)},"draw"),l={draw:c},z={parser:g,db:v,renderer:l};export{z as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as o,c as ht,H as dt,G as yt,aI as pt,p as ft,i as gt,n as st,a as kt,b as mt,g as wt,s as _t,o as xt,d as bt}from"./render-O7CIS3YK-
|
|
1
|
+
import{_ as o,c as ht,H as dt,G as yt,aI as pt,p as ft,i as gt,n as st,a as kt,b as mt,g as wt,s as _t,o as xt,d as bt}from"./render-O7CIS3YK-DQb_czkx.js";import{_ as $}from"./mermaid-layout-elk.core-CNNSrMhF.js";import"./main-Dj875aWF.js";import"./index-CJuEfFQr.js";import"./transform-Bd_a5eGM.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";var et=(function(){var e=o(function(P,t,s,i){for(s=s||{},i=P.length;i--;s[P[i]]=t);return s},"o"),h=[1,4],r=[1,14],a=[1,12],l=[1,13],y=[6,7,8],p=[1,20],d=[1,18],m=[1,19],c=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],b=[1,6,7,11,13,14],D={trace:o($(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:o($(function(t,s,i,u,f,n,v){var w=n.length-1;switch(f){case 6:case 7:return u;case 15:u.addNode(n[w-1].length,n[w].trim());break;case 16:u.addNode(0,n[w].trim());break}},"anonymous"),"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:r,7:[1,10],9:9,12:11,13:a,14:l},e(y,[2,3]),{1:[2,2]},e(y,[2,4]),e(y,[2,5]),{1:[2,6],6:r,12:15,13:a,14:l},{6:r,9:16,12:11,13:a,14:l},{6:p,7:d,10:17,11:m},e(c,[2,18],{14:[1,21]}),e(c,[2,16]),e(c,[2,17]),{6:p,7:d,10:22,11:m},{1:[2,7],6:r,12:15,13:a,14:l},e(k,[2,14],{7:g,11:_}),e(b,[2,8]),e(b,[2,9]),e(b,[2,10]),e(c,[2,15]),e(k,[2,13],{7:g,11:_}),e(b,[2,11]),e(b,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:o($(function(t,s){if(s.recoverable)this.trace(t);else{var i=new Error(t);throw i.hash=s,i}},"parseError"),"parseError"),parse:o($(function(t){var s=this,i=[0],u=[],f=[null],n=[],v=this.table,w="",L=0,E=0,T=2,I=1,V=n.slice.call(arguments,1),x=Object.create(this.lexer),R={yy:{}};for(var G in this.yy)Object.prototype.hasOwnProperty.call(this.yy,G)&&(R.yy[G]=this.yy[G]);x.setInput(t,R.yy),R.yy.lexer=x,R.yy.parser=this,typeof x.yylloc>"u"&&(x.yylloc={});var M=x.yylloc;n.push(M);var O=x.options&&x.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function z(B){i.length=i.length-2*B,f.length=f.length-B,n.length=n.length-B}$(z,"popStack"),o(z,"popStack");function F(){var B;return B=u.pop()||x.lex()||I,typeof B!="number"&&(B instanceof Array&&(u=B,B=u.pop()),B=s.symbols_[B]||B),B}$(F,"lex"),o(F,"lex");for(var A,j,N,Q,U={},Y,W,it,K;;){if(j=i[i.length-1],this.defaultActions[j]?N=this.defaultActions[j]:((A===null||typeof A>"u")&&(A=F()),N=v[j]&&v[j][A]),typeof N>"u"||!N.length||!N[0]){var J="";K=[];for(Y in v[j])this.terminals_[Y]&&Y>T&&K.push("'"+this.terminals_[Y]+"'");x.showPosition?J="Parse error on line "+(L+1)+`:
|
|
2
2
|
`+x.showPosition()+`
|
|
3
3
|
Expecting `+K.join(", ")+", got '"+(this.terminals_[A]||A)+"'":J="Parse error on line "+(L+1)+": Unexpected "+(A==I?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(J,{text:x.match,token:this.terminals_[A]||A,line:x.yylineno,loc:M,expected:K})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+A);switch(N[0]){case 1:i.push(A),f.push(x.yytext),n.push(x.yylloc),i.push(N[1]),A=null,E=x.yyleng,w=x.yytext,L=x.yylineno,M=x.yylloc;break;case 2:if(W=this.productions_[N[1]][1],U.$=f[f.length-W],U._$={first_line:n[n.length-(W||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(W||1)].first_column,last_column:n[n.length-1].last_column},O&&(U._$.range=[n[n.length-(W||1)].range[0],n[n.length-1].range[1]]),Q=this.performAction.apply(U,[w,E,L,R.yy,N[1],f,n].concat(V)),typeof Q<"u")return Q;W&&(i=i.slice(0,-1*W*2),f=f.slice(0,-1*W),n=n.slice(0,-1*W)),i.push(this.productions_[N[1]][0]),f.push(U.$),n.push(U._$),it=v[i[i.length-2]][i[i.length-1]],i.push(it);break;case 3:return!0}}return!0},"parse"),"parse")},C=(function(){var P={EOF:1,parseError:o($(function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},"parseError"),"parseError"),setInput:o(function(t,s){return this.yy=s||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var s=t.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:o(function(t){var s=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var f=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===u.length?this.yylloc.first_column:0)+u[u.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(t){this.unput(this.match.slice(t))},"less"),pastInput:o(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var t=this.pastInput(),s=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
package/web/assets/{ishikawaDiagram-WSZJBQD7-C34Z0ADb.js → ishikawaDiagram-5VMMS53U-j9THtiQE.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{_ as o,c as ot,
|
|
1
|
+
import{_ as o,c as ot,G as ut,F as dt,a6 as yt,q as ft,j as pt,o as it,a as gt,b as kt,g as mt,s as wt,p as _t,d as bt}from"./mermaid.core-CnNeOEec.js";import"./main-Dj875aWF.js";import"./index-CJuEfFQr.js";import"./transform-Bd_a5eGM.js";var tt=(function(){var e=o(function(M,t,s,i){for(s=s||{},i=M.length;i--;s[M[i]]=t);return s},"o"),h=[1,4],r=[1,14],a=[1,12],l=[1,13],y=[6,7,8],f=[1,20],d=[1,18],m=[1,19],c=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],x=[1,6,7,11,13,14],N={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:o(function(t,s,i,u,p,n,v){var w=n.length-1;switch(p){case 6:case 7:return u;case 15:u.addNode(n[w-1].length,n[w].trim());break;case 16:u.addNode(0,n[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:r,7:[1,10],9:9,12:11,13:a,14:l},e(y,[2,3]),{1:[2,2]},e(y,[2,4]),e(y,[2,5]),{1:[2,6],6:r,12:15,13:a,14:l},{6:r,9:16,12:11,13:a,14:l},{6:f,7:d,10:17,11:m},e(c,[2,18],{14:[1,21]}),e(c,[2,16]),e(c,[2,17]),{6:f,7:d,10:22,11:m},{1:[2,7],6:r,12:15,13:a,14:l},e(k,[2,14],{7:g,11:_}),e(x,[2,8]),e(x,[2,9]),e(x,[2,10]),e(c,[2,15]),e(k,[2,13],{7:g,11:_}),e(x,[2,11]),e(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(t,s){if(s.recoverable)this.trace(t);else{var i=new Error(t);throw i.hash=s,i}},"parseError"),parse:o(function(t){var s=this,i=[0],u=[],p=[null],n=[],v=this.table,w="",I=0,S=0,L=2,E=1,R=n.slice.call(arguments,1),b=Object.create(this.lexer),C={yy:{}};for(var W in this.yy)Object.prototype.hasOwnProperty.call(this.yy,W)&&(C.yy[W]=this.yy[W]);b.setInput(t,C.yy),C.yy.lexer=b,C.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var T=b.yylloc;n.push(T);var D=b.options&&b.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function j(P){i.length=i.length-2*P,p.length=p.length-P,n.length=n.length-P}o(j,"popStack");function z(){var P;return P=u.pop()||b.lex()||E,typeof P!="number"&&(P instanceof Array&&(u=P,P=u.pop()),P=s.symbols_[P]||P),P}o(z,"lex");for(var A,F,B,K,H={},X,V,et,Y;;){if(F=i[i.length-1],this.defaultActions[F]?B=this.defaultActions[F]:((A===null||typeof A>"u")&&(A=z()),B=v[F]&&v[F][A]),typeof B>"u"||!B.length||!B[0]){var Q="";Y=[];for(X in v[F])this.terminals_[X]&&X>L&&Y.push("'"+this.terminals_[X]+"'");b.showPosition?Q="Parse error on line "+(I+1)+`:
|
|
2
2
|
`+b.showPosition()+`
|
|
3
|
-
Expecting `+Y.join(", ")+", got '"+(this.terminals_[A]||A)+"'":Q="Parse error on line "+(I+1)+": Unexpected "+(A
|
|
3
|
+
Expecting `+Y.join(", ")+", got '"+(this.terminals_[A]||A)+"'":Q="Parse error on line "+(I+1)+": Unexpected "+(A==E?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(Q,{text:b.match,token:this.terminals_[A]||A,line:b.yylineno,loc:T,expected:Y})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+A);switch(B[0]){case 1:i.push(A),p.push(b.yytext),n.push(b.yylloc),i.push(B[1]),A=null,S=b.yyleng,w=b.yytext,I=b.yylineno,T=b.yylloc;break;case 2:if(V=this.productions_[B[1]][1],H.$=p[p.length-V],H._$={first_line:n[n.length-(V||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(V||1)].first_column,last_column:n[n.length-1].last_column},D&&(H._$.range=[n[n.length-(V||1)].range[0],n[n.length-1].range[1]]),K=this.performAction.apply(H,[w,S,I,C.yy,B[1],p,n].concat(R)),typeof K<"u")return K;V&&(i=i.slice(0,-1*V*2),p=p.slice(0,-1*V),n=n.slice(0,-1*V)),i.push(this.productions_[B[1]][0]),p.push(H.$),n.push(H._$),et=v[i[i.length-2]][i[i.length-1]],i.push(et);break;case 3:return!0}}return!0},"parse")},O=(function(){var M={EOF:1,parseError:o(function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},"parseError"),setInput:o(function(t,s){return this.yy=s||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var s=t.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:o(function(t){var s=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===u.length?this.yylloc.first_column:0)+u[u.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(t){this.unput(this.match.slice(t))},"less"),pastInput:o(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var t=this.pastInput(),s=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
5
5
|
`+s+"^"},"showPosition"),test_match:o(function(t,s){var i,u,p;if(this.options.backtrack_lexer&&(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(p.yylloc.range=this.yylloc.range.slice(0))),u=t[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,s,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var n in p)this[n]=p[n];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,s,i,u;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),n=0;n<p.length;n++)if(i=this._input.match(this.rules[p[n]]),i&&(!s||i[0].length>s[0].length)){if(s=i,u=n,this.options.backtrack_lexer){if(t=this.test_match(i,p[n]),t!==!1)return t;if(this._backtrack){s=!1;continue}else return!1}else if(!this.options.flex)break}return s?(t=this.test_match(s,p[u]),t!==!1?t:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var s=this.next();return s||this.lex()},"lex"),begin:o(function(s){this.conditionStack.push(s)},"begin"),popState:o(function(){var s=this.conditionStack.length-1;return s>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},"topState"),pushState:o(function(s){this.begin(s)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(s,i,u,p){switch(u){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return M})();N.lexer=O;function
|
|
7
|
-
`)},"wrapText"),
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var s=this.next();return s||this.lex()},"lex"),begin:o(function(s){this.conditionStack.push(s)},"begin"),popState:o(function(){var s=this.conditionStack.length-1;return s>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},"topState"),pushState:o(function(s){this.begin(s)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(s,i,u,p){switch(u){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return M})();N.lexer=O;function $(){this.yy={}}return o($,"Parser"),$.prototype=N,N.Parser=$,new $})();tt.parser=tt;var xt=tt,Z,vt=(Z=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,ft()}getRoot(){return this.root}addNode(h,r){const a=pt.sanitizeText(r,ot());if(!this.root){this.root={text:a,children:[]},this.stack=[{level:0,node:this.root}],it(a);return}this.baseLevel??(this.baseLevel=h);let l=h-this.baseLevel+1;for(l<=0&&(l=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=l;)this.stack.pop();const y=this.stack[this.stack.length-1].node,f={text:a,children:[]};y.children.push(f),this.stack.push({level:l,node:f})}getAccTitle(){return gt()}setAccTitle(h){kt(h)}getAccDescription(){return mt()}setAccDescription(h){wt(h)}getDiagramTitle(){return _t()}setDiagramTitle(h){it(h)}},o(Z,"IshikawaDB"),Z),St=14,G=250,$t=30,Et=60,At=5,ht=82*Math.PI/180,st=Math.cos(ht),nt=Math.sin(ht),at=o((e,h,r)=>{const a=e.node().getBBox(),l=a.width+h*2,y=a.height+h*2;bt(e,y,l,r),e.attr("viewBox",`${a.x-h} ${a.y-h} ${l} ${y}`)},"applyPaddedViewBox"),It=o((e,h,r,a)=>{var C,W;const y=a.db.getRoot();if(!y)return;const f=ot(),{look:d,handDrawnSeed:m,themeVariables:c}=f,k=ut(f.fontSize)[0]??St,g=d==="handDrawn",_=y.children??[],x=((C=f.ishikawa)==null?void 0:C.diagramPadding)??20,N=((W=f.ishikawa)==null?void 0:W.useMaxWidth)??!1,O=dt(h),$=O.append("g").attr("class","ishikawa"),M=g?yt.svg(O.node()):void 0,t=M?{roughSvg:M,seed:m??0,lineColor:(c==null?void 0:c.lineColor)??"#333",fillColor:(c==null?void 0:c.mainBkg)??"#fff"}:void 0,s=`ishikawa-arrow-${h}`;g||$.append("defs").append("marker").attr("id",s).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let i=0,u=G;const p=g?void 0:U($,i,u,i,u,"ishikawa-spine");if(Lt($,i,u,y.text,k,t),!_.length){g&&U($,i,u,i,u,"ishikawa-spine",t),at(O,x,N);return}i-=20;const n=_.filter((T,D)=>D%2===0),v=_.filter((T,D)=>D%2===1),w=rt(n),I=rt(v),S=w.total+I.total;let L=G,E=G;if(S>0){const T=G*2,D=G*.3;L=Math.max(D,T*(w.total/S)),E=Math.max(D,T*(I.total/S))}const R=k*2;L=Math.max(L,w.max*R),E=Math.max(E,I.max*R),u=Math.max(L,G),p&&p.attr("y1",u).attr("y2",u),$.select(".ishikawa-head-group").attr("transform",`translate(0,${u})`);const b=Math.ceil(_.length/2);for(let T=0;T<b;T++){const D=$.append("g").attr("class","ishikawa-pair");for(const[j,z,A]of[[_[T*2],-1,L],[_[T*2+1],1,E]])j&&Pt(D,j,i,u,z,A,k,t);i=D.selectAll("text").nodes().reduce((j,z)=>Math.min(j,z.getBBox().x),1/0)}if(g)U($,i,u,0,u,"ishikawa-spine",t);else{p.attr("x1",i);const T=`url(#${s})`;$.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",T)}at(O,x,N)},"draw"),rt=o(e=>{const h=o(r=>r.children.reduce((a,l)=>a+1+h(l),0),"countDescendants");return e.reduce((r,a)=>{const l=h(a);return r.total+=l,r.max=Math.max(r.max,l),r},{total:0,max:0})},"sideStats"),Lt=o((e,h,r,a,l,y)=>{const f=Math.max(6,Math.floor(110/(l*.6))),d=e.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${h},${r})`),m=q(d,ct(a,f),0,0,"ishikawa-head-label","start",l),c=m.node().getBBox(),k=Math.max(60,c.width+6),g=Math.max(40,c.height*2+40),_=`M 0 ${-g/2} L 0 ${g/2} Q ${k*2.4} 0 0 ${-g/2} Z`;if(y){const x=y.roughSvg.path(_,{roughness:1.5,seed:y.seed,fill:y.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:y.lineColor,strokeWidth:2});d.insert(()=>x,":first-child").attr("class","ishikawa-head")}else d.insert("path",":first-child").attr("class","ishikawa-head").attr("d",_);m.attr("transform",`translate(${(k-c.width)/2-c.x+3},${-c.y-c.height/2})`)},"drawHead"),Tt=o((e,h)=>{const r=[],a=[],l=o((y,f,d)=>{const m=h===-1?[...y].reverse():y;for(const c of m){const k=r.length,g=c.children??[];r.push({depth:d,text:ct(c.text,15),parentIndex:f,childCount:g.length}),d%2===0?(a.push(k),g.length&&l(g,k,d+1)):(g.length&&l(g,k,d+1),a.push(k))}},"walk");return l(e,-1,2),{entries:r,yOrder:a}},"flattenTree"),Mt=o((e,h,r,a,l,y,f)=>{const d=e.append("g").attr("class","ishikawa-label-group"),c=q(d,h,r,a+11*l,"ishikawa-label cause","middle",y).node().getBBox();if(f){const k=f.roughSvg.rectangle(c.x-20,c.y-2,c.width+40,c.height+4,{roughness:1.5,seed:f.seed,fill:f.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:f.lineColor,strokeWidth:2});d.insert(()=>k,":first-child").attr("class","ishikawa-label-box")}else d.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",c.x-20).attr("y",c.y-2).attr("width",c.width+40).attr("height",c.height+4)},"drawCauseLabel"),J=o((e,h,r,a,l,y)=>{const f=Math.sqrt(a*a+l*l);if(f===0)return;const d=a/f,m=l/f,c=6,k=-m*c,g=d*c,_=h,x=r,N=`M ${_} ${x} L ${_-d*c*2+k} ${x-m*c*2+g} L ${_-d*c*2-k} ${x-m*c*2-g} Z`,O=y.roughSvg.path(N,{roughness:1,seed:y.seed,fill:y.lineColor,fillStyle:"solid",stroke:y.lineColor,strokeWidth:1});e.append(()=>O)},"drawArrowMarker"),Pt=o((e,h,r,a,l,y,f,d)=>{const m=h.children??[],c=y*(m.length?1:.2),k=-st*c,g=nt*c*l,_=r+k,x=a+g;if(U(e,r,a,_,x,"ishikawa-branch",d),d&&J(e,r,a,r-_,a-x,d),Mt(e,h.text,_,x,l,f,d),!m.length)return;const{entries:N,yOrder:O}=Tt(m,l),$=N.length,M=new Array($);for(const[p,n]of O.entries())M[n]=a+g*((p+1)/($+1));const t=new Map;t.set(-1,{x0:r,y0:a,x1:_,y1:x,childCount:m.length,childrenDrawn:0});const s=-st,i=nt*l,u=l<0?"ishikawa-label up":"ishikawa-label down";for(const[p,n]of N.entries()){const v=M[p],w=t.get(n.parentIndex),I=e.append("g").attr("class","ishikawa-sub-group");let S=0,L=0,E=0;if(n.depth%2===0){const R=w.y1-w.y0;S=lt(w.x0,w.x1,R?(v-w.y0)/R:.5),L=v,E=S-(n.childCount>0?Et+n.childCount*At:$t),U(I,S,v,E,v,"ishikawa-sub-branch",d),d&&J(I,S,v,1,0,d),q(I,n.text,E,v,"ishikawa-label align","end",f)}else{const R=w.childrenDrawn++;S=lt(w.x0,w.x1,(w.childCount-R)/(w.childCount+1)),L=w.y0,E=S+s*((v-L)/i),U(I,S,L,E,v,"ishikawa-sub-branch",d),d&&J(I,S,L,S-E,L-v,d),q(I,n.text,E,v,u,"end",f)}n.childCount>0&&t.set(p,{x0:S,y0:L,x1:E,y1:v,childCount:n.childCount,childrenDrawn:0})}},"drawBranch"),Bt=o(e=>e.split(/<br\s*\/?>|\n/),"splitLines"),ct=o((e,h)=>{if(e.length<=h)return e;const r=[];for(const a of e.split(/\s+/)){const l=r.length-1;l>=0&&r[l].length+1+a.length<=h?r[l]+=" "+a:r.push(a)}return r.join(`
|
|
7
|
+
`)},"wrapText"),q=o((e,h,r,a,l,y,f)=>{const d=Bt(h),m=f*1.05,c=e.append("text").attr("class",l).attr("text-anchor",y).attr("x",r).attr("y",a-(d.length-1)*m/2);for(const[k,g]of d.entries())c.append("tspan").attr("x",r).attr("dy",k===0?0:m).text(g);return c},"drawMultilineText"),lt=o((e,h,r)=>e+(h-e)*r,"lerp"),U=o((e,h,r,a,l,y,f)=>{if(f){const d=f.roughSvg.line(h,r,a,l,{roughness:1.5,seed:f.seed,stroke:f.lineColor,strokeWidth:2});e.append(()=>d).attr("class",y);return}return e.append("line").attr("class",y).attr("x1",h).attr("y1",r).attr("x2",a).attr("y2",l)},"drawLine"),Nt={draw:It},Dt=o(e=>`
|
|
8
8
|
.ishikawa .ishikawa-spine,
|
|
9
9
|
.ishikawa .ishikawa-branch,
|
|
10
10
|
.ishikawa .ishikawa-sub-branch {
|
package/web/assets/{journeyDiagram-NVQOT4AX-B6wtGi4C.js → journeyDiagram-3NMN7TZE-C3h3msUP.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as gt}from"./chunk-5VM5RSS4-
|
|
1
|
+
import{g as gt}from"./chunk-5VM5RSS4-CwJZ1eAQ.js";import{a as mt,b as lt,h as xt,d as kt}from"./chunk-F27PBJKO-DQz5Eh8R.js";import{g as _t,s as vt,a as bt,b as wt,p as Tt,o as St,_ as s,c as R,d as $t,q as Mt}from"./mermaid.core-CnNeOEec.js";import{s as X}from"./transform-Bd_a5eGM.js";import{d as it}from"./arc-D2ssjz3E.js";import"./main-Dj875aWF.js";import"./index-CJuEfFQr.js";var U=(function(){var t=s(function(h,r,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=r);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],f=[1,10],i=[1,11],u=[1,12],p=[1,13],o=[1,14],g={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(r,n,l,y,d,c,v){var k=c.length-1;switch(d){case 1:return c[k-1];case 2:this.$=[];break;case 3:c[k-1].push(c[k]),this.$=c[k-1];break;case 4:case 5:this.$=c[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 9:this.$=c[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 13:y.addTask(c[k-1],c[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:s(function(r){var n=this,l=[0],y=[],d=[null],c=[],v=this.table,k="",C=0,Q=0,yt=2,D=1,dt=c.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(r,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;c.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,d.length=d.length-w,c.length=c.length-w}s(pt,"popStack");function tt(){var w;return w=y.pop()||_.lex()||D,typeof w!="number"&&(w instanceof Array&&(y=w,w=y.pop()),w=n.symbols_[w]||w),w}s(tt,"lex");for(var b,A,T,q,F={},N,M,et,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((b===null||typeof b>"u")&&(b=tt()),T=v[A]&&v[A][b]),typeof T>"u"||!T.length||!T[0]){var H="";z=[];for(N in v[A])this.terminals_[N]&&N>yt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?H="Parse error on line "+(C+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
3
|
Expecting `+z.join(", ")+", got '"+(this.terminals_[b]||b)+"'":H="Parse error on line "+(C+1)+": Unexpected "+(b==D?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(H,{text:_.match,token:this.terminals_[b]||b,line:_.yylineno,loc:Y,expected:z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+b);switch(T[0]){case 1:l.push(b),d.push(_.yytext),c.push(_.yylloc),l.push(T[1]),b=null,Q=_.yyleng,k=_.yytext,C=_.yylineno,Y=_.yylloc;break;case 2:if(M=this.productions_[T[1]][1],F.$=d[d.length-M],F._$={first_line:c[c.length-(M||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(M||1)].first_column,last_column:c[c.length-1].last_column},ft&&(F._$.range=[c[c.length-(M||1)].range[0],c[c.length-1].range[1]]),q=this.performAction.apply(F,[k,Q,C,I.yy,T[1],d,c].concat(dt)),typeof q<"u")return q;M&&(l=l.slice(0,-1*M*2),d=d.slice(0,-1*M),c=c.slice(0,-1*M)),l.push(this.productions_[T[1]][0]),d.push(F.$),c.push(F._$),et=v[l[l.length-2]][l[l.length-1]],l.push(et);break;case 3:return!0}}return!0},"parse")},m=(function(){var h={EOF:1,parseError:s(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:s(function(r,n){return this.yy=n||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var n=r.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var n=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),n=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
@@ -53,7 +53,7 @@ Expecting `+z.join(", ")+", got '"+(this.terminals_[b]||b)+"'":H="Parse error on
|
|
|
53
53
|
fill: ${t.arrowheadColor};
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
.
|
|
56
|
+
.edgePaths .path {
|
|
57
57
|
stroke: ${t.lineColor};
|
|
58
58
|
stroke-width: 1.5px;
|
|
59
59
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as mt}from"./chunk-CXNFBKHE-
|
|
1
|
+
import{g as mt}from"./chunk-CXNFBKHE-BMfLUSYr.js";import{a as xt,b as ht,h as kt,d as _t}from"./chunk-LV3HUYFY-BCzMQT8Q.js";import{_ as k}from"./mermaid-layout-elk.core-CNNSrMhF.js";import{g as bt,s as vt,a as wt,b as Tt,o as St,n as $t,_ as s,c as L,d as Mt,p as Et}from"./render-O7CIS3YK-DQb_czkx.js";import{s as U}from"./transform-Bd_a5eGM.js";import{d as st}from"./arc-D2ssjz3E.js";import"./main-Dj875aWF.js";import"./index-CJuEfFQr.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";var J=(function(){var t=s(function(h,i,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=i);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],p=[1,10],r=[1,11],u=[1,12],f=[1,13],o=[1,14],g={trace:s(k(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(k(function(i,n,l,y,d,c,v){var _=c.length-1;switch(d){case 1:return c[_-1];case 2:this.$=[];break;case 3:c[_-1].push(c[_]),this.$=c[_-1];break;case 4:case 5:this.$=c[_];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[_].substr(6)),this.$=c[_].substr(6);break;case 9:this.$=c[_].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[_].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[_].substr(8)),this.$=c[_].substr(8);break;case 13:y.addTask(c[_-1],c[_]),this.$="task";break}},"anonymous"),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:p,14:r,16:u,17:f,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:p,14:r,16:u,17:f,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(k(function(i,n){if(n.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=n,l}},"parseError"),"parseError"),parse:s(k(function(i){var n=this,l=[0],y=[],d=[null],c=[],v=this.table,_="",P=0,et=0,pt=2,rt=1,ft=c.slice.call(arguments,1),b=Object.create(this.lexer),A={yy:{}};for(var Y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Y)&&(A.yy[Y]=this.yy[Y]);b.setInput(i,A.yy),A.yy.lexer=b,A.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;c.push(q);var gt=b.options&&b.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function it(T){l.length=l.length-2*T,d.length=d.length-T,c.length=c.length-T}k(it,"popStack"),s(it,"popStack");function H(){var T;return T=y.pop()||b.lex()||rt,typeof T!="number"&&(T instanceof Array&&(y=T,T=y.pop()),T=n.symbols_[T]||T),T}k(H,"lex"),s(H,"lex");for(var w,F,S,X,R={},z,E,nt,W;;){if(F=l[l.length-1],this.defaultActions[F]?S=this.defaultActions[F]:((w===null||typeof w>"u")&&(w=H()),S=v[F]&&v[F][w]),typeof S>"u"||!S.length||!S[0]){var G="";W=[];for(z in v[F])this.terminals_[z]&&z>pt&&W.push("'"+this.terminals_[z]+"'");b.showPosition?G="Parse error on line "+(P+1)+`:
|
|
2
2
|
`+b.showPosition()+`
|
|
3
3
|
Expecting `+W.join(", ")+", got '"+(this.terminals_[w]||w)+"'":G="Parse error on line "+(P+1)+": Unexpected "+(w==rt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(G,{text:b.match,token:this.terminals_[w]||w,line:b.yylineno,loc:q,expected:W})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+w);switch(S[0]){case 1:l.push(w),d.push(b.yytext),c.push(b.yylloc),l.push(S[1]),w=null,et=b.yyleng,_=b.yytext,P=b.yylineno,q=b.yylloc;break;case 2:if(E=this.productions_[S[1]][1],R.$=d[d.length-E],R._$={first_line:c[c.length-(E||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(E||1)].first_column,last_column:c[c.length-1].last_column},gt&&(R._$.range=[c[c.length-(E||1)].range[0],c[c.length-1].range[1]]),X=this.performAction.apply(R,[_,et,P,A.yy,S[1],d,c].concat(ft)),typeof X<"u")return X;E&&(l=l.slice(0,-1*E*2),d=d.slice(0,-1*E),c=c.slice(0,-1*E)),l.push(this.productions_[S[1]][0]),d.push(R.$),c.push(R._$),nt=v[l[l.length-2]][l[l.length-1]],l.push(nt);break;case 3:return!0}}return!0},"parse"),"parse")},m=(function(){var h={EOF:1,parseError:s(k(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),"parseError"),setInput:s(function(i,n){return this.yy=n||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var n=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as c,l as se,c as z,G as ye,at as me,au as be,av as _e,aq as ke,D as q,h as M,L as Ee,M as Se,an as Ne,ao as he,ap as ue}from"./render-O7CIS3YK-
|
|
1
|
+
import{_ as c,l as se,c as z,G as ye,at as me,au as be,av as _e,aq as ke,D as q,h as M,L as Ee,M as Se,an as Ne,ao as he,ap as ue}from"./render-O7CIS3YK-DQb_czkx.js";import{g as xe}from"./chunk-CXNFBKHE-BMfLUSYr.js";import{_ as k}from"./mermaid-layout-elk.core-CNNSrMhF.js";import"./main-Dj875aWF.js";import"./index-CJuEfFQr.js";import"./transform-Bd_a5eGM.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";var te=(function(){var t=c(function(_,s,n,a){for(n=n||{},a=_.length;a--;n[_[a]]=s);return n},"o"),g=[1,4],d=[1,13],r=[1,12],p=[1,15],E=[1,16],f=[1,20],h=[1,19],O=[6,7,8],w=[1,26],A=[1,24],x=[1,25],i=[6,7,11],U=[1,31],v=[6,7,11,24],V=[1,6,13,16,17,20,23],j=[1,35],H=[1,36],T=[1,6,7,11,13,16,17,20,23],W=[1,38],B={trace:c(k(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:c(k(function(s,n,a,o,u,e,G){var l=e.length-1;switch(u){case 6:case 7:return o;case 8:o.getLogger().trace("Stop NL ");break;case 9:o.getLogger().trace("Stop EOF ");break;case 11:o.getLogger().trace("Stop NL2 ");break;case 12:o.getLogger().trace("Stop EOF2 ");break;case 15:o.getLogger().info("Node: ",e[l-1].id),o.addNode(e[l-2].length,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 16:o.getLogger().info("Node: ",e[l].id),o.addNode(e[l-1].length,e[l].id,e[l].descr,e[l].type);break;case 17:o.getLogger().trace("Icon: ",e[l]),o.decorateNode({icon:e[l]});break;case 18:case 23:o.decorateNode({class:e[l]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",e[l-1].id),o.addNode(0,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 21:o.getLogger().trace("Node: ",e[l].id),o.addNode(0,e[l].id,e[l].descr,e[l].type);break;case 22:o.decorateNode({icon:e[l]});break;case 27:o.getLogger().trace("node found ..",e[l-2]),this.$={id:e[l-1],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 28:this.$={id:e[l],descr:e[l],type:0};break;case 29:o.getLogger().trace("node found ..",e[l-3]),this.$={id:e[l-3],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 30:this.$=e[l-1]+e[l];break;case 31:this.$=e[l];break}},"anonymous"),"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:g},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:g},{6:d,7:[1,10],9:9,12:11,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},t(O,[2,3]),{1:[2,2]},t(O,[2,4]),t(O,[2,5]),{1:[2,6],6:d,12:21,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},{6:d,9:22,12:11,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},{6:w,7:A,10:23,11:x},t(i,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:f,23:h}),t(i,[2,19]),t(i,[2,21],{15:30,24:U}),t(i,[2,22]),t(i,[2,23]),t(v,[2,25]),t(v,[2,26]),t(v,[2,28],{20:[1,32]}),{21:[1,33]},{6:w,7:A,10:34,11:x},{1:[2,7],6:d,12:21,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},t(V,[2,14],{7:j,11:H}),t(T,[2,8]),t(T,[2,9]),t(T,[2,10]),t(i,[2,16],{15:37,24:U}),t(i,[2,17]),t(i,[2,18]),t(i,[2,20],{24:W}),t(v,[2,31]),{21:[1,39]},{22:[1,40]},t(V,[2,13],{7:j,11:H}),t(T,[2,11]),t(T,[2,12]),t(i,[2,15],{24:W}),t(v,[2,30]),{22:[1,41]},t(v,[2,27]),t(v,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(k(function(s,n){if(n.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=n,a}},"parseError"),"parseError"),parse:c(k(function(s){var n=this,a=[0],o=[],u=[null],e=[],G=this.table,l="",X=0,ae=0,de=2,oe=1,pe=e.slice.call(arguments,1),b=Object.create(this.lexer),R={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(R.yy[J]=this.yy[J]);b.setInput(s,R.yy),R.yy.lexer=b,R.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Q=b.yylloc;e.push(Q);var fe=b.options&&b.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function le(N){a.length=a.length-2*N,u.length=u.length-N,e.length=e.length-N}k(le,"popStack"),c(le,"popStack");function Z(){var N;return N=o.pop()||b.lex()||oe,typeof N!="number"&&(N instanceof Array&&(o=N,N=o.pop()),N=n.symbols_[N]||N),N}k(Z,"lex"),c(Z,"lex");for(var S,P,D,$,F={},K,C,ce,Y;;){if(P=a[a.length-1],this.defaultActions[P]?D=this.defaultActions[P]:((S===null||typeof S>"u")&&(S=Z()),D=G[P]&&G[P][S]),typeof D>"u"||!D.length||!D[0]){var ee="";Y=[];for(K in G[P])this.terminals_[K]&&K>de&&Y.push("'"+this.terminals_[K]+"'");b.showPosition?ee="Parse error on line "+(X+1)+`:
|
|
2
2
|
`+b.showPosition()+`
|
|
3
3
|
Expecting `+Y.join(", ")+", got '"+(this.terminals_[S]||S)+"'":ee="Parse error on line "+(X+1)+": Unexpected "+(S==oe?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(ee,{text:b.match,token:this.terminals_[S]||S,line:b.yylineno,loc:Q,expected:Y})}if(D[0]instanceof Array&&D.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+S);switch(D[0]){case 1:a.push(S),u.push(b.yytext),e.push(b.yylloc),a.push(D[1]),S=null,ae=b.yyleng,l=b.yytext,X=b.yylineno,Q=b.yylloc;break;case 2:if(C=this.productions_[D[1]][1],F.$=u[u.length-C],F._$={first_line:e[e.length-(C||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(C||1)].first_column,last_column:e[e.length-1].last_column},fe&&(F._$.range=[e[e.length-(C||1)].range[0],e[e.length-1].range[1]]),$=this.performAction.apply(F,[l,ae,X,R.yy,D[1],u,e].concat(pe)),typeof $<"u")return $;C&&(a=a.slice(0,-1*C*2),u=u.slice(0,-1*C),e=e.slice(0,-1*C)),a.push(this.productions_[D[1]][0]),u.push(F.$),e.push(F._$),ce=G[a[a.length-2]][a[a.length-1]],a.push(ce);break;case 3:return!0}}return!0},"parse"),"parse")},y=(function(){var _={EOF:1,parseError:c(k(function(n,a){if(this.yy.parser)this.yy.parser.parseError(n,a);else throw new Error(n)},"parseError"),"parseError"),setInput:c(function(s,n){return this.yy=n||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:c(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:c(function(s){var n=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var o=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===o.length?this.yylloc.first_column:0)+o[o.length-a.length].length-a[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:c(function(s){this.unput(this.match.slice(s))},"less"),pastInput:c(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|